mirror of
https://github.com/mod-playerbots/mod-playerbots
synced 2025-11-29 15:58:20 +08:00
- Added Blessing of Sanctuary to paladin health buff strategy (#1345)
- Removed Blessing of Sanctuary from paladin dps buff strategy - Added health buff strategy as default for protection paladin
This commit is contained in:
@@ -531,7 +531,7 @@ void AiFactory::AddDefaultNonCombatStrategies(Player* player, PlayerbotAI* const
|
|||||||
nonCombatEngine->addStrategiesNoInit("bthreat", "tank assist", "barmor", nullptr);
|
nonCombatEngine->addStrategiesNoInit("bthreat", "tank assist", "barmor", nullptr);
|
||||||
if (player->GetLevel() >= 20)
|
if (player->GetLevel() >= 20)
|
||||||
{
|
{
|
||||||
nonCombatEngine->addStrategy("bstats", false);
|
nonCombatEngine->addStrategy("bhealth", false);
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -39,6 +39,7 @@ public:
|
|||||||
creators["blessing of wisdom"] = &blessing_of_wisdom;
|
creators["blessing of wisdom"] = &blessing_of_wisdom;
|
||||||
creators["blessing of kings on party"] = &blessing_of_kings_on_party;
|
creators["blessing of kings on party"] = &blessing_of_kings_on_party;
|
||||||
creators["blessing of wisdom on party"] = &blessing_of_wisdom_on_party;
|
creators["blessing of wisdom on party"] = &blessing_of_wisdom_on_party;
|
||||||
|
creators["blessing of sanctuary on party"] = &blessing_of_sanctuary_on_party;
|
||||||
creators["blessing of sanctuary"] = &blessing_of_sanctuary;
|
creators["blessing of sanctuary"] = &blessing_of_sanctuary;
|
||||||
creators["seal of command"] = &seal_of_command;
|
creators["seal of command"] = &seal_of_command;
|
||||||
creators["taunt spell"] = &hand_of_reckoning;
|
creators["taunt spell"] = &hand_of_reckoning;
|
||||||
@@ -83,6 +84,13 @@ private:
|
|||||||
/*A*/ nullptr,
|
/*A*/ nullptr,
|
||||||
/*C*/ nullptr);
|
/*C*/ nullptr);
|
||||||
}
|
}
|
||||||
|
static ActionNode* blessing_of_sanctuary_on_party(PlayerbotAI* /* ai */)
|
||||||
|
{
|
||||||
|
return new ActionNode("blessing of sanctuary on party",
|
||||||
|
/*P*/ nullptr,
|
||||||
|
/*A*/ nullptr,
|
||||||
|
/*C*/ nullptr);
|
||||||
|
}
|
||||||
static ActionNode* retribution_aura(PlayerbotAI* /* ai */)
|
static ActionNode* retribution_aura(PlayerbotAI* /* ai */)
|
||||||
{
|
{
|
||||||
return new ActionNode("retribution aura",
|
return new ActionNode("retribution aura",
|
||||||
|
|||||||
@@ -14,21 +14,13 @@
|
|||||||
#include "SharedDefines.h"
|
#include "SharedDefines.h"
|
||||||
#include "../../../../../src/server/scripts/Spells/spell_generic.cpp"
|
#include "../../../../../src/server/scripts/Spells/spell_generic.cpp"
|
||||||
|
|
||||||
inline std::string const GetActualBlessingOfMight(Unit* target, PlayerbotAI* botAI, Player* bot)
|
inline std::string const GetActualBlessingOfMight(Unit* target)
|
||||||
{
|
{
|
||||||
Player* targetPlayer = target->ToPlayer();
|
if (!target->ToPlayer())
|
||||||
|
|
||||||
if (!targetPlayer)
|
|
||||||
{
|
{
|
||||||
return "blessing of might";
|
return "blessing of might";
|
||||||
}
|
}
|
||||||
|
|
||||||
if (targetPlayer->HasTankSpec() && !targetPlayer->HasAura(SPELL_BLESSING_OF_SANCTUARY) &&
|
|
||||||
bot->HasSpell(SPELL_BLESSING_OF_SANCTUARY))
|
|
||||||
{
|
|
||||||
return "blessing of sanctuary";
|
|
||||||
}
|
|
||||||
|
|
||||||
int tab = AiFactory::GetPlayerSpecTab(target->ToPlayer());
|
int tab = AiFactory::GetPlayerSpecTab(target->ToPlayer());
|
||||||
switch (target->getClass())
|
switch (target->getClass())
|
||||||
{
|
{
|
||||||
@@ -98,6 +90,23 @@ inline std::string const GetActualBlessingOfWisdom(Unit* target)
|
|||||||
return "blessing of wisdom";
|
return "blessing of wisdom";
|
||||||
}
|
}
|
||||||
|
|
||||||
|
inline std::string const GetActualBlessingOfSanctuary(Unit* target, Player* bot)
|
||||||
|
{
|
||||||
|
Player* targetPlayer = target->ToPlayer();
|
||||||
|
|
||||||
|
if (!targetPlayer)
|
||||||
|
{
|
||||||
|
return "blessing of sanctuary";
|
||||||
|
}
|
||||||
|
|
||||||
|
if (targetPlayer->HasTankSpec() && bot->HasSpell(SPELL_BLESSING_OF_SANCTUARY))
|
||||||
|
{
|
||||||
|
return "blessing of sanctuary";
|
||||||
|
}
|
||||||
|
|
||||||
|
return "blessing of kings";
|
||||||
|
}
|
||||||
|
|
||||||
Value<Unit*>* CastBlessingOnPartyAction::GetTargetValue()
|
Value<Unit*>* CastBlessingOnPartyAction::GetTargetValue()
|
||||||
{
|
{
|
||||||
return context->GetValue<Unit*>("party member without aura", name);
|
return context->GetValue<Unit*>("party member without aura", name);
|
||||||
@@ -109,7 +118,7 @@ bool CastBlessingOfMightAction::Execute(Event event)
|
|||||||
if (!target)
|
if (!target)
|
||||||
return false;
|
return false;
|
||||||
|
|
||||||
return botAI->CastSpell(GetActualBlessingOfMight(target, botAI, bot), target);
|
return botAI->CastSpell(GetActualBlessingOfMight(target), target);
|
||||||
}
|
}
|
||||||
|
|
||||||
Value<Unit*>* CastBlessingOfMightOnPartyAction::GetTargetValue()
|
Value<Unit*>* CastBlessingOfMightOnPartyAction::GetTargetValue()
|
||||||
@@ -123,7 +132,7 @@ bool CastBlessingOfMightOnPartyAction::Execute(Event event)
|
|||||||
if (!target)
|
if (!target)
|
||||||
return false;
|
return false;
|
||||||
|
|
||||||
return botAI->CastSpell(GetActualBlessingOfMight(target, botAI, bot), target);
|
return botAI->CastSpell(GetActualBlessingOfMight(target), target);
|
||||||
}
|
}
|
||||||
|
|
||||||
bool CastBlessingOfWisdomAction::Execute(Event event)
|
bool CastBlessingOfWisdomAction::Execute(Event event)
|
||||||
@@ -149,6 +158,20 @@ bool CastBlessingOfWisdomOnPartyAction::Execute(Event event)
|
|||||||
return botAI->CastSpell(GetActualBlessingOfWisdom(target), target);
|
return botAI->CastSpell(GetActualBlessingOfWisdom(target), target);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Value<Unit*>* CastBlessingOfSanctuaryOnPartyAction::GetTargetValue()
|
||||||
|
{
|
||||||
|
return context->GetValue<Unit*>("party member without aura", "blessing of sanctuary,blessing of kings");
|
||||||
|
}
|
||||||
|
|
||||||
|
bool CastBlessingOfSanctuaryOnPartyAction::Execute(Event event)
|
||||||
|
{
|
||||||
|
Unit* target = GetTarget();
|
||||||
|
if (!target)
|
||||||
|
return false;
|
||||||
|
|
||||||
|
return botAI->CastSpell(GetActualBlessingOfSanctuary(target, bot), target);
|
||||||
|
}
|
||||||
|
|
||||||
bool CastSealSpellAction::isUseful() { return AI_VALUE2(bool, "combat", "self target"); }
|
bool CastSealSpellAction::isUseful() { return AI_VALUE2(bool, "combat", "self target"); }
|
||||||
|
|
||||||
Value<Unit*>* CastTurnUndeadAction::GetTargetValue() { return context->GetValue<Unit*>("cc target", getName()); }
|
Value<Unit*>* CastTurnUndeadAction::GetTargetValue() { return context->GetValue<Unit*>("cc target", getName()); }
|
||||||
|
|||||||
@@ -149,14 +149,16 @@ public:
|
|||||||
CastBlessingOfSanctuaryAction(PlayerbotAI* botAI) : CastBuffSpellAction(botAI, "blessing of sanctuary") {}
|
CastBlessingOfSanctuaryAction(PlayerbotAI* botAI) : CastBuffSpellAction(botAI, "blessing of sanctuary") {}
|
||||||
};
|
};
|
||||||
|
|
||||||
class CastBlessingOfSanctuaryOnPartyAction : public CastBlessingOnPartyAction
|
class CastBlessingOfSanctuaryOnPartyAction : public BuffOnPartyAction
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
CastBlessingOfSanctuaryOnPartyAction(PlayerbotAI* botAI) : CastBlessingOnPartyAction(botAI, "blessing of sanctuary")
|
CastBlessingOfSanctuaryOnPartyAction(PlayerbotAI* botAI) : BuffOnPartyAction(botAI, "blessing of sanctuary")
|
||||||
{
|
{
|
||||||
}
|
}
|
||||||
|
|
||||||
std::string const getName() override { return "blessing of sanctuary on party"; }
|
std::string const getName() override { return "blessing of sanctuary on party"; }
|
||||||
|
Value<Unit*>* GetTargetValue() override;
|
||||||
|
bool Execute(Event event) override;
|
||||||
};
|
};
|
||||||
|
|
||||||
class CastHolyLightAction : public CastHealingSpellAction
|
class CastHolyLightAction : public CastHealingSpellAction
|
||||||
|
|||||||
@@ -145,6 +145,7 @@ public:
|
|||||||
creators["blessing of kings on party"] = &PaladinTriggerFactoryInternal::blessing_of_kings_on_party;
|
creators["blessing of kings on party"] = &PaladinTriggerFactoryInternal::blessing_of_kings_on_party;
|
||||||
creators["blessing of wisdom on party"] = &PaladinTriggerFactoryInternal::blessing_of_wisdom_on_party;
|
creators["blessing of wisdom on party"] = &PaladinTriggerFactoryInternal::blessing_of_wisdom_on_party;
|
||||||
creators["blessing of might on party"] = &PaladinTriggerFactoryInternal::blessing_of_might_on_party;
|
creators["blessing of might on party"] = &PaladinTriggerFactoryInternal::blessing_of_might_on_party;
|
||||||
|
creators["blessing of sanctuary on party"] = &PaladinTriggerFactoryInternal::blessing_of_sanctuary_on_party;
|
||||||
|
|
||||||
creators["avenging wrath"] = &PaladinTriggerFactoryInternal::avenging_wrath;
|
creators["avenging wrath"] = &PaladinTriggerFactoryInternal::avenging_wrath;
|
||||||
}
|
}
|
||||||
@@ -206,11 +207,9 @@ private:
|
|||||||
static Trigger* sacred_shield_on_main_tank(PlayerbotAI* ai) { return new SacredShieldOnMainTankTrigger(ai); }
|
static Trigger* sacred_shield_on_main_tank(PlayerbotAI* ai) { return new SacredShieldOnMainTankTrigger(ai); }
|
||||||
|
|
||||||
static Trigger* blessing_of_kings_on_party(PlayerbotAI* botAI) { return new BlessingOfKingsOnPartyTrigger(botAI); }
|
static Trigger* blessing_of_kings_on_party(PlayerbotAI* botAI) { return new BlessingOfKingsOnPartyTrigger(botAI); }
|
||||||
static Trigger* blessing_of_wisdom_on_party(PlayerbotAI* botAI)
|
static Trigger* blessing_of_wisdom_on_party(PlayerbotAI* botAI) { return new BlessingOfWisdomOnPartyTrigger(botAI); }
|
||||||
{
|
|
||||||
return new BlessingOfWisdomOnPartyTrigger(botAI);
|
|
||||||
}
|
|
||||||
static Trigger* blessing_of_might_on_party(PlayerbotAI* botAI) { return new BlessingOfMightOnPartyTrigger(botAI); }
|
static Trigger* blessing_of_might_on_party(PlayerbotAI* botAI) { return new BlessingOfMightOnPartyTrigger(botAI); }
|
||||||
|
static Trigger* blessing_of_sanctuary_on_party(PlayerbotAI* botAI) { return new BlessingOfSanctuaryOnPartyTrigger(botAI); }
|
||||||
|
|
||||||
static Trigger* avenging_wrath(PlayerbotAI* botAI) { return new AvengingWrathTrigger(botAI); }
|
static Trigger* avenging_wrath(PlayerbotAI* botAI) { return new AvengingWrathTrigger(botAI); }
|
||||||
};
|
};
|
||||||
@@ -231,6 +230,7 @@ public:
|
|||||||
creators["blessing of kings on party"] = &PaladinAiObjectContextInternal::blessing_of_kings_on_party;
|
creators["blessing of kings on party"] = &PaladinAiObjectContextInternal::blessing_of_kings_on_party;
|
||||||
creators["blessing of might on party"] = &PaladinAiObjectContextInternal::blessing_of_might_on_party;
|
creators["blessing of might on party"] = &PaladinAiObjectContextInternal::blessing_of_might_on_party;
|
||||||
creators["blessing of wisdom on party"] = &PaladinAiObjectContextInternal::blessing_of_wisdom_on_party;
|
creators["blessing of wisdom on party"] = &PaladinAiObjectContextInternal::blessing_of_wisdom_on_party;
|
||||||
|
creators["blessing of sanctuary on party"] = &PaladinAiObjectContextInternal::blessing_of_sanctuary_on_party;
|
||||||
creators["redemption"] = &PaladinAiObjectContextInternal::redemption;
|
creators["redemption"] = &PaladinAiObjectContextInternal::redemption;
|
||||||
creators["crusader strike"] = &PaladinAiObjectContextInternal::crusader_strike;
|
creators["crusader strike"] = &PaladinAiObjectContextInternal::crusader_strike;
|
||||||
creators["crusader aura"] = &PaladinAiObjectContextInternal::crusader_aura;
|
creators["crusader aura"] = &PaladinAiObjectContextInternal::crusader_aura;
|
||||||
@@ -317,18 +317,10 @@ private:
|
|||||||
static Action* blessing_of_wisdom(PlayerbotAI* botAI) { return new CastBlessingOfWisdomAction(botAI); }
|
static Action* blessing_of_wisdom(PlayerbotAI* botAI) { return new CastBlessingOfWisdomAction(botAI); }
|
||||||
static Action* blessing_of_kings(PlayerbotAI* botAI) { return new CastBlessingOfKingsAction(botAI); }
|
static Action* blessing_of_kings(PlayerbotAI* botAI) { return new CastBlessingOfKingsAction(botAI); }
|
||||||
static Action* divine_storm(PlayerbotAI* botAI) { return new CastDivineStormAction(botAI); }
|
static Action* divine_storm(PlayerbotAI* botAI) { return new CastDivineStormAction(botAI); }
|
||||||
static Action* blessing_of_kings_on_party(PlayerbotAI* botAI)
|
static Action* blessing_of_kings_on_party(PlayerbotAI* botAI) { return new CastBlessingOfKingsOnPartyAction(botAI); }
|
||||||
{
|
static Action* blessing_of_might_on_party(PlayerbotAI* botAI) { return new CastBlessingOfMightOnPartyAction(botAI); }
|
||||||
return new CastBlessingOfKingsOnPartyAction(botAI);
|
static Action* blessing_of_wisdom_on_party(PlayerbotAI* botAI) { return new CastBlessingOfWisdomOnPartyAction(botAI); }
|
||||||
}
|
static Action* blessing_of_sanctuary_on_party(PlayerbotAI* botAI) { return new CastBlessingOfSanctuaryOnPartyAction(botAI); }
|
||||||
static Action* blessing_of_might_on_party(PlayerbotAI* botAI)
|
|
||||||
{
|
|
||||||
return new CastBlessingOfMightOnPartyAction(botAI);
|
|
||||||
}
|
|
||||||
static Action* blessing_of_wisdom_on_party(PlayerbotAI* botAI)
|
|
||||||
{
|
|
||||||
return new CastBlessingOfWisdomOnPartyAction(botAI);
|
|
||||||
}
|
|
||||||
static Action* redemption(PlayerbotAI* botAI) { return new CastRedemptionAction(botAI); }
|
static Action* redemption(PlayerbotAI* botAI) { return new CastRedemptionAction(botAI); }
|
||||||
static Action* crusader_strike(PlayerbotAI* botAI) { return new CastCrusaderStrikeAction(botAI); }
|
static Action* crusader_strike(PlayerbotAI* botAI) { return new CastCrusaderStrikeAction(botAI); }
|
||||||
static Action* crusader_aura(PlayerbotAI* botAI) { return new CastCrusaderAuraAction(botAI); }
|
static Action* crusader_aura(PlayerbotAI* botAI) { return new CastCrusaderAuraAction(botAI); }
|
||||||
|
|||||||
@@ -19,8 +19,8 @@ void PaladinBuffManaStrategy::InitTriggers(std::vector<TriggerNode*>& triggers)
|
|||||||
void PaladinBuffHealthStrategy::InitTriggers(std::vector<TriggerNode*>& triggers)
|
void PaladinBuffHealthStrategy::InitTriggers(std::vector<TriggerNode*>& triggers)
|
||||||
{
|
{
|
||||||
triggers.push_back(
|
triggers.push_back(
|
||||||
new TriggerNode("blessing of kings on party",
|
new TriggerNode("blessing of sanctuary on party",
|
||||||
NextAction::array(0, new NextAction("blessing of kings on party", 11.0f), nullptr)));
|
NextAction::array(0, new NextAction("blessing of sanctuary on party", 11.0f), nullptr)));
|
||||||
// triggers.push_back(new TriggerNode("blessing", NextAction::array(0, new NextAction("blessing of kings",
|
// triggers.push_back(new TriggerNode("blessing", NextAction::array(0, new NextAction("blessing of kings",
|
||||||
// ACTION_HIGH + 8), nullptr)));
|
// ACTION_HIGH + 8), nullptr)));
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -234,6 +234,15 @@ public:
|
|||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
|
class BlessingOfSanctuaryOnPartyTrigger : public BuffOnPartyTrigger
|
||||||
|
{
|
||||||
|
public:
|
||||||
|
BlessingOfSanctuaryOnPartyTrigger(PlayerbotAI* botAI)
|
||||||
|
: BuffOnPartyTrigger(botAI, "blessing of sanctuary,blessing of kings", 2 * 2000)
|
||||||
|
{
|
||||||
|
}
|
||||||
|
};
|
||||||
|
|
||||||
class AvengingWrathTrigger : public BoostTrigger
|
class AvengingWrathTrigger : public BoostTrigger
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
|
|||||||
Reference in New Issue
Block a user