mirror of
https://github.com/mod-playerbots/mod-playerbots.git
synced 2026-02-22 11:34:36 +00:00
Removed the expansion folder from dungeons (#2027)
In order to make consistent with raids but also to shorten max used length directory for windows builds
This commit is contained in:
@@ -0,0 +1,31 @@
|
||||
#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");
|
||||
}
|
||||
Reference in New Issue
Block a user