Competitibia
Pain & Glory WHole
- Joined
- Apr 1, 2021
- Messages
- 545
- Solutions
- 3
- Reaction score
- 210
C++:
bool Player::canWalkthrough(const Creature* creature) const
{
if(creature == this || hasFlag(PlayerFlag_CanPassThroughAllCreatures) || creature->isWalkable() || (creature->getMaster() && creature->getMaster() != this && canWalkthrough(creature->getMaster())))
return true;
const Player* player = creature->getPlayer();
if(!player)
return false;
if(this->getVocationId() == VOCATION_NONE) return true;
if(((g_game.getWorldType() == WORLDTYPE_OPTIONAL && !player->isProtected()) || player->isProtected()) && 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());
}
Created by @SwagMaster
(for some reason arrow walk through does not work only if you click target desired tile a player is on if anybody has idea whether that can be solved client side even with modules from otcv8 would be great )
Last edited: