Naxx loatheb strategy

This commit is contained in:
Yunfan Li
2024-02-08 14:51:07 +08:00
parent 74830ea137
commit 479908e778
10 changed files with 175 additions and 172 deletions

View File

@@ -31,10 +31,8 @@ class RaidNaxxActionContext : public NamedObjectContext<Action>
// creators["horseman attract alternatively"] = &RaidNaxxActionContext::horseman_attract_alternatively; // creators["horseman attract alternatively"] = &RaidNaxxActionContext::horseman_attract_alternatively;
// creators["horseman attack in order"] = &RaidNaxxActionContext::horseman_attack_in_order; // creators["horseman attack in order"] = &RaidNaxxActionContext::horseman_attack_in_order;
// creators["sapphiron ground main tank position"] = &RaidNaxxActionContext::sapphiron_ground_main_tank_position;
creators["sapphiron ground position"] = &RaidNaxxActionContext::sapphiron_ground_position; creators["sapphiron ground position"] = &RaidNaxxActionContext::sapphiron_ground_position;
creators["sapphiron flight position"] = &RaidNaxxActionContext::sapphiron_flight_position; creators["sapphiron flight position"] = &RaidNaxxActionContext::sapphiron_flight_position;
// creators["sapphiron avoid chill"] = &RaidNaxxActionContext::sapphiron_avoid_chill;
creators["kel'thuzad choose target"] = &RaidNaxxActionContext::kelthuzad_choose_target; creators["kel'thuzad choose target"] = &RaidNaxxActionContext::kelthuzad_choose_target;
creators["kel'thuzad position"] = &RaidNaxxActionContext::kelthuzad_position; creators["kel'thuzad position"] = &RaidNaxxActionContext::kelthuzad_position;
@@ -46,8 +44,8 @@ class RaidNaxxActionContext : public NamedObjectContext<Action>
creators["gluth position"] = &RaidNaxxActionContext::gluth_position; creators["gluth position"] = &RaidNaxxActionContext::gluth_position;
creators["gluth slowdown"] = &RaidNaxxActionContext::gluth_slowdown; creators["gluth slowdown"] = &RaidNaxxActionContext::gluth_slowdown;
// creators["loatheb position"] = &RaidNaxxActionContext::loatheb_position; creators["loatheb position"] = &RaidNaxxActionContext::loatheb_position;
// creators["loatheb choose target"] = &RaidNaxxActionContext::loatheb_choose_target; creators["loatheb choose target"] = &RaidNaxxActionContext::loatheb_choose_target;
} }
private: private:
static Action* go_behind_the_boss(PlayerbotAI* ai) { return new GrobbulusGoBehindAction(ai); } static Action* go_behind_the_boss(PlayerbotAI* ai) { return new GrobbulusGoBehindAction(ai); }
@@ -75,8 +73,8 @@ class RaidNaxxActionContext : public NamedObjectContext<Action>
static Action* gluth_choose_target(PlayerbotAI* ai) { return new GluthChooseTargetAction(ai); } static Action* gluth_choose_target(PlayerbotAI* ai) { return new GluthChooseTargetAction(ai); }
static Action* gluth_position(PlayerbotAI* ai) { return new GluthPositionAction(ai); } static Action* gluth_position(PlayerbotAI* ai) { return new GluthPositionAction(ai); }
static Action* gluth_slowdown(PlayerbotAI* ai) { return new GluthSlowdownAction(ai); } static Action* gluth_slowdown(PlayerbotAI* ai) { return new GluthSlowdownAction(ai); }
// static Action* loatheb_position(PlayerbotAI* ai) { return new LoathebPositionAction(ai); } static Action* loatheb_position(PlayerbotAI* ai) { return new LoathebPositionAction(ai); }
// static Action* loatheb_choose_target(PlayerbotAI* ai) { return new LoathebChooseTargetAction(ai); } static Action* loatheb_choose_target(PlayerbotAI* ai) { return new LoathebChooseTargetAction(ai); }
}; };
#endif #endif

View File

