[TFS 1.2] Go through players on specific tile

Joined
Oct 6, 2017
Messages
516
Best answers
2
Likes
17
#1
Hi
i think its source related so how to make if player is on tile (11111) can go trough all players. Cant find any related shit with this type of stuff.
 
Last edited:
Joined
Oct 6, 2017
Messages
516
Best answers
2
Likes
17
#3
As i understand this script blocks tiles but makes another tiles that are not include go through players. So if i add
C++:
[LIST=1]
[*]bool Player::canWalkthrough(const Creature* creature) const
[*]{
[*]    std::vector<int> blocked_tiles = {10552, 3215, 3217, 447, 425, 417};
[*]    if(creature == this || creature->isWalkable() ||
[*]        (creature->getMaster() && creature->getMaster() != this && canWalkthrough(creature->getMaster())))
[*]        return true;
[*]    const Player* player = creature->getPlayer();
[*]    if(!player)
[*]        return false;
[*]    if(
[*]        (
[*]            (
[*]                (
[*]                    (
[*]                        player->getVocation()->isAttackable() &&
[*]                        player->getLevel() < (uint32_t)g_config.getNumber(ConfigManager::PROTECTION_LEVEL)
[*]                    )
[*]                    || (
[*]                        player->getTile()->hasFlag(TILESTATE_PROTECTIONZONE) &&
[*]                        !player->getTile()->hasFlag(TILESTATE_HOUSE)
[*]                    )
[*]                )
[*]            ) && player->getTile()->ground && std::find(blocked_tiles.begin(), blocked_tiles.end(), player->getTile()->ground->getID()) != blocked_tiles.end()
[*]        ) && (
[*]            !player->hasCustomFlag(PlayerCustomFlag_GamemasterPrivileges)
[*]            || player->getAccess() <= getAccess()
[*]        )
[*]    ) return true;
[*]    return (player->isGhost() && getGhostAccess() < player->getGhostAccess())
[*]        || (isGhost() && getGhostAccess() > player->getGhostAccess());
[*]}
[/LIST]
If i dont add all my tiles into this script that i dont want it to be walkable they will be able to walk trough so if i use like 100+ tiles in my server it will be a lot of work to add them all to prevent from walk through.
 
Top