mirror of
https://github.com/mod-playerbots/mod-playerbots.git
synced 2026-02-15 08:06:11 +00:00
anubrekhan strategy port
This commit is contained in:
@@ -42,21 +42,22 @@ bool BossEventTrigger<T>::IsActive()
|
||||
return false;
|
||||
}
|
||||
|
||||
// bool BossPhaseTrigger::IsActive()
|
||||
// {
|
||||
// Unit* boss = AI_VALUE2(Unit*, "find target", boss_name);
|
||||
// if (!boss) {
|
||||
// return false;
|
||||
// }
|
||||
// if (this->phase_mask == 0) {
|
||||
// return true;
|
||||
// }
|
||||
// BossAI* boss_ai = dynamic_cast<BossAI*>(boss->GetAI());
|
||||
// EventMap* eventMap = boss_botAI->GetEvents();
|
||||
// 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;
|
||||
// }
|
||||
template<class T>
|
||||
bool BossPhaseTrigger<T>::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<T*>(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()
|
||||
{
|
||||
@@ -165,4 +166,5 @@ bool HeiganRangedTrigger::IsActive()
|
||||
// return true;
|
||||
// }
|
||||
|
||||
template bool BossEventTrigger<boss_grobbulus::boss_grobbulusAI>::IsActive();
|
||||
template bool BossEventTrigger<boss_grobbulus::boss_grobbulusAI>::IsActive();
|
||||
template bool BossPhaseTrigger<boss_anubrekhan::boss_anubrekhanAI>::IsActive();
|
||||
@@ -7,6 +7,7 @@
|
||||
#include "PlayerbotAIConfig.h"
|
||||
#include "GenericTriggers.h"
|
||||
#include "../../../../src/server/scripts/Northrend/Naxxramas/boss_grobbulus.h"
|
||||
#include "../../../../src/server/scripts/Northrend/Naxxramas/boss_anubrekhan.h"
|
||||
|
||||
using namespace std;
|
||||
|
||||
@@ -48,6 +49,7 @@ protected:
|
||||
uint32 boss_entry, event_id, last_event_time;
|
||||
};
|
||||
|
||||
template<class T>
|
||||
class BossPhaseTrigger : public Trigger
|
||||
{
|
||||
public:
|
||||
@@ -172,11 +174,11 @@ public:
|
||||
// KelthuzadTrigger(PlayerbotAI* ai) : BossPhaseTrigger(ai, "kel'thuzad", 0, "kel'thuzad trigger") {}
|
||||
// };
|
||||
|
||||
// class AnubrekhanTrigger : public BossPhaseTrigger
|
||||
// {
|
||||
// public:
|
||||
// AnubrekhanTrigger(PlayerbotAI* ai) : BossPhaseTrigger(ai, "anub'rekhan", 0, "anub'rekhan trigger") {}
|
||||
// };
|
||||
class AnubrekhanTrigger : public BossPhaseTrigger<boss_anubrekhan::boss_anubrekhanAI>
|
||||
{
|
||||
public:
|
||||
AnubrekhanTrigger(PlayerbotAI* ai) : BossPhaseTrigger(ai, "anub'rekhan", 0, "anub'rekhan trigger") {}
|
||||
};
|
||||
|
||||
// class KelthuzadPhaseTwoTrigger : public BossPhaseTrigger
|
||||
// {
|
||||
|
||||
@@ -219,7 +219,7 @@ class TriggerContext : public NamedObjectContext<Trigger>
|
||||
// creators["kel'thuzad"] = &TriggerContext::kelthuzad;
|
||||
// creators["kel'thuzad phase two"] = &TriggerContext::kelthuzad_phase_two;
|
||||
|
||||
// creators["anub'rekhan"] = &TriggerContext::anubrekhan;
|
||||
creators["anub'rekhan"] = &TriggerContext::anubrekhan;
|
||||
|
||||
// creators["gluth"] = &TriggerContext::gluth;
|
||||
// creators["gluth main tank mortal wound"] = &TriggerContext::gluth_main_tank_mortal_wound;
|
||||
@@ -386,7 +386,7 @@ class TriggerContext : public NamedObjectContext<Trigger>
|
||||
// static Trigger* sapphiron_ground_chill(PlayerbotAI* ai) { return new SapphironGroundChillTrigger(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_main_tank_mortal_wound(PlayerbotAI* ai) { return new GluthMainTankMortalWoundTrigger(ai); }
|
||||
// static Trigger* loatheb(PlayerbotAI* ai) { return new LoathebTrigger(ai); }
|
||||
|
||||
Reference in New Issue
Block a user