mirror of
https://github.com/mod-playerbots/mod-playerbots.git
synced 2026-01-13 09:07:19 +00:00
40 lines
879 B
C++
40 lines
879 B
C++
#include "Playerbots.h"
|
|
#include "ForgeOfSoulsTriggers.h"
|
|
#include "AiObject.h"
|
|
#include "AiObjectContext.h"
|
|
|
|
bool MoveFromBronjahmTrigger::IsActive()
|
|
{
|
|
Unit* boss = AI_VALUE2(Unit*, "find target", "bronjahm");
|
|
|
|
if (boss->FindCurrentSpellBySpellId(SPELL_CORRUPT_SOUL) && bot->HasAura(SPELL_CORRUPT_SOUL))
|
|
return true;
|
|
|
|
return false;
|
|
}
|
|
|
|
bool SwitchToSoulFragment::IsActive()
|
|
{
|
|
Unit* fragment = nullptr;
|
|
GuidVector targets = AI_VALUE(GuidVector, "possible targets no los");
|
|
|
|
for (auto& target : targets)
|
|
{
|
|
Unit* unit = botAI->GetUnit(target);
|
|
if (unit && unit->GetEntry() == NPC_CORRUPTED_SOUL_FRAGMENT)
|
|
{
|
|
if (botAI->IsDps(bot))
|
|
return true;
|
|
}
|
|
}
|
|
|
|
return false;
|
|
|
|
}
|
|
|
|
bool BronjahmPositionTrigger::IsActive()
|
|
{
|
|
|
|
return bool(AI_VALUE2(Unit*, "find target", "bronjahm"));
|
|
}
|