Ir para conteúdo

Featured Replies

Postado

Preciso de ajuda.

 

Não sei exatamente o que aconteceu, antes o meu War System funcionava normalmente (os players não fragavam ao matar jogadores da guilda inimiga).

 

Fui testar hoje, e ao começar a atacar um jogador da guild inimiga (com a guerra ativa), eu peguei Skull. Ao matar, peguei frag.

 

Se matar 5x, pego red.

 

Alguém sabe por favor me dizer onde é definido essa função pra que quando se está em war não frague ao atacar/matar jogadores da guilda inimiga?

 

E também a correção, se possível.

 

Agradeço muito.

 

PS: Descobri o erro, mas não a solução... Testei uma source antiga e confirmei 100% que o problema é na source, pois com a antiga está ok o sistema...

Acredito que o problema seja no player.cpp, nessa função "isInWar" (ela sempre retorna false, mesmo que os times estejam em war):

 

Spoiler

if (!Combat::isInPvpZone(this, targetPlayer) && !isInWar(targetPlayer)) {
                addAttacked(targetPlayer);

                if (targetPlayer->getSkull() == SKULL_NONE && getSkull() == SKULL_NONE && !targetPlayer->hasKilled(this)) {
                    setSkull(SKULL_WHITE);
                }

                if (getSkull() == SKULL_NONE) {
                    targetPlayer->sendCreatureSkull(this);
                }
            }

 

Spoiler

} else if (targetPlayer->getSkull() == SKULL_NONE && !isInWar(targetPlayer)) {
                    unjustified = true;
                    addUnjustifiedDead(targetPlayer);
                }

                if (lastHit && hasCondition(CONDITION_INFIGHT)) {
                    pzLocked = true;
                    Condition* condition = Condition::createCondition(CONDITIONID_DEFAULT, CONDITION_INFIGHT, g_config.getNumber(ConfigManager::WHITE_SKULL_TIME), 0);
                    addCondition(condition);
                }

 

Spoiler

if (isInWar(player)) {
            return SKULL_GREEN;
        }

 

Spoiler

bool Player::isInWar(const Player* player) const
{
    if (!player || !guild) {
        return false;
    }

    const Guild* playerGuild = player->getGuild();
    if (!playerGuild) {
        return false;
    }

    return isInWarList(playerGuild->getId()) && player->isInWarList(guild->getId());
}

 

Editado por MatCollier (veja o histórico de edições)

Participe da conversa

Você pode postar agora e se cadastrar mais tarde. Se você tem uma conta, faça o login para postar com sua conta.

Visitante
Responder

Quem Está Navegando 0

  • Nenhum usuário registrado visualizando esta página.

Conteúdo Similar

Estatísticas dos Fóruns

  • Tópicos 96.9k
  • Posts 520.1k

Informação Importante

Confirmação de Termo