Ir para conteúdo
  • 0

[pedido] passar por dentro de player e npc em pz


4sharedddd

Pergunta

1 resposta a esta questão

Posts Recomendados

  • 0

Se tiver as sources do seu servidor. Vá em Player.cpp e procure:

bool Player::canWalkthrough(const Creature* creature) const

Substitua todo o código por:

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() == WORLD_TYPE_NO_PVP &&
        player->getVocation()->isAttackable()) || player->getTile()->hasFlag(TILESTATE_PROTECTIONZONE) || (player->getVocation()->isAttackable() &&
        player->getLevel() < (uint32_t)g_config.getNumber(ConfigManager::PROTECTION_LEVEL))) && player->getTile()->ground) &&
        (!player->hasCustomFlag(PlayerCustomFlag_GamemasterPrivileges)
        || player->getAccess() <= getAccess()))
        return true;
 
    return (player->isGhost() && getGhostAccess() < player->getGhostAccess())
        || (isGhost() && getGhostAccess() > player->getGhostAccess());
}

Depois em const.h procure:

PlayerCustomFlag_CanWearAllAddons, //2^23 = 8388608

Embaixo coloque:

PlayerCustomFlag_IsWalkable,                //2^24 = 16777216
    PlayerCustomFlag_CanWalkthrough,            //2^25 = 33554433

Link do tópico com o código:

http://www.xtibia.com/forum/topic/235927-tfs-036-playercanwalkthrough/

Link para o comentário
Compartilhar em outros sites

×
×
  • Criar Novo...