mirror of
https://github.com/mod-playerbots/mod-playerbots.git
synced 2026-02-07 12:41:09 +00:00
In order to make consistent with raids but also to shorten max used length directory for windows builds
32 lines
861 B
C++
32 lines
861 B
C++
#include "Playerbots.h"
|
|
#include "CullingOfStratholmeTriggers.h"
|
|
#include "AiObject.h"
|
|
#include "AiObjectContext.h"
|
|
|
|
bool ExplodeGhoulTrigger::IsActive()
|
|
{
|
|
Unit* boss = AI_VALUE2(Unit*, "find target", "salramm the fleshcrafter");
|
|
if (!boss) { return false; }
|
|
|
|
float distance = 10.0f;
|
|
float distanceExtra = 2.0f;
|
|
GuidVector corpses = AI_VALUE(GuidVector, "nearest corpses");
|
|
for (auto i = corpses.begin(); i != corpses.end(); ++i)
|
|
{
|
|
Unit* unit = botAI->GetUnit(*i);
|
|
if (unit && unit->GetEntry() == NPC_RISEN_GHOUL)
|
|
{
|
|
if (bot->GetExactDist2d(unit) < distance + distanceExtra)
|
|
{
|
|
return true;
|
|
}
|
|
}
|
|
}
|
|
return false;
|
|
}
|
|
|
|
bool EpochRangedTrigger::IsActive()
|
|
{
|
|
return !botAI->IsMelee(bot) && AI_VALUE2(Unit*, "find target", "chrono-lord epoch");
|
|
}
|