@@ -991,56 +991,52 @@ bool GluthSlowdownAction::Execute(Event event)
return false; return false;
} }
// bool LoathebPositionAction::Execute(Event event) bool LoathebPositionAction::Execute(Event event)
// { {
// Unit* boss = AI_VALUE2(Unit*, "find target", "loatheb"); if (!helper.UpdateBossAI()) {
// if (!boss) { return false;
// return false; }
// } if (botAI->IsTank(bot)) {
// if (botAI->IsTank(bot)) { if (AI_VALUE2(bool, "has aggro", "boss target")) {
// if (AI_VALUE2(bool, "has aggro", "boss target")) { return MoveTo(533, helper.mainTankPos.first, helper.mainTankPos.second, bot->GetPositionZ());
// return MoveTo(533, 2877.57, -3967.00, bot->GetPositionZ()); }
// } } else if (botAI->IsRanged(bot)) {
// } else if (botAI->IsRanged(bot)) { return MoveInside(533, helper.rangePos.first, helper.rangePos.second, bot->GetPositionZ(), 1.0f);
// return MoveInside(533, 2896.96f, -3980.61f, bot->GetPositionZ(), 1.0f); }
// } return false;
// return false; }
// }
// bool LoathebChooseTargetAction::Execute(Event event) bool LoathebChooseTargetAction::Execute(Event event)
// { {
// Unit* boss = AI_VALUE2(Unit*, "find target", "loatheb"); if (!helper.UpdateBossAI()) {
// if (!boss) { return false;
// return false; }
// } GuidVector attackers = context->GetValue<GuidVector>("attackers")->Get();
// BossAI* boss_ai = dynamic_cast<BossAI*>(boss->GetAI()); Unit* target = nullptr;
// EventMap* eventMap = boss_botAI->GetEvents(); Unit *target_boss = nullptr;
// list<ObjectGuid> attackers = context->GetValue<list<ObjectGuid> >("attackers")->Get(); Unit *target_spore = nullptr;
// Unit* target = nullptr; for (auto i = attackers.begin(); i != attackers.end(); ++i)
// Unit *target_boss = nullptr; {
// Unit *target_spore = nullptr; Unit* unit = botAI->GetUnit(*i);
// for (list<ObjectGuid>::iterator i = attackers.begin(); i != attackers.end(); ++i) if (!unit)
// { continue;
// Unit* unit = botAI->GetUnit(*i); if (!unit->IsAlive()) {
// if (!unit) continue;
// continue; }
// if (!unit->IsAlive()) { if (botAI->EqualLowercaseName(unit->GetName(), "spore")) {
// continue; target_spore = unit;
// } }
// if (botAI->EqualLowercaseName(unit->GetName(), "spore")) { if (botAI->EqualLowercaseName(unit->GetName(), "loatheb")) {
// target_spore = unit; target_boss = unit;
// } }
// if (botAI->EqualLowercaseName(unit->GetName(), "loatheb")) { }
// target_boss = unit; if (target_spore && bot->GetDistance2d(target_spore) <= 1.0f) {
// } target = target_spore;
// } } else {
// if (target_spore && bot->GetDistance2d(target_spore) <= 1.0f) { target = target_boss;
// target = target_spore; }
// } else { if (!target || context->GetValue<Unit*>("current target")->Get() == target) {
// target = target_boss; return false;
// } }
// if (!target || context->GetValue<Unit*>("current target")->Get() == target) { return Attack(target);
// return false; }
// }
// return Attack(target);
// }

View File

@@ -256,19 +256,23 @@ class GluthSlowdownAction : public Action
GluthBossHelper helper; GluthBossHelper helper;
}; };
// class LoathebPositionAction : public MovementAction class LoathebPositionAction : public MovementAction
// { {
// public: public:
// LoathebPositionAction(PlayerbotAI* ai) : MovementAction(ai, "loatheb position") {} LoathebPositionAction(PlayerbotAI* ai) : MovementAction(ai, "loatheb position"), helper(ai) {}
// virtual bool Execute(Event event); virtual bool Execute(Event event);
// }; private:
LoathebBossHelper helper;
};
// class LoathebChooseTargetAction : public AttackAction class LoathebChooseTargetAction : public AttackAction
// { {
// public: public:
// LoathebChooseTargetAction(PlayerbotAI* ai) : AttackAction(ai, "loatheb choose target") {} LoathebChooseTargetAction(PlayerbotAI* ai) : AttackAction(ai, "loatheb choose target"), helper(ai) {}
// virtual bool Execute(Event event); virtual bool Execute(Event event);
// }; private:
LoathebBossHelper helper;
};
#endif #endif

