diff --git a/src/strategy/raids/naxxramas/RaidNaxxActions.cpp b/src/strategy/raids/naxxramas/RaidNaxxActions.cpp index a1019d9bd..021bedb93 100644 --- a/src/strategy/raids/naxxramas/RaidNaxxActions.cpp +++ b/src/strategy/raids/naxxramas/RaidNaxxActions.cpp @@ -834,17 +834,14 @@ bool AnubrekhanPositionAction::Execute(Event event) { return false; } - EventMap* eventMap = &boss_ai->events; - uint32 locust = eventMap->GetNextEventTime(2); - uint32 timer = eventMap->GetTimer(); bool inPhase = botAI->HasAura("locust swarm", boss) || boss->GetCurrentSpell(CURRENT_GENERIC_SPELL); - if (inPhase || (locust && locust - timer <= 8000)) + if (inPhase) { if (botAI->IsMainTank(bot)) { uint32 nearest = FindNearestWaypoint(); uint32 next_point; - if (inPhase || (locust && locust - timer <= 3000)) + if (inPhase) { next_point = (nearest + 1) % intervals; } diff --git a/src/strategy/raids/naxxramas/RaidNaxxTriggers.cpp b/src/strategy/raids/naxxramas/RaidNaxxTriggers.cpp index 0ce93564e..f4575141e 100644 --- a/src/strategy/raids/naxxramas/RaidNaxxTriggers.cpp +++ b/src/strategy/raids/naxxramas/RaidNaxxTriggers.cpp @@ -50,26 +50,6 @@ bool BossEventTrigger::IsActive() return false; } -template -bool BossPhaseTrigger::IsActive() -{ - Unit* boss = AI_VALUE2(Unit*, "find target", boss_name); - if (!boss) - { - return false; - } - if (this->phase_mask == 0) - { - return true; - } - T* boss_ai = dynamic_cast(boss->GetAI()); - EventMap* eventMap = &boss_ai->events; - uint8 phase_mask = eventMap->GetPhaseMask(); - // bot->Yell("phase mask detected: " + to_string(phase_mask) + " compare with " + to_string(this->phase_mask), - // LANG_UNIVERSAL); - return phase_mask == this->phase_mask; -} - bool GrobbulusCloudTrigger::IsActive() { Unit* boss = AI_VALUE(Unit*, "boss target"); @@ -162,21 +142,6 @@ bool SapphironFlightTrigger::IsActive() return helper.IsPhaseFlight(); } -// bool SapphironGroundExceptMainTankTrigger::IsActive() -// { -// return BossPhaseTrigger::IsActive() && !botAI->IsMainTank(bot); -// } - -// bool SapphironFlightTrigger::IsActive() -// { -// return BossPhaseTrigger::IsActive(); -// } - -// bool SapphironGroundChillTrigger::IsActive() -// { -// return BossPhaseTrigger::IsActive() && !botAI->IsMainTank(bot) && botAI->HasAura("chill", bot); -// } - bool GluthTrigger::IsActive() { return helper.UpdateBossAI(); } bool GluthMainTankMortalWoundTrigger::IsActive() @@ -204,6 +169,15 @@ bool GluthMainTankMortalWoundTrigger::IsActive() bool KelthuzadTrigger::IsActive() { return helper.UpdateBossAI(); } +bool AnubrekhanTrigger::IsActive() { + Unit* boss = AI_VALUE2(Unit*, "find target", "anub'rekhan"); + if (!boss) + { + return false; + } + return true; +} + bool LoathebTrigger::IsActive() { return helper.UpdateBossAI(); } bool ThaddiusPhasePetTrigger::IsActive() @@ -234,4 +208,3 @@ bool ThaddiusPhaseThaddiusTrigger::IsActive() } template bool BossEventTrigger::IsActive(); -template bool BossPhaseTrigger::IsActive(); \ No newline at end of file diff --git a/src/strategy/raids/naxxramas/RaidNaxxTriggers.h b/src/strategy/raids/naxxramas/RaidNaxxTriggers.h index 3ad498a31..ec10c5ded 100644 --- a/src/strategy/raids/naxxramas/RaidNaxxTriggers.h +++ b/src/strategy/raids/naxxramas/RaidNaxxTriggers.h @@ -49,23 +49,6 @@ class BossEventTrigger : public Trigger uint32 boss_entry, event_id, last_event_time; }; -template -class BossPhaseTrigger : public Trigger -{ -public: - BossPhaseTrigger(PlayerbotAI* ai, std::string boss_name, uint32 phase_mask, std::string name = "boss event") - : Trigger(ai, name, 1) - { - this->boss_name = boss_name; - this->phase_mask = phase_mask; - } - virtual bool IsActive(); - -protected: - std::string boss_name; - uint32 phase_mask; -}; - class GrobbulusCloudTrigger : public BossEventTrigger { public: @@ -117,10 +100,11 @@ class KelthuzadTrigger : public Trigger KelthuzadBossHelper helper; }; -class AnubrekhanTrigger : public BossPhaseTrigger +class AnubrekhanTrigger : public Trigger { public: - AnubrekhanTrigger(PlayerbotAI* ai) : BossPhaseTrigger(ai, "anub'rekhan", 0, "anub'rekhan trigger") {} + AnubrekhanTrigger(PlayerbotAI* ai) : Trigger(ai, "anub'rekhan") {} + bool IsActive() override; }; class ThaddiusPhasePetTrigger : public Trigger @@ -194,12 +178,6 @@ class SapphironGroundTrigger : public Trigger SapphironBossHelper helper; }; -// class SapphironGroundExceptMainTankTrigger : public BossPhaseTrigger -// { -// public: -// SapphironGroundExceptMainTankTrigger(PlayerbotAI* ai) : BossPhaseTrigger(ai, "sapphiron", (1 << (2 - 1)), -// "sapphiron ground except main tank") {} virtual bool IsActive(); -// }; class SapphironFlightTrigger : public Trigger { @@ -211,20 +189,6 @@ class SapphironFlightTrigger : public Trigger SapphironBossHelper helper; }; -// class SapphironGroundChillTrigger : public BossPhaseTrigger -// { -// public: -// SapphironGroundChillTrigger(PlayerbotAI* ai) : BossPhaseTrigger(ai, "sapphiron", 0, "sapphiron chill") {} -// virtual bool IsActive(); -// }; - -// class KelthuzadPhaseTwoTrigger : public BossPhaseTrigger -// { -// public: -// KelthuzadPhaseTwoTrigger(PlayerbotAI* ai) : BossPhaseTrigger(ai, "kel'thuzad", 1 << (2 - 1), "kel'thuzad -// trigger") {} -// }; - class GluthTrigger : public Trigger { public: @@ -257,5 +221,4 @@ class LoathebTrigger : public Trigger LoathebBossHelper helper; }; -// template BossEventTrigger; #endif \ No newline at end of file