Hi,
Can someone give me good C++ (player.cpp) code to walkthrough other players in depo??
i found this but this dont work.. tfs 0.3.6pl1 8.54
Can someone give me good C++ (player.cpp) code to walkthrough other players in depo??
i found this but this dont work.. tfs 0.3.6pl1 8.54
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;