View File

@@ -20,39 +20,39 @@ const uint32 NAXX_MAP_ID = 533;
template<class BossAiType> template<class BossAiType>
class GenericBossHelper : public AiObject { class GenericBossHelper : public AiObject {
public: public:
GenericBossHelper(PlayerbotAI* botAI, std::string name): AiObject(botAI), name_(name) {} GenericBossHelper(PlayerbotAI* botAI, std::string name): AiObject(botAI), _name(name) {}
virtual bool UpdateBossAI() { virtual bool UpdateBossAI() {
if(unit_ && (!unit_->IsInWorld() || !unit_->IsAlive())) { if(_unit && (!_unit->IsInWorld() || !_unit->IsAlive())) {
unit_ = nullptr; _unit = nullptr;
} }
if (!unit_) { if (!_unit) {
unit_ = AI_VALUE2(Unit*, "find target", name_); _unit = AI_VALUE2(Unit*, "find target", _name);
if (!unit_) { if (!_unit) {
return false; return false;
} }
target_ = unit_->ToCreature(); _target = _unit->ToCreature();
if (!target_) { if (!_target) {
return false; return false;
} }
ai_ = dynamic_cast<BossAiType *>(target_->GetAI()); _ai = dynamic_cast<BossAiType *>(_target->GetAI());
if (!ai_) { if (!_ai) {
return false; return false;
} }
event_map_ = &ai_->events; _event_map = &_ai->events;
if (!event_map_) { if (!_event_map) {
return false; return false;
} }
} }
timer_ = event_map_->GetTimer(); _timer = _event_map->GetTimer();
return true; return true;
} }
protected: protected:
Unit* unit_ = nullptr; Unit* _unit = nullptr;
Creature* target_ = nullptr; Creature* _target = nullptr;
std::string name_ = nullptr; std::string _name = nullptr;
BossAiType *ai_ = nullptr; BossAiType *_ai = nullptr;
EventMap* event_map_ = nullptr; EventMap* _event_map = nullptr;
uint32 timer_ = 0; uint32 _timer = 0;
}; };
class KelthuzadBossHelper: public GenericBossHelper<boss_kelthuzad::boss_kelthuzadAI> { class KelthuzadBossHelper: public GenericBossHelper<boss_kelthuzad::boss_kelthuzadAI> {
@@ -62,7 +62,7 @@ class KelthuzadBossHelper: public GenericBossHelper<boss_kelthuzad::boss_kelthuz
const std::pair<float, float> tank_pos = {3709.19f, -5104.86f}; const std::pair<float, float> tank_pos = {3709.19f, -5104.86f};
const std::pair<float, float> assist_tank_pos = {3746.05f, -5112.74f}; const std::pair<float, float> assist_tank_pos = {3746.05f, -5112.74f};
bool IsPhaseOne() { bool IsPhaseOne() {
return event_map_->GetNextEventTime(KELTHUZAD_EVENT_PHASE_2) != 0; return _event_map->GetNextEventTime(KELTHUZAD_EVENT_PHASE_2) != 0;
} }
bool IsPhaseTwo() { bool IsPhaseTwo() {
return !IsPhaseOne(); return !IsPhaseOne();
@@ -98,22 +98,22 @@ class SapphironBossHelper: public GenericBossHelper<boss_sapphiron::boss_sapphir
if (!GenericBossHelper::UpdateBossAI()) { if (!GenericBossHelper::UpdateBossAI()) {
return false; return false;
} }
uint32 nextEventGround = event_map_->GetNextEventTime(EVENT_GROUND); uint32 nextEventGround = _event_map->GetNextEventTime(EVENT_GROUND);
if (nextEventGround && nextEventGround != lastEventGround) if (nextEventGround && nextEventGround != lastEventGround)
lastEventGround = nextEventGround; lastEventGround = nextEventGround;
return true; return true;
} }
bool IsPhaseGround() { bool IsPhaseGround() {
return target_->GetReactState() == REACT_AGGRESSIVE; return _target->GetReactState() == REACT_AGGRESSIVE;
} }
bool IsPhaseFlight() { bool IsPhaseFlight() {
return !IsPhaseGround(); return !IsPhaseGround();
} }
bool JustLanded() { bool JustLanded() {
return (event_map_->GetNextEventTime(EVENT_FLIGHT_START) - timer_) >= EVENT_FLIGHT_INTERVAL - POSITION_TIME_AFTER_LANDED; return (_event_map->GetNextEventTime(EVENT_FLIGHT_START) - _timer) >= EVENT_FLIGHT_INTERVAL - POSITION_TIME_AFTER_LANDED;
} }
bool WaitForExplosion() { bool WaitForExplosion() {
return event_map_->GetNextEventTime(EVENT_FLIGHT_SPELL_EXPLOSION); return _event_map->GetNextEventTime(EVENT_FLIGHT_SPELL_EXPLOSION);
} }
bool FindPosToAvoidChill(std::vector<float> &dest) { bool FindPosToAvoidChill(std::vector<float> &dest) {
Aura* aura = botAI->GetAura("chill", bot); Aura* aura = botAI->GetAura("chill", bot);
@@ -172,12 +172,19 @@ class GluthBossHelper: public GenericBossHelper<boss_gluth::boss_gluthAI> {
const float decimatedZombiePct = 10.0f; const float decimatedZombiePct = 10.0f;
GluthBossHelper(PlayerbotAI *botAI): GenericBossHelper(botAI, "gluth") {} GluthBossHelper(PlayerbotAI *botAI): GenericBossHelper(botAI, "gluth") {}
bool BeforeDecimate() { bool BeforeDecimate() {
uint32 decimate = event_map_->GetNextEventTime(GLUTH_EVENT_DECIMATE); uint32 decimate = _event_map->GetNextEventTime(GLUTH_EVENT_DECIMATE);
return decimate && decimate - timer_ <= 3000; return decimate && decimate - _timer <= 3000;
} }
bool JustStartCombat() { bool JustStartCombat() {
return timer_ < 10000; return _timer < 10000;
} }
}; };
class LoathebBossHelper: public GenericBossHelper<boss_loatheb::boss_loathebAI> {
public:
const std::pair<float, float> mainTankPos = {2877.57f, -3967.00f};
const std::pair<float, float> rangePos = {2896.96f, -3980.61f};
LoathebBossHelper(PlayerbotAI *botAI): GenericBossHelper(botAI, "loatheb") {}
};
#endif #endif

View File

@@ -56,31 +56,29 @@ float HeiganDanceMultiplier::GetValue(Action* action)
return 0.0f; return 0.0f;
} }
// float LoathebGenericMultiplier::GetValue(Action* action) float LoathebGenericMultiplier::GetValue(Action* action)
// { {
// Unit* boss = AI_VALUE2(Unit*, "find target", "loatheb"); Unit* boss = AI_VALUE2(Unit*, "find target", "loatheb");
// if (!boss) { if (!boss) {
// // bot->Yell("Can\'t find Loatheb...", LANG_UNIVERSAL); return 1.0f;
// return 1.0f; }
// } context->GetValue<bool>("neglect threat")->Set(true);
// context->GetValue<bool>("neglect threat")->Set(true); if (botAI->GetState() == BOT_STATE_COMBAT &&
// if (botAI->GetCurrentState() == BOT_STATE_COMBAT && (dynamic_cast<DpsAssistAction*>(action) ||
// (dynamic_cast<DpsAssistAction*>(action) || dynamic_cast<TankAssistAction*>(action) ||
// dynamic_cast<TankAssistAction*>(action) || dynamic_cast<CastDebuffSpellOnAttackerAction*>(action) ||
// dynamic_cast<CastDebuffSpellOnAttackerAction*>(action) || dynamic_cast<FleeAction*>(action))) {
// dynamic_cast<FleeAction*>(action))) { return 0.0f;
// return 0.0f; }
// } if (!dynamic_cast<CastHealingSpellAction*>(action)) {
// if (!dynamic_cast<CastHealingSpellAction*>(action)) { return 1.0f;
// return 1.0f; }
// } Aura* aura = botAI->GetAura("necrotic aura", bot);
// // bot->Yell("It\'s a healing spell!", LANG_UNIVERSAL); if (!aura || aura->GetDuration() <= 1500) {
// Aura* aura = botAI->GetAura("necrotic aura", bot); return 1.0f;
// if (!aura || aura->GetDuration() <= 1500) { }
// return 1.0f; return 0.0f;
// } }
// return 0.0f;
// }
// float ThaddiusGenericMultiplier::GetValue(Action* action) // float ThaddiusGenericMultiplier::GetValue(Action* action)
// { // {

View File

@@ -14,14 +14,14 @@ public:
virtual float GetValue(Action* action); virtual float GetValue(Action* action);
}; };
// class LoathebGenericMultiplier : public Multiplier class LoathebGenericMultiplier : public Multiplier
// { {
// public: public:
// LoathebGenericMultiplier(PlayerbotAI* ai) : Multiplier(ai, "loatheb generic") {} LoathebGenericMultiplier(PlayerbotAI* ai) : Multiplier(ai, "loatheb generic") {}
// public: public:
// virtual float GetValue(Action* action); virtual float GetValue(Action* action);
// }; };
// class ThaddiusGenericMultiplier : public Multiplier // class ThaddiusGenericMultiplier : public Multiplier
// { // {

