Big update.

This commit is contained in:
UltraNix
2022-03-12 22:27:09 +01:00
parent b3d00ccb26
commit b952636f0d
843 changed files with 1534330 additions and 99 deletions

View File

@@ -0,0 +1,72 @@
/*
* Copyright (C) 2016+ AzerothCore <www.azerothcore.org>, released under GNU GPL v2 license, you may redistribute it and/or modify it under version 2 of the License, or (at your option), any later version.
*/
#include "DpsPaladinStrategy.h"
#include "Playerbots.h"
class DpsPaladinStrategyActionNodeFactory : public NamedObjectFactory<ActionNode>
{
public:
DpsPaladinStrategyActionNodeFactory()
{
creators["seal of vengeance"] = &seal_of_vengeance;
creators["seal of command"] = &seal_of_command;
creators["blessing of might"] = &blessing_of_might;
creators["crusader strike"] = &crusader_strike;
}
private:
static ActionNode* seal_of_vengeance(PlayerbotAI* botAI)
{
return new ActionNode ("seal of vengeance",
/*P*/ nullptr,
/*A*/ NextAction::array(0, new NextAction("seal of command"), nullptr),
/*C*/ nullptr);
}
static ActionNode* seal_of_command(PlayerbotAI* botAI)
{
return new ActionNode ("seal of command",
/*P*/ nullptr,
/*A*/ NextAction::array(0, new NextAction("seal of wisdom"), nullptr),
/*C*/ nullptr);
}
static ActionNode* blessing_of_might(PlayerbotAI* botAI)
{
return new ActionNode ("blessing of might",
/*P*/ nullptr,
/*A*/ NextAction::array(0, new NextAction("blessing of kings"), nullptr),
/*C*/ nullptr);
}
static ActionNode* crusader_strike(PlayerbotAI* botAI)
{
return new ActionNode ("crusader strike",
/*P*/ nullptr,
/*A*/ NextAction::array(0, new NextAction("melee"), nullptr),
/*C*/ nullptr);
}
};
DpsPaladinStrategy::DpsPaladinStrategy(PlayerbotAI* botAI) : GenericPaladinStrategy(botAI)
{
actionNodeFactories.Add(new DpsPaladinStrategyActionNodeFactory());
}
NextAction** DpsPaladinStrategy::getDefaultActions()
{
return NextAction::array(0, new NextAction("crusader strike", ACTION_NORMAL + 1), nullptr);
}
void DpsPaladinStrategy::InitTriggers(std::vector<TriggerNode*>& triggers)
{
GenericPaladinStrategy::InitTriggers(triggers);
triggers.push_back(new TriggerNode("seal", NextAction::array(0, new NextAction("seal of wisdom", 90.0f), nullptr)));
triggers.push_back(new TriggerNode("low health", NextAction::array(0, new NextAction("divine shield", ACTION_CRITICAL_HEAL + 2), new NextAction("holy light", ACTION_CRITICAL_HEAL + 2), nullptr)));
triggers.push_back(new TriggerNode("judgement of wisdom", NextAction::array(0, new NextAction("judgement of wisdom", ACTION_NORMAL + 2), nullptr)));
triggers.push_back(new TriggerNode("medium aoe", NextAction::array(0, new NextAction("divine storm", ACTION_HIGH + 1), new NextAction("consecration", ACTION_HIGH + 1), nullptr)));
triggers.push_back(new TriggerNode("art of war", NextAction::array(0, new NextAction("exorcism", ACTION_HIGH + 2), nullptr)));
}

View File

@@ -0,0 +1,23 @@
/*
* Copyright (C) 2016+ AzerothCore <www.azerothcore.org>, released under GNU GPL v2 license, you may redistribute it and/or modify it under version 2 of the License, or (at your option), any later version.
*/
#ifndef _PLAYERBOT_DPSPALADINSTRATEGY_H
#define _PLAYERBOT_DPSPALADINSTRATEGY_H
#include "GenericPaladinStrategy.h"
class PlayerbotAI;
class DpsPaladinStrategy : public GenericPaladinStrategy
{
public:
DpsPaladinStrategy(PlayerbotAI* botAI);
void InitTriggers(std::vector<TriggerNode*>& triggers) override;
std::string const getName() override { return "dps"; }
NextAction** getDefaultActions() override;
uint32 GetType() const override { return STRATEGY_TYPE_COMBAT | STRATEGY_TYPE_DPS | STRATEGY_TYPE_MELEE; }
};
#endif

View File

@@ -0,0 +1,19 @@
/*
* Copyright (C) 2016+ AzerothCore <www.azerothcore.org>, released under GNU GPL v2 license, you may redistribute it and/or modify it under version 2 of the License, or (at your option), any later version.
*/
#include "GenericPaladinNonCombatStrategy.h"
#include "GenericPaladinStrategyActionNodeFactory.h"
#include "Playerbots.h"
GenericPaladinNonCombatStrategy::GenericPaladinNonCombatStrategy(PlayerbotAI* botAI) : NonCombatStrategy(botAI)
{
actionNodeFactories.Add(new GenericPaladinStrategyActionNodeFactory());
}
void GenericPaladinNonCombatStrategy::InitTriggers(std::vector<TriggerNode*>& triggers)
{
NonCombatStrategy::InitTriggers(triggers);
triggers.push_back(new TriggerNode("party member dead", NextAction::array(0, new NextAction("redemption", 30.0f), nullptr)));
}

View File

@@ -0,0 +1,21 @@
/*
* Copyright (C) 2016+ AzerothCore <www.azerothcore.org>, released under GNU GPL v2 license, you may redistribute it and/or modify it under version 2 of the License, or (at your option), any later version.
*/
#ifndef _PLAYERBOT_GENERICPALADINNONCOMBATSTRATEGY_H
#define _PLAYERBOT_GENERICPALADINNONCOMBATSTRATEGY_H
#include "NonCombatStrategy.h"
class PlayerbotAI;
class GenericPaladinNonCombatStrategy : public NonCombatStrategy
{
public:
GenericPaladinNonCombatStrategy(PlayerbotAI* botAI);
std::string const getName() override { return "nc"; }
void InitTriggers(std::vector<TriggerNode*>& triggers) override;
};
#endif

View File

@@ -0,0 +1,48 @@
/*
* Copyright (C) 2016+ AzerothCore <www.azerothcore.org>, released under GNU GPL v2 license, you may redistribute it and/or modify it under version 2 of the License, or (at your option), any later version.
*/
#include "GenericPaladinStrategy.h"
#include "GenericPaladinStrategyActionNodeFactory.h"
#include "Playerbots.h"
GenericPaladinStrategy::GenericPaladinStrategy(PlayerbotAI* botAI) : CombatStrategy(botAI)
{
actionNodeFactories.Add(new GenericPaladinStrategyActionNodeFactory());
}
void GenericPaladinStrategy::InitTriggers(std::vector<TriggerNode*>& triggers)
{
CombatStrategy::InitTriggers(triggers);
triggers.push_back(new TriggerNode("low health", NextAction::array(0, new NextAction("divine protection", ACTION_CRITICAL_HEAL + 2), new NextAction("holy light", ACTION_CRITICAL_HEAL + 2), nullptr)));
triggers.push_back(new TriggerNode("party member low health", NextAction::array(0, new NextAction("holy light on party", ACTION_CRITICAL_HEAL + 1), nullptr)));
triggers.push_back(new TriggerNode("hammer of justice interrupt", NextAction::array(0, new NextAction("hammer of justice", ACTION_INTERRUPT), nullptr)));
triggers.push_back(new TriggerNode("hammer of justice on enemy healer", NextAction::array(0, new NextAction("hammer of justice on enemy healer", ACTION_INTERRUPT), nullptr)));
triggers.push_back(new TriggerNode("hammer of justice on snare target", NextAction::array(0, new NextAction("hammer of justice on snare target", ACTION_MOVE + 1), nullptr)));
triggers.push_back(new TriggerNode("critical health", NextAction::array(0, new NextAction("lay on hands", ACTION_EMERGENCY), nullptr)));
triggers.push_back(new TriggerNode("party member critical health", NextAction::array(0, new NextAction("lay on hands on party", ACTION_EMERGENCY), nullptr)));
triggers.push_back(new TriggerNode("target critical health", NextAction::array(0, new NextAction("hammer of wrath", ACTION_HIGH + 1), nullptr)));
triggers.push_back(new TriggerNode("often", NextAction::array(0, new NextAction("apply stone", 1.0f), nullptr)));
triggers.push_back(new TriggerNode("protect party member", NextAction::array(0, new NextAction("blessing of protection on party", ACTION_EMERGENCY + 2), nullptr)));
}
void PaladinCureStrategy::InitTriggers(std::vector<TriggerNode*>& triggers)
{
triggers.push_back(new TriggerNode("cleanse cure disease", NextAction::array(0, new NextAction("cleanse disease", ACTION_DISPEL + 2), nullptr)));
triggers.push_back(new TriggerNode("cleanse party member cure disease", NextAction::array(0, new NextAction("cleanse disease on party", ACTION_DISPEL + 1), nullptr)));
triggers.push_back(new TriggerNode("cleanse cure poison", NextAction::array(0, new NextAction("cleanse poison", ACTION_DISPEL + 2), nullptr)));
triggers.push_back(new TriggerNode("cleanse party member cure poison", NextAction::array(0, new NextAction("cleanse poison on party", ACTION_DISPEL + 1), nullptr)));
triggers.push_back(new TriggerNode("cleanse cure magic", NextAction::array(0, new NextAction("cleanse magic", ACTION_DISPEL + 2), nullptr)));
triggers.push_back(new TriggerNode("cleanse party member cure magic", NextAction::array(0, new NextAction("cleanse magic on party", ACTION_DISPEL + 1), nullptr)));
}
void PaladinBoostStrategy::InitTriggers(std::vector<TriggerNode*>& triggers)
{
triggers.push_back(new TriggerNode("divine favor", NextAction::array(0, new NextAction("divine favor", ACTION_HIGH + 1), nullptr)));
}
void PaladinCcStrategy::InitTriggers(std::vector<TriggerNode*>& triggers)
{
triggers.push_back(new TriggerNode("turn undead", NextAction::array(0, new NextAction("turn undead", ACTION_HIGH + 1), nullptr)));
}

View File

