mirror of
https://github.com/mod-playerbots/mod-playerbots.git
synced 2026-01-22 04:56:22 +00:00
Fix four horsemen
This commit is contained in:
@@ -170,7 +170,7 @@ bool MovementAction::MoveTo(uint32 mapId, float x, float y, float z, bool idle,
|
|||||||
if (modifiedZ == INVALID_HEIGHT) {
|
if (modifiedZ == INVALID_HEIGHT) {
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
// mm.Clear();
|
mm.Clear();
|
||||||
mm.MovePoint(mapId, x, y, modifiedZ, generatePath);
|
mm.MovePoint(mapId, x, y, modifiedZ, generatePath);
|
||||||
AI_VALUE(LastMovement&, "last movement").Set(mapId, x, y, z, bot->GetOrientation());
|
AI_VALUE(LastMovement&, "last movement").Set(mapId, x, y, z, bot->GetOrientation());
|
||||||
return true;
|
return true;
|
||||||
|
|||||||
@@ -419,6 +419,9 @@ bool HorsemanAttractAlternativelyAction::Execute(Event event)
|
|||||||
|
|
||||||
bool HorsemanAttactInOrderAction::Execute(Event event)
|
bool HorsemanAttactInOrderAction::Execute(Event event)
|
||||||
{
|
{
|
||||||
|
if (!helper.UpdateBossAI()) {
|
||||||
|
return false;
|
||||||
|
}
|
||||||
Unit* target = nullptr;
|
Unit* target = nullptr;
|
||||||
Unit* thane = AI_VALUE2(Unit*, "find target", "thane korth'azz");
|
Unit* thane = AI_VALUE2(Unit*, "find target", "thane korth'azz");
|
||||||
Unit* baron = AI_VALUE2(Unit*, "find target", "baron rivendare");
|
Unit* baron = AI_VALUE2(Unit*, "find target", "baron rivendare");
|
||||||
@@ -431,7 +434,7 @@ bool HorsemanAttactInOrderAction::Execute(Event event)
|
|||||||
attack_order = {thane, baron, lady, sir};
|
attack_order = {thane, baron, lady, sir};
|
||||||
}
|
}
|
||||||
for (Unit* t : attack_order) {
|
for (Unit* t : attack_order) {
|
||||||
if (t) {
|
if (t && t->IsAlive()) {
|
||||||
target = t;
|
target = t;
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -58,6 +58,7 @@ class RaidNaxxTriggerContext : public NamedObjectContext<Trigger>
|
|||||||
|
|
||||||
static Trigger* horseman_attractors(PlayerbotAI* ai) { return new HorsemanAttractorsTrigger(ai); }
|
static Trigger* horseman_attractors(PlayerbotAI* ai) { return new HorsemanAttractorsTrigger(ai); }
|
||||||
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* kelthuzad(PlayerbotAI* ai) { return new KelthuzadTrigger(ai); }
|
static Trigger* kelthuzad(PlayerbotAI* ai) { return new KelthuzadTrigger(ai); }
|
||||||
|
|||||||
@@ -146,7 +146,7 @@ public:
|
|||||||
class HorsemanAttractorsTrigger : public Trigger
|
class HorsemanAttractorsTrigger : public Trigger
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
HorsemanAttractorsTrigger(PlayerbotAI* ai) : Trigger(ai, "fourhorsemen"), helper(ai) {}
|
HorsemanAttractorsTrigger(PlayerbotAI* ai) : Trigger(ai, "fourhorsemen attractors"), helper(ai) {}
|
||||||
bool IsActive() override;
|
bool IsActive() override;
|
||||||
private:
|
private:
|
||||||
FourhorsemanBossHelper helper;
|
FourhorsemanBossHelper helper;
|
||||||
@@ -155,7 +155,7 @@ class HorsemanAttractorsTrigger : public Trigger
|
|||||||
class HorsemanExceptAttractorsTrigger : public Trigger
|
class HorsemanExceptAttractorsTrigger : public Trigger
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
HorsemanExceptAttractorsTrigger(PlayerbotAI* ai) : Trigger(ai, "fourhorsemen"), helper(ai) {}
|
HorsemanExceptAttractorsTrigger(PlayerbotAI* ai) : Trigger(ai, "fourhorsemen except attractors"), helper(ai) {}
|
||||||
bool IsActive() override;
|
bool IsActive() override;
|
||||||
private:
|
private:
|
||||||
FourhorsemanBossHelper helper;
|
FourhorsemanBossHelper helper;
|
||||||
|
|||||||
Reference in New Issue
Block a user