secondlife
Member
- Joined
- Aug 1, 2009
- Messages
- 298
- Reaction score
- 23
Hi guys!!
I was trying to make in the sources (0.4) a system that could allow players with a vocation >8 to pass through players with a vocation <=8.
However, without success.
This is my part of the sources that checks this:
Can someone with more experience try to help me?
Is there any way to do this through the sources? Or even with .lua, maybe.
Many thanks!
I was trying to make in the sources (0.4) a system that could allow players with a vocation >8 to pass through players with a vocation <=8.
However, without success.
This is my part of the sources that checks this:
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 && !player->isEnemy(this, true) &&
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());
}
Can someone with more experience try to help me?
Is there any way to do this through the sources? Or even with .lua, maybe.
Many thanks!