mirror of
https://github.com/mod-playerbots/mod-playerbots.git
synced 2026-02-13 23:33:47 +00:00
Avoid aoe base
This commit is contained in:
@@ -88,6 +88,7 @@ class ActionContext : public NamedObjectContext<Action>
|
||||
creators["reach party member to resurrect"] = &ActionContext::reach_party_member_to_resurrect;
|
||||
creators["flee"] = &ActionContext::flee;
|
||||
creators["flee with pet"] = &ActionContext::flee_with_pet;
|
||||
creators["avoid aoe"] = &ActionContext::avoid_aoe;
|
||||
creators["gift of the naaru"] = &ActionContext::gift_of_the_naaru;
|
||||
creators["shoot"] = &ActionContext::shoot;
|
||||
creators["lifeblood"] = &ActionContext::lifeblood;
|
||||
@@ -263,6 +264,7 @@ class ActionContext : public NamedObjectContext<Action>
|
||||
static Action* reach_party_member_to_resurrect(PlayerbotAI* botAI) { return new ReachPartyMemberToResurrectAction(botAI); }
|
||||
static Action* flee(PlayerbotAI* botAI) { return new FleeAction(botAI); }
|
||||
static Action* flee_with_pet(PlayerbotAI* botAI) { return new FleeWithPetAction(botAI); }
|
||||
static Action* avoid_aoe(PlayerbotAI* botAI) { return new AvoidAoeAction(botAI); }
|
||||
static Action* gift_of_the_naaru(PlayerbotAI* botAI) { return new CastGiftOfTheNaaruAction(botAI); }
|
||||
static Action* lifeblood(PlayerbotAI* botAI) { return new CastLifeBloodAction(botAI); }
|
||||
static Action* arcane_torrent(PlayerbotAI* botAI) { return new CastArcaneTorrentAction(botAI); }
|
||||
|
||||
@@ -1482,6 +1482,16 @@ bool FleeWithPetAction::Execute(Event event)
|
||||
return Flee(AI_VALUE(Unit*, "current target"));
|
||||
}
|
||||
|
||||
bool AvoidAoeAction::isUseful()
|
||||
{
|
||||
return false;
|
||||
}
|
||||
|
||||
bool AvoidAoeAction::Execute(Event event)
|
||||
{
|
||||
return false;
|
||||
}
|
||||
|
||||
bool RunAwayAction::Execute(Event event)
|
||||
{
|
||||
return Flee(AI_VALUE(Unit*, "master target"));
|
||||
|
||||
@@ -66,11 +66,20 @@ class FleeWithPetAction : public MovementAction
|
||||
bool Execute(Event event) override;
|
||||
};
|
||||
|
||||
class AvoidAoeAction : public MovementAction
|
||||
{
|
||||
public:
|
||||
AvoidAoeAction(PlayerbotAI* botAI) : MovementAction(botAI, "avoid aoe") { }
|
||||
|
||||
bool isUseful() override;
|
||||
bool Execute(Event event) override;
|
||||
};
|
||||
|
||||
class RunAwayAction : public MovementAction
|
||||
{
|
||||
public:
|
||||
RunAwayAction(PlayerbotAI* botAI) : MovementAction(botAI, "runaway") { }
|
||||
|
||||
|
||||
bool Execute(Event event) override;
|
||||
};
|
||||
|
||||
|
||||
Reference in New Issue
Block a user