@@ -0,0 +1,48 @@
/*
* Copyright (C) 2016+ AzerothCore <www.azerothcore.org>, released under GNU GPL v2 license, you may redistribute it and/or modify it under version 2 of the License, or (at your option), any later version.
*/
#ifndef _PLAYERBOT_GENERICPALADINSTRATEGY_H
#define _PLAYERBOT_GENERICPALADINSTRATEGY_H
#include "CombatStrategy.h"
class PlayerbotAI;
class GenericPaladinStrategy : public CombatStrategy
{
public:
GenericPaladinStrategy(PlayerbotAI* botAI);
void InitTriggers(std::vector<TriggerNode*>& triggers) override;
std::string const getName() override { return "paladin"; }
};
class PaladinCureStrategy : public Strategy
{
public:
PaladinCureStrategy(PlayerbotAI* botAI) : Strategy(botAI) { }
void InitTriggers(std::vector<TriggerNode*>& triggers) override;
std::string const getName() override { return "cure"; }
};
class PaladinBoostStrategy : public Strategy
{
public:
PaladinBoostStrategy(PlayerbotAI* botAI) : Strategy(botAI) { }
void InitTriggers(std::vector<TriggerNode*>& triggers) override;
std::string const getName() override { return "boost"; }
};
class PaladinCcStrategy : public Strategy
{
public:
PaladinCcStrategy(PlayerbotAI* botAI) : Strategy(botAI) { }
void InitTriggers(std::vector<TriggerNode*>& triggers) override;
std::string const getName() override { return "cc"; }
};
#endif

View File

@@ -0,0 +1,227 @@
/*
* Copyright (C) 2016+ AzerothCore <www.azerothcore.org>, released under GNU GPL v2 license, you may redistribute it and/or modify it under version 2 of the License, or (at your option), any later version.
*/
#ifndef _PLAYERBOT_GENERICPALADINSTRATEGYACTIONNODEFACTORY_H
#define _PLAYERBOT_GENERICPALADINSTRATEGYACTIONNODEFACTORY_H
#include "Action.h"
#include "NamedObjectContext.h"
class PlayerbotAI;
class GenericPaladinStrategyActionNodeFactory : public NamedObjectFactory<ActionNode>
{
public:
GenericPaladinStrategyActionNodeFactory()
{
creators["seal of light"] = &seal_of_light;
creators["cleanse poison"] = &cleanse_poison;
creators["cleanse disease"] = &cleanse_disease;
creators["cleanse magic"] = &cleanse_magic;
creators["cleanse poison on party"] = &cleanse_poison_on_party;
creators["cleanse disease on party"] = &cleanse_disease_on_party;
creators["seal of wisdom"] = &seal_of_wisdom;
creators["seal of justice"] = &seal_of_justice;
creators["hand of reckoning"] = &hand_of_reckoning;
creators["judgement of wisdom"] = &judgement_of_wisdom;
creators["divine shield"] = &divine_shield;
creators["flash of light"] = &flash_of_light;
creators["flash of light on party"] = &flash_of_light_on_party;
creators["holy wrath"] = &holy_wrath;
creators["lay on hands"] = &lay_on_hands;
creators["lay on hands on party"] = &lay_on_hands_on_party;
creators["hammer of wrath"] = &hammer_of_wrath;
creators["retribution aura"] = &retribution_aura;
creators["blessing of kings"] = &blessing_of_kings;
creators["blessing of wisdom"] = &blessing_of_wisdom;
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 sanctuary"] = &blessing_of_sanctuary;
}
private:
static ActionNode* blessing_of_sanctuary(PlayerbotAI* botAI)
{
return new ActionNode ("blessing of sanctuary",
/*P*/ nullptr,
/*A*/ nullptr,
/*C*/ nullptr);
}
static ActionNode* blessing_of_kings(PlayerbotAI* botAI)
{
return new ActionNode ("blessing of kings",
/*P*/ nullptr,
/*A*/ nullptr,
/*C*/ nullptr);
}
static ActionNode* blessing_of_wisdom(PlayerbotAI* botAI)
{
return new ActionNode ("blessing of wisdom",
/*P*/ nullptr,
/*A*/ nullptr,
/*C*/ nullptr);
}
static ActionNode* blessing_of_kings_on_party(PlayerbotAI* botAI)
{
return new ActionNode ("blessing of kings on party",
/*P*/ nullptr,
/*A*/ nullptr,
/*C*/ nullptr);
}
static ActionNode* blessing_of_wisdom_on_party(PlayerbotAI* botAI)
{
return new ActionNode ("blessing of wisdom on party",
/*P*/ nullptr,
/*A*/ nullptr,
/*C*/ nullptr);
}
static ActionNode* retribution_aura(PlayerbotAI* botAI)
{
return new ActionNode ("retribution aura",
/*P*/ nullptr,
/*A*/ NextAction::array(0, new NextAction("devotion aura"), nullptr),
/*C*/ nullptr);
}
static ActionNode* lay_on_hands(PlayerbotAI* botAI)
{
return new ActionNode ("lay on hands",
/*P*/ nullptr,
/*A*/ NextAction::array(0, new NextAction("divine shield"), new NextAction("flash of light"), nullptr),
/*C*/ nullptr);
}
static ActionNode* lay_on_hands_on_party(PlayerbotAI* botAI)
{
return new ActionNode ("lay on hands on party",
/*P*/ nullptr,
/*A*/ NextAction::array(0, new NextAction("flash of light"), nullptr),
/*C*/ nullptr);
}
static ActionNode* seal_of_light(PlayerbotAI* botAI)
{
return new ActionNode ("seal of light",
/*P*/ nullptr,
/*A*/ NextAction::array(0, new NextAction("seal of justice"), nullptr),
/*C*/ nullptr);
}
static ActionNode* cleanse_poison(PlayerbotAI* botAI)
{
return new ActionNode ("cleanse poison",
/*P*/ nullptr,
/*A*/ NextAction::array(0, new NextAction("purify poison"), nullptr),
/*C*/ nullptr);
}
static ActionNode* cleanse_magic(PlayerbotAI* botAI)
{
return new ActionNode ("cleanse magic",
/*P*/ nullptr,
/*A*/ nullptr,
/*C*/ nullptr);
}
static ActionNode* cleanse_disease(PlayerbotAI* botAI)
{
return new ActionNode ("cleanse disease",
/*P*/ nullptr,
/*A*/ NextAction::array(0, new NextAction("purify disease"), nullptr),
/*C*/ nullptr);
}
static ActionNode* cleanse_poison_on_party(PlayerbotAI* botAI)
{
return new ActionNode ("cleanse poison on party",
/*P*/ nullptr,
/*A*/ NextAction::array(0, new NextAction("purify poison on party"), nullptr),
/*C*/ nullptr);
}
static ActionNode* cleanse_disease_on_party(PlayerbotAI* botAI)
{
return new ActionNode ("cleanse disease on party",
/*P*/ nullptr,
/*A*/ NextAction::array(0, new NextAction("purify disease on party"), nullptr),
/*C*/ nullptr);
}
static ActionNode* seal_of_wisdom(PlayerbotAI* botAI)
{
return new ActionNode ("seal of wisdom",
/*P*/ nullptr,
/*A*/ NextAction::array(0, new NextAction("seal of justice"), nullptr),
/*C*/ nullptr);
}
static ActionNode* seal_of_justice(PlayerbotAI* botAI)
{
return new ActionNode ("seal of justice",
/*P*/ nullptr,
/*A*/ NextAction::array(0, new NextAction("seal of righteousness"), nullptr),
/*C*/ nullptr);
}
static ActionNode* hand_of_reckoning(PlayerbotAI* botAI)
{
return new ActionNode ("hand of reckoning",
/*P*/ nullptr,
/*A*/ NextAction::array(0, new NextAction("judgement of justice"), nullptr),
/*C*/ nullptr);
}
static ActionNode* judgement_of_wisdom(PlayerbotAI* botAI)
{
return new ActionNode ("judgement of wisdom",
/*P*/ nullptr,
/*A*/ NextAction::array(0, new NextAction("judgement of light"), nullptr),
/*C*/ nullptr);
}
static ActionNode* divine_shield(PlayerbotAI* botAI)
{
return new ActionNode ("divine shield",
/*P*/ nullptr,
/*A*/ NextAction::array(0, new NextAction("divine protection"), nullptr),
/*C*/ nullptr);
}
static ActionNode* flash_of_light(PlayerbotAI* botAI)
{
return new ActionNode ("flash of light",
/*P*/ nullptr,
/*A*/ NextAction::array(0, new NextAction("holy light"), nullptr),
/*C*/ nullptr);
}
static ActionNode* flash_of_light_on_party(PlayerbotAI* botAI)
{
return new ActionNode ("flash of light on party",
/*P*/ nullptr,
/*A*/ NextAction::array(0, new NextAction("holy light on party"), nullptr),
/*C*/ nullptr);
}
static ActionNode* holy_wrath(PlayerbotAI* botAI)
{
return new ActionNode ("holy wrath",
/*P*/ nullptr,
/*A*/ NextAction::array(0, new NextAction("consecration"), nullptr),
/*C*/ nullptr);
}
static ActionNode* hammer_of_wrath(PlayerbotAI* botAI)
{
return new ActionNode ("hammer of wrath",
/*P*/ nullptr,
/*A*/ NextAction::array(0, new NextAction("melee"), nullptr),
/*C*/ nullptr);
}
};
#endif

View File

@@ -0,0 +1,25 @@
/*
* Copyright (C) 2016+ AzerothCore <www.azerothcore.org>, released under GNU GPL v2 license, you may redistribute it and/or modify it under version 2 of the License, or (at your option), any later version.
*/
#include "HealPaladinStrategy.h"
#include "Playerbots.h"
HealPaladinStrategy::HealPaladinStrategy(PlayerbotAI* botAI) : GenericPaladinStrategy(botAI)
{
}
NextAction** HealPaladinStrategy::getDefaultActions()
{
return NextAction::array(0, new NextAction("melee", ACTION_NORMAL), nullptr);
}
void HealPaladinStrategy::InitTriggers(std::vector<TriggerNode*>& triggers)
{
GenericPaladinStrategy::InitTriggers(triggers);
triggers.push_back(new TriggerNode("medium health", NextAction::array(0, new NextAction("flash of light", ACTION_MEDIUM_HEAL + 2), nullptr)));
triggers.push_back(new TriggerNode("party member medium health", NextAction::array(0, new NextAction("flash of light on party", ACTION_MEDIUM_HEAL + 1), nullptr)));
triggers.push_back(new TriggerNode("blessing", NextAction::array(0, new NextAction("blessing of sanctuary", ACTION_HIGH + 9), nullptr)));
triggers.push_back(new TriggerNode("party member to heal out of spell range", NextAction::array(0, new NextAction("reach party member to heal", ACTION_CRITICAL_HEAL + 1), nullptr)));
}

