Ir para conteúdo

Featured Replies

Postado

Bom tropa to aqui mas um vez pra perdi ajuda a vocês. Bem eu tava usando tfs 0.4 e usava esse codigo de boa.

 

Spoiler



Serei breve: com esta pequena modificação, o creatureevent onTarget poderá ser executado por monstros.

Nas sources do seu servidor, abra o arquivo monster.cpp e procure por:

if(it == targetList.end())
{
    //Target not found in our target list.
#ifdef __DEBUG__
    std::cout << "Target not found in targetList." << std::endl;
#endif
    return false;
}
Abaixo deste bloco de código, coloque:
CreatureEventList targetEvents = getCreatureEvents(CREATURE_EVENT_TARGET);
for(CreatureEventList::iterator it = targetEvents.begin(); it != targetEvents.end(); ++it)
{
    if(!(*it)->executeTarget(this, creature))
        return false;
}
Depois, no código da função:
void Monster::doAttacking(uint32_t interval)
Abaixo de:
if(!attackedCreature || (isSummon() && attackedCreature == this))
    return;
coloque:
if(Creature* creature = attackedCreature->getCreature())
{
    CreatureEventList targetEvents = getCreatureEvents(CREATURE_EVENT_TARGET);
    for(CreatureEventList::iterator it = targetEvents.begin(); it != targetEvents.end(); ++it)
    {
        if(!(*it)->executeTarget(this, creature))
        {
            setFollowCreature(NULL);
            setAttackedCreature(NULL);
            searchTarget(TARGETSEARCH_NEAREST);
            break;
        }
    }
}

 

 

mas mudei de sources agr uso OTX e fui adicionar o codigo acima e aparece esse erro.

 

Spoiler

1383108627_Semttulo.thumb.png.e671e9c9e684fab9c6a5c578f98a02a2.png

 

Alguem pode min ajudar ajusta o codigo.

 

Creditos: @zipter98

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.

Estatísticas dos Fóruns

  • Tópicos 96.9k
  • Posts 520.2k

Informação Importante

Confirmação de Termo