mirror of
https://github.com/mod-playerbots/mod-playerbots.git
synced 2026-02-18 01:24:35 +00:00
[HOT FIX] MS build issues regarding folder / command lenght usage or rc.exe (#2038)
This commit is contained in:
107
src/Ai/Dungeon/Nexus/Trigger/NexusTriggers.cpp
Normal file
107
src/Ai/Dungeon/Nexus/Trigger/NexusTriggers.cpp
Normal file
@@ -0,0 +1,107 @@
|
||||
#include "Playerbots.h"
|
||||
#include "NexusTriggers.h"
|
||||
#include "AiObject.h"
|
||||
#include "AiObjectContext.h"
|
||||
|
||||
bool FactionCommanderWhirlwindTrigger::IsActive()
|
||||
{
|
||||
Unit* boss = nullptr;
|
||||
uint8 faction = bot->GetTeamId();
|
||||
|
||||
switch (bot->GetMap()->GetDifficulty())
|
||||
{
|
||||
case DUNGEON_DIFFICULTY_NORMAL:
|
||||
if (faction == TEAM_ALLIANCE)
|
||||
{
|
||||
boss = AI_VALUE2(Unit*, "find target", "horde commander");
|
||||
}
|
||||
else //if (faction == TEAM_HORDE)
|
||||
{
|
||||
boss = AI_VALUE2(Unit*, "find target", "alliance commander");
|
||||
}
|
||||
break;
|
||||
case DUNGEON_DIFFICULTY_HEROIC:
|
||||
if (faction == TEAM_ALLIANCE)
|
||||
{
|
||||
boss = AI_VALUE2(Unit*, "find target", "commander kolurg");
|
||||
}
|
||||
else //if (faction == TEAM_HORDE)
|
||||
{
|
||||
boss = AI_VALUE2(Unit*, "find target", "commander stoutbeard");
|
||||
}
|
||||
break;
|
||||
default:
|
||||
break;
|
||||
}
|
||||
|
||||
if (boss && boss->HasUnitState(UNIT_STATE_CASTING))
|
||||
{
|
||||
if (boss->FindCurrentSpellBySpellId(SPELL_WHIRLWIND))
|
||||
{
|
||||
return true;
|
||||
}
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
bool TelestraFirebombTrigger::IsActive()
|
||||
{
|
||||
if (botAI->IsMelee(bot)) { return false; }
|
||||
|
||||
Unit* boss = AI_VALUE2(Unit*, "find target", "grand magus telestra");
|
||||
// Avoid split phase with the fake Telestra units, only match the true boss id
|
||||
return boss && boss->GetEntry() == NPC_TELESTRA;
|
||||
}
|
||||
|
||||
bool TelestraSplitPhaseTrigger::IsActive()
|
||||
{
|
||||
Unit* boss = AI_VALUE2(Unit*, "find target", "grand magus telestra");
|
||||
// Only match split phase with the fake Telestra units
|
||||
return boss && boss->GetEntry() != NPC_TELESTRA;
|
||||
}
|
||||
|
||||
bool ChaoticRiftTrigger::IsActive()
|
||||
{
|
||||
Unit* boss = AI_VALUE2(Unit*, "find target", "anomalus");
|
||||
return boss && boss->HasAura(BUFF_RIFT_SHIELD);
|
||||
}
|
||||
|
||||
bool OrmorokSpikesTrigger::IsActive()
|
||||
{
|
||||
Unit* boss = AI_VALUE2(Unit*, "find target", "ormorok the tree-shaper");
|
||||
if (!boss || !botAI->IsTank(bot)) { return false; }
|
||||
|
||||
GuidVector objects = AI_VALUE(GuidVector, "closest game objects");
|
||||
for (auto i = objects.begin(); i != objects.end(); ++i)
|
||||
{
|
||||
GameObject* go = botAI->GetGameObject(*i);
|
||||
if (go && go->GetEntry() == GO_CRYSTAL_SPIKE)
|
||||
{
|
||||
return true;
|
||||
}
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
bool OrmorokStackTrigger::IsActive()
|
||||
{
|
||||
Unit* boss = AI_VALUE2(Unit*, "find target", "ormorok the tree-shaper");
|
||||
return (boss && !botAI->IsTank(bot));
|
||||
}
|
||||
|
||||
bool IntenseColdTrigger::IsActive()
|
||||
{
|
||||
// Adjust as needed - too much interrupting loses dps time,
|
||||
// but too many stacks is deadly. Assuming 3-5 is a good number to clear
|
||||
int stackThreshold = 5;
|
||||
Unit* boss = AI_VALUE2(Unit*, "find target", "keristrasza");
|
||||
return boss && botAI->GetAura("intense cold", bot, false, false, stackThreshold);
|
||||
}
|
||||
|
||||
bool KeristraszaPositioningTrigger::IsActive()
|
||||
{
|
||||
Unit* boss = AI_VALUE2(Unit*, "find target", "keristrasza");
|
||||
// Include healers here for now, otherwise they stand in things
|
||||
return boss && !botAI->IsTank(bot) && !botAI->IsRangedDps(bot);
|
||||
// return boss && botAI->IsMelee(bot) && !botAI->IsTank(bot);
|
||||
}
|
||||
89
src/Ai/Dungeon/Nexus/Trigger/NexusTriggers.h
Normal file
89
src/Ai/Dungeon/Nexus/Trigger/NexusTriggers.h
Normal file
@@ -0,0 +1,89 @@
|
||||
#ifndef _PLAYERBOT_WOTLKDUNGEONNEXTRIGGERS_H
|
||||
#define _PLAYERBOT_WOTLKDUNGEONNEXTRIGGERS_H
|
||||
|
||||
#include "Trigger.h"
|
||||
#include "PlayerbotAIConfig.h"
|
||||
#include "GenericTriggers.h"
|
||||
#include "DungeonStrategyUtils.h"
|
||||
|
||||
enum NexusIDs
|
||||
{
|
||||
// Faction Commander
|
||||
NPC_ALLIANCE_COMMANDER = 27949,
|
||||
NPC_HORDE_COMMANDER = 27947,
|
||||
NPC_COMMANDER_STOUTBEARD = 26796,
|
||||
NPC_COMMANDER_KOLURG = 26798,
|
||||
// SPELL_FRIGHTENING_SHOUT = 19134,
|
||||
SPELL_WHIRLWIND = 38618,
|
||||
|
||||
// Grand Magus Telestra
|
||||
NPC_TELESTRA = 26731,
|
||||
NPC_FIRE_MAGUS = 26928,
|
||||
NPC_FROST_MAGUS = 26930,
|
||||
NPC_ARCANE_MAGUS = 26929,
|
||||
|
||||
// Anomalus
|
||||
BUFF_RIFT_SHIELD = 47748,
|
||||
|
||||
// Ormorok the Tree Shaper
|
||||
// NPC_CRYSTAL_SPIKE = 27099,
|
||||
GO_CRYSTAL_SPIKE = 188537,
|
||||
};
|
||||
|
||||
class FactionCommanderWhirlwindTrigger : public Trigger
|
||||
{
|
||||
public:
|
||||
FactionCommanderWhirlwindTrigger(PlayerbotAI* ai) : Trigger(ai, "faction commander whirlwind") {}
|
||||
bool IsActive() override;
|
||||
};
|
||||
|
||||
class TelestraFirebombTrigger : public Trigger
|
||||
{
|
||||
public:
|
||||
TelestraFirebombTrigger(PlayerbotAI* ai) : Trigger(ai, "telestra firebomb spread") {}
|
||||
bool IsActive() override;
|
||||
};
|
||||
|
||||
class TelestraSplitPhaseTrigger : public Trigger
|
||||
{
|
||||
public:
|
||||
TelestraSplitPhaseTrigger(PlayerbotAI* ai) : Trigger(ai, "telestra split phase") {}
|
||||
bool IsActive() override;
|
||||
};
|
||||
|
||||
class ChaoticRiftTrigger : public Trigger
|
||||
{
|
||||
public:
|
||||
ChaoticRiftTrigger(PlayerbotAI* ai) : Trigger(ai, "chaotic rift") {}
|
||||
bool IsActive() override;
|
||||
};
|
||||
|
||||
class OrmorokSpikesTrigger : public Trigger
|
||||
{
|
||||
public:
|
||||
OrmorokSpikesTrigger(PlayerbotAI* ai) : Trigger(ai, "ormorok spikes") {}
|
||||
bool IsActive() override;
|
||||
};
|
||||
|
||||
class OrmorokStackTrigger : public Trigger
|
||||
{
|
||||
public:
|
||||
OrmorokStackTrigger(PlayerbotAI* ai) : Trigger(ai, "ormorok stack") {}
|
||||
bool IsActive() override;
|
||||
};
|
||||
|
||||
class IntenseColdTrigger : public Trigger
|
||||
{
|
||||
public:
|
||||
IntenseColdTrigger(PlayerbotAI* ai) : Trigger(ai, "intense cold") {}
|
||||
bool IsActive() override;
|
||||
};
|
||||
|
||||
class KeristraszaPositioningTrigger : public Trigger
|
||||
{
|
||||
public:
|
||||
KeristraszaPositioningTrigger(PlayerbotAI* ai) : Trigger(ai, "keristrasza positioning") {}
|
||||
bool IsActive() override;
|
||||
};
|
||||
|
||||
#endif
|
||||
Reference in New Issue
Block a user