- 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:
kadeshar
2025-06-06 12:10:45 +02:00
committed by GitHub
parent 9986469042
commit fc6309c521
7 changed files with 67 additions and 33 deletions

View File

@@ -14,21 +14,13 @@
#include "SharedDefines.h"
#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 (!targetPlayer)
if (!target->ToPlayer())
{
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());
switch (target->getClass())
{
@@ -98,6 +90,23 @@ inline std::string const GetActualBlessingOfWisdom(Unit* target)
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()
{
return context->GetValue<Unit*>("party member without aura", name);
@@ -109,7 +118,7 @@ bool CastBlessingOfMightAction::Execute(Event event)
if (!target)
return false;
return botAI->CastSpell(GetActualBlessingOfMight(target, botAI, bot), target);
return botAI->CastSpell(GetActualBlessingOfMight(target), target);
}
Value<Unit*>* CastBlessingOfMightOnPartyAction::GetTargetValue()
@@ -123,7 +132,7 @@ bool CastBlessingOfMightOnPartyAction::Execute(Event event)
if (!target)
return false;
return botAI->CastSpell(GetActualBlessingOfMight(target, botAI, bot), target);
return botAI->CastSpell(GetActualBlessingOfMight(target), target);
}
bool CastBlessingOfWisdomAction::Execute(Event event)
@@ -149,6 +158,20 @@ bool CastBlessingOfWisdomOnPartyAction::Execute(Event event)
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"); }
Value<Unit*>* CastTurnUndeadAction::GetTargetValue() { return context->GetValue<Unit*>("cc target", getName()); }