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,51 @@
/*
* 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 "CasterShamanStrategy.h"
#include "Playerbots.h"
class CasterShamanStrategyActionNodeFactory : public NamedObjectFactory<ActionNode>
{
public:
CasterShamanStrategyActionNodeFactory()
{
creators["magma totem"] = &magma_totem;
}
private:
static ActionNode* magma_totem(PlayerbotAI* botAI)
{
return new ActionNode ("magma totem",
/*P*/ nullptr,
/*A*/ nullptr,
/*C*/ NextAction::array(0, new NextAction("fire nova"), nullptr));
}
};
CasterShamanStrategy::CasterShamanStrategy(PlayerbotAI* botAI) : GenericShamanStrategy(botAI)
{
actionNodeFactories.Add(new CasterShamanStrategyActionNodeFactory());
}
NextAction** CasterShamanStrategy::getDefaultActions()
{
return NextAction::array(0, new NextAction("lightning bolt", 10.0f), nullptr);
}
void CasterShamanStrategy::InitTriggers(std::vector<TriggerNode*>& triggers)
{
GenericShamanStrategy::InitTriggers(triggers);
triggers.push_back(new TriggerNode("enemy out of spell", NextAction::array(0, new NextAction("reach spell", ACTION_NORMAL + 9), nullptr)));
triggers.push_back(new TriggerNode("shaman weapon", NextAction::array(0, new NextAction("flametongue weapon", 23.0f), nullptr)));
triggers.push_back(new TriggerNode("searing totem", NextAction::array(0, new NextAction("searing totem", 19.0f), nullptr)));
triggers.push_back(new TriggerNode("shock", NextAction::array(0, new NextAction("earth shock", 20.0f), nullptr)));
triggers.push_back(new TriggerNode("frost shock snare", NextAction::array(0, new NextAction("frost shock", 21.0f), nullptr)));
triggers.push_back(new TriggerNode("medium aoe", NextAction::array(0, new NextAction("flametongue totem", ACTION_LIGHT_HEAL), nullptr)));
}
void CasterAoeShamanStrategy::InitTriggers(std::vector<TriggerNode*>& triggers)
{
triggers.push_back(new TriggerNode("light aoe", NextAction::array(0, new NextAction("chain lightning", 25.0f), nullptr)));
}

View File

@@ -0,0 +1,32 @@
/*
* 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_CASTSHAMANSTRATEGY_H
#define _PLAYERBOT_CASTSHAMANSTRATEGY_H
#include "GenericShamanStrategy.h"
class PlayerbotAI;
class CasterShamanStrategy : public GenericShamanStrategy
{
public:
CasterShamanStrategy(PlayerbotAI* botAI);
void InitTriggers(std::vector<TriggerNode*>& triggers) override;
NextAction** getDefaultActions() override;
std::string const getName() override { return "caster"; }
uint32 GetType() const override { return STRATEGY_TYPE_COMBAT | STRATEGY_TYPE_DPS | STRATEGY_TYPE_RANGED; }
};
class CasterAoeShamanStrategy : public CombatStrategy
{
public:
CasterAoeShamanStrategy(PlayerbotAI* botAI) : CombatStrategy(botAI) { }
void InitTriggers(std::vector<TriggerNode*>& triggers) override;
std::string const getName() override { return "caster aoe"; }
};
#endif

View File

@@ -0,0 +1,150 @@
/*
* 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 "HealShamanStrategy.h"
#include "Playerbots.h"
class GenericShamanStrategyActionNodeFactory : public NamedObjectFactory<ActionNode>
{
public:
GenericShamanStrategyActionNodeFactory()
{
creators["flametongue weapon"] = &flametongue_weapon;
creators["frostbrand weapon"] = &frostbrand_weapon;
creators["windfury weapon"] = &windfury_weapon;
creators["lesser healing wave"] = &lesser_healing_wave;
creators["lesser healing wave on party"] = &lesser_healing_wave_on_party;
creators["chain heal"] = &chain_heal;
creators["riptide"] = &riptide;
creators["chain heal on party"] = &chain_heal_on_party;
creators["riptide on party"] = &riptide_on_party;
creators["earth shock"] = &earth_shock;
}
private:
static ActionNode* earth_shock(PlayerbotAI* botAI)
{
return new ActionNode ("earth shock",
/*P*/ nullptr,
/*A*/ NextAction::array(0, new NextAction("flame shock"), nullptr),
/*C*/ nullptr);
}
static ActionNode* flametongue_weapon(PlayerbotAI* botAI)
{
return new ActionNode ("flametongue weapon",
/*P*/ nullptr,
/*A*/ NextAction::array(0, new NextAction("frostbrand weapon"), nullptr),
/*C*/ nullptr);
}
static ActionNode* frostbrand_weapon(PlayerbotAI* botAI)
{
return new ActionNode ("frostbrand weapon",
/*P*/ nullptr,
/*A*/ NextAction::array(0, new NextAction("rockbiter weapon"), nullptr),
/*C*/ nullptr);
}
static ActionNode* windfury_weapon(PlayerbotAI* botAI)
{
return new ActionNode ("windfury weapon",
/*P*/ nullptr,
/*A*/ NextAction::array(0, new NextAction("rockbiter weapon"), nullptr),
/*C*/ nullptr);
}
static ActionNode* lesser_healing_wave(PlayerbotAI* botAI)
{
return new ActionNode ("lesser healing wave",
/*P*/ nullptr,
/*A*/ NextAction::array(0, new NextAction("healing wave"), nullptr),
/*C*/ nullptr);
}
static ActionNode* lesser_healing_wave_on_party(PlayerbotAI* botAI)
{
return new ActionNode ("lesser healing wave on party",
/*P*/ nullptr,
/*A*/ NextAction::array(0, new NextAction("healing wave on party"), nullptr),
/*C*/ nullptr);
}
static ActionNode* chain_heal(PlayerbotAI* botAI)
{
return new ActionNode ("chain heal",
/*P*/ nullptr,
/*A*/ NextAction::array(0, new NextAction("lesser healing wave"), nullptr),
/*C*/ nullptr);
}
static ActionNode* riptide(PlayerbotAI* botAI)
{
return new ActionNode ("riptide",
/*P*/ nullptr,
/*A*/ NextAction::array(0, new NextAction("healing wave"), nullptr),
/*C*/ nullptr);
}
static ActionNode* chain_heal_on_party(PlayerbotAI* botAI)
{
return new ActionNode ("chain heal on party",
/*P*/ nullptr,
/*A*/ NextAction::array(0, new NextAction("lesser healing wave on party"), nullptr),
/*C*/ nullptr);
}
static ActionNode* riptide_on_party(PlayerbotAI* botAI)
{
return new ActionNode ("riptide on party",
/*P*/ nullptr,
/*A*/ NextAction::array(0, new NextAction("healing wave on party"), nullptr),
/*C*/ nullptr);
}
};
GenericShamanStrategy::GenericShamanStrategy(PlayerbotAI* botAI) : CombatStrategy(botAI)
{
actionNodeFactories.Add(new GenericShamanStrategyActionNodeFactory());
}
void GenericShamanStrategy::InitTriggers(std::vector<TriggerNode*>& triggers)
{
CombatStrategy::InitTriggers(triggers);
triggers.push_back(new TriggerNode("wind shear", NextAction::array(0, new NextAction("wind shear", 23.0f), nullptr)));
triggers.push_back(new TriggerNode("wind shear on enemy healer", NextAction::array(0, new NextAction("wind shear on enemy healer", 23.0f), nullptr)));
triggers.push_back(new TriggerNode("purge", NextAction::array(0, new NextAction("purge", 10.0f), nullptr)));
triggers.push_back(new TriggerNode("party member medium health", NextAction::array(0, new NextAction("lesser healing wave on party", 25.0f), nullptr)));
triggers.push_back(new TriggerNode("party member low health", NextAction::array(0, new NextAction("riptide on party", 25.0f), nullptr)));
triggers.push_back(new TriggerNode("medium aoe heal", NextAction::array(0, new NextAction("chain heal", 27.0f), nullptr)));
triggers.push_back(new TriggerNode("medium health", NextAction::array(0, new NextAction("lesser healing wave", 26.0f), nullptr)));
triggers.push_back(new TriggerNode("low health", NextAction::array(0, new NextAction("riptide", 26.0f), nullptr)));
triggers.push_back(new TriggerNode("heroism", NextAction::array(0, new NextAction("heroism", 31.0f), nullptr)));
triggers.push_back(new TriggerNode("bloodlust", NextAction::array(0, new NextAction("bloodlust", 30.0f), nullptr)));
}
void ShamanBuffDpsStrategy::InitTriggers(std::vector<TriggerNode*>& triggers)
{
triggers.push_back(new TriggerNode("lightning shield", NextAction::array(0, new NextAction("lightning shield", 22.0f), nullptr)));
}
void ShamanBuffManaStrategy::InitTriggers(std::vector<TriggerNode*>& triggers)
{
triggers.push_back(new TriggerNode("water shield", NextAction::array(0, new NextAction("water shield", 22.0f), nullptr)));
}
void ShamanCureStrategy::InitTriggers(std::vector<TriggerNode*>& triggers)
{
triggers.push_back(new TriggerNode("cure poison", NextAction::array(0, new NextAction("cure poison", 21.0f), nullptr)));
triggers.push_back(new TriggerNode("party member cure poison", NextAction::array(0, new NextAction("cure poison on party", 21.0f), nullptr)));
triggers.push_back(new TriggerNode("cleanse spirit poison", NextAction::array(0, new NextAction("cleanse spirit", 24.0f), nullptr)));
triggers.push_back(new TriggerNode("party member cleanse spirit poison", NextAction::array(0, new NextAction("cleanse spirit poison on party", 23.0f), nullptr)));
triggers.push_back(new TriggerNode("cure disease", NextAction::array(0, new NextAction("cure disease", 31.0f), nullptr)));
triggers.push_back(new TriggerNode("party member cure disease", NextAction::array(0, new NextAction("cure disease on party", 30.0f), nullptr)));
triggers.push_back(new TriggerNode("cleanse spirit disease", NextAction::array(0, new NextAction("cleanse spirit", 24.0f), nullptr)));
triggers.push_back(new TriggerNode("party member cleanse spirit disease", NextAction::array(0, new NextAction("cleanse spirit disease on party", 23.0f), nullptr)));
triggers.push_back(new TriggerNode("cleanse spirit curse", NextAction::array(0, new NextAction("cleanse spirit", 24.0f), nullptr)));
triggers.push_back(new TriggerNode("party member cleanse spirit curse", NextAction::array(0, new NextAction("cleanse spirit curse on party", 23.0f), nullptr)));
}

View File

@@ -0,0 +1,47 @@
/*
* 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_GENERICSHAMANSTRATEGY_H
#define _PLAYERBOT_GENERICSHAMANSTRATEGY_H
#include "CombatStrategy.h"
class PlayerbotAI;
class GenericShamanStrategy : public CombatStrategy
{
public:
GenericShamanStrategy(PlayerbotAI* botAI);
void InitTriggers(std::vector<TriggerNode*>& triggers) override;
};
class ShamanBuffDpsStrategy : public Strategy
{
public:
ShamanBuffDpsStrategy(PlayerbotAI* botAI) : Strategy(botAI) { }
void InitTriggers(std::vector<TriggerNode*>& triggers) override;
std::string const getName() override { return "bdps"; }
};
class ShamanBuffManaStrategy : public Strategy
{
public:
ShamanBuffManaStrategy(PlayerbotAI* botAI) : Strategy(botAI) { }
void InitTriggers(std::vector<TriggerNode*>& triggers) override;
std::string const getName() override { return "bmana"; }
};
class ShamanCureStrategy : public Strategy
{
public:
ShamanCureStrategy(PlayerbotAI* botAI) : Strategy(botAI) { }
void InitTriggers(std::vector<TriggerNode*>& triggers) override;
std::string const getName() override { return "cure"; }
};
#endif

View File

@@ -0,0 +1,49 @@
/*
* 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 "HealShamanStrategy.h"
#include "Playerbots.h"
class HealShamanStrategyActionNodeFactory : public NamedObjectFactory<ActionNode>
{
public:
HealShamanStrategyActionNodeFactory()
{
creators["earthliving weapon"] = &earthliving_weapon;
creators["mana tide totem"] = &mana_tide_totem;
}
private:
static ActionNode* earthliving_weapon(PlayerbotAI* botAI)
{
return new ActionNode ("earthliving weapon",
/*P*/ nullptr,
/*A*/ NextAction::array(0, new NextAction("flametongue weapon"), nullptr),
/*C*/ nullptr);
}
static ActionNode* mana_tide_totem(PlayerbotAI* botAI)
{
return new ActionNode ("mana tide totem",
/*P*/ nullptr,
/*A*/ NextAction::array(0, new NextAction("mana potion"), nullptr),
/*C*/ nullptr);
}
};
HealShamanStrategy::HealShamanStrategy(PlayerbotAI* botAI) : GenericShamanStrategy(botAI)
{
actionNodeFactories.Add(new HealShamanStrategyActionNodeFactory());
}
void HealShamanStrategy::InitTriggers(std::vector<TriggerNode*>& triggers)
{
GenericShamanStrategy::InitTriggers(triggers);
triggers.push_back(new TriggerNode("enemy out of spell", NextAction::array(0, new NextAction("reach spell", ACTION_NORMAL + 9), nullptr)));
triggers.push_back(new TriggerNode("shaman weapon", NextAction::array(0, new NextAction("earthliving weapon", 22.0f), nullptr)));
triggers.push_back(new TriggerNode("low mana", NextAction::array(0, new NextAction("mana tide totem", ACTION_EMERGENCY + 5), nullptr)));
triggers.push_back(new TriggerNode("medium aoe", NextAction::array(0, new NextAction("healing stream totem", ACTION_LIGHT_HEAL), 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,22 @@
/*
* 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_HEALSHAMANSTRATEGY_H
#define _PLAYERBOT_HEALSHAMANSTRATEGY_H
#include "GenericShamanStrategy.h"
class PlayerbotAI;
class HealShamanStrategy : public GenericShamanStrategy
{
public:
HealShamanStrategy(PlayerbotAI* botAI);
void InitTriggers(std::vector<TriggerNode*>& triggers) override;
std::string const getName() override { return "heal"; }
uint32 GetType() const override { return STRATEGY_TYPE_HEAL; }
};
#endif

View File

@@ -0,0 +1,71 @@
/*
* 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 "MeleeShamanStrategy.h"
#include "Playerbots.h"
class MeleeShamanStrategyActionNodeFactory : public NamedObjectFactory<ActionNode>
{
public:
MeleeShamanStrategyActionNodeFactory()
{
creators["stormstrike"] = &stormstrike;
creators["lava lash"] = &lava_lash;
creators["magma totem"] = &magma_totem;
}
private:
static ActionNode* stormstrike(PlayerbotAI* botAI)
{
return new ActionNode ("stormstrike",
/*P*/ nullptr,
/*A*/ NextAction::array(0, new NextAction("lava lash"), nullptr),
/*C*/ nullptr);
}
static ActionNode* lava_lash(PlayerbotAI* botAI)
{
return new ActionNode ("lava lash",
/*P*/ nullptr,
/*A*/ NextAction::array(0, new NextAction("melee"), nullptr),
/*C*/ nullptr);
}
static ActionNode* magma_totem(PlayerbotAI* botAI)
{
return new ActionNode ("magma totem",
/*P*/ nullptr,
/*A*/ nullptr,
/*C*/ NextAction::array(0, new NextAction("fire nova"), nullptr));
}
};
MeleeShamanStrategy::MeleeShamanStrategy(PlayerbotAI* botAI) : GenericShamanStrategy(botAI)
{
actionNodeFactories.Add(new MeleeShamanStrategyActionNodeFactory());
}
NextAction** MeleeShamanStrategy::getDefaultActions()
{
return NextAction::array(0, new NextAction("stormstrike", 10.0f), nullptr);
}
void MeleeShamanStrategy::InitTriggers(std::vector<TriggerNode*>& triggers)
{
GenericShamanStrategy::InitTriggers(triggers);
triggers.push_back(new TriggerNode("shaman weapon", NextAction::array(0, new NextAction("windfury weapon", 22.0f), nullptr)));
triggers.push_back(new TriggerNode("searing totem", NextAction::array(0, new NextAction("reach melee", 22.0f), new NextAction("searing totem", 22.0f), nullptr)));
triggers.push_back(new TriggerNode("shock", NextAction::array(0, new NextAction("earth shock", 20.0f), nullptr)));
triggers.push_back(new TriggerNode("not facing target", NextAction::array(0, new NextAction("set facing", ACTION_NORMAL + 7), nullptr)));
triggers.push_back(new TriggerNode("enemy too close for melee", NextAction::array(0, new NextAction("move out of enemy contact", ACTION_NORMAL + 8), nullptr)));
triggers.push_back(new TriggerNode("medium aoe", NextAction::array(0, new NextAction("strength of earth totem", ACTION_LIGHT_HEAL), nullptr)));
}
void MeleeAoeShamanStrategy::InitTriggers(std::vector<TriggerNode*>& triggers)
{
triggers.push_back(new TriggerNode("enemy out of melee", NextAction::array(0, new NextAction("reach melee", ACTION_NORMAL + 8), nullptr)));
triggers.push_back(new TriggerNode("magma totem", NextAction::array(0, new NextAction("magma totem", 26.0f), nullptr)));
triggers.push_back(new TriggerNode("medium aoe", NextAction::array(0, new NextAction("fire nova", 25.0f), nullptr)));
}

View File

@@ -0,0 +1,32 @@
/*
* 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_MELEESHAMANSTRATEGY_H
#define _PLAYERBOT_MELEESHAMANSTRATEGY_H
#include "GenericShamanStrategy.h"
class PlayerbotAI;
class MeleeShamanStrategy : public GenericShamanStrategy
{
public:
MeleeShamanStrategy(PlayerbotAI* botAI);
void InitTriggers(std::vector<TriggerNode*>& triggers) override;
NextAction** getDefaultActions() override;
std::string const getName() override { return "melee"; }
uint32 GetType() const override { return STRATEGY_TYPE_COMBAT | STRATEGY_TYPE_DPS | STRATEGY_TYPE_MELEE; }
};
class MeleeAoeShamanStrategy : public CombatStrategy
{
public:
MeleeAoeShamanStrategy(PlayerbotAI* botAI) : CombatStrategy(botAI) { }
void InitTriggers(std::vector<TriggerNode*>& triggers) override;
std::string const getName() override { return "melee aoe"; }
};
#endif

View File

@@ -0,0 +1,31 @@
/*
* 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 "ShamanActions.h"
#include "Playerbots.h"
bool CastTotemAction::isUseful()
{
return CastBuffSpellAction::isUseful() && !AI_VALUE2(bool, "has totem", name);
}
bool CastManaSpringTotemAction::isUseful()
{
return CastTotemAction::isUseful() && !AI_VALUE2(bool, "has totem", "healing stream totem");
}
bool CastFlametongueTotemAction::isUseful()
{
return CastTotemAction::isUseful() && !AI_VALUE2(bool, "has totem", "magma totem");
}
bool CastSearingTotemAction::isUseful()
{
return CastTotemAction::isUseful() && !AI_VALUE2(bool, "has totem", "flametongue totem");
}
bool CastMagmaTotemAction::isUseful()
{
return CastMeleeSpellAction::isUseful() && !AI_VALUE2(bool, "has totem", name);
}

View File

@@ -0,0 +1,371 @@
/*
* 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_SHAMANACTIONS_H
#define _PLAYERBOT_SHAMANACTIONS_H
#include "GenericSpellActions.h"
#include "SharedDefines.h"
class PlayerbotAI;
class CastLesserHealingWaveAction : public CastHealingSpellAction
{
public:
CastLesserHealingWaveAction(PlayerbotAI* botAI) : CastHealingSpellAction(botAI, "lesser healing wave") { }
};
class CastLesserHealingWaveOnPartyAction : public HealPartyMemberAction
{
public:
CastLesserHealingWaveOnPartyAction(PlayerbotAI* botAI) : HealPartyMemberAction(botAI, "lesser healing wave") { }
};
class CastHealingWaveAction : public CastHealingSpellAction
{
public:
CastHealingWaveAction(PlayerbotAI* botAI) : CastHealingSpellAction(botAI, "healing wave") { }
};
class CastHealingWaveOnPartyAction : public HealPartyMemberAction
{
public:
CastHealingWaveOnPartyAction(PlayerbotAI* botAI) : HealPartyMemberAction(botAI, "healing wave") { }
};
class CastChainHealAction : public CastAoeHealSpellAction
{
public:
CastChainHealAction(PlayerbotAI* botAI) : CastAoeHealSpellAction(botAI, "chain heal") { }
};
class CastRiptideAction : public CastHealingSpellAction
{
public:
CastRiptideAction(PlayerbotAI* botAI) : CastHealingSpellAction(botAI, "riptide") { }
};
class CastRiptideOnPartyAction : public HealPartyMemberAction
{
public:
CastRiptideOnPartyAction(PlayerbotAI* botAI) : HealPartyMemberAction(botAI, "riptide") { }
};
class CastEarthShieldAction : public CastBuffSpellAction
{
public:
CastEarthShieldAction(PlayerbotAI* botAI) : CastBuffSpellAction(botAI, "earth shield") { }
};
class CastEarthShieldOnPartyAction : public BuffOnPartyAction
{
public:
CastEarthShieldOnPartyAction(PlayerbotAI* botAI) : BuffOnPartyAction(botAI, "earth shield") { }
};
class CastWaterShieldAction : public CastBuffSpellAction
{
public:
CastWaterShieldAction(PlayerbotAI* botAI) : CastBuffSpellAction(botAI, "water shield") { }
};
class CastLightningShieldAction : public CastBuffSpellAction
{
public:
CastLightningShieldAction(PlayerbotAI* botAI) : CastBuffSpellAction(botAI, "lightning shield") { }
};
class CastEarthlivingWeaponAction : public CastEnchantItemAction
{
public:
CastEarthlivingWeaponAction(PlayerbotAI* botAI) : CastEnchantItemAction(botAI, "earthliving weapon") { }
};
class CastRockbiterWeaponAction : public CastEnchantItemAction
{
public:
CastRockbiterWeaponAction(PlayerbotAI* botAI) : CastEnchantItemAction(botAI, "rockbiter weapon") { }
};
class CastFlametongueWeaponAction : public CastEnchantItemAction
{
public:
CastFlametongueWeaponAction(PlayerbotAI* botAI) : CastEnchantItemAction(botAI, "flametongue weapon") { }
};
class CastFrostbrandWeaponAction : public CastEnchantItemAction
{
public:
CastFrostbrandWeaponAction(PlayerbotAI* botAI) : CastEnchantItemAction(botAI, "frostbrand weapon") { }
};
class CastWindfuryWeaponAction : public CastEnchantItemAction
{
public:
CastWindfuryWeaponAction(PlayerbotAI* botAI) : CastEnchantItemAction(botAI, "windfury weapon") { }
};
class CastTotemAction : public CastBuffSpellAction
{
public:
CastTotemAction(PlayerbotAI* botAI, std::string const spell) : CastBuffSpellAction(botAI, spell) { }
bool isUseful() override;
};
class CastStoneskinTotemAction : public CastTotemAction
{
public:
CastStoneskinTotemAction(PlayerbotAI* botAI) : CastTotemAction(botAI, "stoneskin totem") { }
};
class CastEarthbindTotemAction : public CastTotemAction
{
public:
CastEarthbindTotemAction(PlayerbotAI* botAI) : CastTotemAction(botAI, "earthbind totem") { }
};
class CastStrengthOfEarthTotemAction : public CastTotemAction
{
public:
CastStrengthOfEarthTotemAction(PlayerbotAI* botAI) : CastTotemAction(botAI, "strength of earth totem") { }
};
class CastManaSpringTotemAction : public CastTotemAction
{
public:
CastManaSpringTotemAction(PlayerbotAI* botAI) : CastTotemAction(botAI, "mana spring totem") { }
bool isUseful() override;
};
class CastManaTideTotemAction : public CastTotemAction
{
public:
CastManaTideTotemAction(PlayerbotAI* botAI) : CastTotemAction(botAI, "mana tide totem") { }
std::string const GetTargetName() override { return "self target"; }
};
class CastHealingStreamTotemAction : public CastTotemAction
{
public:
CastHealingStreamTotemAction(PlayerbotAI* botAI) : CastTotemAction(botAI, "healing stream totem") { }
};
class CastCleansingTotemAction : public CastTotemAction
{
public:
CastCleansingTotemAction(PlayerbotAI* botAI) : CastTotemAction(botAI, "cleansing totem") { }
};
class CastFlametongueTotemAction : public CastTotemAction
{
public:
CastFlametongueTotemAction(PlayerbotAI* botAI) : CastTotemAction(botAI, "flametongue totem") { }
bool isUseful() override;
};
class CastWindfuryTotemAction : public CastTotemAction
{
public:
CastWindfuryTotemAction(PlayerbotAI* botAI) : CastTotemAction(botAI, "windfury totem") { }
};
class CastGraceOfAirTotemAction : public CastTotemAction
{
public:
CastGraceOfAirTotemAction(PlayerbotAI* botAI) : CastTotemAction(botAI, "grace of air totem") { }
};
class CastSearingTotemAction : public CastTotemAction
{
public:
CastSearingTotemAction(PlayerbotAI* botAI) : CastTotemAction(botAI, "searing totem") { }
std::string const GetTargetName() override { return "self target"; }
bool isUseful() override;
};
class CastMagmaTotemAction : public CastMeleeSpellAction
{
public:
CastMagmaTotemAction(PlayerbotAI* botAI) : CastMeleeSpellAction(botAI, "magma totem") { }
std::string const GetTargetName() override { return "self target"; }
bool isUseful() override;
};
class CastFireNovaAction : public CastSpellAction
{
public:
CastFireNovaAction(PlayerbotAI* botAI) : CastSpellAction(botAI, "fire nova") { }
};
class CastWindShearAction : public CastSpellAction
{
public:
CastWindShearAction(PlayerbotAI* botAI) : CastSpellAction(botAI, "wind shear") { }
};
class CastAncestralSpiritAction : public ResurrectPartyMemberAction
{
public:
CastAncestralSpiritAction(PlayerbotAI* botAI) : ResurrectPartyMemberAction(botAI, "ancestral spirit") { }
};
class CastPurgeAction : public CastSpellAction
{
public:
CastPurgeAction(PlayerbotAI* botAI) : CastSpellAction(botAI, "purge") { }
};
class CastStormstrikeAction : public CastMeleeSpellAction
{
public:
CastStormstrikeAction(PlayerbotAI* botAI) : CastMeleeSpellAction(botAI, "stormstrike") { }
};
class CastLavaLashAction : public CastMeleeSpellAction
{
public:
CastLavaLashAction(PlayerbotAI* botAI) : CastMeleeSpellAction(botAI, "lava lash") { }
};
class CastWaterBreathingAction : public CastBuffSpellAction
{
public:
CastWaterBreathingAction(PlayerbotAI* botAI) : CastBuffSpellAction(botAI, "water breathing") { }
};
class CastWaterWalkingAction : public CastBuffSpellAction
{
public:
CastWaterWalkingAction(PlayerbotAI* botAI) : CastBuffSpellAction(botAI, "water walking") { }
};
class CastWaterBreathingOnPartyAction : public BuffOnPartyAction
{
public:
CastWaterBreathingOnPartyAction(PlayerbotAI* botAI) : BuffOnPartyAction(botAI, "water breathing") { }
};
class CastWaterWalkingOnPartyAction : public BuffOnPartyAction
{
public:
CastWaterWalkingOnPartyAction(PlayerbotAI* botAI) : BuffOnPartyAction(botAI, "water walking") { }
};
class CastCleanseSpiritAction : public CastCureSpellAction
{
public:
CastCleanseSpiritAction(PlayerbotAI* botAI) : CastCureSpellAction(botAI, "cleanse spirit") { }
};
class CastCleanseSpiritPoisonOnPartyAction : public CurePartyMemberAction
{
public:
CastCleanseSpiritPoisonOnPartyAction(PlayerbotAI* botAI) : CurePartyMemberAction(botAI, "cleanse spirit", DISPEL_POISON) { }
std::string const getName() override { return "cleanse spirit poison on party"; }
};
class CastCleanseSpiritCurseOnPartyAction : public CurePartyMemberAction
{
public:
CastCleanseSpiritCurseOnPartyAction(PlayerbotAI* botAI) : CurePartyMemberAction(botAI, "cleanse spirit", DISPEL_CURSE) { }
std::string const getName() override { return "cleanse spirit curse on party"; }
};
class CastCleanseSpiritDiseaseOnPartyAction : public CurePartyMemberAction
{
public:
CastCleanseSpiritDiseaseOnPartyAction(PlayerbotAI* botAI) : CurePartyMemberAction(botAI, "cleanse spirit", DISPEL_DISEASE) { }
std::string const getName() override { return "cleanse spirit disease on party"; }
};
class CastFlameShockAction : public CastDebuffSpellAction
{
public:
CastFlameShockAction(PlayerbotAI* botAI) : CastDebuffSpellAction(botAI, "flame shock") { }
};
class CastEarthShockAction : public CastDebuffSpellAction
{
public:
CastEarthShockAction(PlayerbotAI* botAI) : CastDebuffSpellAction(botAI, "earth shock") { }
};
class CastFrostShockAction : public CastSnareSpellAction
{
public:
CastFrostShockAction(PlayerbotAI* botAI) : CastSnareSpellAction(botAI, "frost shock") { }
};
class CastChainLightningAction : public CastSpellAction
{
public:
CastChainLightningAction(PlayerbotAI* botAI) : CastSpellAction(botAI, "chain lightning") { }
};
class CastLightningBoltAction : public CastSpellAction
{
public:
CastLightningBoltAction(PlayerbotAI* botAI) : CastSpellAction(botAI, "lightning bolt") { }
};
class CastThunderstormAction : public CastMeleeSpellAction
{
public:
CastThunderstormAction(PlayerbotAI* botAI) : CastMeleeSpellAction(botAI, "thunderstorm") { }
};
class CastHeroismAction : public CastBuffSpellAction
{
public:
CastHeroismAction(PlayerbotAI* botAI) : CastBuffSpellAction(botAI, "heroism") { }
};
class CastBloodlustAction : public CastBuffSpellAction
{
public:
CastBloodlustAction(PlayerbotAI* botAI) : CastBuffSpellAction(botAI, "bloodlust") { }
};
class CastWindShearOnEnemyHealerAction : public CastSpellOnEnemyHealerAction
{
public:
CastWindShearOnEnemyHealerAction(PlayerbotAI* botAI) : CastSpellOnEnemyHealerAction(botAI, "wind shear") { }
};
class CastCurePoisonAction : public CastCureSpellAction
{
public:
CastCurePoisonAction(PlayerbotAI* botAI) : CastCureSpellAction(botAI, "cure poison") { }
};
class CastCurePoisonOnPartyAction : public CurePartyMemberAction
{
public:
CastCurePoisonOnPartyAction(PlayerbotAI* botAI) : CurePartyMemberAction(botAI, "cure poison", DISPEL_POISON) { }
};
class CastCureDiseaseAction : public CastCureSpellAction
{
public:
CastCureDiseaseAction(PlayerbotAI* botAI) : CastCureSpellAction(botAI, "cure disease") { }
};
class CastCureDiseaseOnPartyAction : public CurePartyMemberAction
{
public:
CastCureDiseaseOnPartyAction(PlayerbotAI* botAI) : CurePartyMemberAction(botAI, "cure disease", DISPEL_DISEASE) { }
std::string const getName() override { return "cure disease on party"; }
};
#endif

View File

@@ -0,0 +1,264 @@
/*
* 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 "ShamanAiObjectContext.h"
#include "CasterShamanStrategy.h"
#include "HealShamanStrategy.h"
#include "MeleeShamanStrategy.h"
#include "ShamanActions.h"
#include "ShamanNonCombatStrategy.h"
#include "ShamanTriggers.h"
#include "TotemsShamanStrategy.h"
#include "NamedObjectContext.h"
#include "Playerbots.h"
class ShamanStrategyFactoryInternal : public NamedObjectContext<Strategy>
{
public:
ShamanStrategyFactoryInternal()
{
creators["nc"] = &ShamanStrategyFactoryInternal::nc;
creators["totems"] = &ShamanStrategyFactoryInternal::totems;
creators["melee aoe"] = &ShamanStrategyFactoryInternal::melee_aoe;
creators["caster aoe"] = &ShamanStrategyFactoryInternal::caster_aoe;
creators["cure"] = &ShamanStrategyFactoryInternal::cure;
}
private:
static Strategy* nc(PlayerbotAI* botAI) { return new ShamanNonCombatStrategy(botAI); }
static Strategy* totems(PlayerbotAI* botAI) { return new TotemsShamanStrategy(botAI); }
static Strategy* melee_aoe(PlayerbotAI* botAI) { return new MeleeAoeShamanStrategy(botAI); }
static Strategy* caster_aoe(PlayerbotAI* botAI) { return new CasterAoeShamanStrategy(botAI); }
static Strategy* cure(PlayerbotAI* botAI) { return new ShamanCureStrategy(botAI); }
};
class ShamanBuffStrategyFactoryInternal : public NamedObjectContext<Strategy>
{
public:
ShamanBuffStrategyFactoryInternal() : NamedObjectContext<Strategy>(false, true)
{
creators["bmana"] = &ShamanBuffStrategyFactoryInternal::bmana;
creators["bdps"] = &ShamanBuffStrategyFactoryInternal::bdps;
}
private:
static Strategy* bmana(PlayerbotAI* botAI) { return new ShamanBuffManaStrategy(botAI); }
static Strategy* bdps(PlayerbotAI* botAI) { return new ShamanBuffDpsStrategy(botAI); }
};
class ShamanCombatStrategyFactoryInternal : public NamedObjectContext<Strategy>
{
public:
ShamanCombatStrategyFactoryInternal() : NamedObjectContext<Strategy>(false, true)
{
creators["heal"] = &ShamanCombatStrategyFactoryInternal::heal;
creators["melee"] = &ShamanCombatStrategyFactoryInternal::dps;
creators["dps"] = &ShamanCombatStrategyFactoryInternal::dps;
creators["caster"] = &ShamanCombatStrategyFactoryInternal::caster;
}
private:
static Strategy* heal(PlayerbotAI* botAI) { return new HealShamanStrategy(botAI); }
static Strategy* dps(PlayerbotAI* botAI) { return new MeleeShamanStrategy(botAI); }
static Strategy* caster(PlayerbotAI* botAI) { return new CasterShamanStrategy(botAI); }
};
class ShamanATriggerFactoryInternal : public NamedObjectContext<Trigger>
{
public:
ShamanATriggerFactoryInternal()
{
creators["grace of air totem"] = &ShamanATriggerFactoryInternal::grace_of_air_totem;
creators["windfury totem"] = &ShamanATriggerFactoryInternal::windfury_totem;
creators["mana spring totem"] = &ShamanATriggerFactoryInternal::mana_spring_totem;
creators["flametongue totem"] = &ShamanATriggerFactoryInternal::flametongue_totem;
creators["strength of earth totem"] = &ShamanATriggerFactoryInternal::strength_of_earth_totem;
creators["magma totem"] = &ShamanATriggerFactoryInternal::magma_totem;
creators["searing totem"] = &ShamanATriggerFactoryInternal::searing_totem;
creators["wind shear"] = &ShamanATriggerFactoryInternal::wind_shear;
creators["purge"] = &ShamanATriggerFactoryInternal::purge;
creators["shaman weapon"] = &ShamanATriggerFactoryInternal::shaman_weapon;
creators["water shield"] = &ShamanATriggerFactoryInternal::water_shield;
creators["lightning shield"] = &ShamanATriggerFactoryInternal::lightning_shield;
creators["water breathing"] = &ShamanATriggerFactoryInternal::water_breathing;
creators["water walking"] = &ShamanATriggerFactoryInternal::water_walking;
creators["water breathing on party"] = &ShamanATriggerFactoryInternal::water_breathing_on_party;
creators["water walking on party"] = &ShamanATriggerFactoryInternal::water_walking_on_party;
creators["cleanse spirit poison"] = &ShamanATriggerFactoryInternal::cleanse_poison;
creators["cleanse spirit curse"] = &ShamanATriggerFactoryInternal::cleanse_curse;
creators["cleanse spirit disease"] = &ShamanATriggerFactoryInternal::cleanse_disease;
creators["party member cleanse spirit poison"] = &ShamanATriggerFactoryInternal::party_member_cleanse_poison;
creators["party member cleanse spirit curse"] = &ShamanATriggerFactoryInternal::party_member_cleanse_curse;
creators["party member cleanse spirit disease"] = &ShamanATriggerFactoryInternal::party_member_cleanse_disease;
creators["shock"] = &ShamanATriggerFactoryInternal::shock;
creators["frost shock snare"] = &ShamanATriggerFactoryInternal::frost_shock_snare;
creators["heroism"] = &ShamanATriggerFactoryInternal::heroism;
creators["bloodlust"] = &ShamanATriggerFactoryInternal::bloodlust;
creators["maelstrom weapon"] = &ShamanATriggerFactoryInternal::maelstrom_weapon;
creators["wind shear on enemy healer"] = &ShamanATriggerFactoryInternal::wind_shear_on_enemy_healer;
creators["cure poison"] = &ShamanATriggerFactoryInternal::cure_poison;
creators["party member cure poison"] = &ShamanATriggerFactoryInternal::party_member_cure_poison;
creators["cure disease"] = &ShamanATriggerFactoryInternal::cure_disease;
creators["party member cure disease"] = &ShamanATriggerFactoryInternal::party_member_cure_disease;
}
private:
static Trigger* maelstrom_weapon(PlayerbotAI* botAI) { return new MaelstromWeaponTrigger(botAI); }
static Trigger* heroism(PlayerbotAI* botAI) { return new HeroismTrigger(botAI); }
static Trigger* bloodlust(PlayerbotAI* botAI) { return new BloodlustTrigger(botAI); }
static Trigger* party_member_cleanse_disease(PlayerbotAI* botAI) { return new PartyMemberCleanseSpiritDiseaseTrigger(botAI); }
static Trigger* party_member_cleanse_curse(PlayerbotAI* botAI) { return new PartyMemberCleanseSpiritCurseTrigger(botAI); }
static Trigger* party_member_cleanse_poison(PlayerbotAI* botAI) { return new PartyMemberCleanseSpiritPoisonTrigger(botAI); }
static Trigger* cleanse_disease(PlayerbotAI* botAI) { return new CleanseSpiritDiseaseTrigger(botAI); }
static Trigger* cleanse_curse(PlayerbotAI* botAI) { return new CleanseSpiritCurseTrigger(botAI); }
static Trigger* cleanse_poison(PlayerbotAI* botAI) { return new CleanseSpiritPoisonTrigger(botAI); }
static Trigger* water_breathing(PlayerbotAI* botAI) { return new WaterBreathingTrigger(botAI); }
static Trigger* water_walking(PlayerbotAI* botAI) { return new WaterWalkingTrigger(botAI); }
static Trigger* water_breathing_on_party(PlayerbotAI* botAI) { return new WaterBreathingOnPartyTrigger(botAI); }
static Trigger* water_walking_on_party(PlayerbotAI* botAI) { return new WaterWalkingOnPartyTrigger(botAI); }
static Trigger* windfury_totem(PlayerbotAI* botAI) { return new WindfuryTotemTrigger(botAI); }
static Trigger* grace_of_air_totem(PlayerbotAI* botAI) { return new GraceOfAirTotemTrigger(botAI); }
static Trigger* mana_spring_totem(PlayerbotAI* botAI) { return new ManaSpringTotemTrigger(botAI); }
static Trigger* flametongue_totem(PlayerbotAI* botAI) { return new FlametongueTotemTrigger(botAI); }
static Trigger* strength_of_earth_totem(PlayerbotAI* botAI) { return new StrengthOfEarthTotemTrigger(botAI); }
static Trigger* magma_totem(PlayerbotAI* botAI) { return new MagmaTotemTrigger(botAI); }
static Trigger* searing_totem(PlayerbotAI* botAI) { return new SearingTotemTrigger(botAI); }
static Trigger* wind_shear(PlayerbotAI* botAI) { return new WindShearInterruptSpellTrigger(botAI); }
static Trigger* purge(PlayerbotAI* botAI) { return new PurgeTrigger(botAI); }
static Trigger* shaman_weapon(PlayerbotAI* botAI) { return new ShamanWeaponTrigger(botAI); }
static Trigger* water_shield(PlayerbotAI* botAI) { return new WaterShieldTrigger(botAI); }
static Trigger* lightning_shield(PlayerbotAI* botAI) { return new LightningShieldTrigger(botAI); }
static Trigger* shock(PlayerbotAI* botAI) { return new ShockTrigger(botAI); }
static Trigger* frost_shock_snare(PlayerbotAI* botAI) { return new FrostShockSnareTrigger(botAI); }
static Trigger* wind_shear_on_enemy_healer(PlayerbotAI* botAI) { return new WindShearInterruptEnemyHealerSpellTrigger(botAI); }
static Trigger* cure_poison(PlayerbotAI* botAI) { return new CurePoisonTrigger(botAI); }
static Trigger* party_member_cure_poison(PlayerbotAI* botAI) { return new PartyMemberCurePoisonTrigger(botAI); }
static Trigger* cure_disease(PlayerbotAI* botAI) { return new CureDiseaseTrigger(botAI); }
static Trigger* party_member_cure_disease(PlayerbotAI* botAI) { return new PartyMemberCureDiseaseTrigger(botAI); }
};
class ShamanAiObjectContextInternal : public NamedObjectContext<Action>
{
public:
ShamanAiObjectContextInternal()
{
creators["water shield"] = &ShamanAiObjectContextInternal::water_shield;
creators["lightning shield"] = &ShamanAiObjectContextInternal::lightning_shield;
creators["strength of earth totem"] = &ShamanAiObjectContextInternal::strength_of_earth_totem;
creators["flametongue totem"] = &ShamanAiObjectContextInternal::flametongue_totem;
creators["searing totem"] = &ShamanAiObjectContextInternal::searing_totem;
creators["magma totem"] = &ShamanAiObjectContextInternal::magma_totem;
creators["windfury totem"] = &ShamanAiObjectContextInternal::windfury_totem;
creators["grace of air totem"] = &ShamanAiObjectContextInternal::grace_of_air_totem;
creators["mana spring totem"] = &ShamanAiObjectContextInternal::mana_spring_totem;
creators["mana tide totem"] = &ShamanAiObjectContextInternal::mana_tide_totem;
creators["earthbind totem"] = &ShamanAiObjectContextInternal::earthbind_totem;
creators["healing stream totem"] = &ShamanAiObjectContextInternal::healing_stream_totem;
creators["wind shear"] = &ShamanAiObjectContextInternal::wind_shear;
creators["wind shear on enemy healer"] = &ShamanAiObjectContextInternal::wind_shear_on_enemy_healer;
creators["rockbiter weapon"] = &ShamanAiObjectContextInternal::rockbiter_weapon;
creators["flametongue weapon"] = &ShamanAiObjectContextInternal::flametongue_weapon;
creators["frostbrand weapon"] = &ShamanAiObjectContextInternal::frostbrand_weapon;
creators["windfury weapon"] = &ShamanAiObjectContextInternal::windfury_weapon;
creators["earthliving weapon"] = &ShamanAiObjectContextInternal::earthliving_weapon;
creators["purge"] = &ShamanAiObjectContextInternal::purge;
creators["healing wave"] = &ShamanAiObjectContextInternal::healing_wave;
creators["lesser healing wave"] = &ShamanAiObjectContextInternal::lesser_healing_wave;
creators["healing wave on party"] = &ShamanAiObjectContextInternal::healing_wave_on_party;
creators["lesser healing wave on party"] = &ShamanAiObjectContextInternal::lesser_healing_wave_on_party;
creators["earth shield"] = &ShamanAiObjectContextInternal::earth_shield;
creators["earth shield on party"] = &ShamanAiObjectContextInternal::earth_shield_on_party;
creators["chain heal"] = &ShamanAiObjectContextInternal::chain_heal;
creators["riptide"] = &ShamanAiObjectContextInternal::riptide;
creators["riptide on party"] = &ShamanAiObjectContextInternal::riptide_on_party;
creators["stormstrike"] = &ShamanAiObjectContextInternal::stormstrike;
creators["lava lash"] = &ShamanAiObjectContextInternal::lava_lash;
creators["fire nova"] = &ShamanAiObjectContextInternal::fire_nova;
creators["ancestral spirit"] = &ShamanAiObjectContextInternal::ancestral_spirit;
creators["water walking"] = &ShamanAiObjectContextInternal::water_walking;
creators["water breathing"] = &ShamanAiObjectContextInternal::water_breathing;
creators["water walking on party"] = &ShamanAiObjectContextInternal::water_walking_on_party;
creators["water breathing on party"] = &ShamanAiObjectContextInternal::water_breathing_on_party;
creators["cleanse spirit"] = &ShamanAiObjectContextInternal::cleanse_spirit;
creators["cleanse spirit poison on party"] = &ShamanAiObjectContextInternal::cleanse_spirit_poison_on_party;
creators["cleanse spirit disease on party"] = &ShamanAiObjectContextInternal::cleanse_spirit_disease_on_party;
creators["cleanse spirit curse on party"] = &ShamanAiObjectContextInternal::cleanse_spirit_curse_on_party;
creators["flame shock"] = &ShamanAiObjectContextInternal::flame_shock;
creators["earth shock"] = &ShamanAiObjectContextInternal::earth_shock;
creators["frost shock"] = &ShamanAiObjectContextInternal::frost_shock;
creators["chain lightning"] = &ShamanAiObjectContextInternal::chain_lightning;
creators["lightning bolt"] = &ShamanAiObjectContextInternal::lightning_bolt;
creators["thunderstorm"] = &ShamanAiObjectContextInternal::thunderstorm;
creators["heroism"] = &ShamanAiObjectContextInternal::heroism;
creators["bloodlust"] = &ShamanAiObjectContextInternal::bloodlust;
creators["cure disease"] = &ShamanAiObjectContextInternal::cure_disease;
creators["cure disease on party"] = &ShamanAiObjectContextInternal::cure_disease_on_party;
creators["cure poison"] = &ShamanAiObjectContextInternal::cure_poison;
creators["cure poison on party"] = &ShamanAiObjectContextInternal::cure_poison_on_party;
}
private:
static Action* heroism(PlayerbotAI* botAI) { return new CastHeroismAction(botAI); }
static Action* bloodlust(PlayerbotAI* botAI) { return new CastBloodlustAction(botAI); }
static Action* thunderstorm(PlayerbotAI* botAI) { return new CastThunderstormAction(botAI); }
static Action* lightning_bolt(PlayerbotAI* botAI) { return new CastLightningBoltAction(botAI); }
static Action* chain_lightning(PlayerbotAI* botAI) { return new CastChainLightningAction(botAI); }
static Action* frost_shock(PlayerbotAI* botAI) { return new CastFrostShockAction(botAI); }
static Action* earth_shock(PlayerbotAI* botAI) { return new CastEarthShockAction(botAI); }
static Action* flame_shock(PlayerbotAI* botAI) { return new CastFlameShockAction(botAI); }
static Action* cleanse_spirit_poison_on_party(PlayerbotAI* botAI) { return new CastCleanseSpiritPoisonOnPartyAction(botAI); }
static Action* cleanse_spirit_disease_on_party(PlayerbotAI* botAI) { return new CastCleanseSpiritDiseaseOnPartyAction(botAI); }
static Action* cleanse_spirit_curse_on_party(PlayerbotAI* botAI) { return new CastCleanseSpiritCurseOnPartyAction(botAI); }
static Action* cleanse_spirit(PlayerbotAI* botAI) { return new CastCleanseSpiritAction(botAI); }
static Action* water_walking(PlayerbotAI* botAI) { return new CastWaterWalkingAction(botAI); }
static Action* water_breathing(PlayerbotAI* botAI) { return new CastWaterBreathingAction(botAI); }
static Action* water_walking_on_party(PlayerbotAI* botAI) { return new CastWaterWalkingOnPartyAction(botAI); }
static Action* water_breathing_on_party(PlayerbotAI* botAI) { return new CastWaterBreathingOnPartyAction(botAI); }
static Action* water_shield(PlayerbotAI* botAI) { return new CastWaterShieldAction(botAI); }
static Action* lightning_shield(PlayerbotAI* botAI) { return new CastLightningShieldAction(botAI); }
static Action* strength_of_earth_totem(PlayerbotAI* botAI) { return new CastStrengthOfEarthTotemAction(botAI); }
static Action* flametongue_totem(PlayerbotAI* botAI) { return new CastFlametongueTotemAction(botAI); }
static Action* magma_totem(PlayerbotAI* botAI) { return new CastMagmaTotemAction(botAI); }
static Action* searing_totem(PlayerbotAI* botAI) { return new CastSearingTotemAction(botAI); }
static Action* fire_nova(PlayerbotAI* botAI) { return new CastFireNovaAction(botAI); }
static Action* windfury_totem(PlayerbotAI* botAI) { return new CastWindfuryTotemAction(botAI); }
static Action* grace_of_air_totem(PlayerbotAI* botAI) { return new CastGraceOfAirTotemAction(botAI); }
static Action* mana_spring_totem(PlayerbotAI* botAI) { return new CastManaSpringTotemAction(botAI); }
static Action* mana_tide_totem(PlayerbotAI* botAI) { return new CastManaTideTotemAction(botAI); }
static Action* earthbind_totem(PlayerbotAI* botAI) { return new CastEarthbindTotemAction(botAI); }
static Action* healing_stream_totem(PlayerbotAI* botAI) { return new CastHealingStreamTotemAction(botAI); }
static Action* wind_shear(PlayerbotAI* botAI) { return new CastWindShearAction(botAI); }
static Action* rockbiter_weapon(PlayerbotAI* botAI) { return new CastRockbiterWeaponAction(botAI); }
static Action* flametongue_weapon(PlayerbotAI* botAI) { return new CastFlametongueWeaponAction(botAI); }
static Action* frostbrand_weapon(PlayerbotAI* botAI) { return new CastFrostbrandWeaponAction(botAI); }
static Action* windfury_weapon(PlayerbotAI* botAI) { return new CastWindfuryWeaponAction(botAI); }
static Action* earthliving_weapon(PlayerbotAI* botAI) { return new CastEarthlivingWeaponAction(botAI); }
static Action* purge(PlayerbotAI* botAI) { return new CastPurgeAction(botAI); }
static Action* healing_wave(PlayerbotAI* botAI) { return new CastHealingWaveAction(botAI); }
static Action* lesser_healing_wave(PlayerbotAI* botAI) { return new CastLesserHealingWaveAction(botAI); }
static Action* healing_wave_on_party(PlayerbotAI* botAI) { return new CastHealingWaveOnPartyAction(botAI); }
static Action* lesser_healing_wave_on_party(PlayerbotAI* botAI) { return new CastLesserHealingWaveOnPartyAction(botAI); }
static Action* earth_shield(PlayerbotAI* botAI) { return new CastEarthShieldAction(botAI); }
static Action* earth_shield_on_party(PlayerbotAI* botAI) { return new CastEarthShieldOnPartyAction(botAI); }
static Action* chain_heal(PlayerbotAI* botAI) { return new CastChainHealAction(botAI); }
static Action* riptide(PlayerbotAI* botAI) { return new CastRiptideAction(botAI); }
static Action* riptide_on_party(PlayerbotAI* botAI) { return new CastRiptideOnPartyAction(botAI); }
static Action* stormstrike(PlayerbotAI* botAI) { return new CastStormstrikeAction(botAI); }
static Action* lava_lash(PlayerbotAI* botAI) { return new CastLavaLashAction(botAI); }
static Action* ancestral_spirit(PlayerbotAI* botAI) { return new CastAncestralSpiritAction(botAI); }
static Action* wind_shear_on_enemy_healer(PlayerbotAI* botAI) { return new CastWindShearOnEnemyHealerAction(botAI); }
static Action* cure_poison(PlayerbotAI* botAI) { return new CastCurePoisonAction(botAI); }
static Action* cure_poison_on_party(PlayerbotAI* botAI) { return new CastCurePoisonOnPartyAction(botAI); }
static Action* cure_disease(PlayerbotAI* botAI) { return new CastCureDiseaseAction(botAI); }
static Action* cure_disease_on_party(PlayerbotAI* botAI) { return new CastCureDiseaseOnPartyAction(botAI); }
};
ShamanAiObjectContext::ShamanAiObjectContext(PlayerbotAI* botAI) : AiObjectContext(botAI)
{
strategyContexts.Add(new ShamanStrategyFactoryInternal());
strategyContexts.Add(new ShamanCombatStrategyFactoryInternal());
strategyContexts.Add(new ShamanBuffStrategyFactoryInternal());
actionContexts.Add(new ShamanAiObjectContextInternal());
triggerContexts.Add(new ShamanATriggerFactoryInternal());
}

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_SHAMANAIOBJECTCONTEXT_H
#define _PLAYERBOT_SHAMANAIOBJECTCONTEXT_H
#include "AiObjectContext.h"
class PlayerbotAI;
class ShamanAiObjectContext : public AiObjectContext
{
public:
ShamanAiObjectContext(PlayerbotAI* botAI);
};
#endif

View File

@@ -0,0 +1,30 @@
/*
* 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 "ShamanNonCombatStrategy.h"
#include "Playerbots.h"
void ShamanNonCombatStrategy::InitTriggers(std::vector<TriggerNode*>& triggers)
{
NonCombatStrategy::InitTriggers(triggers);
triggers.push_back(new TriggerNode("party member dead", NextAction::array(0, new NextAction("ancestral spirit", 33.0f), nullptr)));
triggers.push_back(new TriggerNode("water breathing", NextAction::array(0, new NextAction("water breathing", 12.0f), nullptr)));
triggers.push_back(new TriggerNode("water walking", NextAction::array(0, new NextAction("water walking", 12.0f), nullptr)));
triggers.push_back(new TriggerNode("water breathing on party", NextAction::array(0, new NextAction("water breathing on party", 11.0f), nullptr)));
triggers.push_back(new TriggerNode("water walking on party", NextAction::array(0, new NextAction("water walking on party", 11.0f), nullptr)));
triggers.push_back(new TriggerNode("critical health", NextAction::array(0, new NextAction("healing wave", 70.0f), nullptr)));
triggers.push_back(new TriggerNode("party member critical health", NextAction::array(0, new NextAction("healing wave on party", 60.0f), nullptr)));
triggers.push_back(new TriggerNode("medium aoe heal", NextAction::array(0, new NextAction("chain heal", 27.0f), nullptr)));
triggers.push_back(new TriggerNode("cure poison", NextAction::array(0, new NextAction("cure poison", 21.0f), nullptr)));
triggers.push_back(new TriggerNode("party member cure poison", NextAction::array(0, new NextAction("cure poison on party", 21.0f), nullptr)));
triggers.push_back(new TriggerNode("cure disease", NextAction::array(0, new NextAction("cure disease", 31.0f), nullptr)));
triggers.push_back(new TriggerNode("party member cure disease", NextAction::array(0, new NextAction("cure disease on party", 30.0f), nullptr)));
}
void ShamanNonCombatStrategy::InitMultipliers(std::vector<Multiplier*>& multipliers)
{
NonCombatStrategy::InitMultipliers(multipliers);
}

View File

@@ -0,0 +1,22 @@
/*
* 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_SHAMANNONCOMBATSTRATEGY_H
#define _PLAYERBOT_SHAMANNONCOMBATSTRATEGY_H
#include "NonCombatStrategy.h"
class PlayerbotAI;
class ShamanNonCombatStrategy : public NonCombatStrategy
{
public:
ShamanNonCombatStrategy(PlayerbotAI* botAI) : NonCombatStrategy(botAI) { }
void InitTriggers(std::vector<TriggerNode*>& triggers) override;
void InitMultipliers(std::vector<Multiplier*>& multipliers) override;
std::string const getName() override { return "nc"; }
};
#endif

View File

@@ -0,0 +1,67 @@
/*
* 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 "ShamanTriggers.h"
#include "Playerbots.h"
std::vector<std::string> ShamanWeaponTrigger::spells;
bool ShamanWeaponTrigger::IsActive()
{
if (spells.empty())
{
spells.push_back("frostbrand weapon");
spells.push_back("rockbiter weapon");
spells.push_back("flametongue weapon");
spells.push_back("earthliving weapon");
spells.push_back("windfury weapon");
}
for (std::vector<std::string>::iterator i = spells.begin(); i != spells.end(); ++i)
{
uint32 spellId = AI_VALUE2(uint32, "spell id", spell);
if (!spellId)
continue;
if (AI_VALUE2(Item*, "item for spell", spellId))
return true;
}
return false;
}
bool ShockTrigger::IsActive()
{
return SpellTrigger::IsActive() && !botAI->HasAnyAuraOf(GetTarget(), "frost shock", "earth shock", "flame shock", nullptr);
}
bool TotemTrigger::IsActive()
{
return AI_VALUE(uint8, "attacker count") >= attackerCount && !AI_VALUE2(bool, "has totem", name);
}
bool ManaSpringTotemTrigger::IsActive()
{
return AI_VALUE(uint8, "attacker count") >= attackerCount && !AI_VALUE2(bool, "has totem", "mana tide totem") && !AI_VALUE2(bool, "has totem", name);
}
bool WaterWalkingTrigger::IsActive()
{
return BuffTrigger::IsActive() && AI_VALUE2(bool, "swimming", "self target");
}
bool WaterBreathingTrigger::IsActive()
{
return BuffTrigger::IsActive() && AI_VALUE2(bool, "swimming", "self target");
}
bool WaterWalkingOnPartyTrigger::IsActive()
{
return BuffOnPartyTrigger::IsActive() && AI_VALUE2(bool, "swimming", "self target");
}
bool WaterBreathingOnPartyTrigger::IsActive()
{
return BuffOnPartyTrigger::IsActive() && AI_VALUE2(bool, "swimming", "self target");
}

View File

@@ -0,0 +1,233 @@
/*
* 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_SHAMANTRIGGERS_H
#define _PLAYERBOT_SHAMANTRIGGERS_H
#include "CureTriggers.h"
#include "SharedDefines.h"
class PlayerbotAI;
class ShamanWeaponTrigger : public BuffTrigger
{
public:
ShamanWeaponTrigger(PlayerbotAI* botAI) : BuffTrigger(botAI, "rockbiter weapon", 2) { }
bool IsActive() override;
private:
static std::vector<std::string> spells;
};
class TotemTrigger : public Trigger
{
public:
TotemTrigger(PlayerbotAI* botAI, std::string const spell, uint32 attackerCount = 0) : Trigger(botAI, spell), attackerCount(attackerCount) { }
bool IsActive() override;
protected:
uint32 attackerCount;
};
class WindfuryTotemTrigger : public TotemTrigger
{
public:
WindfuryTotemTrigger(PlayerbotAI* botAI) : TotemTrigger(botAI, "windfury totem") { }
};
class GraceOfAirTotemTrigger : public TotemTrigger
{
public:
GraceOfAirTotemTrigger(PlayerbotAI* botAI) : TotemTrigger(botAI, "grace of air totem") { }
};
class ManaSpringTotemTrigger : public TotemTrigger
{
public:
ManaSpringTotemTrigger(PlayerbotAI* botAI) : TotemTrigger(botAI, "mana spring totem") { }
bool IsActive() override;
};
class FlametongueTotemTrigger : public TotemTrigger
{
public:
FlametongueTotemTrigger(PlayerbotAI* botAI) : TotemTrigger(botAI, "flametongue totem") { }
};
class StrengthOfEarthTotemTrigger : public TotemTrigger
{
public:
StrengthOfEarthTotemTrigger(PlayerbotAI* botAI) : TotemTrigger(botAI, "strength of earth totem") { }
};
class MagmaTotemTrigger : public TotemTrigger
{
public:
MagmaTotemTrigger(PlayerbotAI* botAI) : TotemTrigger(botAI, "magma totem", 3) { }
};
class SearingTotemTrigger : public TotemTrigger
{
public:
SearingTotemTrigger(PlayerbotAI* botAI) : TotemTrigger(botAI, "searing totem", 1) { }
};
class WindShearInterruptSpellTrigger : public InterruptSpellTrigger
{
public:
WindShearInterruptSpellTrigger(PlayerbotAI* botAI) : InterruptSpellTrigger(botAI, "wind shear") { }
};
class WaterShieldTrigger : public BuffTrigger
{
public:
WaterShieldTrigger(PlayerbotAI* botAI) : BuffTrigger(botAI, "water shield") { }
};
class LightningShieldTrigger : public BuffTrigger
{
public:
LightningShieldTrigger(PlayerbotAI* botAI) : BuffTrigger(botAI, "lightning shield") { }
};
class PurgeTrigger : public TargetAuraDispelTrigger
{
public:
PurgeTrigger(PlayerbotAI* botAI) : TargetAuraDispelTrigger(botAI, "purge", DISPEL_MAGIC) { }
};
class WaterWalkingTrigger : public BuffTrigger
{
public:
WaterWalkingTrigger(PlayerbotAI* botAI) : BuffTrigger(botAI, "water walking", 7) { }
bool IsActive() override;
};
class WaterBreathingTrigger : public BuffTrigger
{
public:
WaterBreathingTrigger(PlayerbotAI* botAI) : BuffTrigger(botAI, "water breathing", 5) { }
bool IsActive() override;
};
class WaterWalkingOnPartyTrigger : public BuffOnPartyTrigger
{
public:
WaterWalkingOnPartyTrigger(PlayerbotAI* botAI) : BuffOnPartyTrigger(botAI, "water walking on party", 2) { }
bool IsActive() override;
};
class WaterBreathingOnPartyTrigger : public BuffOnPartyTrigger
{
public:
WaterBreathingOnPartyTrigger(PlayerbotAI* botAI) : BuffOnPartyTrigger(botAI, "water breathing on party", 2) { }
bool IsActive() override;
};
class CleanseSpiritPoisonTrigger : public NeedCureTrigger
{
public:
CleanseSpiritPoisonTrigger(PlayerbotAI* botAI) : NeedCureTrigger(botAI, "cleanse spirit", DISPEL_POISON) { }
};
class PartyMemberCleanseSpiritPoisonTrigger : public PartyMemberNeedCureTrigger
{
public:
PartyMemberCleanseSpiritPoisonTrigger(PlayerbotAI* botAI) : PartyMemberNeedCureTrigger(botAI, "cleanse spirit", DISPEL_POISON) { }
};
class CleanseSpiritCurseTrigger : public NeedCureTrigger
{
public:
CleanseSpiritCurseTrigger(PlayerbotAI* botAI) : NeedCureTrigger(botAI, "cleanse spirit", DISPEL_CURSE) { }
};
class PartyMemberCleanseSpiritCurseTrigger : public PartyMemberNeedCureTrigger
{
public:
PartyMemberCleanseSpiritCurseTrigger(PlayerbotAI* botAI) : PartyMemberNeedCureTrigger(botAI, "cleanse spirit", DISPEL_CURSE) { }
};
class CleanseSpiritDiseaseTrigger : public NeedCureTrigger
{
public:
CleanseSpiritDiseaseTrigger(PlayerbotAI* botAI) : NeedCureTrigger(botAI, "cleanse spirit", DISPEL_DISEASE) { }
};
class PartyMemberCleanseSpiritDiseaseTrigger : public PartyMemberNeedCureTrigger
{
public:
PartyMemberCleanseSpiritDiseaseTrigger(PlayerbotAI* botAI) : PartyMemberNeedCureTrigger(botAI, "cleanse spirit", DISPEL_DISEASE) { }
};
class ShockTrigger : public DebuffTrigger
{
public:
ShockTrigger(PlayerbotAI* botAI) : DebuffTrigger(botAI, "earth shock") { }
bool IsActive() override;
};
class FrostShockSnareTrigger : public SnareTargetTrigger
{
public:
FrostShockSnareTrigger(PlayerbotAI* botAI) : SnareTargetTrigger(botAI, "frost shock") { }
};
class HeroismTrigger : public BoostTrigger
{
public:
HeroismTrigger(PlayerbotAI* botAI) : BoostTrigger(botAI, "heroism") { }
};
class BloodlustTrigger : public BoostTrigger
{
public:
BloodlustTrigger(PlayerbotAI* botAI) : BoostTrigger(botAI, "bloodlust") { }
};
class MaelstromWeaponTrigger : public HasAuraTrigger
{
public:
MaelstromWeaponTrigger(PlayerbotAI* botAI) : HasAuraTrigger(botAI, "maelstrom weapon") { }
};
class WindShearInterruptEnemyHealerSpellTrigger : public InterruptEnemyHealerTrigger
{
public:
WindShearInterruptEnemyHealerSpellTrigger(PlayerbotAI* botAI) : InterruptEnemyHealerTrigger(botAI, "wind shear") { }
};
class CurePoisonTrigger : public NeedCureTrigger
{
public:
CurePoisonTrigger(PlayerbotAI* botAI) : NeedCureTrigger(botAI, "cure poison", DISPEL_POISON) { }
};
class PartyMemberCurePoisonTrigger : public PartyMemberNeedCureTrigger
{
public:
PartyMemberCurePoisonTrigger(PlayerbotAI* botAI) : PartyMemberNeedCureTrigger(botAI, "cure poison", DISPEL_POISON) { }
};
class CureDiseaseTrigger : public NeedCureTrigger
{
public:
CureDiseaseTrigger(PlayerbotAI* botAI) : NeedCureTrigger(botAI, "cure disease", DISPEL_DISEASE) { }
};
class PartyMemberCureDiseaseTrigger : public PartyMemberNeedCureTrigger
{
public:
PartyMemberCureDiseaseTrigger(PlayerbotAI* botAI) : PartyMemberNeedCureTrigger(botAI, "cure disease", DISPEL_DISEASE) { }
};
#endif

View File

@@ -0,0 +1,20 @@
/*
* 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 "TotemsShamanStrategy.h"
#include "Playerbots.h"
TotemsShamanStrategy::TotemsShamanStrategy(PlayerbotAI* botAI) : GenericShamanStrategy(botAI)
{
}
void TotemsShamanStrategy::InitTriggers(std::vector<TriggerNode*>& triggers)
{
GenericShamanStrategy::InitTriggers(triggers);
triggers.push_back(new TriggerNode("grace of air totem", NextAction::array(0, new NextAction("grace of air totem", 16.0f), nullptr)));
triggers.push_back(new TriggerNode("mana spring totem", NextAction::array(0, new NextAction("mana spring totem", 19.0f), nullptr)));
triggers.push_back(new TriggerNode("strength of earth totem", NextAction::array(0, new NextAction("strength of earth totem", 18.0f), nullptr)));
triggers.push_back(new TriggerNode("flametongue totem", NextAction::array(0, new NextAction("flametongue totem", 17.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_TOTEMSSHAMANSTRATEGY_H
#define _PLAYERBOT_TOTEMSSHAMANSTRATEGY_H
#include "GenericShamanStrategy.h"
class PlayerbotAI;
class TotemsShamanStrategy : public GenericShamanStrategy
{
public:
TotemsShamanStrategy(PlayerbotAI* botAI);
void InitTriggers(std::vector<TriggerNode*>& triggers) override;
std::string const getName() override { return "totems"; }
};
#endif