date: 2024-11-06

This commit is contained in:
chris
2024-11-06 17:29:59 +08:00
parent f6cf3e728f
commit 2b358bc7b7
16 changed files with 83 additions and 89 deletions

View File

@@ -0,0 +1,44 @@
#include "ForgeOfSoulsTriggers.h"
#include "Playerbots.h"
#include "AiObject.h"
#include "AiObjectContext.h"
bool MoveFromBronjahmTrigger::IsActive()
{
Unit* boss = AI_VALUE2(Unit*, "find target", "bronjahm");
if (boss && boss->HasUnitState(UNIT_STATE_CASTING))
{
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()
{
Unit* boss = AI_VALUE2(Unit*, "find target", "bronjahm");
if (boss)
return true;
return false;
}