Pawelwroclaw
New Member
- Joined
- Aug 22, 2014
- Messages
- 34
- Reaction score
- 0
Hi,
I have an irritating problem, because when anyone is in PZ, they can go throught themselves, which can cause in walking on someone else, who is in DP. I've heard that you can change it on player.ccp in source, but I have no acces to it (on forums people say I would). I've also heard that you can change that in this script, but I have a different one thanks a lot for your help
I have an irritating problem, because when anyone is in PZ, they can go throught themselves, which can cause in walking on someone else, who is in DP. I've heard that you can change it on player.ccp in source, but I have no acces to it (on forums people say I would). I've also heard that you can change that in this script, but I have a different one thanks a lot for your help
Code:
bool Player::canWalkthrough(const Creature* creature) const
{
if(creature == this || hasFlag(PlayerFlag_CanPassThroughAllCreatures) || creature->isWalkable() ||
std::find(forceWalkthrough.begin(), forceWalkthrough.end(), creature->getID()) != forceWalkthrough.end()
|| (creature->getMaster() && creature->getMaster() != this && canWalkthrough(creature->getMaster())))
return true;
const Player* player = creature->getPlayer();
if(!player)
return false;
if((((g_game.getWorldType() == WORLDTYPE_OPTIONAL &&
#ifdef __WAR_SYSTEM__
!player->isEnemy(this, true) &&
#endif
player->getVocation()->isAttackable()) || player->getTile()->hasFlag(TILESTATE_PROTECTIONZONE) || (player->getVocation()->isAttackable()
&& player->getLevel() < (uint32_t)g_config.getNumber(ConfigManager::PROTECTION_LEVEL))) && player->getTile()->ground &&
Item::items[player->getTile()->ground->getID()].walkStack) && (!player->hasCustomFlag(PlayerCustomFlag_GamemasterPrivileges)
|| player->getAccess() <= getAccess()))
return true;
return (player->isGhost() && getGhostAccess() < player->getGhostAccess())
|| (isGhost() && getGhostAccess() > player->getGhostAccess());
}