View File

@@ -0,0 +1,23 @@
/*
* Copyright (C) 2016+ AzerothCore <www.azerothcore.org>, released under GNU GPL v2 license, you may redistribute it and/or modify it under version 2 of the License, or (at your option), any later version.
*/
#ifndef _PLAYERBOT_HEALPALADINSTRATEGY_H
#define _PLAYERBOT_HEALPALADINSTRATEGY_H
#include "GenericPaladinStrategy.h"
class PlayerbotAI;
class HealPaladinStrategy : public GenericPaladinStrategy
{
public:
HealPaladinStrategy(PlayerbotAI* botAI);
void InitTriggers(std::vector<TriggerNode*>& triggers) override;
std::string const getName() override { return "heal"; }
NextAction** getDefaultActions() override;
uint32 GetType() const override { return STRATEGY_TYPE_HEAL | STRATEGY_TYPE_MELEE; }
};
#endif

View File

@@ -0,0 +1,83 @@
/*
* Copyright (C) 2016+ AzerothCore <www.azerothcore.org>, released under GNU GPL v2 license, you may redistribute it and/or modify it under version 2 of the License, or (at your option), any later version.
*/
#include "PaladinActions.h"
#include "Event.h"
#include "Playerbots.h"
inline std::string const GetActualBlessingOfMight(Unit* target)
{
switch (target->getClass())
{
case CLASS_MAGE:
case CLASS_PRIEST:
case CLASS_WARLOCK:
return "blessing of wisdom";
}
return "blessing of might";
}
inline std::string const GetActualBlessingOfWisdom(Unit* target)
{
switch (target->getClass())
{
case CLASS_WARRIOR:
case CLASS_ROGUE:
return "blessing of might";
}
return "blessing of wisdom";
}
Value<Unit*>* CastBlessingOnPartyAction::GetTargetValue()
{
return context->GetValue<Unit*>("party member without aura", "blessing of kings,blessing of might,blessing of wisdom");
}
bool CastBlessingOfMightAction::Execute(Event event)
{
Unit* target = GetTarget();
if (!target)
return false;
return botAI->CastSpell(GetActualBlessingOfMight(target), target);
}
bool CastBlessingOfMightOnPartyAction::Execute(Event event)
{
Unit* target = GetTarget();
if (!target)
return false;
return botAI->CastSpell(GetActualBlessingOfMight(target), target);
}
bool CastBlessingOfWisdomAction::Execute(Event event)
{
Unit* target = GetTarget();
if (!target)
return false;
return botAI->CastSpell(GetActualBlessingOfWisdom(target), target);
}
bool CastBlessingOfWisdomOnPartyAction::Execute(Event event)
{
Unit* target = GetTarget();
if (!target)
return false;
return botAI->CastSpell(GetActualBlessingOfWisdom(target), target);
}
bool CastSealSpellAction::isUseful()
{
return AI_VALUE2(bool, "combat", "self target");
}
Value<Unit*>* CastTurnUndeadAction:: GetTargetValue()
{
return context->GetValue<Unit*>("cc target", getName());
}

View File

@@ -0,0 +1,432 @@
/*
* Copyright (C) 2016+ AzerothCore <www.azerothcore.org>, released under GNU GPL v2 license, you may redistribute it and/or modify it under version 2 of the License, or (at your option), any later version.
*/
#ifndef _PLAYERBOT_PALADINACTIONS_H
#define _PLAYERBOT_PALADINACTIONS_H
#include "GenericSpellActions.h"
#include "SharedDefines.h"
class PlayerbotAI;
class Unit;
class CastJudgementAction : public CastMeleeSpellAction
{
public:
CastJudgementAction(PlayerbotAI* botAI) : CastMeleeSpellAction(botAI, "judgement") { }
};
class CastJudgementOfLightAction : public CastMeleeSpellAction
{
public:
CastJudgementOfLightAction(PlayerbotAI* botAI) : CastMeleeSpellAction(botAI, "judgement of light") { }
};
class CastJudgementOfWisdomAction : public CastMeleeSpellAction
{
public:
CastJudgementOfWisdomAction(PlayerbotAI* botAI) : CastMeleeSpellAction(botAI, "judgement of wisdom") { }
};
class CastJudgementOfJusticeAction : public CastMeleeSpellAction
{
public:
CastJudgementOfJusticeAction(PlayerbotAI* botAI) : CastMeleeSpellAction(botAI, "judgement of justice") { }
};
class CastRighteousFuryAction : public CastBuffSpellAction
{
public:
CastRighteousFuryAction(PlayerbotAI* botAI) : CastBuffSpellAction(botAI, "righteous fury") { }
};
class CastDevotionAuraAction : public CastBuffSpellAction
{
public:
CastDevotionAuraAction(PlayerbotAI* botAI) : CastBuffSpellAction(botAI, "devotion aura") { }
};
class CastRetributionAuraAction : public CastBuffSpellAction
{
public:
CastRetributionAuraAction(PlayerbotAI* botAI) : CastBuffSpellAction(botAI, "retribution aura") { }
};
class CastConcentrationAuraAction : public CastBuffSpellAction
{
public:
CastConcentrationAuraAction(PlayerbotAI* botAI) : CastBuffSpellAction(botAI, "concentration aura") { }
};
class CastDivineStormAction : public CastBuffSpellAction
{
public:
CastDivineStormAction(PlayerbotAI* botAI) : CastBuffSpellAction(botAI, "divine storm") { }
};
class CastCrusaderStrikeAction : public CastMeleeSpellAction
{
public:
CastCrusaderStrikeAction(PlayerbotAI* botAI) : CastMeleeSpellAction(botAI, "crusader strike") { }
};
class CastShadowResistanceAuraAction : public CastBuffSpellAction
{
public:
CastShadowResistanceAuraAction(PlayerbotAI* botAI) : CastBuffSpellAction(botAI, "shadow resistance aura") { }
};
class CastFrostResistanceAuraAction : public CastBuffSpellAction
{
public:
CastFrostResistanceAuraAction(PlayerbotAI* botAI) : CastBuffSpellAction(botAI, "frost resistance aura") { }
};
class CastFireResistanceAuraAction : public CastBuffSpellAction
{
public:
CastFireResistanceAuraAction(PlayerbotAI* botAI) : CastBuffSpellAction(botAI, "fire resistance aura") { }
};
class CastCrusaderAuraAction : public CastBuffSpellAction
{
public:
CastCrusaderAuraAction(PlayerbotAI* botAI) : CastBuffSpellAction(botAI, "crusader aura") { }
};
class CastSealSpellAction : public CastBuffSpellAction
{
public:
CastSealSpellAction(PlayerbotAI* botAI, std::string const name) : CastBuffSpellAction(botAI, name) { }
bool isUseful() override;
};
class CastSealOfRighteousnessAction : public CastSealSpellAction
{
public:
CastSealOfRighteousnessAction(PlayerbotAI* botAI) : CastSealSpellAction(botAI, "seal of righteousness") { }
};
class CastSealOfJusticeAction : public CastSealSpellAction
{
public:
CastSealOfJusticeAction(PlayerbotAI* botAI) : CastSealSpellAction(botAI, "seal of justice") { }
};
class CastSealOfLightAction : public CastSealSpellAction
{
public:
CastSealOfLightAction(PlayerbotAI* botAI) : CastSealSpellAction(botAI, "seal of light") { }
};
class CastSealOfWisdomAction : public CastSealSpellAction
{
public:
CastSealOfWisdomAction(PlayerbotAI* botAI) : CastSealSpellAction(botAI, "seal of wisdom") { }
};
class CastSealOfCommandAction : public CastSealSpellAction
{
public:
CastSealOfCommandAction(PlayerbotAI* botAI) : CastSealSpellAction(botAI, "seal of command") { }
};
class CastSealOfVengeanceAction : public CastSealSpellAction
{
public:
CastSealOfVengeanceAction(PlayerbotAI* botAI) : CastSealSpellAction(botAI, "seal of vengeance") { }
};
class CastBlessingOfMightAction : public CastBuffSpellAction
{
public:
CastBlessingOfMightAction(PlayerbotAI* botAI) : CastBuffSpellAction(botAI, "blessing of might") { }
bool Execute(Event event) override;
};
class CastBlessingOnPartyAction : public BuffOnPartyAction
{
public:
CastBlessingOnPartyAction(PlayerbotAI* botAI, std::string const name) : BuffOnPartyAction(botAI, name) { }
Value<Unit*>* GetTargetValue() override;
};
class CastBlessingOfMightOnPartyAction : public CastBlessingOnPartyAction
{
public:
CastBlessingOfMightOnPartyAction(PlayerbotAI* botAI) : CastBlessingOnPartyAction(botAI, "blessing of might") { }
std::string const getName() override { return "blessing of might on party";}
bool Execute(Event event) override;
};
class CastBlessingOfWisdomAction : public CastBuffSpellAction
{
public:
CastBlessingOfWisdomAction(PlayerbotAI* botAI) : CastBuffSpellAction(botAI, "blessing of wisdom") { }
bool Execute(Event event) override;
};
class CastBlessingOfWisdomOnPartyAction : public CastBlessingOnPartyAction
{
public:
CastBlessingOfWisdomOnPartyAction(PlayerbotAI* botAI) : CastBlessingOnPartyAction(botAI, "blessing of wisdom") { }
std::string const getName() override { return "blessing of wisdom on party";}
bool Execute(Event event) override;
};
class CastBlessingOfKingsAction : public CastBuffSpellAction
{
public:
CastBlessingOfKingsAction(PlayerbotAI* botAI) : CastBuffSpellAction(botAI, "blessing of kings") { }
};
class CastBlessingOfKingsOnPartyAction : public CastBlessingOnPartyAction
{
public:
CastBlessingOfKingsOnPartyAction(PlayerbotAI* botAI) : CastBlessingOnPartyAction(botAI, "blessing of kings") { }
std::string const getName() override { return "blessing of kings on party";}
};
class CastBlessingOfSanctuaryAction : public CastBuffSpellAction
{
public:
CastBlessingOfSanctuaryAction(PlayerbotAI* botAI) : CastBuffSpellAction(botAI, "blessing of sanctuary") { }
};
class CastBlessingOfSanctuaryOnPartyAction : public CastBlessingOnPartyAction
{
public:
CastBlessingOfSanctuaryOnPartyAction(PlayerbotAI* botAI) : CastBlessingOnPartyAction(botAI, "blessing of sanctuary") { }
std::string const getName() override { return "blessing of sanctuary on party";}
};
class CastHolyLightAction : public CastHealingSpellAction
{
public:
CastHolyLightAction(PlayerbotAI* botAI) : CastHealingSpellAction(botAI, "holy light") { }
};
class CastHolyLightOnPartyAction : public HealPartyMemberAction
{
public:
CastHolyLightOnPartyAction(PlayerbotAI* botAI) : HealPartyMemberAction(botAI, "holy light") { }
std::string const getName() override { return "holy light on party"; }
};
class CastFlashOfLightAction : public CastHealingSpellAction
{
public:
CastFlashOfLightAction(PlayerbotAI* botAI) : CastHealingSpellAction(botAI, "flash of light") { }
};
class CastFlashOfLightOnPartyAction : public HealPartyMemberAction
{
public:
CastFlashOfLightOnPartyAction(PlayerbotAI* botAI) : HealPartyMemberAction(botAI, "flash of light") { }
std::string const getName() override { return "flash of light on party"; }
};
class CastLayOnHandsAction : public CastHealingSpellAction
{
public:
CastLayOnHandsAction(PlayerbotAI* botAI) : CastHealingSpellAction(botAI, "lay on hands") { }
};
class CastLayOnHandsOnPartyAction : public HealPartyMemberAction
{
public:
CastLayOnHandsOnPartyAction(PlayerbotAI* botAI) : HealPartyMemberAction(botAI, "lay on hands") { }
std::string const getName() override { return "lay on hands on party"; }
};
class CastDivineProtectionAction : public CastBuffSpellAction
{
public:
CastDivineProtectionAction(PlayerbotAI* botAI) : CastBuffSpellAction(botAI, "divine protection") { }
};
class CastDivineProtectionOnPartyAction : public HealPartyMemberAction
{
public:
CastDivineProtectionOnPartyAction(PlayerbotAI* botAI) : HealPartyMemberAction(botAI, "divine protection") { }
std::string const getName() override { return "divine protection on party"; }
};
class CastDivineShieldAction: public CastBuffSpellAction
{
public:
CastDivineShieldAction(PlayerbotAI* botAI) : CastBuffSpellAction(botAI, "divine shield") { }
};
class CastConsecrationAction : public CastMeleeSpellAction
{
public:
CastConsecrationAction(PlayerbotAI* botAI) : CastMeleeSpellAction(botAI, "consecration") { }
};
class CastHolyWrathAction : public CastMeleeSpellAction
{
public:
CastHolyWrathAction(PlayerbotAI* botAI) : CastMeleeSpellAction(botAI, "holy wrath") { }
};
class CastHammerOfJusticeAction : public CastMeleeSpellAction
{
public:
CastHammerOfJusticeAction(PlayerbotAI* botAI) : CastMeleeSpellAction(botAI, "hammer of justice") { }
};
class CastHammerOfWrathAction : public CastMeleeSpellAction
{
public:
CastHammerOfWrathAction(PlayerbotAI* botAI) : CastMeleeSpellAction(botAI, "hammer of wrath") { }
};
class CastHammerOfTheRighteousAction : public CastMeleeSpellAction
{
public:
CastHammerOfTheRighteousAction(PlayerbotAI* botAI) : CastMeleeSpellAction(botAI, "hammer of the righteous") { }
};
class CastPurifyPoisonAction : public CastCureSpellAction
{
public:
CastPurifyPoisonAction(PlayerbotAI* botAI) : CastCureSpellAction(botAI, "purify") { }
};
class CastPurifyDiseaseAction : public CastCureSpellAction
{
public:
CastPurifyDiseaseAction(PlayerbotAI* botAI) : CastCureSpellAction(botAI, "purify") { }
};
class CastPurifyPoisonOnPartyAction : public CurePartyMemberAction
{
public:
CastPurifyPoisonOnPartyAction(PlayerbotAI* botAI) : CurePartyMemberAction(botAI, "purify", DISPEL_POISON) { }
std::string const getName() override { return "purify poison on party"; }
};
class CastPurifyDiseaseOnPartyAction : public CurePartyMemberAction
{
public:
CastPurifyDiseaseOnPartyAction(PlayerbotAI* botAI) : CurePartyMemberAction(botAI, "purify", DISPEL_DISEASE) { }
std::string const getName() override { return "purify disease on party"; }
};
class CastHandOfReckoningAction : public CastSpellAction
{
public:
CastHandOfReckoningAction(PlayerbotAI* botAI) : CastSpellAction(botAI, "hand of reckoning") { }
};
class CastRighteousDefenseAction : public CastSpellAction
{
public:
CastRighteousDefenseAction(PlayerbotAI* botAI) : CastSpellAction(botAI, "righteous defense") { }
};
class CastCleansePoisonAction : public CastCureSpellAction
{
public:
CastCleansePoisonAction(PlayerbotAI* botAI) : CastCureSpellAction(botAI, "cleanse") { }
};
class CastCleanseDiseaseAction : public CastCureSpellAction
{
public:
CastCleanseDiseaseAction(PlayerbotAI* botAI) : CastCureSpellAction(botAI, "cleanse") { }
};
class CastCleanseMagicAction : public CastCureSpellAction
{
public:
CastCleanseMagicAction(PlayerbotAI* botAI) : CastCureSpellAction(botAI, "cleanse") { }
};
class CastCleansePoisonOnPartyAction : public CurePartyMemberAction
{
public:
CastCleansePoisonOnPartyAction(PlayerbotAI* botAI) : CurePartyMemberAction(botAI, "cleanse", DISPEL_POISON) { }
std::string const getName() override { return "cleanse poison on party"; }
};
class CastCleanseDiseaseOnPartyAction : public CurePartyMemberAction
{
public:
CastCleanseDiseaseOnPartyAction(PlayerbotAI* botAI) : CurePartyMemberAction(botAI, "cleanse", DISPEL_DISEASE) { }
std::string const getName() override { return "cleanse disease on party"; }
};
class CastCleanseMagicOnPartyAction : public CurePartyMemberAction
{
public:
CastCleanseMagicOnPartyAction(PlayerbotAI* botAI) : CurePartyMemberAction(botAI, "cleanse", DISPEL_MAGIC) { }
std::string const getName() override { return "cleanse magic on party"; }
};
BEGIN_SPELL_ACTION(CastAvengersShieldAction, "avenger's shield")
END_SPELL_ACTION()
BEGIN_SPELL_ACTION(CastExorcismAction, "exorcism")
END_SPELL_ACTION()
class CastHolyShieldAction : public CastBuffSpellAction
{
public:
CastHolyShieldAction(PlayerbotAI* botAI) : CastBuffSpellAction(botAI, "holy shield") { }
};
class CastRedemptionAction : public ResurrectPartyMemberAction
{
public:
CastRedemptionAction(PlayerbotAI* botAI) : ResurrectPartyMemberAction(botAI, "redemption") { }
};
class CastHammerOfJusticeOnEnemyHealerAction : public CastSpellOnEnemyHealerAction
{
public:
CastHammerOfJusticeOnEnemyHealerAction(PlayerbotAI* botAI) : CastSpellOnEnemyHealerAction(botAI, "hammer of justice") { }
};
class CastHammerOfJusticeSnareAction : public CastSnareSpellAction
{
public:
CastHammerOfJusticeSnareAction(PlayerbotAI* botAI) : CastSnareSpellAction(botAI, "hammer of justice") { }
};
class CastDivineFavorAction : public CastBuffSpellAction
{
public:
CastDivineFavorAction(PlayerbotAI* botAI) : CastBuffSpellAction(botAI, "divine favor") { }
};
class CastTurnUndeadAction : public CastBuffSpellAction
{
public:
CastTurnUndeadAction(PlayerbotAI* botAI) : CastBuffSpellAction(botAI, "turn undead") { }
Value<Unit*>* GetTargetValue() override;
};
PROTECT_ACTION(CastBlessingOfProtectionProtectAction, "blessing of protection");
#endif

View File

@@ -0,0 +1,294 @@
/*
* Copyright (C) 2016+ AzerothCore <www.azerothcore.org>, released under GNU GPL v2 license, you may redistribute it and/or modify it under version 2 of the License, or (at your option), any later version.
*/
#include "PaladinAiObjectContext.h"
#include "DpsPaladinStrategy.h"
#include "PaladinActions.h"
#include "PaladinBuffStrategies.h"
#include "PaladinTriggers.h"
#include "GenericPaladinNonCombatStrategy.h"
#include "HealPaladinStrategy.h"
#include "TankPaladinStrategy.h"
#include "NamedObjectContext.h"
#include "Playerbots.h"
class PaladinStrategyFactoryInternal : public NamedObjectContext<Strategy>
{
public:
PaladinStrategyFactoryInternal()
{
creators["nc"] = &PaladinStrategyFactoryInternal::nc;
creators["cure"] = &PaladinStrategyFactoryInternal::cure;
creators["boost"] = &PaladinStrategyFactoryInternal::boost;
creators["cc"] = &PaladinStrategyFactoryInternal::cc;
creators["bthreat"] = &PaladinStrategyFactoryInternal::bthreat;
}
private:
static Strategy* nc(PlayerbotAI* botAI) { return new GenericPaladinNonCombatStrategy(botAI); }
static Strategy* cure(PlayerbotAI* botAI) { return new PaladinCureStrategy(botAI); }
static Strategy* boost(PlayerbotAI* botAI) { return new PaladinBoostStrategy(botAI); }
static Strategy* cc(PlayerbotAI* botAI) { return new PaladinCcStrategy(botAI); }
static Strategy* bthreat(PlayerbotAI* botAI) { return new PaladinBuffThreatStrategy(botAI); }
};
class PaladinResistanceStrategyFactoryInternal : public NamedObjectContext<Strategy>
{
public:
PaladinResistanceStrategyFactoryInternal() : NamedObjectContext<Strategy>(false, true)
{
creators["rshadow"] = &PaladinResistanceStrategyFactoryInternal::rshadow;
creators["rfrost"] = &PaladinResistanceStrategyFactoryInternal::rfrost;
creators["rfire"] = &PaladinResistanceStrategyFactoryInternal::rfire;
creators["baoe"] = &PaladinResistanceStrategyFactoryInternal::baoe;
creators["barmor"] = &PaladinResistanceStrategyFactoryInternal::barmor;
}
private:
static Strategy* rshadow(PlayerbotAI* botAI) { return new PaladinShadowResistanceStrategy(botAI); }
static Strategy* rfrost(PlayerbotAI* botAI) { return new PaladinFrostResistanceStrategy(botAI); }
static Strategy* rfire(PlayerbotAI* botAI) { return new PaladinFireResistanceStrategy(botAI); }
static Strategy* baoe(PlayerbotAI* botAI) { return new PaladinBuffAoeStrategy(botAI); }
static Strategy* barmor(PlayerbotAI* botAI) { return new PaladinBuffArmorStrategy(botAI); }
};
class PaladinBuffStrategyFactoryInternal : public NamedObjectContext<Strategy>
{
public:
PaladinBuffStrategyFactoryInternal() : NamedObjectContext<Strategy>(false, true)
{
creators["bhealth"] = &PaladinBuffStrategyFactoryInternal::bhealth;
creators["bmana"] = &PaladinBuffStrategyFactoryInternal::bmana;
creators["bdps"] = &PaladinBuffStrategyFactoryInternal::bdps;
creators["bstats"] = &PaladinBuffStrategyFactoryInternal::bstats;
}
private:
static Strategy* bhealth(PlayerbotAI* botAI) { return new PaladinBuffHealthStrategy(botAI); }
static Strategy* bmana(PlayerbotAI* botAI) { return new PaladinBuffManaStrategy(botAI); }
static Strategy* bdps(PlayerbotAI* botAI) { return new PaladinBuffDpsStrategy(botAI); }
static Strategy* bstats(PlayerbotAI* botAI) { return new PaladinBuffStatsStrategy(botAI); }
};
class PaladinCombatStrategyFactoryInternal : public NamedObjectContext<Strategy>
{
public:
PaladinCombatStrategyFactoryInternal() : NamedObjectContext<Strategy>(false, true)
{
creators["tank"] = &PaladinCombatStrategyFactoryInternal::tank;
creators["dps"] = &PaladinCombatStrategyFactoryInternal::dps;
creators["heal"] = &PaladinCombatStrategyFactoryInternal::heal;
}
private:
static Strategy* tank(PlayerbotAI* botAI) { return new TankPaladinStrategy(botAI); }
static Strategy* dps(PlayerbotAI* botAI) { return new DpsPaladinStrategy(botAI); }
static Strategy* heal(PlayerbotAI* botAI) { return new HealPaladinStrategy(botAI); }
};
class PaladinTriggerFactoryInternal : public NamedObjectContext<Trigger>
{
public:
PaladinTriggerFactoryInternal()
{
creators["judgement of wisdom"] = &PaladinTriggerFactoryInternal::judgement_of_wisdom;
creators["judgement of light"] = &PaladinTriggerFactoryInternal::judgement_of_light;
creators["blessing"] = &PaladinTriggerFactoryInternal::blessing;
creators["seal"] = &PaladinTriggerFactoryInternal::seal;
creators["art of war"] = &PaladinTriggerFactoryInternal::art_of_war;
creators["blessing on party"] = &PaladinTriggerFactoryInternal::blessing_on_party;
creators["crusader aura"] = &PaladinTriggerFactoryInternal::crusader_aura;
creators["retribution aura"] = &PaladinTriggerFactoryInternal::retribution_aura;
creators["devotion aura"] = &PaladinTriggerFactoryInternal::devotion_aura;
creators["shadow resistance aura"] = &PaladinTriggerFactoryInternal::shadow_resistance_aura;
creators["frost resistance aura"] = &PaladinTriggerFactoryInternal::frost_resistance_aura;
creators["fire resistance aura"] = &PaladinTriggerFactoryInternal::fire_resistance_aura;
creators["hammer of justice snare"] = &PaladinTriggerFactoryInternal::hammer_of_justice_snare;
creators["hammer of justice interrupt"] = &PaladinTriggerFactoryInternal::hammer_of_justice_interrupt;
creators["cleanse cure disease"] = &PaladinTriggerFactoryInternal::CleanseCureDisease;
creators["cleanse party member cure disease"] = &PaladinTriggerFactoryInternal::CleanseCurePartyMemberDisease;
creators["cleanse cure poison"] = &PaladinTriggerFactoryInternal::CleanseCurePoison;
creators["cleanse party member cure poison"] = &PaladinTriggerFactoryInternal::CleanseCurePartyMemberPoison;
creators["cleanse cure magic"] = &PaladinTriggerFactoryInternal::CleanseCureMagic;
creators["cleanse party member cure magic"] = &PaladinTriggerFactoryInternal::CleanseCurePartyMemberMagic;
creators["righteous fury"] = &PaladinTriggerFactoryInternal::righteous_fury;
creators["holy shield"] = &PaladinTriggerFactoryInternal::holy_shield;
creators["hammer of justice on enemy healer"] = &PaladinTriggerFactoryInternal::hammer_of_justice_on_enemy_target;
creators["hammer of justice on snare target"] = &PaladinTriggerFactoryInternal::hammer_of_justice_on_snare_target;
creators["divine favor"] = &PaladinTriggerFactoryInternal::divine_favor;
creators["turn undead"] = &PaladinTriggerFactoryInternal::turn_undead;
creators["avenger's shield"] = &PaladinTriggerFactoryInternal::avenger_shield;
}
private:
static Trigger* turn_undead(PlayerbotAI* botAI) { return new TurnUndeadTrigger(botAI); }
static Trigger* divine_favor(PlayerbotAI* botAI) { return new DivineFavorTrigger(botAI); }
static Trigger* holy_shield(PlayerbotAI* botAI) { return new HolyShieldTrigger(botAI); }
static Trigger* righteous_fury(PlayerbotAI* botAI) { return new RighteousFuryTrigger(botAI); }
static Trigger* judgement_of_wisdom(PlayerbotAI* botAI) { return new JudgementOfWisdomTrigger(botAI); }
static Trigger* judgement_of_light(PlayerbotAI* botAI) { return new JudgementOfLightTrigger(botAI); }
static Trigger* blessing(PlayerbotAI* botAI) { return new BlessingTrigger(botAI); }
static Trigger* seal(PlayerbotAI* botAI) { return new SealTrigger(botAI); }
static Trigger* art_of_war(PlayerbotAI* botAI) { return new ArtOfWarTrigger(botAI); }
static Trigger* blessing_on_party(PlayerbotAI* botAI) { return new BlessingOnPartyTrigger(botAI); }
static Trigger* crusader_aura(PlayerbotAI* botAI) { return new CrusaderAuraTrigger(botAI); }
static Trigger* retribution_aura(PlayerbotAI* botAI) { return new RetributionAuraTrigger(botAI); }
static Trigger* devotion_aura(PlayerbotAI* botAI) { return new DevotionAuraTrigger(botAI); }
static Trigger* shadow_resistance_aura(PlayerbotAI* botAI) { return new ShadowResistanceAuraTrigger(botAI); }
static Trigger* frost_resistance_aura(PlayerbotAI* botAI) { return new FrostResistanceAuraTrigger(botAI); }
static Trigger* fire_resistance_aura(PlayerbotAI* botAI) { return new FireResistanceAuraTrigger(botAI); }
static Trigger* hammer_of_justice_snare(PlayerbotAI* botAI) { return new HammerOfJusticeSnareTrigger(botAI); }
static Trigger* hammer_of_justice_interrupt(PlayerbotAI* botAI) { return new HammerOfJusticeInterruptSpellTrigger(botAI); }
static Trigger* CleanseCureDisease(PlayerbotAI* botAI) { return new CleanseCureDiseaseTrigger(botAI); }
static Trigger* CleanseCurePartyMemberDisease(PlayerbotAI* botAI) { return new CleanseCurePartyMemberDiseaseTrigger(botAI); }
static Trigger* CleanseCurePoison(PlayerbotAI* botAI) { return new CleanseCurePoisonTrigger(botAI); }
static Trigger* CleanseCurePartyMemberPoison(PlayerbotAI* botAI) { return new CleanseCurePartyMemberPoisonTrigger(botAI); }
static Trigger* CleanseCureMagic(PlayerbotAI* botAI) { return new CleanseCureMagicTrigger(botAI); }
static Trigger* CleanseCurePartyMemberMagic(PlayerbotAI* botAI) { return new CleanseCurePartyMemberMagicTrigger(botAI); }
static Trigger* hammer_of_justice_on_enemy_target(PlayerbotAI* botAI) { return new HammerOfJusticeEnemyHealerTrigger(botAI); }
static Trigger* hammer_of_justice_on_snare_target(PlayerbotAI* botAI) { return new HammerOfJusticeSnareTrigger(botAI); }
static Trigger* avenger_shield(PlayerbotAI* botAI) { return new AvengerShieldTrigger(botAI); }
};
class PaladinAiObjectContextInternal : public NamedObjectContext<Action>
{
public:
PaladinAiObjectContextInternal()
{
creators["seal of command"] = &PaladinAiObjectContextInternal::seal_of_command;
creators["seal of vengeance"] = &PaladinAiObjectContextInternal::seal_of_vengeance;
creators["blessing of might"] = &PaladinAiObjectContextInternal::blessing_of_might;
creators["blessing of wisdom"] = &PaladinAiObjectContextInternal::blessing_of_wisdom;
creators["blessing of kings"] = &PaladinAiObjectContextInternal::blessing_of_kings;
creators["blessing of sanctuary"] = &PaladinAiObjectContextInternal::blessing_of_sanctuary;
creators["divine storm"] = &PaladinAiObjectContextInternal::divine_storm;
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 wisdom on party"] = &PaladinAiObjectContextInternal::blessing_of_wisdom_on_party;
creators["redemption"] = &PaladinAiObjectContextInternal::redemption;
creators["crusader strike"] = &PaladinAiObjectContextInternal::crusader_strike;
creators["crusader aura"] = &PaladinAiObjectContextInternal::crusader_aura;
creators["seal of light"] = &PaladinAiObjectContextInternal::seal_of_light;
creators["devotion aura"] = &PaladinAiObjectContextInternal::devotion_aura;
creators["holy wrath"] = &PaladinAiObjectContextInternal::holy_wrath;
creators["consecration"] = &PaladinAiObjectContextInternal::consecration;
creators["cleanse disease"] = &PaladinAiObjectContextInternal::cleanse_disease;
creators["cleanse poison"] = &PaladinAiObjectContextInternal::cleanse_poison;
creators["cleanse magic"] = &PaladinAiObjectContextInternal::cleanse_magic;
creators["purify disease"] = &PaladinAiObjectContextInternal::purify_disease;
creators["purify poison"] = &PaladinAiObjectContextInternal::purify_poison;
creators["cleanse poison on party"] = &PaladinAiObjectContextInternal::cleanse_poison_on_party;
creators["cleanse disease on party"] = &PaladinAiObjectContextInternal::cleanse_disease_on_party;
creators["cleanse magic on party"] = &PaladinAiObjectContextInternal::cleanse_magic_on_party;
creators["purify poison on party"] = &PaladinAiObjectContextInternal::purify_poison_on_party;
creators["purify disease on party"] = &PaladinAiObjectContextInternal::purify_disease_on_party;
creators["seal of wisdom"] = &PaladinAiObjectContextInternal::seal_of_wisdom;
creators["seal of justice"] = &PaladinAiObjectContextInternal::seal_of_justice;
creators["seal of righteousness"] = &PaladinAiObjectContextInternal::seal_of_righteousness;
creators["flash of light"] = &PaladinAiObjectContextInternal::flash_of_light;
creators["hand of reckoning"] = &PaladinAiObjectContextInternal::hand_of_reckoning;
creators["avenger's shield"] = &PaladinAiObjectContextInternal::avengers_shield;
creators["exorcism"] = &PaladinAiObjectContextInternal::exorcism;
creators["judgement"] = &PaladinAiObjectContextInternal::judgement;
creators["judgement of light"] = &PaladinAiObjectContextInternal::judgement_of_light;
creators["judgement of wisdom"] = &PaladinAiObjectContextInternal::judgement_of_wisdom;
creators["divine shield"] = &PaladinAiObjectContextInternal::divine_shield;
creators["divine protection"] = &PaladinAiObjectContextInternal::divine_protection;
creators["divine protection on party"] =&PaladinAiObjectContextInternal::divine_protection_on_party;
creators["hammer of justice"] = &PaladinAiObjectContextInternal::hammer_of_justice;
creators["flash of light on party"] = &PaladinAiObjectContextInternal::flash_of_light_on_party;
creators["holy light"] = &PaladinAiObjectContextInternal::holy_light;
creators["holy light on party"] = &PaladinAiObjectContextInternal::holy_light_on_party;
creators["lay on hands"] = &PaladinAiObjectContextInternal::lay_on_hands;
creators["lay on hands on party"] = &PaladinAiObjectContextInternal::lay_on_hands_on_party;
creators["judgement of justice"] = &PaladinAiObjectContextInternal::judgement_of_justice;
creators["hammer of wrath"] = &PaladinAiObjectContextInternal::hammer_of_wrath;
creators["holy shield"] = &PaladinAiObjectContextInternal::holy_shield;
creators["hammer of the righteous"] = &PaladinAiObjectContextInternal::hammer_of_the_righteous;
creators["retribution aura"] = &PaladinAiObjectContextInternal::retribution_aura;
creators["shadow resistance aura"] = &PaladinAiObjectContextInternal::shadow_resistance_aura;
creators["frost resistance aura"] = &PaladinAiObjectContextInternal::frost_resistance_aura;
creators["fire resistance aura"] = &PaladinAiObjectContextInternal::fire_resistance_aura;
creators["righteous fury"] = &PaladinAiObjectContextInternal::righteous_fury;
creators["hammer of justice on enemy healer"] = &PaladinAiObjectContextInternal::hammer_of_justice_on_enemy_healer;
creators["hammer of justice on snare target"] = &PaladinAiObjectContextInternal::hammer_of_justice_on_snare_target;
creators["divine favor"] = &PaladinAiObjectContextInternal::divine_favor;
creators["turn undead"] = &PaladinAiObjectContextInternal::turn_undead;
creators["blessing of protection on party"] = &PaladinAiObjectContextInternal::blessing_of_protection_on_party;
creators["righteous defense"] = &PaladinAiObjectContextInternal::righteous_defense;
}
private:
static Action* blessing_of_protection_on_party(PlayerbotAI* botAI) { return new CastBlessingOfProtectionProtectAction(botAI); }
static Action* turn_undead(PlayerbotAI* botAI) { return new CastTurnUndeadAction(botAI); }
static Action* divine_favor(PlayerbotAI* botAI) { return new CastDivineFavorAction(botAI); }
static Action* righteous_fury(PlayerbotAI* botAI) { return new CastRighteousFuryAction(botAI); }
static Action* seal_of_command(PlayerbotAI* botAI) { return new CastSealOfCommandAction(botAI); }
static Action* seal_of_vengeance(PlayerbotAI* botAI) { return new CastSealOfVengeanceAction(botAI); }
static Action* blessing_of_sanctuary(PlayerbotAI* botAI) { return new CastBlessingOfSanctuaryAction(botAI); }
static Action* blessing_of_might(PlayerbotAI* botAI) { return new CastBlessingOfMightAction(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* divine_storm(PlayerbotAI* botAI) { return new CastDivineStormAction(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); }
static Action* blessing_of_wisdom_on_party(PlayerbotAI* botAI) { return new CastBlessingOfWisdomOnPartyAction(botAI); }
static Action* redemption(PlayerbotAI* botAI) { return new CastRedemptionAction(botAI); }
static Action* crusader_strike(PlayerbotAI* botAI) { return new CastCrusaderStrikeAction(botAI); }
static Action* crusader_aura(PlayerbotAI* botAI) { return new CastCrusaderAuraAction(botAI); }
static Action* seal_of_light(PlayerbotAI* botAI) { return new CastSealOfLightAction(botAI); }
static Action* devotion_aura(PlayerbotAI* botAI) { return new CastDevotionAuraAction(botAI); }
static Action* holy_wrath(PlayerbotAI* botAI) { return new CastHolyWrathAction(botAI); }
static Action* consecration(PlayerbotAI* botAI) { return new CastConsecrationAction(botAI); }
static Action* cleanse_poison(PlayerbotAI* botAI) { return new CastCleansePoisonAction(botAI); }
static Action* cleanse_disease(PlayerbotAI* botAI) { return new CastCleanseDiseaseAction(botAI); }
static Action* cleanse_magic(PlayerbotAI* botAI) { return new CastCleanseMagicAction(botAI); }
static Action* purify_poison(PlayerbotAI* botAI) { return new CastPurifyPoisonAction(botAI); }
static Action* purify_disease(PlayerbotAI* botAI) { return new CastPurifyDiseaseAction(botAI); }
static Action* cleanse_poison_on_party(PlayerbotAI* botAI) { return new CastCleansePoisonOnPartyAction(botAI); }
static Action* cleanse_disease_on_party(PlayerbotAI* botAI) { return new CastCleanseDiseaseOnPartyAction(botAI); }
static Action* cleanse_magic_on_party(PlayerbotAI* botAI) { return new CastCleanseMagicOnPartyAction(botAI); }
static Action* purify_poison_on_party(PlayerbotAI* botAI) { return new CastPurifyPoisonOnPartyAction(botAI); }
static Action* purify_disease_on_party(PlayerbotAI* botAI) { return new CastPurifyDiseaseOnPartyAction(botAI); }
static Action* seal_of_wisdom(PlayerbotAI* botAI) { return new CastSealOfWisdomAction(botAI); }
static Action* seal_of_justice(PlayerbotAI* botAI) { return new CastSealOfJusticeAction(botAI); }
static Action* seal_of_righteousness(PlayerbotAI* botAI) { return new CastSealOfRighteousnessAction(botAI); }
static Action* flash_of_light(PlayerbotAI* botAI) { return new CastFlashOfLightAction(botAI); }
static Action* hand_of_reckoning(PlayerbotAI* botAI) { return new CastHandOfReckoningAction(botAI); }
static Action* avengers_shield(PlayerbotAI* botAI) { return new CastAvengersShieldAction(botAI); }
static Action* exorcism(PlayerbotAI* botAI) { return new CastExorcismAction(botAI); }
static Action* judgement(PlayerbotAI* botAI) { return new CastJudgementAction(botAI); }
static Action* judgement_of_light(PlayerbotAI* botAI) { return new CastJudgementOfLightAction(botAI); }
static Action* judgement_of_wisdom(PlayerbotAI* botAI) { return new CastJudgementOfWisdomAction(botAI); }
static Action* divine_shield(PlayerbotAI* botAI) { return new CastDivineShieldAction(botAI); }
static Action* divine_protection(PlayerbotAI* botAI) { return new CastDivineProtectionAction(botAI); }
static Action* divine_protection_on_party(PlayerbotAI* botAI) { return new CastDivineProtectionOnPartyAction(botAI); }
static Action* hammer_of_justice(PlayerbotAI* botAI) { return new CastHammerOfJusticeAction(botAI); }
static Action* flash_of_light_on_party(PlayerbotAI* botAI) { return new CastFlashOfLightOnPartyAction(botAI); }
static Action* holy_light(PlayerbotAI* botAI) { return new CastHolyLightAction(botAI); }
static Action* holy_light_on_party(PlayerbotAI* botAI) { return new CastHolyLightOnPartyAction(botAI); }
static Action* lay_on_hands(PlayerbotAI* botAI) { return new CastLayOnHandsAction(botAI); }
static Action* lay_on_hands_on_party(PlayerbotAI* botAI) { return new CastLayOnHandsOnPartyAction(botAI); }
static Action* judgement_of_justice(PlayerbotAI* botAI) { return new CastJudgementOfJusticeAction(botAI); }
static Action* hammer_of_wrath(PlayerbotAI* botAI) { return new CastHammerOfWrathAction(botAI); }
static Action* holy_shield(PlayerbotAI* botAI) { return new CastHolyShieldAction(botAI); }
static Action* hammer_of_the_righteous(PlayerbotAI* botAI) { return new CastHammerOfTheRighteousAction(botAI); }
static Action* retribution_aura(PlayerbotAI* botAI) { return new CastRetributionAuraAction(botAI); }
static Action* shadow_resistance_aura(PlayerbotAI* botAI) { return new CastShadowResistanceAuraAction(botAI); }
static Action* frost_resistance_aura(PlayerbotAI* botAI) { return new CastFrostResistanceAuraAction(botAI); }
static Action* fire_resistance_aura(PlayerbotAI* botAI) { return new CastFireResistanceAuraAction(botAI); }
static Action* hammer_of_justice_on_enemy_healer(PlayerbotAI* botAI) { return new CastHammerOfJusticeOnEnemyHealerAction(botAI); }
static Action* hammer_of_justice_on_snare_target(PlayerbotAI* botAI) { return new CastHammerOfJusticeSnareAction(botAI); }
static Action* righteous_defense(PlayerbotAI* botAI) { return new CastRighteousDefenseAction(botAI); }
};
PaladinAiObjectContext::PaladinAiObjectContext(PlayerbotAI* botAI) : AiObjectContext(botAI)
{
strategyContexts.Add(new PaladinStrategyFactoryInternal());
strategyContexts.Add(new PaladinCombatStrategyFactoryInternal());
strategyContexts.Add(new PaladinBuffStrategyFactoryInternal());
strategyContexts.Add(new PaladinResistanceStrategyFactoryInternal());
actionContexts.Add(new PaladinAiObjectContextInternal());
triggerContexts.Add(new PaladinTriggerFactoryInternal());
}

View File

@@ -0,0 +1,18 @@
/*
* Copyright (C) 2016+ AzerothCore <www.azerothcore.org>, released under GNU GPL v2 license, you may redistribute it and/or modify it under version 2 of the License, or (at your option), any later version.
*/
#ifndef _PLAYERBOT_PALADINAIOBJECTCONTEXT_H
#define _PLAYERBOT_PALADINAIOBJECTCONTEXT_H
#include "AiObjectContext.h"
class PlayerbotAI;
class PaladinAiObjectContext : public AiObjectContext
{
public:
PaladinAiObjectContext(PlayerbotAI* botAI);
};
#endif

View File

@@ -0,0 +1,61 @@
/*
* Copyright (C) 2016+ AzerothCore <www.azerothcore.org>, released under GNU GPL v2 license, you may redistribute it and/or modify it under version 2 of the License, or (at your option), any later version.
*/
#include "PaladinBuffStrategies.h"
#include "Playerbots.h"
void PaladinBuffManaStrategy::InitTriggers(std::vector<TriggerNode*>& triggers)
{
triggers.push_back(new TriggerNode("blessing on party", NextAction::array(0, new NextAction("blessing of wisdom on party", 11.0f), nullptr)));
triggers.push_back(new TriggerNode("blessing", NextAction::array(0, new NextAction("blessing of wisdom", ACTION_HIGH + 8), nullptr)));
}
void PaladinBuffHealthStrategy::InitTriggers(std::vector<TriggerNode*>& triggers)
{
triggers.push_back(new TriggerNode("blessing on party", NextAction::array(0, new NextAction("blessing of kings on party", 11.0f), nullptr)));
triggers.push_back(new TriggerNode("blessing", NextAction::array(0, new NextAction("blessing of kings", ACTION_HIGH + 8), nullptr)));
}
void PaladinBuffDpsStrategy::InitTriggers(std::vector<TriggerNode*>& triggers)
{
triggers.push_back(new TriggerNode("blessing on party", NextAction::array(0, new NextAction("blessing of might on party", 11.0f), nullptr)));
triggers.push_back(new TriggerNode("blessing", NextAction::array(0, new NextAction("blessing of might", ACTION_HIGH + 8), nullptr)));
}
void PaladinShadowResistanceStrategy::InitTriggers(std::vector<TriggerNode*>& triggers)
{
triggers.push_back(new TriggerNode("shadow resistance aura", NextAction::array(0, new NextAction("shadow resistance aura", 90.0f), nullptr)));
}
void PaladinFrostResistanceStrategy::InitTriggers(std::vector<TriggerNode*>& triggers)
{
triggers.push_back(new TriggerNode("frost resistance aura", NextAction::array(0, new NextAction("frost resistance aura", 90.0f), nullptr)));
}
void PaladinFireResistanceStrategy::InitTriggers(std::vector<TriggerNode*>& triggers)
{
triggers.push_back(new TriggerNode("fire resistance aura", NextAction::array(0, new NextAction("fire resistance aura", 90.0f), nullptr)));
}
void PaladinBuffArmorStrategy::InitTriggers(std::vector<TriggerNode*>& triggers)
{
triggers.push_back(new TriggerNode("devotion aura", NextAction::array(0, new NextAction("devotion aura", 90.0f), nullptr)));
}
void PaladinBuffAoeStrategy::InitTriggers(std::vector<TriggerNode*>& triggers)
{
triggers.push_back(new TriggerNode("retribution aura", NextAction::array(0, new NextAction("retribution aura", 90.0f), nullptr)));
}
void PaladinBuffThreatStrategy::InitTriggers(std::vector<TriggerNode*>& triggers)
{
triggers.push_back(new TriggerNode("righteous fury", NextAction::array(0, new NextAction("righteous fury", ACTION_HIGH + 8), nullptr)));
}
void PaladinBuffStatsStrategy::InitTriggers(std::vector<TriggerNode*>& triggers)
{
triggers.push_back(new TriggerNode("blessing on party", NextAction::array(0, new NextAction("blessing of kings on party", 11.0f), nullptr)));
triggers.push_back(new TriggerNode("blessing", NextAction::array(0, new NextAction("blessing of kings", ACTION_HIGH + 8), nullptr)));
}

View File

@@ -0,0 +1,102 @@
/*
* Copyright (C) 2016+ AzerothCore <www.azerothcore.org>, released under GNU GPL v2 license, you may redistribute it and/or modify it under version 2 of the License, or (at your option), any later version.
*/
#ifndef _PLAYERBOT_PALADINBUFFSTRATEGIES_H
#define _PLAYERBOT_PALADINBUFFSTRATEGIES_H
#include "Strategy.h"
class PlayerbotAI;
class PaladinBuffManaStrategy : public Strategy
{
public:
PaladinBuffManaStrategy(PlayerbotAI* botAI) : Strategy(botAI) { }
void InitTriggers(std::vector<TriggerNode*>& triggers) override;
std::string const getName() override { return "bmana"; }
};
class PaladinBuffHealthStrategy : public Strategy
{
public:
PaladinBuffHealthStrategy(PlayerbotAI* botAI) : Strategy(botAI) { }
void InitTriggers(std::vector<TriggerNode*>& triggers) override;
std::string const getName() override { return "bhealth"; }
};
class PaladinBuffDpsStrategy : public Strategy
{
public:
PaladinBuffDpsStrategy(PlayerbotAI* botAI) : Strategy(botAI) { }
void InitTriggers(std::vector<TriggerNode*>& triggers) override;
std::string const getName() override { return "bdps"; }
};
class PaladinBuffArmorStrategy : public Strategy
{
public:
PaladinBuffArmorStrategy(PlayerbotAI* botAI) : Strategy(botAI) { }
void InitTriggers(std::vector<TriggerNode*>& triggers) override;
std::string const getName() override { return "barmor"; }
};
class PaladinBuffAoeStrategy : public Strategy
{
public:
PaladinBuffAoeStrategy(PlayerbotAI* botAI) : Strategy(botAI) { }
void InitTriggers(std::vector<TriggerNode*>& triggers) override;
std::string const getName() override { return "baoe"; }
};
class PaladinBuffThreatStrategy : public Strategy
{
public:
PaladinBuffThreatStrategy(PlayerbotAI* botAI) : Strategy(botAI) { }
void InitTriggers(std::vector<TriggerNode*>& triggers) override;
std::string const getName() override { return "bthreat"; }
};
class PaladinBuffStatsStrategy : public Strategy
{
public:
PaladinBuffStatsStrategy(PlayerbotAI* botAI) : Strategy(botAI) { }
void InitTriggers(std::vector<TriggerNode*>& triggers) override;
std::string const getName() override { return "bstats"; }
};
class PaladinShadowResistanceStrategy : public Strategy
{
public:
PaladinShadowResistanceStrategy(PlayerbotAI* botAI) : Strategy(botAI) { }
void InitTriggers(std::vector<TriggerNode*>& triggers) override;
std::string const getName() override { return "rshadow"; }
};
class PaladinFrostResistanceStrategy : public Strategy
{
public:
PaladinFrostResistanceStrategy(PlayerbotAI* botAI) : Strategy(botAI) { }
void InitTriggers(std::vector<TriggerNode*>& triggers) override;
std::string const getName() override { return "rfrost"; }
};
class PaladinFireResistanceStrategy : public Strategy
{
public:
PaladinFireResistanceStrategy(PlayerbotAI* botAI) : Strategy(botAI) { }
void InitTriggers(std::vector<TriggerNode*>& triggers) override;
std::string const getName() override { return "rfire"; }
};
#endif

View File

@@ -0,0 +1,27 @@
/*
* Copyright (C) 2016+ AzerothCore <www.azerothcore.org>, released under GNU GPL v2 license, you may redistribute it and/or modify it under version 2 of the License, or (at your option), any later version.
*/
#include "PaladinActions.h"
#include "PaladinTriggers.h"
#include "Playerbots.h"
bool SealTrigger::IsActive()
{
Unit* target = GetTarget();
return !botAI->HasAura("seal of justice", target) && !botAI->HasAura("seal of command", target) && !botAI->HasAura("seal of vengeance", target) &&
!botAI->HasAura("seal of righteousness", target) && !botAI->HasAura("seal of light", target) && !botAI->HasAura("seal of wisdom", target) &&
AI_VALUE2(bool, "combat", "self target");
}
bool CrusaderAuraTrigger::IsActive()
{
Unit* target = GetTarget();
return AI_VALUE2(bool, "mounted", "self target") && !botAI->HasAura("crusader aura", target);
}
bool BlessingTrigger::IsActive()
{
Unit* target = GetTarget();
return SpellTrigger::IsActive() && !botAI->HasAnyAuraOf(target, "blessing of might", "blessing of wisdom", "blessing of kings", "blessing of sanctuary", nullptr);
}

View File

@@ -0,0 +1,149 @@
/*
* Copyright (C) 2016+ AzerothCore <www.azerothcore.org>, released under GNU GPL v2 license, you may redistribute it and/or modify it under version 2 of the License, or (at your option), any later version.
*/
#ifndef _PLAYERBOT_PALADINTRIGGERS_H
#define _PLAYERBOT_PALADINTRIGGERS_H
#include "CureTriggers.h"
#include "SharedDefines.h"
class PlayerbotAI;
BUFF_TRIGGER(HolyShieldTrigger, "holy shield");
BUFF_TRIGGER(RighteousFuryTrigger, "righteous fury");
BUFF_TRIGGER(RetributionAuraTrigger, "retribution aura");
class CrusaderAuraTrigger : public BuffTrigger
{
public:
CrusaderAuraTrigger(PlayerbotAI* botAI) : BuffTrigger(botAI, "crusader aura") { }
bool IsActive() override;
};
class SealTrigger : public BuffTrigger
{
public:
SealTrigger(PlayerbotAI* botAI) : BuffTrigger(botAI, "seal of justice") { }
bool IsActive() override;
};
DEBUFF_TRIGGER(JudgementOfLightTrigger, "judgement of light");
DEBUFF_TRIGGER(JudgementOfWisdomTrigger, "judgement of wisdom");
class BlessingOnPartyTrigger : public BuffOnPartyTrigger
{
public:
BlessingOnPartyTrigger(PlayerbotAI* botAI) : BuffOnPartyTrigger(botAI, "blessing of kings,blessing of might,blessing of wisdom", 2) { }
};
class BlessingTrigger : public BuffTrigger
{
public:
BlessingTrigger(PlayerbotAI* botAI) : BuffTrigger(botAI, "blessing of sanctuary", 2) { }
bool IsActive() override;
};
class HammerOfJusticeInterruptSpellTrigger : public InterruptSpellTrigger
{
public:
HammerOfJusticeInterruptSpellTrigger(PlayerbotAI* botAI) : InterruptSpellTrigger(botAI, "hammer of justice") { }
};
class HammerOfJusticeSnareTrigger : public SnareTargetTrigger
{
public:
HammerOfJusticeSnareTrigger(PlayerbotAI* botAI) : SnareTargetTrigger(botAI, "hammer of justice") { }
};
class ArtOfWarTrigger : public HasAuraTrigger
{
public:
ArtOfWarTrigger(PlayerbotAI* botAI) : HasAuraTrigger(botAI, "the art of war") { }
};
class ShadowResistanceAuraTrigger : public BuffTrigger
{
public:
ShadowResistanceAuraTrigger(PlayerbotAI* botAI) : BuffTrigger(botAI, "shadow resistance aura") { }
};
class FrostResistanceAuraTrigger : public BuffTrigger
{
public:
FrostResistanceAuraTrigger(PlayerbotAI* botAI) : BuffTrigger(botAI, "frost resistance aura") { }
};
class FireResistanceAuraTrigger : public BuffTrigger
{
public:
FireResistanceAuraTrigger(PlayerbotAI* botAI) : BuffTrigger(botAI, "fire resistance aura") { }
};
class DevotionAuraTrigger : public BuffTrigger
{
public:
DevotionAuraTrigger(PlayerbotAI* botAI) : BuffTrigger(botAI, "devotion aura") { }
};
class CleanseCureDiseaseTrigger : public NeedCureTrigger
{
public:
CleanseCureDiseaseTrigger(PlayerbotAI* botAI) : NeedCureTrigger(botAI, "cleanse", DISPEL_DISEASE) { }
};
class CleanseCurePartyMemberDiseaseTrigger : public PartyMemberNeedCureTrigger
{
public:
CleanseCurePartyMemberDiseaseTrigger(PlayerbotAI* botAI) : PartyMemberNeedCureTrigger(botAI, "cleanse", DISPEL_DISEASE) { }
};
class CleanseCurePoisonTrigger : public NeedCureTrigger
{
public:
CleanseCurePoisonTrigger(PlayerbotAI* botAI) : NeedCureTrigger(botAI, "cleanse", DISPEL_POISON) { }
};
class CleanseCurePartyMemberPoisonTrigger : public PartyMemberNeedCureTrigger
{
public:
CleanseCurePartyMemberPoisonTrigger(PlayerbotAI* botAI) : PartyMemberNeedCureTrigger(botAI, "cleanse", DISPEL_POISON) { }
};
class CleanseCureMagicTrigger : public NeedCureTrigger
{
public:
CleanseCureMagicTrigger(PlayerbotAI* botAI) : NeedCureTrigger(botAI, "cleanse", DISPEL_MAGIC) { }
};
class CleanseCurePartyMemberMagicTrigger : public PartyMemberNeedCureTrigger
{
public:
CleanseCurePartyMemberMagicTrigger(PlayerbotAI* botAI) : PartyMemberNeedCureTrigger(botAI, "cleanse", DISPEL_MAGIC) { }
};
class HammerOfJusticeEnemyHealerTrigger : public InterruptEnemyHealerTrigger
{
public:
HammerOfJusticeEnemyHealerTrigger(PlayerbotAI* botAI) : InterruptEnemyHealerTrigger(botAI, "hammer of justice") { }
};
class DivineFavorTrigger : public BuffTrigger
{
public:
DivineFavorTrigger(PlayerbotAI* botAI) : BuffTrigger(botAI, "divine favor") { }
};
class TurnUndeadTrigger : public HasCcTargetTrigger
{
public:
TurnUndeadTrigger(PlayerbotAI* botAI) : HasCcTargetTrigger(botAI, "turn undead") { }
};
DEBUFF_TRIGGER(AvengerShieldTrigger, "avenger's shield");
#endif

View File

@@ -0,0 +1,54 @@
/*
* Copyright (C) 2016+ AzerothCore <www.azerothcore.org>, released under GNU GPL v2 license, you may redistribute it and/or modify it under version 2 of the License, or (at your option), any later version.
*/
#include "TankPaladinStrategy.h"
#include "Playerbots.h"
class TankPaladinStrategyActionNodeFactory : public NamedObjectFactory<ActionNode>
{
public:
TankPaladinStrategyActionNodeFactory()
{
creators["seal of vengeance"] = &seal_of_vengeance;
creators["hand of reckoning"] = &hand_of_reckoning;
}
private:
static ActionNode* seal_of_vengeance(PlayerbotAI* botAI)
{
return new ActionNode("seal of vengeance",
/*P*/ nullptr,
/*A*/ NextAction::array(0, new NextAction("seal of righteousness"), nullptr),
/*C*/ nullptr);
}
ACTION_NODE_A(hand_of_reckoning, "hand of reckoning", "righteous defense");
};
TankPaladinStrategy::TankPaladinStrategy(PlayerbotAI* botAI) : GenericPaladinStrategy(botAI)
{
actionNodeFactories.Add(new TankPaladinStrategyActionNodeFactory());
}
NextAction** TankPaladinStrategy::getDefaultActions()
{
return NextAction::array(0, new NextAction("melee", ACTION_NORMAL), nullptr);
}
void TankPaladinStrategy::InitTriggers(std::vector<TriggerNode*>& triggers)
{
GenericPaladinStrategy::InitTriggers(triggers);
triggers.push_back(new TriggerNode("seal", NextAction::array(0, new NextAction("seal of vengeance", 90.0f), nullptr)));
triggers.push_back(new TriggerNode("judgement of light", NextAction::array(0, new NextAction("judgement of light", ACTION_NORMAL + 2), nullptr)));
triggers.push_back(new TriggerNode("medium mana", NextAction::array(0, new NextAction("judgement of wisdom", ACTION_NORMAL + 3), nullptr)));
triggers.push_back(new TriggerNode("enemy is close", NextAction::array(0, new NextAction("judgement", ACTION_NORMAL + 3), nullptr)));
triggers.push_back(new TriggerNode("light aoe", NextAction::array(0, new NextAction("hammer of the righteous", ACTION_HIGH + 6), new NextAction("avenger's shield", ACTION_HIGH + 6), nullptr)));
triggers.push_back(new TriggerNode("avenger's shield", NextAction::array(0, new NextAction("avenger's shield", ACTION_HIGH + 6), nullptr)));
triggers.push_back(new TriggerNode("medium aoe", NextAction::array(0, new NextAction("consecration", ACTION_HIGH + 6), nullptr)));
triggers.push_back(new TriggerNode("enemy is close", NextAction::array(0, new NextAction("consecration", ACTION_HIGH + 6), nullptr)));
triggers.push_back(new TriggerNode("lose aggro", NextAction::array(0, new NextAction("hand of reckoning", ACTION_HIGH + 7), nullptr)));
triggers.push_back(new TriggerNode("holy shield", NextAction::array(0, new NextAction("holy shield", ACTION_HIGH + 7), nullptr)));
triggers.push_back(new TriggerNode("blessing", NextAction::array(0, new NextAction("blessing of sanctuary", ACTION_HIGH + 9), nullptr)));
}

View File

@@ -0,0 +1,23 @@
/*
* Copyright (C) 2016+ AzerothCore <www.azerothcore.org>, released under GNU GPL v2 license, you may redistribute it and/or modify it under version 2 of the License, or (at your option), any later version.
*/
#ifndef _PLAYERBOT_TANKPALADINSTRATEGY_H
#define _PLAYERBOT_TANKPALADINSTRATEGY_H
#include "GenericPaladinStrategy.h"
class PlayerbotAI;
class TankPaladinStrategy : public GenericPaladinStrategy
{
public:
TankPaladinStrategy(PlayerbotAI* botAI);
void InitTriggers(std::vector<TriggerNode*>& triggers) override;
std::string const getName() override { return "tank"; }
NextAction** getDefaultActions() override;
uint32 GetType() const override { return STRATEGY_TYPE_TANK | STRATEGY_TYPE_MELEE; }
};
#endif