Hi
Well i have this code (made by Cykotitan) to make players walk through others in PZ.
But it has these issues:
1-Gods cant walkthrough players when they are out of PZ Zone
2-Sometimes someplayers got bugged, you cant walk through them and get the "Sorry not possible" error (i'm testing to find what is wrong)
3-Players cant walkthrough Gods when they (gods) are in pz
4-Players and Gods cant walkthrough NPCs
Using TFS 0.4 rev 3884 - 8.60
Edit1: about issue 2: seems that reloging the bugged player fix it
Well i have this code (made by Cykotitan) to make players walk through others in PZ.
Code:
bool Player::canWalkthrough(const Creature* creature) const
{
if(creature == this || hasCustomFlag(PlayerCustomFlag_CanWalkthrough) || creature->isWalkable() ||
(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;
But it has these issues:
1-Gods cant walkthrough players when they are out of PZ Zone
2-Sometimes someplayers got bugged, you cant walk through them and get the "Sorry not possible" error (i'm testing to find what is wrong)
3-Players cant walkthrough Gods when they (gods) are in pz
4-Players and Gods cant walkthrough NPCs
Using TFS 0.4 rev 3884 - 8.60
Edit1: about issue 2: seems that reloging the bugged player fix it
Last edited: