mirror of
https://github.com/mod-playerbots/mod-playerbots.git
synced 2026-01-23 21:46:24 +00:00
Prelim EoE completion
This commit is contained in:
@@ -21,8 +21,8 @@ class WotlkDungeonOccActionContext : public NamedObjectContext<Action>
|
||||
static Action* avoid_unstable_sphere(PlayerbotAI* ai) { return new AvoidUnstableSphereAction(ai); }
|
||||
static Action* mount_drake(PlayerbotAI* ai) { return new MountDrakeAction(ai); }
|
||||
static Action* dismount_drake(PlayerbotAI* ai) { return new DismountDrakeAction(ai); }
|
||||
static Action* fly_drake(PlayerbotAI* ai) { return new FlyDrakeAction(ai); }
|
||||
static Action* drake_attack(PlayerbotAI* ai) { return new DrakeAttackAction(ai); }
|
||||
static Action* fly_drake(PlayerbotAI* ai) { return new OccFlyDrakeAction(ai); }
|
||||
static Action* drake_attack(PlayerbotAI* ai) { return new OccDrakeAttackAction(ai); }
|
||||
static Action* avoid_arcane_explosion(PlayerbotAI* ai) { return new AvoidArcaneExplosionAction(ai); }
|
||||
static Action* time_bomb_spread(PlayerbotAI* ai) { return new TimeBombSpreadAction(ai); }
|
||||
};
|
||||
|
||||
@@ -111,7 +111,7 @@ bool DismountDrakeAction::Execute(Event event)
|
||||
return false;
|
||||
}
|
||||
|
||||
bool FlyDrakeAction::Execute(Event event)
|
||||
bool OccFlyDrakeAction::Execute(Event event)
|
||||
{
|
||||
Player* master = botAI->GetMaster();
|
||||
if (!master) { return false; }
|
||||
@@ -152,7 +152,7 @@ bool FlyDrakeAction::Execute(Event event)
|
||||
return false;
|
||||
}
|
||||
|
||||
bool DrakeAttackAction::Execute(Event event)
|
||||
bool OccDrakeAttackAction::Execute(Event event)
|
||||
{
|
||||
vehicleBase = bot->GetVehicleBase();
|
||||
if (!vehicleBase) { return false; }
|
||||
@@ -188,7 +188,7 @@ bool DrakeAttackAction::Execute(Event event)
|
||||
return false;
|
||||
}
|
||||
|
||||
bool DrakeAttackAction::CastDrakeSpellAction(Unit* target, uint32 spellId, uint32 cooldown)
|
||||
bool OccDrakeAttackAction::CastDrakeSpellAction(Unit* target, uint32 spellId, uint32 cooldown)
|
||||
{
|
||||
if (botAI->CanCastVehicleSpell(spellId, target))
|
||||
if (botAI->CastVehicleSpell(spellId, target))
|
||||
@@ -199,7 +199,7 @@ bool DrakeAttackAction::CastDrakeSpellAction(Unit* target, uint32 spellId, uint3
|
||||
return false;
|
||||
}
|
||||
|
||||
bool DrakeAttackAction::AmberDrakeAction(Unit* target)
|
||||
bool OccDrakeAttackAction::AmberDrakeAction(Unit* target)
|
||||
{
|
||||
Aura* shockCharges = target->GetAura(SPELL_SHOCK_CHARGE, vehicleBase->GetGUID());
|
||||
if (shockCharges && shockCharges->GetStackAmount() > 8)
|
||||
@@ -225,7 +225,7 @@ bool DrakeAttackAction::AmberDrakeAction(Unit* target)
|
||||
return false;
|
||||
}
|
||||
|
||||
bool DrakeAttackAction::EmeraldDrakeAction(Unit* target)
|
||||
bool OccDrakeAttackAction::EmeraldDrakeAction(Unit* target)
|
||||
{
|
||||
Aura* poisonStacks = target->GetAura(SPELL_LEECHING_POISON, vehicleBase->GetGUID());
|
||||
if (!poisonStacks || (poisonStacks->GetStackAmount() < 3 ||
|
||||
@@ -286,7 +286,7 @@ bool DrakeAttackAction::EmeraldDrakeAction(Unit* target)
|
||||
return false;
|
||||
}
|
||||
|
||||
bool DrakeAttackAction::RubyDrakeAction(Unit* target)
|
||||
bool OccDrakeAttackAction::RubyDrakeAction(Unit* target)
|
||||
{
|
||||
Aura* evasiveCharges = vehicleBase->GetAura(SPELL_EVASIVE_CHARGES);
|
||||
Aura* evasiveManeuvers = vehicleBase->GetAura(SPELL_EVASIVE_MANEUVERS);
|
||||
|
||||
@@ -38,17 +38,17 @@ public:
|
||||
bool Execute(Event event) override;
|
||||
};
|
||||
|
||||
class FlyDrakeAction : public MovementAction
|
||||
class OccFlyDrakeAction : public MovementAction
|
||||
{
|
||||
public:
|
||||
FlyDrakeAction(PlayerbotAI* ai) : MovementAction(ai, "fly drake") {}
|
||||
OccFlyDrakeAction(PlayerbotAI* ai) : MovementAction(ai, "occ fly drake") {}
|
||||
bool Execute(Event event) override;
|
||||
};
|
||||
|
||||
class DrakeAttackAction : public Action
|
||||
class OccDrakeAttackAction : public Action
|
||||
{
|
||||
public:
|
||||
DrakeAttackAction(PlayerbotAI* botAI) : Action(botAI, "drake attack") {}
|
||||
OccDrakeAttackAction(PlayerbotAI* botAI) : Action(botAI, "occ drake attack") {}
|
||||
bool Execute(Event event) override;
|
||||
|
||||
protected:
|
||||
@@ -57,7 +57,6 @@ protected:
|
||||
bool AmberDrakeAction(Unit* target);
|
||||
bool EmeraldDrakeAction(Unit* target);
|
||||
bool RubyDrakeAction(Unit* target);
|
||||
|
||||
};
|
||||
|
||||
class AvoidArcaneExplosionAction : public MovementAction
|
||||
|
||||
@@ -26,12 +26,12 @@ float MountingDrakeMultiplier::GetValue(Action* action)
|
||||
return 1.0f;
|
||||
}
|
||||
|
||||
float FlyingMultiplier::GetValue(Action* action)
|
||||
float OccFlyingMultiplier::GetValue(Action* action)
|
||||
{
|
||||
if (bot->GetMapId() != OCULUS_MAP_ID || !bot->GetVehicleBase()) { return 1.0f; }
|
||||
|
||||
// Suppresses FollowAction as well as some attack-based movements
|
||||
if (dynamic_cast<MovementAction*>(action) && !dynamic_cast<FlyDrakeAction*>(action))
|
||||
if (dynamic_cast<MovementAction*>(action) && !dynamic_cast<OccFlyDrakeAction*>(action))
|
||||
{
|
||||
return 0.0f;
|
||||
}
|
||||
@@ -103,7 +103,7 @@ float EregosMultiplier::GetValue(Action* action)
|
||||
Unit* boss = AI_VALUE2(Unit*, "find target", "ley-guardian eregos");
|
||||
if (!boss) { return 1.0f; }
|
||||
|
||||
if (boss->HasAura(SPELL_PLANAR_SHIFT && dynamic_cast<DrakeAttackAction*>(action)))
|
||||
if (boss->HasAura(SPELL_PLANAR_SHIFT && dynamic_cast<OccDrakeAttackAction*>(action)))
|
||||
{
|
||||
return 0.0f;
|
||||
}
|
||||
|
||||
@@ -21,10 +21,10 @@ class MountingDrakeMultiplier : public Multiplier
|
||||
virtual float GetValue(Action* action);
|
||||
};
|
||||
|
||||
class FlyingMultiplier : public Multiplier
|
||||
class OccFlyingMultiplier : public Multiplier
|
||||
{
|
||||
public:
|
||||
FlyingMultiplier(PlayerbotAI* ai) : Multiplier(ai, "flying drake") {}
|
||||
OccFlyingMultiplier(PlayerbotAI* ai) : Multiplier(ai, "occ flying drake") {}
|
||||
|
||||
public:
|
||||
virtual float GetValue(Action* action);
|
||||
|
||||
@@ -36,7 +36,7 @@ void WotlkDungeonOccStrategy::InitTriggers(std::vector<TriggerNode*> &triggers)
|
||||
void WotlkDungeonOccStrategy::InitMultipliers(std::vector<Multiplier*> &multipliers)
|
||||
{
|
||||
multipliers.push_back(new MountingDrakeMultiplier(botAI));
|
||||
multipliers.push_back(new FlyingMultiplier(botAI));
|
||||
multipliers.push_back(new OccFlyingMultiplier(botAI));
|
||||
multipliers.push_back(new UromMultiplier(botAI));
|
||||
multipliers.push_back(new EregosMultiplier(botAI));
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user