Postado Julho 4, 2021 4 anos 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 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.