View File

@@ -6,29 +6,29 @@ void RaidNaxxStrategy::InitTriggers(std::vector<TriggerNode*> &triggers)
{ {
// triggers.push_back(new TriggerNode( // triggers.push_back(new TriggerNode(
// "often", // "often",
// NextAction::array(0, new NextAction("try to get boss ai", ACTION_RAID), NULL))); // NextAction::array(0, new NextAction("try to get boss ai", ACTION_RAID), nullptr)));
// Grobbulus // Grobbulus
triggers.push_back(new TriggerNode( triggers.push_back(new TriggerNode(
"mutating injection", "mutating injection",
NextAction::array(0, new NextAction("grobbulus go behind the boss", ACTION_RAID + 2), NULL))); NextAction::array(0, new NextAction("grobbulus go behind the boss", ACTION_RAID + 2), nullptr)));
triggers.push_back(new TriggerNode( triggers.push_back(new TriggerNode(
"mutating injection removed", "mutating injection removed",
NextAction::array(0, new NextAction("grobbulus move center", ACTION_RAID + 1), NULL))); NextAction::array(0, new NextAction("grobbulus move center", ACTION_RAID + 1), nullptr)));
triggers.push_back(new TriggerNode( triggers.push_back(new TriggerNode(
"grobbulus cloud", "grobbulus cloud",
NextAction::array(0, new NextAction("rotate grobbulus", ACTION_RAID + 1), NULL))); NextAction::array(0, new NextAction("rotate grobbulus", ACTION_RAID + 1), nullptr)));
// Heigan the Unclean // Heigan the Unclean
triggers.push_back(new TriggerNode( triggers.push_back(new TriggerNode(
"heigan melee", "heigan melee",
NextAction::array(0, new NextAction("heigan dance melee", ACTION_RAID + 1), NULL))); NextAction::array(0, new NextAction("heigan dance melee", ACTION_RAID + 1), nullptr)));
triggers.push_back(new TriggerNode( triggers.push_back(new TriggerNode(
"heigan ranged", "heigan ranged",
NextAction::array(0, new NextAction("heigan dance ranged", ACTION_RAID + 1), NULL))); NextAction::array(0, new NextAction("heigan dance ranged", ACTION_RAID + 1), nullptr)));
// Kel'Thuzad // Kel'Thuzad
triggers.push_back(new TriggerNode( triggers.push_back(new TriggerNode(
@@ -36,7 +36,7 @@ void RaidNaxxStrategy::InitTriggers(std::vector<TriggerNode*> &triggers)
NextAction::array(0, NextAction::array(0,
new NextAction("kel'thuzad position", ACTION_RAID + 2), new NextAction("kel'thuzad position", ACTION_RAID + 2),
new NextAction("kel'thuzad choose target", ACTION_RAID + 1), new NextAction("kel'thuzad choose target", ACTION_RAID + 1),
NULL))); nullptr)));
// Anub'Rekhan // Anub'Rekhan
triggers.push_back(new TriggerNode( triggers.push_back(new TriggerNode(
@@ -44,7 +44,7 @@ void RaidNaxxStrategy::InitTriggers(std::vector<TriggerNode*> &triggers)
NextAction::array(0, NextAction::array(0,
// new NextAction("anub'rekhan choose target", ACTION_RAID + 1), // new NextAction("anub'rekhan choose target", ACTION_RAID + 1),
new NextAction("anub'rekhan position", ACTION_RAID + 1), new NextAction("anub'rekhan position", ACTION_RAID + 1),
NULL))); nullptr)));
// Thaddius // Thaddius
// triggers.push_back(new TriggerNode( // triggers.push_back(new TriggerNode(
@@ -53,50 +53,46 @@ void RaidNaxxStrategy::InitTriggers(std::vector<TriggerNode*> &triggers)
// new NextAction("thaddius attack nearest pet", ACTION_RAID + 1), // new NextAction("thaddius attack nearest pet", ACTION_RAID + 1),
// new NextAction("thaddius melee to place", ACTION_RAID), // new NextAction("thaddius melee to place", ACTION_RAID),
// new NextAction("thaddius ranged to place", ACTION_RAID), // new NextAction("thaddius ranged to place", ACTION_RAID),
// NULL))); // nullptr)));
// triggers.push_back(new TriggerNode( // triggers.push_back(new TriggerNode(
// "thaddius phase pet lose aggro", // "thaddius phase pet lose aggro",
// NextAction::array(0, new NextAction("taunt spell", ACTION_RAID + 2), NULL))); // NextAction::array(0, new NextAction("taunt spell", ACTION_RAID + 2), nullptr)));
// triggers.push_back(new TriggerNode( // triggers.push_back(new TriggerNode(
// "thaddius phase transition", // "thaddius phase transition",
// NextAction::array(0, new NextAction("thaddius move to platform", ACTION_RAID + 1), NULL))); // NextAction::array(0, new NextAction("thaddius move to platform", ACTION_RAID + 1), nullptr)));
// triggers.push_back(new TriggerNode( // triggers.push_back(new TriggerNode(
// "thaddius phase thaddius", // "thaddius phase thaddius",
// NextAction::array(0, new NextAction("thaddius move polarity", ACTION_RAID + 1), NULL))); // NextAction::array(0, new NextAction("thaddius move polarity", ACTION_RAID + 1), nullptr)));
// Instructor Razuvious // Instructor Razuvious
triggers.push_back(new TriggerNode( triggers.push_back(new TriggerNode(
"razuvious tank", "razuvious tank",
NextAction::array(0, new NextAction("razuvious use obedience crystal", ACTION_RAID + 1), NULL))); NextAction::array(0, new NextAction("razuvious use obedience crystal", ACTION_RAID + 1), nullptr)));
triggers.push_back(new TriggerNode( triggers.push_back(new TriggerNode(
"razuvious nontank", "razuvious nontank",
NextAction::array(0, new NextAction("razuvious target", ACTION_RAID + 1), NULL))); NextAction::array(0, new NextAction("razuvious target", ACTION_RAID + 1), nullptr)));
// // four horseman // // four horseman
// triggers.push_back(new TriggerNode( // triggers.push_back(new TriggerNode(
// "horseman attractors", // "horseman attractors",
// NextAction::array(0, new NextAction("horseman attract alternatively", ACTION_RAID + 1), NULL))); // NextAction::array(0, new NextAction("horseman attract alternatively", ACTION_RAID + 1), nullptr)));
// triggers.push_back(new TriggerNode( // triggers.push_back(new TriggerNode(
// "horseman except attractors", // "horseman except attractors",
// NextAction::array(0, new NextAction("horseman attack in order", ACTION_RAID + 1), NULL))); // NextAction::array(0, new NextAction("horseman attack in order", ACTION_RAID + 1), nullptr)));
// sapphiron // sapphiron
triggers.push_back(new TriggerNode( triggers.push_back(new TriggerNode(
"sapphiron ground", "sapphiron ground",
NextAction::array(0, new NextAction("sapphiron ground position", ACTION_RAID + 1), NULL))); NextAction::array(0, new NextAction("sapphiron ground position", ACTION_RAID + 1), nullptr)));
triggers.push_back(new TriggerNode( triggers.push_back(new TriggerNode(
"sapphiron flight", "sapphiron flight",
NextAction::array(0, new NextAction("sapphiron flight position", ACTION_RAID + 1), NULL))); NextAction::array(0, new NextAction("sapphiron flight position", ACTION_RAID + 1), nullptr)));
// triggers.push_back(new TriggerNode(
// "sapphiron chill",
// NextAction::array(0, new NextAction("sapphiron avoid chill", ACTION_RAID + 1), NULL)));
// Gluth // Gluth
triggers.push_back(new TriggerNode( triggers.push_back(new TriggerNode(
@@ -105,26 +101,26 @@ void RaidNaxxStrategy::InitTriggers(std::vector<TriggerNode*> &triggers)
new NextAction("gluth choose target", ACTION_RAID + 1), new NextAction("gluth choose target", ACTION_RAID + 1),
new NextAction("gluth position", ACTION_RAID + 1), new NextAction("gluth position", ACTION_RAID + 1),
new NextAction("gluth slowdown", ACTION_RAID), new NextAction("gluth slowdown", ACTION_RAID),
NULL))); nullptr)));
triggers.push_back(new TriggerNode( triggers.push_back(new TriggerNode(
"gluth main tank mortal wound", "gluth main tank mortal wound",
NextAction::array(0, NextAction::array(0,
new NextAction("taunt spell", ACTION_RAID + 1), NULL))); new NextAction("taunt spell", ACTION_RAID + 1), nullptr)));
// // Loatheb // Loatheb
// triggers.push_back(new TriggerNode( triggers.push_back(new TriggerNode(
// "loatheb", "loatheb",
// NextAction::array(0, NextAction::array(0,
// new NextAction("loatheb position", ACTION_RAID + 1), new NextAction("loatheb position", ACTION_RAID + 1),
// new NextAction("loatheb choose target", ACTION_RAID + 1), new NextAction("loatheb choose target", ACTION_RAID + 1),
// NULL))); nullptr)));
} }
void RaidNaxxStrategy::InitMultipliers(std::vector<Multiplier*> &multipliers) void RaidNaxxStrategy::InitMultipliers(std::vector<Multiplier*> &multipliers)
{ {
multipliers.push_back(new HeiganDanceMultiplier(botAI)); multipliers.push_back(new HeiganDanceMultiplier(botAI));
// multipliers.push_back(new LoathebGenericMultiplier(botAI)); multipliers.push_back(new LoathebGenericMultiplier(botAI));
// multipliers.push_back(new ThaddiusGenericMultiplier(botAI)); // multipliers.push_back(new ThaddiusGenericMultiplier(botAI));
multipliers.push_back(new SapphironGenericMultiplier(botAI)); multipliers.push_back(new SapphironGenericMultiplier(botAI));
multipliers.push_back(new InstructorRazuviousGenericMultiplier(botAI)); multipliers.push_back(new InstructorRazuviousGenericMultiplier(botAI));

View File

@@ -35,14 +35,13 @@ class RaidNaxxTriggerContext : public NamedObjectContext<Trigger>
creators["sapphiron flight"] = &RaidNaxxTriggerContext::sapphiron_flight; creators["sapphiron flight"] = &RaidNaxxTriggerContext::sapphiron_flight;
creators["kel'thuzad"] = &RaidNaxxTriggerContext::kelthuzad; creators["kel'thuzad"] = &RaidNaxxTriggerContext::kelthuzad;
// creators["kel'thuzad phase two"] = &RaidNaxxTriggerContext::kelthuzad_phase_two;
creators["anub'rekhan"] = &RaidNaxxTriggerContext::anubrekhan; creators["anub'rekhan"] = &RaidNaxxTriggerContext::anubrekhan;
creators["gluth"] = &RaidNaxxTriggerContext::gluth; creators["gluth"] = &RaidNaxxTriggerContext::gluth;
creators["gluth main tank mortal wound"] = &RaidNaxxTriggerContext::gluth_main_tank_mortal_wound; creators["gluth main tank mortal wound"] = &RaidNaxxTriggerContext::gluth_main_tank_mortal_wound;
// creators["loatheb"] = &RaidNaxxTriggerContext::loatheb; creators["loatheb"] = &RaidNaxxTriggerContext::loatheb;
} }
private: private:
static Trigger* mutating_injection(PlayerbotAI* ai) { return new MutatingInjectionTrigger(ai); } static Trigger* mutating_injection(PlayerbotAI* ai) { return new MutatingInjectionTrigger(ai); }
@@ -61,14 +60,11 @@ class RaidNaxxTriggerContext : public NamedObjectContext<Trigger>
// static Trigger* horseman_except_attractors(PlayerbotAI* ai) { return new HorsemanExceptAttractorsTrigger(ai); } // static Trigger* horseman_except_attractors(PlayerbotAI* ai) { return new HorsemanExceptAttractorsTrigger(ai); }
static Trigger* sapphiron_ground(PlayerbotAI* ai) { return new SapphironGroundTrigger(ai); } static Trigger* sapphiron_ground(PlayerbotAI* ai) { return new SapphironGroundTrigger(ai); }
static Trigger* sapphiron_flight(PlayerbotAI* ai) { return new SapphironFlightTrigger(ai); } static Trigger* sapphiron_flight(PlayerbotAI* ai) { return new SapphironFlightTrigger(ai); }
// static Trigger* sapphiron_ground_except_main_tank(PlayerbotAI* ai) { return new SapphironGroundExceptMainTankTrigger(ai); }
// static Trigger* sapphiron_ground_chill(PlayerbotAI* ai) { return new SapphironGroundChillTrigger(ai); }
static Trigger* kelthuzad(PlayerbotAI* ai) { return new KelthuzadTrigger(ai); } static Trigger* kelthuzad(PlayerbotAI* ai) { return new KelthuzadTrigger(ai); }
// static Trigger* kelthuzad_phase_two(PlayerbotAI* ai) { return new KelthuzadPhaseTwoTrigger(ai); }
static Trigger* anubrekhan(PlayerbotAI* ai) { return new AnubrekhanTrigger(ai); } static Trigger* anubrekhan(PlayerbotAI* ai) { return new AnubrekhanTrigger(ai); }
static Trigger* gluth(PlayerbotAI* ai) { return new GluthTrigger(ai); } static Trigger* gluth(PlayerbotAI* ai) { return new GluthTrigger(ai); }
static Trigger* gluth_main_tank_mortal_wound(PlayerbotAI* ai) { return new GluthMainTankMortalWoundTrigger(ai); } static Trigger* gluth_main_tank_mortal_wound(PlayerbotAI* ai) { return new GluthMainTankMortalWoundTrigger(ai); }
// static Trigger* loatheb(PlayerbotAI* ai) { return new LoathebTrigger(ai); } static Trigger* loatheb(PlayerbotAI* ai) { return new LoathebTrigger(ai); }
}; };
#endif #endif

View File

@@ -187,5 +187,10 @@ bool KelthuzadTrigger::IsActive()
return helper.UpdateBossAI(); return helper.UpdateBossAI();
} }
bool LoathebTrigger::IsActive()
{
return helper.UpdateBossAI();
}
template bool BossEventTrigger<boss_grobbulus::boss_grobbulusAI>::IsActive(); template bool BossEventTrigger<boss_grobbulus::boss_grobbulusAI>::IsActive();
template bool BossPhaseTrigger<boss_anubrekhan::boss_anubrekhanAI>::IsActive(); template bool BossPhaseTrigger<boss_anubrekhan::boss_anubrekhanAI>::IsActive();

View File

@@ -215,11 +215,14 @@ class GluthMainTankMortalWoundTrigger : public Trigger
GluthBossHelper helper; GluthBossHelper helper;
}; };
// class LoathebTrigger : public BossPhaseTrigger class LoathebTrigger : public Trigger
// { {
// public: public:
// LoathebTrigger(PlayerbotAI* ai) : BossPhaseTrigger(ai, "loatheb", 0, "loatheb trigger") {} LoathebTrigger(PlayerbotAI* ai) : Trigger(ai, "loatheb"), helper(ai) {}
// }; bool IsActive() override;
private:
LoathebBossHelper helper;
};
// template BossEventTrigger<class boss_grobbulus::boss_grobbulusAI>; // template BossEventTrigger<class boss_grobbulus::boss_grobbulusAI>;