mirror of
https://github.com/mod-playerbots/mod-playerbots.git
synced 2026-01-19 03:35:43 +00:00
mage and paladin strategy port
This commit is contained in:
@@ -213,7 +213,7 @@ Value<Unit*>* CastDebuffSpellOnAttackerAction::GetTargetValue()
|
||||
return context->GetValue<Unit*>("attacker without aura", spell);
|
||||
}
|
||||
|
||||
CastBuffSpellAction::CastBuffSpellAction(PlayerbotAI* botAI, std::string const spell) : CastAuraSpellAction(botAI, spell)
|
||||
CastBuffSpellAction::CastBuffSpellAction(PlayerbotAI* botAI, std::string const spell, bool checkIsOwner) : CastAuraSpellAction(botAI, spell, checkIsOwner)
|
||||
{
|
||||
range = botAI->GetRange("spell");
|
||||
}
|
||||
@@ -274,3 +274,9 @@ bool CastVehicleSpellAction::Execute(Event event)
|
||||
uint32 spellId = AI_VALUE2(uint32, "vehicle spell id", spell);
|
||||
return botAI->CastVehicleSpell(spellId, GetTarget());
|
||||
}
|
||||
|
||||
Value<Unit*>* BuffOnMainTankAction::GetTargetValue()
|
||||
{
|
||||
return context->GetValue<Unit*>("main tank", spell);
|
||||
}
|
||||
|
||||
|
||||
@@ -66,7 +66,7 @@ class CastDebuffSpellOnAttackerAction : public CastAuraSpellAction
|
||||
class CastBuffSpellAction : public CastAuraSpellAction
|
||||
{
|
||||
public:
|
||||
CastBuffSpellAction(PlayerbotAI* botAI, std::string const spell);
|
||||
CastBuffSpellAction(PlayerbotAI* botAI, std::string const spell, bool checkIsOwner = false);
|
||||
|
||||
std::string const GetTargetName() override { return "self target"; }
|
||||
};
|
||||
@@ -322,4 +322,26 @@ class CastBladeSalvoAction : public CastVehicleSpellAction
|
||||
CastBladeSalvoAction(PlayerbotAI* botAI) : CastVehicleSpellAction(botAI, "blade salvo") { }
|
||||
};
|
||||
|
||||
class MainTankActionNameSupport {
|
||||
public:
|
||||
MainTankActionNameSupport(std::string spell)
|
||||
{
|
||||
name = std::string(spell) + " on main tank";
|
||||
}
|
||||
|
||||
virtual std::string const getName() { return name; }
|
||||
|
||||
private:
|
||||
std::string name;
|
||||
};
|
||||
|
||||
class BuffOnMainTankAction : public CastBuffSpellAction, public MainTankActionNameSupport
|
||||
{
|
||||
public:
|
||||
BuffOnMainTankAction(PlayerbotAI* ai, std::string spell, bool checkIsOwner = false) :
|
||||
CastBuffSpellAction(ai, spell, checkIsOwner), MainTankActionNameSupport(spell) {}
|
||||
public:
|
||||
virtual Value<Unit*>* GetTargetValue();
|
||||
virtual std::string const getName() { return MainTankActionNameSupport::getName(); }
|
||||
};
|
||||
#endif
|
||||
|
||||
Reference in New Issue
Block a user