mirror of
https://github.com/mod-playerbots/mod-playerbots.git
synced 2026-01-17 10:45:43 +00:00
Modify file structure
This commit is contained in:
@@ -1,81 +0,0 @@
|
||||
/*
|
||||
* 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 "ArcaneMageStrategy.h"
|
||||
|
||||
#include "Playerbots.h"
|
||||
|
||||
class ArcaneMageStrategyActionNodeFactory : public NamedObjectFactory<ActionNode>
|
||||
{
|
||||
public:
|
||||
ArcaneMageStrategyActionNodeFactory()
|
||||
{
|
||||
creators["arcane blast"] = &arcane_blast;
|
||||
creators["arcane barrage"] = &arcane_barrage;
|
||||
creators["arcane missiles"] = &arcane_missiles;
|
||||
// creators["firebolt"] = &firebolt;
|
||||
}
|
||||
|
||||
private:
|
||||
static ActionNode* arcane_blast([[maybe_unused]] PlayerbotAI* botAI)
|
||||
{
|
||||
return new ActionNode("arcane blast",
|
||||
/*P*/ nullptr,
|
||||
/*A*/ NextAction::array(0, new NextAction("arcane missiles"), nullptr),
|
||||
/*C*/ nullptr);
|
||||
}
|
||||
|
||||
static ActionNode* arcane_barrage([[maybe_unused]] PlayerbotAI* botAI)
|
||||
{
|
||||
return new ActionNode("arcane barrage",
|
||||
/*P*/ nullptr,
|
||||
/*A*/ NextAction::array(0, new NextAction("arcane missiles"), nullptr),
|
||||
/*C*/ nullptr);
|
||||
}
|
||||
|
||||
static ActionNode* arcane_missiles([[maybe_unused]] PlayerbotAI* botAI)
|
||||
{
|
||||
return new ActionNode("arcane missiles",
|
||||
/*P*/ nullptr,
|
||||
/*A*/ NextAction::array(0, new NextAction("fireball"), nullptr),
|
||||
/*C*/ nullptr);
|
||||
}
|
||||
|
||||
// static ActionNode* firebolt([[maybe_unused]] PlayerbotAI* botAI)
|
||||
// {
|
||||
// return new ActionNode ("firebolt",
|
||||
// /*P*/ nullptr,
|
||||
// /*A*/ NextAction::array(0, new NextAction("shoot"), nullptr),
|
||||
// /*C*/ nullptr);
|
||||
// }
|
||||
};
|
||||
|
||||
ArcaneMageStrategy::ArcaneMageStrategy(PlayerbotAI* botAI) : GenericMageStrategy(botAI)
|
||||
{
|
||||
actionNodeFactories.Add(new ArcaneMageStrategyActionNodeFactory());
|
||||
}
|
||||
|
||||
NextAction** ArcaneMageStrategy::getDefaultActions()
|
||||
{
|
||||
return NextAction::array(0, new NextAction("arcane blast", ACTION_DEFAULT + 0.1f),
|
||||
new NextAction("shoot", ACTION_DEFAULT), NULL);
|
||||
}
|
||||
|
||||
void ArcaneMageStrategy::InitTriggers(std::vector<TriggerNode*>& triggers)
|
||||
{
|
||||
GenericMageStrategy::InitTriggers(triggers);
|
||||
|
||||
triggers.push_back(
|
||||
new TriggerNode("arcane blast stack", NextAction::array(0, new NextAction("arcane missiles", 15.0f), NULL)));
|
||||
}
|
||||
|
||||
void ArcaneMageAoeStrategy::InitTriggers(std::vector<TriggerNode*>& triggers)
|
||||
{
|
||||
// triggers.push_back(new TriggerNode(
|
||||
// "high aoe",
|
||||
// NextAction::array(0, new NextAction("arcane explosion", 39.0f), NULL)));
|
||||
|
||||
triggers.push_back(new TriggerNode("medium aoe", NextAction::array(0, new NextAction("blizzard", 40.0f), NULL)));
|
||||
}
|
||||
@@ -1,32 +0,0 @@
|
||||
/*
|
||||
* 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_ARCANEMAGESTRATEGY_H
|
||||
#define _PLAYERBOT_ARCANEMAGESTRATEGY_H
|
||||
|
||||
#include "GenericMageStrategy.h"
|
||||
|
||||
class PlayerbotAI;
|
||||
|
||||
class ArcaneMageStrategy : public GenericMageStrategy
|
||||
{
|
||||
public:
|
||||
ArcaneMageStrategy(PlayerbotAI* botAI);
|
||||
|
||||
void InitTriggers(std::vector<TriggerNode*>& triggers) override;
|
||||
std::string const getName() override { return "arcane"; }
|
||||
NextAction** getDefaultActions() override;
|
||||
};
|
||||
|
||||
class ArcaneMageAoeStrategy : public CombatStrategy
|
||||
{
|
||||
public:
|
||||
ArcaneMageAoeStrategy(PlayerbotAI* ai) : CombatStrategy(ai) {}
|
||||
|
||||
public:
|
||||
virtual void InitTriggers(std::vector<TriggerNode*>& triggers) override;
|
||||
std::string const getName() override { return "arcane aoe"; }
|
||||
};
|
||||
#endif
|
||||
@@ -1,36 +0,0 @@
|
||||
/*
|
||||
* 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 "FireMageStrategy.h"
|
||||
|
||||
#include "Playerbots.h"
|
||||
|
||||
NextAction** FireMageStrategy::getDefaultActions()
|
||||
{
|
||||
return NextAction::array(0, new NextAction("fireball", ACTION_DEFAULT + 0.1f),
|
||||
new NextAction("shoot", ACTION_DEFAULT), NULL);
|
||||
}
|
||||
|
||||
void FireMageStrategy::InitTriggers(std::vector<TriggerNode*>& triggers)
|
||||
{
|
||||
GenericMageStrategy::InitTriggers(triggers);
|
||||
|
||||
// triggers.push_back(new TriggerNode("pyroblast", NextAction::array(0, new NextAction("pyroblast", 10.0f),
|
||||
// nullptr)));
|
||||
triggers.push_back(
|
||||
new TriggerNode("hot streak", NextAction::array(0, new NextAction("pyroblast", 25.0f), nullptr)));
|
||||
triggers.push_back(
|
||||
new TriggerNode("combustion", NextAction::array(0, new NextAction("combustion", 50.0f), nullptr)));
|
||||
// triggers.push_back(new TriggerNode("enemy too close for spell", NextAction::array(0, new NextAction("dragon's
|
||||
// breath", 70.0f), nullptr)));
|
||||
}
|
||||
|
||||
void FireMageAoeStrategy::InitTriggers(std::vector<TriggerNode*>& triggers)
|
||||
{
|
||||
triggers.push_back(
|
||||
new TriggerNode("medium aoe", NextAction::array(0, new NextAction("flamestrike", 20.0f), nullptr)));
|
||||
triggers.push_back(
|
||||
new TriggerNode("living bomb", NextAction::array(0, new NextAction("living bomb", 25.0f), nullptr)));
|
||||
}
|
||||
@@ -1,32 +0,0 @@
|
||||
/*
|
||||
* 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_FIREMAGESTRATEGY_H
|
||||
#define _PLAYERBOT_FIREMAGESTRATEGY_H
|
||||
|
||||
#include "GenericMageStrategy.h"
|
||||
|
||||
class PlayerbotAI;
|
||||
|
||||
class FireMageStrategy : public GenericMageStrategy
|
||||
{
|
||||
public:
|
||||
FireMageStrategy(PlayerbotAI* botAI) : GenericMageStrategy(botAI) {}
|
||||
|
||||
void InitTriggers(std::vector<TriggerNode*>& triggers) override;
|
||||
std::string const getName() override { return "fire"; }
|
||||
NextAction** getDefaultActions() override;
|
||||
};
|
||||
|
||||
class FireMageAoeStrategy : public CombatStrategy
|
||||
{
|
||||
public:
|
||||
FireMageAoeStrategy(PlayerbotAI* botAI) : CombatStrategy(botAI) {}
|
||||
|
||||
void InitTriggers(std::vector<TriggerNode*>& triggers) override;
|
||||
std::string const getName() override { return "fire aoe"; }
|
||||
};
|
||||
|
||||
#endif
|
||||
@@ -1,109 +0,0 @@
|
||||
/*
|
||||
* 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 "FrostMageStrategy.h"
|
||||
|
||||
#include "Playerbots.h"
|
||||
|
||||
class FrostMageStrategyActionNodeFactory : public NamedObjectFactory<ActionNode>
|
||||
{
|
||||
public:
|
||||
FrostMageStrategyActionNodeFactory()
|
||||
{
|
||||
creators["cold snap"] = &cold_snap;
|
||||
creators["ice barrier"] = &ice_barrier;
|
||||
creators["summon water elemental"] = &summon_water_elemental;
|
||||
creators["deep freeze"] = &deep_freeze;
|
||||
}
|
||||
|
||||
private:
|
||||
static ActionNode* cold_snap([[maybe_unused]] PlayerbotAI* botAI)
|
||||
{
|
||||
return new ActionNode("cold snap",
|
||||
/*P*/ nullptr,
|
||||
/*A*/ nullptr,
|
||||
/*C*/ nullptr);
|
||||
}
|
||||
|
||||
static ActionNode* ice_barrier([[maybe_unused]] PlayerbotAI* botAI)
|
||||
{
|
||||
return new ActionNode("ice barrier",
|
||||
/*P*/ nullptr,
|
||||
/*A*/ nullptr,
|
||||
/*C*/ nullptr);
|
||||
}
|
||||
|
||||
static ActionNode* summon_water_elemental([[maybe_unused]] PlayerbotAI* botAI)
|
||||
{
|
||||
return new ActionNode("summon water elemental",
|
||||
/*P*/ nullptr,
|
||||
/*A*/ nullptr,
|
||||
/*C*/ nullptr);
|
||||
}
|
||||
|
||||
static ActionNode* deep_freeze([[maybe_unused]] PlayerbotAI* botAI)
|
||||
{
|
||||
return new ActionNode("deep freeze",
|
||||
/*P*/ nullptr,
|
||||
/*A*/ NextAction::array(0, new NextAction("ice lance"), nullptr),
|
||||
/*C*/ nullptr);
|
||||
}
|
||||
};
|
||||
|
||||
FrostMageStrategy::FrostMageStrategy(PlayerbotAI* botAI) : GenericMageStrategy(botAI)
|
||||
{
|
||||
actionNodeFactories.Add(new FrostMageStrategyActionNodeFactory());
|
||||
}
|
||||
|
||||
NextAction** FrostMageStrategy::getDefaultActions()
|
||||
{
|
||||
return NextAction::array(0, new NextAction("frostbolt", ACTION_DEFAULT + 0.2f),
|
||||
new NextAction("fireball", ACTION_DEFAULT + 0.1f),
|
||||
new NextAction("shoot", ACTION_DEFAULT), nullptr);
|
||||
}
|
||||
|
||||
void FrostMageStrategy::InitTriggers(std::vector<TriggerNode*>& triggers)
|
||||
{
|
||||
GenericMageStrategy::InitTriggers(triggers);
|
||||
triggers.push_back(new TriggerNode("icy veins", NextAction::array(0, new NextAction("icy veins", 50.0f), nullptr)));
|
||||
// No logic currently for cold snap usage.. possibly use right after icy veins drops off?
|
||||
// triggers.push_back(new TriggerNode("cold snap", NextAction::array(0, new NextAction("cold snap", 50.0f),
|
||||
// nullptr)));
|
||||
|
||||
triggers.push_back(new TriggerNode(
|
||||
"no pet", NextAction::array(0, new NextAction("summon water elemental", ACTION_HIGH), nullptr)));
|
||||
triggers.push_back(
|
||||
new TriggerNode("has pet", NextAction::array(0, new NextAction("toggle pet spell", ACTION_HIGH + 1), nullptr)));
|
||||
triggers.push_back(
|
||||
new TriggerNode("ice barrier", NextAction::array(0, new NextAction("ice barrier", ACTION_NORMAL), nullptr)));
|
||||
|
||||
triggers.push_back(new TriggerNode(
|
||||
"brain freeze", NextAction::array(0, new NextAction("frostfire bolt", ACTION_NORMAL + 3), nullptr)));
|
||||
// Combo cast the last charge of fingers of frost for double crits.
|
||||
// Should only do this on the final charge of FoF.
|
||||
triggers.push_back(new TriggerNode("fingers of frost single",
|
||||
NextAction::array(0, new NextAction("frostbolt", ACTION_NORMAL + 2),
|
||||
new NextAction("deep freeze", ACTION_NORMAL + 1), nullptr)));
|
||||
// May not need this, frostbolt is the default action so probably don't need to specify.
|
||||
// Maybe uncomment if you find the mage is prioritising auxillary spells while this buff is up, and wasting the
|
||||
// proc. triggers.push_back(new TriggerNode("fingers of frost double", NextAction::array(0, new
|
||||
// NextAction("frostbolt", ACTION_NORMAL), nullptr)));
|
||||
|
||||
// Same 2-spell combo for various freeze procs
|
||||
triggers.push_back(new TriggerNode("frost nova on target",
|
||||
NextAction::array(0, new NextAction("frostbolt", ACTION_NORMAL + 2),
|
||||
new NextAction("deep freeze", ACTION_NORMAL + 1), nullptr)));
|
||||
triggers.push_back(new TriggerNode("frostbite on target",
|
||||
NextAction::array(0, new NextAction("frostbolt", ACTION_NORMAL + 2),
|
||||
new NextAction("deep freeze", ACTION_NORMAL + 1), nullptr)));
|
||||
}
|
||||
|
||||
void FrostMageAoeStrategy::InitTriggers(std::vector<TriggerNode*>& triggers)
|
||||
{
|
||||
triggers.push_back(
|
||||
new TriggerNode("medium aoe", NextAction::array(0, new NextAction("blizzard", ACTION_HIGH), nullptr)));
|
||||
triggers.push_back(
|
||||
new TriggerNode("light aoe", NextAction::array(0, new NextAction("cone of cold", ACTION_HIGH + 1), nullptr)));
|
||||
}
|
||||
@@ -1,32 +0,0 @@
|
||||
/*
|
||||
* 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_FROSTMAGESTRATEGY_H
|
||||
#define _PLAYERBOT_FROSTMAGESTRATEGY_H
|
||||
|
||||
#include "GenericMageStrategy.h"
|
||||
|
||||
class PlayerbotAI;
|
||||
|
||||
class FrostMageStrategy : public GenericMageStrategy
|
||||
{
|
||||
public:
|
||||
FrostMageStrategy(PlayerbotAI* botAI);
|
||||
|
||||
void InitTriggers(std::vector<TriggerNode*>& triggers) override;
|
||||
std::string const getName() override { return "frost"; }
|
||||
NextAction** getDefaultActions() override;
|
||||
};
|
||||
|
||||
class FrostMageAoeStrategy : public CombatStrategy
|
||||
{
|
||||
public:
|
||||
FrostMageAoeStrategy(PlayerbotAI* botAI) : CombatStrategy(botAI) {}
|
||||
|
||||
void InitTriggers(std::vector<TriggerNode*>& triggers) override;
|
||||
std::string const getName() override { return "frost aoe"; }
|
||||
};
|
||||
|
||||
#endif
|
||||
@@ -1,83 +0,0 @@
|
||||
/*
|
||||
* 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 "GenericMageNonCombatStrategy.h"
|
||||
|
||||
#include "Playerbots.h"
|
||||
|
||||
class GenericMageNonCombatStrategyActionNodeFactory : public NamedObjectFactory<ActionNode>
|
||||
{
|
||||
public:
|
||||
GenericMageNonCombatStrategyActionNodeFactory()
|
||||
{
|
||||
creators["molten armor"] = &molten_armor;
|
||||
creators["mage armor"] = &mage_armor;
|
||||
creators["ice armor"] = &ice_armor;
|
||||
}
|
||||
|
||||
private:
|
||||
static ActionNode* molten_armor([[maybe_unused]] PlayerbotAI* botAI)
|
||||
{
|
||||
return new ActionNode("molten armor",
|
||||
/*P*/ nullptr,
|
||||
/*A*/ NextAction::array(0, new NextAction("mage armor"), nullptr),
|
||||
/*C*/ nullptr);
|
||||
}
|
||||
|
||||
static ActionNode* mage_armor([[maybe_unused]] PlayerbotAI* botAI)
|
||||
{
|
||||
return new ActionNode("mage armor",
|
||||
/*P*/ nullptr,
|
||||
/*A*/ NextAction::array(0, new NextAction("ice armor"), nullptr),
|
||||
/*C*/ nullptr);
|
||||
}
|
||||
|
||||
static ActionNode* ice_armor([[maybe_unused]] PlayerbotAI* botAI)
|
||||
{
|
||||
return new ActionNode("ice armor",
|
||||
/*P*/ nullptr,
|
||||
/*A*/ NextAction::array(0, new NextAction("frost armor"), nullptr),
|
||||
/*C*/ nullptr);
|
||||
}
|
||||
};
|
||||
|
||||
GenericMageNonCombatStrategy::GenericMageNonCombatStrategy(PlayerbotAI* botAI) : NonCombatStrategy(botAI)
|
||||
{
|
||||
actionNodeFactories.Add(new GenericMageNonCombatStrategyActionNodeFactory());
|
||||
}
|
||||
|
||||
void GenericMageNonCombatStrategy::InitTriggers(std::vector<TriggerNode*>& triggers)
|
||||
{
|
||||
NonCombatStrategy::InitTriggers(triggers);
|
||||
|
||||
triggers.push_back(
|
||||
new TriggerNode("arcane intellect", NextAction::array(0, new NextAction("arcane intellect", 21.0f), nullptr)));
|
||||
// triggers.push_back(new TriggerNode("no drink", NextAction::array(0, new NextAction("conjure water", 16.0f),
|
||||
// nullptr))); triggers.push_back(new TriggerNode("no food", NextAction::array(0, new NextAction("conjure
|
||||
// food", 15.0f), nullptr)));
|
||||
triggers.push_back(new TriggerNode("often", NextAction::array(0, new NextAction("apply oil", 1.0f), nullptr)));
|
||||
}
|
||||
|
||||
void MageBuffManaStrategy::InitTriggers(std::vector<TriggerNode*>& triggers)
|
||||
{
|
||||
triggers.push_back(
|
||||
new TriggerNode("mage armor", NextAction::array(0, new NextAction("mage armor", 19.0f), nullptr)));
|
||||
}
|
||||
|
||||
void MageBuffDpsStrategy::InitTriggers(std::vector<TriggerNode*>& triggers)
|
||||
{
|
||||
triggers.push_back(
|
||||
new TriggerNode("mage armor", NextAction::array(0, new NextAction("molten armor", 19.0f), nullptr)));
|
||||
}
|
||||
|
||||
void MageBuffStrategy::InitTriggers(std::vector<TriggerNode*>& triggers)
|
||||
{
|
||||
triggers.push_back(
|
||||
new TriggerNode("arcane intellect on party",
|
||||
NextAction::array(0, new NextAction("arcane intellect on party", 20.0f), nullptr)));
|
||||
// triggers.push_back(new TriggerNode("give water", NextAction::array(0, new NextAction("give water", 14.0f),
|
||||
// nullptr))); triggers.push_back(new TriggerNode("give food", NextAction::array(0, new NextAction("give
|
||||
// food", 13.0f), nullptr)));
|
||||
}
|
||||
@@ -1,49 +0,0 @@
|
||||
/*
|
||||
* 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_GENERICMAGENONCOMBATSTRATEGY_H
|
||||
#define _PLAYERBOT_GENERICMAGENONCOMBATSTRATEGY_H
|
||||
|
||||
#include "NonCombatStrategy.h"
|
||||
|
||||
class PlayerbotAI;
|
||||
|
||||
class GenericMageNonCombatStrategy : public NonCombatStrategy
|
||||
{
|
||||
public:
|
||||
GenericMageNonCombatStrategy(PlayerbotAI* botAI);
|
||||
|
||||
std::string const getName() override { return "nc"; }
|
||||
void InitTriggers(std::vector<TriggerNode*>& triggers) override;
|
||||
};
|
||||
|
||||
class MageBuffManaStrategy : public Strategy
|
||||
{
|
||||
public:
|
||||
MageBuffManaStrategy(PlayerbotAI* botAI) : Strategy(botAI) {}
|
||||
|
||||
void InitTriggers(std::vector<TriggerNode*>& triggers) override;
|
||||
std::string const getName() override { return "bmana"; }
|
||||
};
|
||||
|
||||
class MageBuffDpsStrategy : public Strategy
|
||||
{
|
||||
public:
|
||||
MageBuffDpsStrategy(PlayerbotAI* botAI) : Strategy(botAI) {}
|
||||
|
||||
void InitTriggers(std::vector<TriggerNode*>& triggers) override;
|
||||
std::string const getName() override { return "bdps"; }
|
||||
};
|
||||
|
||||
class MageBuffStrategy : public Strategy
|
||||
{
|
||||
public:
|
||||
MageBuffStrategy(PlayerbotAI* botAI) : Strategy(botAI) {}
|
||||
|
||||
void InitTriggers(std::vector<TriggerNode*>& triggers) override;
|
||||
std::string const getName() override { return "buff"; }
|
||||
};
|
||||
|
||||
#endif
|
||||
@@ -1,206 +0,0 @@
|
||||
/*
|
||||
* 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 "GenericMageStrategy.h"
|
||||
|
||||
#include "Playerbots.h"
|
||||
#include "RangedCombatStrategy.h"
|
||||
|
||||
class GenericMageStrategyActionNodeFactory : public NamedObjectFactory<ActionNode>
|
||||
{
|
||||
public:
|
||||
GenericMageStrategyActionNodeFactory()
|
||||
{
|
||||
creators["frostbolt"] = &frostbolt;
|
||||
creators["frostfire bolt"] = &frostfire_bolt;
|
||||
creators["ice lance"] = &ice_lance;
|
||||
creators["fire blast"] = &fire_blast;
|
||||
creators["scorch"] = &scorch;
|
||||
creators["frost nova"] = &frost_nova;
|
||||
creators["cone of cold"] = &cone_of_cold;
|
||||
creators["icy veins"] = &icy_veins;
|
||||
creators["combustion"] = &combustion;
|
||||
creators["evocation"] = &evocation;
|
||||
creators["dragon's breath"] = &dragons_breath;
|
||||
creators["blast wave"] = &blast_wave;
|
||||
creators["remove curse"] = &remove_curse;
|
||||
creators["remove curse on party"] = &remove_curse_on_party;
|
||||
creators["fireball"] = &fireball;
|
||||
}
|
||||
|
||||
private:
|
||||
static ActionNode* frostbolt([[maybe_unused]] PlayerbotAI* botAI)
|
||||
{
|
||||
return new ActionNode("frostbolt",
|
||||
/*P*/ nullptr,
|
||||
/*A*/ NextAction::array(0, new NextAction("shoot"), nullptr),
|
||||
/*C*/ nullptr);
|
||||
}
|
||||
|
||||
static ActionNode* frostfire_bolt([[maybe_unused]] PlayerbotAI* botAI)
|
||||
{
|
||||
return new ActionNode("frostfire bolt",
|
||||
/*P*/ nullptr,
|
||||
/*A*/ NextAction::array(0, new NextAction("fireball"), nullptr),
|
||||
/*C*/ nullptr);
|
||||
}
|
||||
|
||||
static ActionNode* ice_lance([[maybe_unused]] PlayerbotAI* botAI)
|
||||
{
|
||||
return new ActionNode("ice lance",
|
||||
/*P*/ nullptr,
|
||||
/*A*/ nullptr,
|
||||
/*C*/ nullptr);
|
||||
}
|
||||
|
||||
static ActionNode* fire_blast([[maybe_unused]] PlayerbotAI* botAI)
|
||||
{
|
||||
return new ActionNode("fire blast",
|
||||
/*P*/ nullptr,
|
||||
/*A*/ NextAction::array(0, new NextAction("scorch"), nullptr),
|
||||
/*C*/ nullptr);
|
||||
}
|
||||
|
||||
static ActionNode* scorch([[maybe_unused]] PlayerbotAI* botAI)
|
||||
{
|
||||
return new ActionNode("scorch",
|
||||
/*P*/ nullptr,
|
||||
/*A*/ NextAction::array(0, new NextAction("shoot"), nullptr),
|
||||
/*C*/ nullptr);
|
||||
}
|
||||
|
||||
static ActionNode* frost_nova([[maybe_unused]] PlayerbotAI* botAI)
|
||||
{
|
||||
return new ActionNode("frost nova",
|
||||
/*P*/ nullptr,
|
||||
/*A*/ nullptr,
|
||||
/*C*/ nullptr);
|
||||
}
|
||||
|
||||
static ActionNode* cone_of_cold([[maybe_unused]] PlayerbotAI* botAI)
|
||||
{
|
||||
return new ActionNode("cone of cold",
|
||||
/*P*/ nullptr,
|
||||
/*A*/ nullptr,
|
||||
/*C*/ nullptr);
|
||||
}
|
||||
|
||||
static ActionNode* icy_veins([[maybe_unused]] PlayerbotAI* botAI)
|
||||
{
|
||||
return new ActionNode("icy veins",
|
||||
/*P*/ nullptr,
|
||||
/*A*/ nullptr,
|
||||
/*C*/ nullptr);
|
||||
}
|
||||
|
||||
static ActionNode* combustion([[maybe_unused]] PlayerbotAI* botAI)
|
||||
{
|
||||
return new ActionNode("combustion",
|
||||
/*P*/ nullptr,
|
||||
/*A*/ nullptr,
|
||||
/*C*/ nullptr);
|
||||
}
|
||||
|
||||
static ActionNode* evocation([[maybe_unused]] PlayerbotAI* botAI)
|
||||
{
|
||||
return new ActionNode("evocation",
|
||||
/*P*/ nullptr,
|
||||
/*A*/ NextAction::array(0, new NextAction("mana potion"), nullptr),
|
||||
/*C*/ nullptr);
|
||||
}
|
||||
|
||||
static ActionNode* dragons_breath([[maybe_unused]] PlayerbotAI* botAI)
|
||||
{
|
||||
return new ActionNode("dragon's breath",
|
||||
/*P*/ nullptr,
|
||||
/*A*/ NextAction::array(0, new NextAction("blast wave"), nullptr),
|
||||
/*C*/ NextAction::array(0, new NextAction("flamestrike", 71.0f), nullptr));
|
||||
}
|
||||
|
||||
static ActionNode* blast_wave([[maybe_unused]] PlayerbotAI* botAI)
|
||||
{
|
||||
return new ActionNode("blast wave",
|
||||
/*P*/ nullptr,
|
||||
/*A*/ NextAction::array(0, new NextAction("frost nova"), nullptr),
|
||||
/*C*/ NextAction::array(0, new NextAction("flamestrike", 71.0f), nullptr));
|
||||
}
|
||||
|
||||
static ActionNode* remove_curse([[maybe_unused]] PlayerbotAI* botAI)
|
||||
{
|
||||
return new ActionNode("remove curse",
|
||||
/*P*/ nullptr,
|
||||
/*A*/ NextAction::array(0, new NextAction("remove lesser curse"), nullptr),
|
||||
/*C*/ nullptr);
|
||||
}
|
||||
|
||||
static ActionNode* remove_curse_on_party([[maybe_unused]] PlayerbotAI* botAI)
|
||||
{
|
||||
return new ActionNode("remove curse on party",
|
||||
/*P*/ nullptr,
|
||||
/*A*/ NextAction::array(0, new NextAction("remove lesser curse on party"), nullptr),
|
||||
/*C*/ nullptr);
|
||||
}
|
||||
static ActionNode* fireball([[maybe_unused]] PlayerbotAI* botAI)
|
||||
{
|
||||
return new ActionNode("fireball",
|
||||
/*P*/ nullptr,
|
||||
/*A*/ NextAction::array(0, new NextAction("shoot"), nullptr),
|
||||
/*C*/ nullptr);
|
||||
}
|
||||
};
|
||||
|
||||
GenericMageStrategy::GenericMageStrategy(PlayerbotAI* botAI) : RangedCombatStrategy(botAI)
|
||||
{
|
||||
actionNodeFactories.Add(new GenericMageStrategyActionNodeFactory());
|
||||
}
|
||||
|
||||
void GenericMageStrategy::InitTriggers(std::vector<TriggerNode*>& triggers)
|
||||
{
|
||||
RangedCombatStrategy::InitTriggers(triggers);
|
||||
|
||||
// triggers.push_back(new TriggerNode("enemy out of spell", NextAction::array(0, new NextAction("reach spell",
|
||||
// ACTION_MOVE + 9), nullptr)));
|
||||
triggers.push_back(
|
||||
new TriggerNode("enemy is close", NextAction::array(0, new NextAction("frost nova", 50.0f), nullptr)));
|
||||
triggers.push_back(
|
||||
new TriggerNode("counterspell on enemy healer",
|
||||
NextAction::array(0, new NextAction("counterspell on enemy healer", 40.0f), nullptr)));
|
||||
triggers.push_back(
|
||||
new TriggerNode("critical health", NextAction::array(0, new NextAction("ice block", 80.0f), nullptr)));
|
||||
triggers.push_back(
|
||||
new TriggerNode("spellsteal", NextAction::array(0, new NextAction("spellsteal", 40.0f), nullptr)));
|
||||
triggers.push_back(
|
||||
new TriggerNode("medium threat", NextAction::array(0, new NextAction("invisibility", 60.0f), nullptr)));
|
||||
triggers.push_back(
|
||||
new TriggerNode("low mana", NextAction::array(0, new NextAction("evocation", ACTION_EMERGENCY + 5), nullptr)));
|
||||
triggers.push_back(
|
||||
new TriggerNode("fire ward", NextAction::array(0, new NextAction("fire ward", ACTION_EMERGENCY), nullptr)));
|
||||
triggers.push_back(
|
||||
new TriggerNode("frost ward", NextAction::array(0, new NextAction("frost ward", ACTION_EMERGENCY), nullptr)));
|
||||
}
|
||||
|
||||
void MageCureStrategy::InitTriggers(std::vector<TriggerNode*>& triggers)
|
||||
{
|
||||
triggers.push_back(
|
||||
new TriggerNode("remove curse", NextAction::array(0, new NextAction("remove curse", 41.0f), nullptr)));
|
||||
triggers.push_back(new TriggerNode("remove curse on party",
|
||||
NextAction::array(0, new NextAction("remove curse on party", 40.0f), nullptr)));
|
||||
}
|
||||
|
||||
void MageBoostStrategy::InitTriggers(std::vector<TriggerNode*>& triggers)
|
||||
{
|
||||
triggers.push_back(new TriggerNode("icy veins", NextAction::array(0, new NextAction("icy veins", 50.0f), nullptr)));
|
||||
triggers.push_back(
|
||||
new TriggerNode("presence of mind", NextAction::array(0, new NextAction("presence of mind", 42.0f), nullptr)));
|
||||
// triggers.push_back(new TriggerNode("arcane power", NextAction::array(0, new NextAction("arcane power", 41.0f),
|
||||
// nullptr)));
|
||||
triggers.push_back(
|
||||
new TriggerNode("mirror image", NextAction::array(0, new NextAction("mirror image", 41.0f), nullptr)));
|
||||
}
|
||||
|
||||
void MageCcStrategy::InitTriggers(std::vector<TriggerNode*>& triggers)
|
||||
{
|
||||
triggers.push_back(new TriggerNode("polymorph", NextAction::array(0, new NextAction("polymorph", 30.0f), nullptr)));
|
||||
}
|
||||
@@ -1,54 +0,0 @@
|
||||
/*
|
||||
* 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_GENERICMAGESTRATEGY_H
|
||||
#define _PLAYERBOT_GENERICMAGESTRATEGY_H
|
||||
|
||||
#include "CombatStrategy.h"
|
||||
#include "RangedCombatStrategy.h"
|
||||
|
||||
class PlayerbotAI;
|
||||
|
||||
class GenericMageStrategy : public RangedCombatStrategy
|
||||
{
|
||||
public:
|
||||
GenericMageStrategy(PlayerbotAI* botAI);
|
||||
|
||||
std::string const getName() override { return "mage"; }
|
||||
void InitTriggers(std::vector<TriggerNode*>& triggers) override;
|
||||
uint32 GetType() const override
|
||||
{
|
||||
return RangedCombatStrategy::GetType() | STRATEGY_TYPE_RANGED | STRATEGY_TYPE_DPS;
|
||||
}
|
||||
};
|
||||
|
||||
class MageCureStrategy : public Strategy
|
||||
{
|
||||
public:
|
||||
MageCureStrategy(PlayerbotAI* botAI) : Strategy(botAI) {}
|
||||
|
||||
void InitTriggers(std::vector<TriggerNode*>& triggers) override;
|
||||
std::string const getName() override { return "cure"; }
|
||||
};
|
||||
|
||||
class MageBoostStrategy : public Strategy
|
||||
{
|
||||
public:
|
||||
MageBoostStrategy(PlayerbotAI* botAI) : Strategy(botAI) {}
|
||||
|
||||
void InitTriggers(std::vector<TriggerNode*>& triggers) override;
|
||||
std::string const getName() override { return "boost"; }
|
||||
};
|
||||
|
||||
class MageCcStrategy : public Strategy
|
||||
{
|
||||
public:
|
||||
MageCcStrategy(PlayerbotAI* botAI) : Strategy(botAI) {}
|
||||
|
||||
void InitTriggers(std::vector<TriggerNode*>& triggers) override;
|
||||
std::string const getName() override { return "cc"; }
|
||||
};
|
||||
|
||||
#endif
|
||||
@@ -1,23 +0,0 @@
|
||||
/*
|
||||
* 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 "MageActions.h"
|
||||
|
||||
#include "Playerbots.h"
|
||||
#include "ServerFacade.h"
|
||||
|
||||
Value<Unit*>* CastPolymorphAction::GetTargetValue() { return context->GetValue<Unit*>("cc target", getName()); }
|
||||
|
||||
bool CastFrostNovaAction::isUseful()
|
||||
{
|
||||
return sServerFacade->IsDistanceLessOrEqualThan(AI_VALUE2(float, "distance", GetTargetName()), 10.f);
|
||||
}
|
||||
|
||||
bool CastConeOfColdAction::isUseful()
|
||||
{
|
||||
bool facingTarget = AI_VALUE2(bool, "facing", "current target");
|
||||
bool targetClose = sServerFacade->IsDistanceLessOrEqualThan(AI_VALUE2(float, "distance", GetTargetName()), 10.f);
|
||||
return facingTarget && targetClose;
|
||||
}
|
||||
@@ -1,297 +0,0 @@
|
||||
/*
|
||||
* 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_MAGEACTIONS_H
|
||||
#define _PLAYERBOT_MAGEACTIONS_H
|
||||
|
||||
#include "GenericSpellActions.h"
|
||||
#include "SharedDefines.h"
|
||||
|
||||
class PlayerbotAI;
|
||||
|
||||
BUFF_ACTION(CastFireWardAction, "fire ward");
|
||||
BUFF_ACTION(CastFrostWardAction, "frost ward");
|
||||
|
||||
class CastFireballAction : public CastSpellAction
|
||||
{
|
||||
public:
|
||||
CastFireballAction(PlayerbotAI* botAI) : CastSpellAction(botAI, "fireball") {}
|
||||
};
|
||||
|
||||
class CastScorchAction : public CastSpellAction
|
||||
{
|
||||
public:
|
||||
CastScorchAction(PlayerbotAI* botAI) : CastSpellAction(botAI, "scorch") {}
|
||||
};
|
||||
|
||||
class CastFireBlastAction : public CastSpellAction
|
||||
{
|
||||
public:
|
||||
CastFireBlastAction(PlayerbotAI* botAI) : CastSpellAction(botAI, "fire blast") {}
|
||||
};
|
||||
|
||||
class CastArcaneBlastAction : public CastBuffSpellAction
|
||||
{
|
||||
public:
|
||||
CastArcaneBlastAction(PlayerbotAI* botAI) : CastBuffSpellAction(botAI, "arcane blast") {}
|
||||
std::string const GetTargetName() override { return "current target"; }
|
||||
};
|
||||
|
||||
class CastArcaneBarrageAction : public CastSpellAction
|
||||
{
|
||||
public:
|
||||
CastArcaneBarrageAction(PlayerbotAI* botAI) : CastSpellAction(botAI, "arcane barrage") {}
|
||||
};
|
||||
|
||||
class CastArcaneMissilesAction : public CastSpellAction
|
||||
{
|
||||
public:
|
||||
CastArcaneMissilesAction(PlayerbotAI* botAI) : CastSpellAction(botAI, "arcane missiles") {}
|
||||
};
|
||||
|
||||
class CastPyroblastAction : public CastSpellAction
|
||||
{
|
||||
public:
|
||||
CastPyroblastAction(PlayerbotAI* botAI) : CastSpellAction(botAI, "pyroblast") {}
|
||||
};
|
||||
|
||||
class CastFlamestrikeAction : public CastSpellAction
|
||||
{
|
||||
public:
|
||||
CastFlamestrikeAction(PlayerbotAI* botAI) : CastSpellAction(botAI, "flamestrike") {}
|
||||
ActionThreatType getThreatType() override { return ActionThreatType::Aoe; }
|
||||
};
|
||||
|
||||
class CastFrostNovaAction : public CastSpellAction
|
||||
{
|
||||
public:
|
||||
CastFrostNovaAction(PlayerbotAI* botAI) : CastSpellAction(botAI, "frost nova") {}
|
||||
bool isUseful() override;
|
||||
};
|
||||
|
||||
class CastFrostboltAction : public CastSpellAction
|
||||
{
|
||||
public:
|
||||
CastFrostboltAction(PlayerbotAI* botAI) : CastSpellAction(botAI, "frostbolt") {}
|
||||
};
|
||||
|
||||
class CastFrostfireBoltAction : public CastSpellAction
|
||||
{
|
||||
public:
|
||||
CastFrostfireBoltAction(PlayerbotAI* botAI) : CastSpellAction(botAI, "frostfire bolt") {}
|
||||
};
|
||||
|
||||
class CastIceLanceAction : public CastSpellAction
|
||||
{
|
||||
public:
|
||||
CastIceLanceAction(PlayerbotAI* botAI) : CastSpellAction(botAI, "ice lance") {}
|
||||
};
|
||||
|
||||
class CastDeepFreezeAction : public CastSpellAction
|
||||
{
|
||||
public:
|
||||
CastDeepFreezeAction(PlayerbotAI* botAI) : CastSpellAction(botAI, "deep freeze") {}
|
||||
};
|
||||
|
||||
class CastBlizzardAction : public CastSpellAction
|
||||
{
|
||||
public:
|
||||
CastBlizzardAction(PlayerbotAI* botAI) : CastSpellAction(botAI, "blizzard") {}
|
||||
ActionThreatType getThreatType() override { return ActionThreatType::Aoe; }
|
||||
};
|
||||
|
||||
class CastConeOfColdAction : public CastSpellAction
|
||||
{
|
||||
public:
|
||||
CastConeOfColdAction(PlayerbotAI* botAI) : CastSpellAction(botAI, "cone of cold") {}
|
||||
ActionThreatType getThreatType() override { return ActionThreatType::Aoe; }
|
||||
bool isUseful() override;
|
||||
};
|
||||
|
||||
class CastArcaneIntellectAction : public CastBuffSpellAction
|
||||
{
|
||||
public:
|
||||
CastArcaneIntellectAction(PlayerbotAI* botAI) : CastBuffSpellAction(botAI, "arcane intellect") {}
|
||||
};
|
||||
|
||||
class CastArcaneIntellectOnPartyAction : public BuffOnPartyAction
|
||||
{
|
||||
public:
|
||||
CastArcaneIntellectOnPartyAction(PlayerbotAI* botAI) : BuffOnPartyAction(botAI, "arcane intellect") {}
|
||||
};
|
||||
|
||||
class CastRemoveCurseAction : public CastCureSpellAction
|
||||
{
|
||||
public:
|
||||
CastRemoveCurseAction(PlayerbotAI* botAI) : CastCureSpellAction(botAI, "remove curse") {}
|
||||
};
|
||||
|
||||
class CastRemoveLesserCurseAction : public CastCureSpellAction
|
||||
{
|
||||
public:
|
||||
CastRemoveLesserCurseAction(PlayerbotAI* botAI) : CastCureSpellAction(botAI, "remove lesser curse") {}
|
||||
};
|
||||
|
||||
class CastIcyVeinsAction : public CastBuffSpellAction
|
||||
{
|
||||
public:
|
||||
CastIcyVeinsAction(PlayerbotAI* botAI) : CastBuffSpellAction(botAI, "icy veins") {}
|
||||
};
|
||||
|
||||
class CastColdSnapAction : public CastBuffSpellAction
|
||||
{
|
||||
public:
|
||||
CastColdSnapAction(PlayerbotAI* botAI) : CastBuffSpellAction(botAI, "cold snap") {}
|
||||
};
|
||||
|
||||
class CastIceBarrierAction : public CastBuffSpellAction
|
||||
{
|
||||
public:
|
||||
CastIceBarrierAction(PlayerbotAI* botAI) : CastBuffSpellAction(botAI, "ice barrier") {}
|
||||
};
|
||||
|
||||
class CastSummonWaterElementalAction : public CastBuffSpellAction
|
||||
{
|
||||
public:
|
||||
CastSummonWaterElementalAction(PlayerbotAI* botAI) : CastBuffSpellAction(botAI, "summon water elemental") {}
|
||||
};
|
||||
|
||||
class CastCombustionAction : public CastBuffSpellAction
|
||||
{
|
||||
public:
|
||||
CastCombustionAction(PlayerbotAI* botAI) : CastBuffSpellAction(botAI, "combustion") {}
|
||||
};
|
||||
|
||||
BEGIN_SPELL_ACTION(CastCounterspellAction, "counterspell")
|
||||
END_SPELL_ACTION()
|
||||
|
||||
class CastRemoveCurseOnPartyAction : public CurePartyMemberAction
|
||||
{
|
||||
public:
|
||||
CastRemoveCurseOnPartyAction(PlayerbotAI* botAI) : CurePartyMemberAction(botAI, "remove curse", DISPEL_CURSE) {}
|
||||
};
|
||||
|
||||
class CastRemoveLesserCurseOnPartyAction : public CurePartyMemberAction
|
||||
{
|
||||
public:
|
||||
CastRemoveLesserCurseOnPartyAction(PlayerbotAI* botAI)
|
||||
: CurePartyMemberAction(botAI, "remove lesser curse", DISPEL_CURSE)
|
||||
{
|
||||
}
|
||||
};
|
||||
|
||||
class CastConjureFoodAction : public CastBuffSpellAction
|
||||
{
|
||||
public:
|
||||
CastConjureFoodAction(PlayerbotAI* botAI) : CastBuffSpellAction(botAI, "conjure food") {}
|
||||
};
|
||||
|
||||
class CastConjureWaterAction : public CastBuffSpellAction
|
||||
{
|
||||
public:
|
||||
CastConjureWaterAction(PlayerbotAI* botAI) : CastBuffSpellAction(botAI, "conjure water") {}
|
||||
};
|
||||
|
||||
class CastIceBlockAction : public CastBuffSpellAction
|
||||
{
|
||||
public:
|
||||
CastIceBlockAction(PlayerbotAI* botAI) : CastBuffSpellAction(botAI, "ice block") {}
|
||||
};
|
||||
|
||||
class CastMoltenArmorAction : public CastBuffSpellAction
|
||||
{
|
||||
public:
|
||||
CastMoltenArmorAction(PlayerbotAI* botAI) : CastBuffSpellAction(botAI, "molten armor") {}
|
||||
};
|
||||
|
||||
class CastMageArmorAction : public CastBuffSpellAction
|
||||
{
|
||||
public:
|
||||
CastMageArmorAction(PlayerbotAI* botAI) : CastBuffSpellAction(botAI, "mage armor") {}
|
||||
};
|
||||
|
||||
class CastIceArmorAction : public CastBuffSpellAction
|
||||
{
|
||||
public:
|
||||
CastIceArmorAction(PlayerbotAI* botAI) : CastBuffSpellAction(botAI, "ice armor") {}
|
||||
};
|
||||
|
||||
class CastFrostArmorAction : public CastBuffSpellAction
|
||||
{
|
||||
public:
|
||||
CastFrostArmorAction(PlayerbotAI* botAI) : CastBuffSpellAction(botAI, "frost armor") {}
|
||||
};
|
||||
|
||||
class CastPolymorphAction : public CastBuffSpellAction
|
||||
{
|
||||
public:
|
||||
CastPolymorphAction(PlayerbotAI* botAI) : CastBuffSpellAction(botAI, "polymorph") {}
|
||||
Value<Unit*>* GetTargetValue() override;
|
||||
};
|
||||
|
||||
class CastSpellstealAction : public CastSpellAction
|
||||
{
|
||||
public:
|
||||
CastSpellstealAction(PlayerbotAI* botAI) : CastSpellAction(botAI, "spellsteal") {}
|
||||
};
|
||||
|
||||
class CastLivingBombAction : public CastDebuffSpellAction
|
||||
{
|
||||
public:
|
||||
CastLivingBombAction(PlayerbotAI* botAI) : CastDebuffSpellAction(botAI, "living bomb", true) {}
|
||||
};
|
||||
|
||||
class CastDragonsBreathAction : public CastSpellAction
|
||||
{
|
||||
public:
|
||||
CastDragonsBreathAction(PlayerbotAI* botAI) : CastSpellAction(botAI, "dragon's breath") {}
|
||||
ActionThreatType getThreatType() override { return ActionThreatType::Aoe; }
|
||||
};
|
||||
|
||||
class CastBlastWaveAction : public CastSpellAction
|
||||
{
|
||||
public:
|
||||
CastBlastWaveAction(PlayerbotAI* botAI) : CastSpellAction(botAI, "blast wave") {}
|
||||
ActionThreatType getThreatType() override { return ActionThreatType::Aoe; }
|
||||
};
|
||||
|
||||
class CastInvisibilityAction : public CastBuffSpellAction
|
||||
{
|
||||
public:
|
||||
CastInvisibilityAction(PlayerbotAI* botAI) : CastBuffSpellAction(botAI, "invisibility") {}
|
||||
};
|
||||
|
||||
class CastEvocationAction : public CastSpellAction
|
||||
{
|
||||
public:
|
||||
CastEvocationAction(PlayerbotAI* botAI) : CastSpellAction(botAI, "evocation") {}
|
||||
std::string const GetTargetName() override { return "self target"; }
|
||||
};
|
||||
|
||||
class CastCounterspellOnEnemyHealerAction : public CastSpellOnEnemyHealerAction
|
||||
{
|
||||
public:
|
||||
CastCounterspellOnEnemyHealerAction(PlayerbotAI* botAI) : CastSpellOnEnemyHealerAction(botAI, "counterspell") {}
|
||||
};
|
||||
|
||||
class CastArcanePowerAction : public CastBuffSpellAction
|
||||
{
|
||||
public:
|
||||
CastArcanePowerAction(PlayerbotAI* botAI) : CastBuffSpellAction(botAI, "arcane power") {}
|
||||
};
|
||||
|
||||
class CastPresenceOfMindAction : public CastBuffSpellAction
|
||||
{
|
||||
public:
|
||||
CastPresenceOfMindAction(PlayerbotAI* botAI) : CastBuffSpellAction(botAI, "presence of mind") {}
|
||||
};
|
||||
|
||||
class CastMirrorImageAction : public CastBuffSpellAction
|
||||
{
|
||||
public:
|
||||
CastMirrorImageAction(PlayerbotAI* botAI) : CastBuffSpellAction(botAI, "mirror image") {}
|
||||
};
|
||||
|
||||
#endif
|
||||
@@ -1,263 +0,0 @@
|
||||
/*
|
||||
* 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 "MageAiObjectContext.h"
|
||||
|
||||
#include "ArcaneMageStrategy.h"
|
||||
#include "FireMageStrategy.h"
|
||||
#include "FrostMageStrategy.h"
|
||||
#include "GenericMageNonCombatStrategy.h"
|
||||
#include "MageActions.h"
|
||||
#include "MageTriggers.h"
|
||||
#include "NamedObjectContext.h"
|
||||
#include "Playerbots.h"
|
||||
#include "PullStrategy.h"
|
||||
|
||||
class MageStrategyFactoryInternal : public NamedObjectContext<Strategy>
|
||||
{
|
||||
public:
|
||||
MageStrategyFactoryInternal()
|
||||
{
|
||||
creators["nc"] = &MageStrategyFactoryInternal::nc;
|
||||
creators["pull"] = &MageStrategyFactoryInternal::pull;
|
||||
creators["fire aoe"] = &MageStrategyFactoryInternal::fire_aoe;
|
||||
creators["frost aoe"] = &MageStrategyFactoryInternal::frost_aoe;
|
||||
creators["arcane aoe"] = &MageStrategyFactoryInternal::arcane_aoe;
|
||||
creators["cure"] = &MageStrategyFactoryInternal::cure;
|
||||
creators["buff"] = &MageStrategyFactoryInternal::buff;
|
||||
creators["boost"] = &MageStrategyFactoryInternal::boost;
|
||||
creators["cc"] = &MageStrategyFactoryInternal::cc;
|
||||
}
|
||||
|
||||
private:
|
||||
static Strategy* nc(PlayerbotAI* botAI) { return new GenericMageNonCombatStrategy(botAI); }
|
||||
static Strategy* pull(PlayerbotAI* botAI) { return new PullStrategy(botAI, "shoot"); }
|
||||
static Strategy* fire_aoe(PlayerbotAI* botAI) { return new FireMageAoeStrategy(botAI); }
|
||||
static Strategy* frost_aoe(PlayerbotAI* botAI) { return new FrostMageAoeStrategy(botAI); }
|
||||
static Strategy* arcane_aoe(PlayerbotAI* botAI) { return new ArcaneMageAoeStrategy(botAI); }
|
||||
static Strategy* cure(PlayerbotAI* botAI) { return new MageCureStrategy(botAI); }
|
||||
static Strategy* buff(PlayerbotAI* botAI) { return new MageBuffStrategy(botAI); }
|
||||
static Strategy* boost(PlayerbotAI* botAI) { return new MageBoostStrategy(botAI); }
|
||||
static Strategy* cc(PlayerbotAI* botAI) { return new MageCcStrategy(botAI); }
|
||||
};
|
||||
|
||||
class MageCombatStrategyFactoryInternal : public NamedObjectContext<Strategy>
|
||||
{
|
||||
public:
|
||||
MageCombatStrategyFactoryInternal() : NamedObjectContext<Strategy>(false, true)
|
||||
{
|
||||
creators["frost"] = &MageCombatStrategyFactoryInternal::frost;
|
||||
creators["fire"] = &MageCombatStrategyFactoryInternal::fire;
|
||||
creators["arcane"] = &MageCombatStrategyFactoryInternal::arcane;
|
||||
}
|
||||
|
||||
private:
|
||||
static Strategy* frost(PlayerbotAI* botAI) { return new FrostMageStrategy(botAI); }
|
||||
static Strategy* fire(PlayerbotAI* botAI) { return new FireMageStrategy(botAI); }
|
||||
static Strategy* arcane(PlayerbotAI* botAI) { return new ArcaneMageStrategy(botAI); }
|
||||
};
|
||||
|
||||
class MageBuffStrategyFactoryInternal : public NamedObjectContext<Strategy>
|
||||
{
|
||||
public:
|
||||
MageBuffStrategyFactoryInternal() : NamedObjectContext<Strategy>(false, true)
|
||||
{
|
||||
creators["bmana"] = &MageBuffStrategyFactoryInternal::bmana;
|
||||
creators["bdps"] = &MageBuffStrategyFactoryInternal::bdps;
|
||||
}
|
||||
|
||||
private:
|
||||
static Strategy* bmana(PlayerbotAI* botAI) { return new MageBuffManaStrategy(botAI); }
|
||||
static Strategy* bdps(PlayerbotAI* botAI) { return new MageBuffDpsStrategy(botAI); }
|
||||
};
|
||||
|
||||
class MageTriggerFactoryInternal : public NamedObjectContext<Trigger>
|
||||
{
|
||||
public:
|
||||
MageTriggerFactoryInternal()
|
||||
{
|
||||
creators["fireball"] = &MageTriggerFactoryInternal::fireball;
|
||||
creators["pyroblast"] = &MageTriggerFactoryInternal::pyroblast;
|
||||
creators["combustion"] = &MageTriggerFactoryInternal::combustion;
|
||||
creators["fingers of frost single"] = &MageTriggerFactoryInternal::fingers_of_frost_single;
|
||||
creators["fingers of frost double"] = &MageTriggerFactoryInternal::fingers_of_frost_double;
|
||||
creators["brain freeze"] = &MageTriggerFactoryInternal::brain_freeze;
|
||||
creators["icy veins"] = &MageTriggerFactoryInternal::icy_veins;
|
||||
creators["cold snap"] = &MageTriggerFactoryInternal::cold_snap;
|
||||
creators["ice barrier"] = &MageTriggerFactoryInternal::ice_barrier;
|
||||
creators["arcane intellect"] = &MageTriggerFactoryInternal::arcane_intellect;
|
||||
creators["arcane intellect on party"] = &MageTriggerFactoryInternal::arcane_intellect_on_party;
|
||||
creators["mage armor"] = &MageTriggerFactoryInternal::mage_armor;
|
||||
creators["remove curse"] = &MageTriggerFactoryInternal::remove_curse;
|
||||
creators["remove curse on party"] = &MageTriggerFactoryInternal::remove_curse_on_party;
|
||||
creators["counterspell"] = &MageTriggerFactoryInternal::counterspell;
|
||||
creators["polymorph"] = &MageTriggerFactoryInternal::polymorph;
|
||||
creators["spellsteal"] = &MageTriggerFactoryInternal::spellsteal;
|
||||
creators["hot streak"] = &MageTriggerFactoryInternal::hot_streak;
|
||||
creators["living bomb"] = &MageTriggerFactoryInternal::living_bomb;
|
||||
creators["missile barrage"] = &MageTriggerFactoryInternal::missile_barrage;
|
||||
creators["arcane blast"] = &MageTriggerFactoryInternal::arcane_blast;
|
||||
creators["counterspell on enemy healer"] = &MageTriggerFactoryInternal::counterspell_enemy_healer;
|
||||
creators["arcane power"] = &MageTriggerFactoryInternal::arcane_power;
|
||||
creators["presence of mind"] = &MageTriggerFactoryInternal::presence_of_mind;
|
||||
creators["fire ward"] = &MageTriggerFactoryInternal::fire_ward;
|
||||
creators["frost ward"] = &MageTriggerFactoryInternal::frost_ward;
|
||||
creators["arcane blast stack"] = &MageTriggerFactoryInternal::arcane_blast_stack;
|
||||
creators["mirror image"] = &MageTriggerFactoryInternal::mirror_image;
|
||||
creators["frost nova on target"] = &MageTriggerFactoryInternal::frost_nova_on_target;
|
||||
creators["frostbite on target"] = &MageTriggerFactoryInternal::frostbite_on_target;
|
||||
}
|
||||
|
||||
private:
|
||||
static Trigger* presence_of_mind(PlayerbotAI* botAI) { return new PresenceOfMindTrigger(botAI); }
|
||||
static Trigger* frost_ward(PlayerbotAI* botAI) { return new FrostWardTrigger(botAI); }
|
||||
static Trigger* fire_ward(PlayerbotAI* botAI) { return new FireWardTrigger(botAI); }
|
||||
static Trigger* arcane_power(PlayerbotAI* botAI) { return new ArcanePowerTrigger(botAI); }
|
||||
static Trigger* hot_streak(PlayerbotAI* botAI) { return new HotStreakTrigger(botAI); }
|
||||
static Trigger* fireball(PlayerbotAI* botAI) { return new FireballTrigger(botAI); }
|
||||
static Trigger* pyroblast(PlayerbotAI* botAI) { return new PyroblastTrigger(botAI); }
|
||||
static Trigger* combustion(PlayerbotAI* botAI) { return new CombustionTrigger(botAI); }
|
||||
static Trigger* fingers_of_frost_single(PlayerbotAI* botAI) { return new FingersOfFrostSingleTrigger(botAI); }
|
||||
static Trigger* fingers_of_frost_double(PlayerbotAI* botAI) { return new FingersOfFrostDoubleTrigger(botAI); }
|
||||
static Trigger* brain_freeze(PlayerbotAI* botAI) { return new BrainFreezeTrigger(botAI); }
|
||||
static Trigger* icy_veins(PlayerbotAI* botAI) { return new IcyVeinsTrigger(botAI); }
|
||||
static Trigger* cold_snap(PlayerbotAI* botAI) { return new ColdSnapTrigger(botAI); }
|
||||
static Trigger* ice_barrier(PlayerbotAI* botAI) { return new IceBarrierTrigger(botAI); }
|
||||
static Trigger* arcane_intellect(PlayerbotAI* botAI) { return new ArcaneIntellectTrigger(botAI); }
|
||||
static Trigger* arcane_intellect_on_party(PlayerbotAI* botAI) { return new ArcaneIntellectOnPartyTrigger(botAI); }
|
||||
static Trigger* mage_armor(PlayerbotAI* botAI) { return new MageArmorTrigger(botAI); }
|
||||
static Trigger* remove_curse(PlayerbotAI* botAI) { return new RemoveCurseTrigger(botAI); }
|
||||
static Trigger* remove_curse_on_party(PlayerbotAI* botAI) { return new PartyMemberRemoveCurseTrigger(botAI); }
|
||||
static Trigger* counterspell(PlayerbotAI* botAI) { return new CounterspellInterruptSpellTrigger(botAI); }
|
||||
static Trigger* polymorph(PlayerbotAI* botAI) { return new PolymorphTrigger(botAI); }
|
||||
static Trigger* spellsteal(PlayerbotAI* botAI) { return new SpellstealTrigger(botAI); }
|
||||
static Trigger* living_bomb(PlayerbotAI* botAI) { return new LivingBombTrigger(botAI); }
|
||||
static Trigger* missile_barrage(PlayerbotAI* botAI) { return new MissileBarrageTrigger(botAI); }
|
||||
static Trigger* arcane_blast(PlayerbotAI* botAI) { return new ArcaneBlastTrigger(botAI); }
|
||||
static Trigger* counterspell_enemy_healer(PlayerbotAI* botAI) { return new CounterspellEnemyHealerTrigger(botAI); }
|
||||
static Trigger* arcane_blast_stack(PlayerbotAI* botAI) { return new ArcaneBlastStackTrigger(botAI); }
|
||||
static Trigger* mirror_image(PlayerbotAI* botAI) { return new MirrorImageTrigger(botAI); }
|
||||
static Trigger* frost_nova_on_target(PlayerbotAI* botAI) { return new FrostNovaOnTargetTrigger(botAI); }
|
||||
static Trigger* frostbite_on_target(PlayerbotAI* botAI) { return new FrostbiteOnTargetTrigger(botAI); }
|
||||
};
|
||||
|
||||
class MageAiObjectContextInternal : public NamedObjectContext<Action>
|
||||
{
|
||||
public:
|
||||
MageAiObjectContextInternal()
|
||||
{
|
||||
creators["arcane power"] = &MageAiObjectContextInternal::arcane_power;
|
||||
creators["presence of mind"] = &MageAiObjectContextInternal::presence_of_mind;
|
||||
creators["frostbolt"] = &MageAiObjectContextInternal::frostbolt;
|
||||
creators["frostfire bolt"] = &MageAiObjectContextInternal::frostfire_bolt;
|
||||
creators["ice lance"] = &MageAiObjectContextInternal::ice_lance;
|
||||
creators["deep freeze"] = &MageAiObjectContextInternal::deep_freeze;
|
||||
creators["blizzard"] = &MageAiObjectContextInternal::blizzard;
|
||||
creators["cone of cold"] = &MageAiObjectContextInternal::cone_of_cold;
|
||||
creators["frost nova"] = &MageAiObjectContextInternal::frost_nova;
|
||||
creators["arcane intellect"] = &MageAiObjectContextInternal::arcane_intellect;
|
||||
creators["arcane intellect on party"] = &MageAiObjectContextInternal::arcane_intellect_on_party;
|
||||
creators["conjure water"] = &MageAiObjectContextInternal::conjure_water;
|
||||
creators["conjure food"] = &MageAiObjectContextInternal::conjure_food;
|
||||
creators["molten armor"] = &MageAiObjectContextInternal::molten_armor;
|
||||
creators["mage armor"] = &MageAiObjectContextInternal::mage_armor;
|
||||
creators["ice armor"] = &MageAiObjectContextInternal::ice_armor;
|
||||
creators["frost armor"] = &MageAiObjectContextInternal::frost_armor;
|
||||
creators["fireball"] = &MageAiObjectContextInternal::fireball;
|
||||
creators["pyroblast"] = &MageAiObjectContextInternal::pyroblast;
|
||||
creators["flamestrike"] = &MageAiObjectContextInternal::flamestrike;
|
||||
creators["fire blast"] = &MageAiObjectContextInternal::fire_blast;
|
||||
creators["scorch"] = &MageAiObjectContextInternal::scorch;
|
||||
creators["counterspell"] = &MageAiObjectContextInternal::counterspell;
|
||||
creators["remove curse"] = &MageAiObjectContextInternal::remove_curse;
|
||||
creators["remove curse on party"] = &MageAiObjectContextInternal::remove_curse_on_party;
|
||||
creators["remove lesser curse"] = &MageAiObjectContextInternal::remove_lesser_curse;
|
||||
creators["remove lesser curse on party"] = &MageAiObjectContextInternal::remove_lesser_curse_on_party;
|
||||
creators["icy veins"] = &MageAiObjectContextInternal::icy_veins;
|
||||
creators["cold snap"] = &MageAiObjectContextInternal::cold_snap;
|
||||
creators["ice barrier"] = &MageAiObjectContextInternal::ice_barrier;
|
||||
creators["summon water elemental"] = &MageAiObjectContextInternal::summon_water_elemental;
|
||||
creators["combustion"] = &MageAiObjectContextInternal::combustion;
|
||||
creators["ice block"] = &MageAiObjectContextInternal::ice_block;
|
||||
creators["polymorph"] = &MageAiObjectContextInternal::polymorph;
|
||||
creators["spellsteal"] = &MageAiObjectContextInternal::spellsteal;
|
||||
creators["living bomb"] = &MageAiObjectContextInternal::living_bomb;
|
||||
creators["dragon's breath"] = &MageAiObjectContextInternal::dragons_breath;
|
||||
creators["blast wave"] = &MageAiObjectContextInternal::blast_wave;
|
||||
creators["invisibility"] = &MageAiObjectContextInternal::invisibility;
|
||||
creators["evocation"] = &MageAiObjectContextInternal::evocation;
|
||||
creators["arcane blast"] = &MageAiObjectContextInternal::arcane_blast;
|
||||
creators["arcane barrage"] = &MageAiObjectContextInternal::arcane_barrage;
|
||||
creators["arcane missiles"] = &MageAiObjectContextInternal::arcane_missiles;
|
||||
creators["counterspell on enemy healer"] = &MageAiObjectContextInternal::counterspell_on_enemy_healer;
|
||||
creators["fire ward"] = &MageAiObjectContextInternal::fire_ward;
|
||||
creators["frost ward"] = &MageAiObjectContextInternal::frost_ward;
|
||||
creators["mirror image"] = &MageAiObjectContextInternal::mirror_image;
|
||||
}
|
||||
|
||||
private:
|
||||
static Action* presence_of_mind(PlayerbotAI* botAI) { return new CastPresenceOfMindAction(botAI); }
|
||||
static Action* frost_ward(PlayerbotAI* botAI) { return new CastFrostWardAction(botAI); }
|
||||
static Action* fire_ward(PlayerbotAI* botAI) { return new CastFireWardAction(botAI); }
|
||||
static Action* arcane_power(PlayerbotAI* botAI) { return new CastArcanePowerAction(botAI); }
|
||||
static Action* arcane_missiles(PlayerbotAI* botAI) { return new CastArcaneMissilesAction(botAI); }
|
||||
static Action* arcane_barrage(PlayerbotAI* botAI) { return new CastArcaneBarrageAction(botAI); }
|
||||
static Action* arcane_blast(PlayerbotAI* botAI) { return new CastArcaneBlastAction(botAI); }
|
||||
static Action* frostbolt(PlayerbotAI* botAI) { return new CastFrostboltAction(botAI); }
|
||||
static Action* frostfire_bolt(PlayerbotAI* botAI) { return new CastFrostfireBoltAction(botAI); }
|
||||
static Action* ice_lance(PlayerbotAI* botAI) { return new CastIceLanceAction(botAI); }
|
||||
static Action* deep_freeze(PlayerbotAI* botAI) { return new CastDeepFreezeAction(botAI); }
|
||||
static Action* blizzard(PlayerbotAI* botAI) { return new CastBlizzardAction(botAI); }
|
||||
static Action* cone_of_cold(PlayerbotAI* botAI) { return new CastConeOfColdAction(botAI); }
|
||||
static Action* frost_nova(PlayerbotAI* botAI) { return new CastFrostNovaAction(botAI); }
|
||||
static Action* arcane_intellect(PlayerbotAI* botAI) { return new CastArcaneIntellectAction(botAI); }
|
||||
static Action* arcane_intellect_on_party(PlayerbotAI* botAI) { return new CastArcaneIntellectOnPartyAction(botAI); }
|
||||
static Action* conjure_water(PlayerbotAI* botAI) { return new CastConjureWaterAction(botAI); }
|
||||
static Action* conjure_food(PlayerbotAI* botAI) { return new CastConjureFoodAction(botAI); }
|
||||
static Action* molten_armor(PlayerbotAI* botAI) { return new CastMoltenArmorAction(botAI); }
|
||||
static Action* mage_armor(PlayerbotAI* botAI) { return new CastMageArmorAction(botAI); }
|
||||
static Action* ice_armor(PlayerbotAI* botAI) { return new CastIceArmorAction(botAI); }
|
||||
static Action* frost_armor(PlayerbotAI* botAI) { return new CastFrostArmorAction(botAI); }
|
||||
static Action* fireball(PlayerbotAI* botAI) { return new CastFireballAction(botAI); }
|
||||
static Action* pyroblast(PlayerbotAI* botAI) { return new CastPyroblastAction(botAI); }
|
||||
static Action* flamestrike(PlayerbotAI* botAI) { return new CastFlamestrikeAction(botAI); }
|
||||
static Action* fire_blast(PlayerbotAI* botAI) { return new CastFireBlastAction(botAI); }
|
||||
static Action* scorch(PlayerbotAI* botAI) { return new CastScorchAction(botAI); }
|
||||
static Action* counterspell(PlayerbotAI* botAI) { return new CastCounterspellAction(botAI); }
|
||||
static Action* remove_curse(PlayerbotAI* botAI) { return new CastRemoveCurseAction(botAI); }
|
||||
static Action* remove_curse_on_party(PlayerbotAI* botAI) { return new CastRemoveCurseOnPartyAction(botAI); }
|
||||
static Action* remove_lesser_curse(PlayerbotAI* botAI) { return new CastRemoveLesserCurseAction(botAI); }
|
||||
static Action* remove_lesser_curse_on_party(PlayerbotAI* botAI)
|
||||
{
|
||||
return new CastRemoveLesserCurseOnPartyAction(botAI);
|
||||
}
|
||||
static Action* icy_veins(PlayerbotAI* botAI) { return new CastIcyVeinsAction(botAI); }
|
||||
static Action* cold_snap(PlayerbotAI* botAI) { return new CastColdSnapAction(botAI); }
|
||||
static Action* ice_barrier(PlayerbotAI* botAI) { return new CastIceBarrierAction(botAI); }
|
||||
static Action* summon_water_elemental(PlayerbotAI* botAI) { return new CastSummonWaterElementalAction(botAI); }
|
||||
static Action* combustion(PlayerbotAI* botAI) { return new CastCombustionAction(botAI); }
|
||||
static Action* ice_block(PlayerbotAI* botAI) { return new CastIceBlockAction(botAI); }
|
||||
static Action* polymorph(PlayerbotAI* botAI) { return new CastPolymorphAction(botAI); }
|
||||
static Action* spellsteal(PlayerbotAI* botAI) { return new CastSpellstealAction(botAI); }
|
||||
static Action* living_bomb(PlayerbotAI* botAI) { return new CastLivingBombAction(botAI); }
|
||||
static Action* dragons_breath(PlayerbotAI* botAI) { return new CastDragonsBreathAction(botAI); }
|
||||
static Action* blast_wave(PlayerbotAI* botAI) { return new CastBlastWaveAction(botAI); }
|
||||
static Action* invisibility(PlayerbotAI* botAI) { return new CastInvisibilityAction(botAI); }
|
||||
static Action* evocation(PlayerbotAI* botAI) { return new CastEvocationAction(botAI); }
|
||||
static Action* counterspell_on_enemy_healer(PlayerbotAI* botAI)
|
||||
{
|
||||
return new CastCounterspellOnEnemyHealerAction(botAI);
|
||||
}
|
||||
static Action* mirror_image(PlayerbotAI* botAI) { return new CastMirrorImageAction(botAI); }
|
||||
};
|
||||
|
||||
MageAiObjectContext::MageAiObjectContext(PlayerbotAI* botAI) : AiObjectContext(botAI)
|
||||
{
|
||||
strategyContexts.Add(new MageStrategyFactoryInternal());
|
||||
strategyContexts.Add(new MageCombatStrategyFactoryInternal());
|
||||
strategyContexts.Add(new MageBuffStrategyFactoryInternal());
|
||||
actionContexts.Add(new MageAiObjectContextInternal());
|
||||
triggerContexts.Add(new MageTriggerFactoryInternal());
|
||||
}
|
||||
@@ -1,19 +0,0 @@
|
||||
/*
|
||||
* 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_MAGEAIOBJECTCONTEXT_H
|
||||
#define _PLAYERBOT_MAGEAIOBJECTCONTEXT_H
|
||||
|
||||
#include "AiObjectContext.h"
|
||||
|
||||
class PlayerbotAI;
|
||||
|
||||
class MageAiObjectContext : public AiObjectContext
|
||||
{
|
||||
public:
|
||||
MageAiObjectContext(PlayerbotAI* botAI);
|
||||
};
|
||||
|
||||
#endif
|
||||
@@ -1,54 +0,0 @@
|
||||
/*
|
||||
* 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 "MageTriggers.h"
|
||||
|
||||
#include "MageActions.h"
|
||||
#include "Playerbots.h"
|
||||
|
||||
bool ArcaneIntellectOnPartyTrigger::IsActive()
|
||||
{
|
||||
return BuffOnPartyTrigger::IsActive() && !botAI->HasAura("arcane brilliance", GetTarget());
|
||||
}
|
||||
|
||||
bool ArcaneIntellectTrigger::IsActive()
|
||||
{
|
||||
return BuffTrigger::IsActive() && !botAI->HasAura("arcane brilliance", GetTarget());
|
||||
}
|
||||
|
||||
bool MageArmorTrigger::IsActive()
|
||||
{
|
||||
Unit* target = GetTarget();
|
||||
return !botAI->HasAura("ice armor", target) && !botAI->HasAura("frost armor", target) &&
|
||||
!botAI->HasAura("molten armor", target) && !botAI->HasAura("mage armor", target);
|
||||
}
|
||||
|
||||
bool FingersOfFrostSingleTrigger::IsActive()
|
||||
{
|
||||
// Fingers of Frost "stack" count is always 1.
|
||||
// The value is instead stored in the charges.
|
||||
Aura* aura = botAI->GetAura("fingers of frost", bot, false, true, -1);
|
||||
return (aura && aura->GetCharges() == 1);
|
||||
}
|
||||
|
||||
bool FrostNovaOnTargetTrigger::IsActive()
|
||||
{
|
||||
Unit* target = GetTarget();
|
||||
if (!target || !target->IsAlive() || !target->IsInWorld())
|
||||
{
|
||||
return false;
|
||||
}
|
||||
return botAI->HasAura(spell, target);
|
||||
}
|
||||
|
||||
bool FrostbiteOnTargetTrigger::IsActive()
|
||||
{
|
||||
Unit* target = GetTarget();
|
||||
if (!target || !target->IsAlive() || !target->IsInWorld())
|
||||
{
|
||||
return false;
|
||||
}
|
||||
return botAI->HasAura(spell, target);
|
||||
}
|
||||
@@ -1,196 +0,0 @@
|
||||
/*
|
||||
* 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_MAGETRIGGERS_H
|
||||
#define _PLAYERBOT_MAGETRIGGERS_H
|
||||
|
||||
#include "CureTriggers.h"
|
||||
#include "GenericTriggers.h"
|
||||
#include "SharedDefines.h"
|
||||
|
||||
class PlayerbotAI;
|
||||
|
||||
DEFLECT_TRIGGER(FireWardTrigger, "fire ward");
|
||||
DEFLECT_TRIGGER(FrostWardTrigger, "frost ward");
|
||||
|
||||
class ArcaneIntellectOnPartyTrigger : public BuffOnPartyTrigger
|
||||
{
|
||||
public:
|
||||
ArcaneIntellectOnPartyTrigger(PlayerbotAI* botAI) : BuffOnPartyTrigger(botAI, "arcane intellect", 2 * 2000) {}
|
||||
|
||||
bool IsActive() override;
|
||||
};
|
||||
|
||||
class ArcaneIntellectTrigger : public BuffTrigger
|
||||
{
|
||||
public:
|
||||
ArcaneIntellectTrigger(PlayerbotAI* botAI) : BuffTrigger(botAI, "arcane intellect", 2 * 2000) {}
|
||||
bool IsActive() override;
|
||||
};
|
||||
|
||||
class MageArmorTrigger : public BuffTrigger
|
||||
{
|
||||
public:
|
||||
MageArmorTrigger(PlayerbotAI* botAI) : BuffTrigger(botAI, "mage armor", 5 * 2000) {}
|
||||
bool IsActive() override;
|
||||
};
|
||||
|
||||
class LivingBombTrigger : public DebuffTrigger
|
||||
{
|
||||
public:
|
||||
LivingBombTrigger(PlayerbotAI* botAI) : DebuffTrigger(botAI, "living bomb", 1, true) {}
|
||||
};
|
||||
|
||||
class FireballTrigger : public DebuffTrigger
|
||||
{
|
||||
public:
|
||||
FireballTrigger(PlayerbotAI* botAI) : DebuffTrigger(botAI, "fireball", 1, true) {}
|
||||
};
|
||||
|
||||
class PyroblastTrigger : public DebuffTrigger
|
||||
{
|
||||
public:
|
||||
PyroblastTrigger(PlayerbotAI* botAI) : DebuffTrigger(botAI, "pyroblast", 1, true) {}
|
||||
};
|
||||
|
||||
class HotStreakTrigger : public HasAuraTrigger
|
||||
{
|
||||
public:
|
||||
HotStreakTrigger(PlayerbotAI* botAI) : HasAuraTrigger(botAI, "hot streak") {}
|
||||
};
|
||||
|
||||
class MissileBarrageTrigger : public HasAuraTrigger
|
||||
{
|
||||
public:
|
||||
MissileBarrageTrigger(PlayerbotAI* botAI) : HasAuraTrigger(botAI, "missile barrage") {}
|
||||
};
|
||||
|
||||
class ArcaneBlastTrigger : public BuffTrigger
|
||||
{
|
||||
public:
|
||||
ArcaneBlastTrigger(PlayerbotAI* botAI) : BuffTrigger(botAI, "arcane blast") {}
|
||||
};
|
||||
|
||||
class FingersOfFrostSingleTrigger : public HasAuraStackTrigger
|
||||
{
|
||||
public:
|
||||
FingersOfFrostSingleTrigger(PlayerbotAI* ai) : HasAuraStackTrigger(ai, "fingers of frost", 1, 1) {}
|
||||
bool IsActive() override;
|
||||
};
|
||||
|
||||
class FingersOfFrostDoubleTrigger : public HasAuraStackTrigger
|
||||
{
|
||||
public:
|
||||
FingersOfFrostDoubleTrigger(PlayerbotAI* ai) : HasAuraStackTrigger(ai, "fingers of frost", 2, 1) {}
|
||||
// bool IsActive() override;
|
||||
};
|
||||
|
||||
class BrainFreezeTrigger : public HasAuraTrigger
|
||||
{
|
||||
public:
|
||||
BrainFreezeTrigger(PlayerbotAI* botAI) : HasAuraTrigger(botAI, "fireball!") {}
|
||||
};
|
||||
|
||||
class CounterspellInterruptSpellTrigger : public InterruptSpellTrigger
|
||||
{
|
||||
public:
|
||||
CounterspellInterruptSpellTrigger(PlayerbotAI* botAI) : InterruptSpellTrigger(botAI, "counterspell") {}
|
||||
};
|
||||
|
||||
class CombustionTrigger : public BoostTrigger
|
||||
{
|
||||
public:
|
||||
CombustionTrigger(PlayerbotAI* botAI) : BoostTrigger(botAI, "combustion") {}
|
||||
};
|
||||
|
||||
class IcyVeinsTrigger : public BoostTrigger
|
||||
{
|
||||
public:
|
||||
IcyVeinsTrigger(PlayerbotAI* botAI) : BoostTrigger(botAI, "icy veins") {}
|
||||
};
|
||||
|
||||
class ColdSnapTrigger : public BoostTrigger
|
||||
{
|
||||
public:
|
||||
ColdSnapTrigger(PlayerbotAI* botAI) : BoostTrigger(botAI, "cold snap") {}
|
||||
};
|
||||
|
||||
class IceBarrierTrigger : public BuffTrigger
|
||||
{
|
||||
public:
|
||||
IceBarrierTrigger(PlayerbotAI* botAI) : BuffTrigger(botAI, "ice barrier") {}
|
||||
};
|
||||
|
||||
class PolymorphTrigger : public HasCcTargetTrigger
|
||||
{
|
||||
public:
|
||||
PolymorphTrigger(PlayerbotAI* botAI) : HasCcTargetTrigger(botAI, "polymorph") {}
|
||||
};
|
||||
|
||||
class RemoveCurseTrigger : public NeedCureTrigger
|
||||
{
|
||||
public:
|
||||
RemoveCurseTrigger(PlayerbotAI* botAI) : NeedCureTrigger(botAI, "remove curse", DISPEL_CURSE) {}
|
||||
};
|
||||
|
||||
class PartyMemberRemoveCurseTrigger : public PartyMemberNeedCureTrigger
|
||||
{
|
||||
public:
|
||||
PartyMemberRemoveCurseTrigger(PlayerbotAI* botAI) : PartyMemberNeedCureTrigger(botAI, "remove curse", DISPEL_CURSE)
|
||||
{
|
||||
}
|
||||
};
|
||||
|
||||
class SpellstealTrigger : public TargetAuraDispelTrigger
|
||||
{
|
||||
public:
|
||||
SpellstealTrigger(PlayerbotAI* botAI) : TargetAuraDispelTrigger(botAI, "spellsteal", DISPEL_MAGIC) {}
|
||||
};
|
||||
|
||||
class CounterspellEnemyHealerTrigger : public InterruptEnemyHealerTrigger
|
||||
{
|
||||
public:
|
||||
CounterspellEnemyHealerTrigger(PlayerbotAI* botAI) : InterruptEnemyHealerTrigger(botAI, "counterspell") {}
|
||||
};
|
||||
|
||||
class ArcanePowerTrigger : public BuffTrigger
|
||||
{
|
||||
public:
|
||||
ArcanePowerTrigger(PlayerbotAI* botAI) : BuffTrigger(botAI, "arcane power") {}
|
||||
};
|
||||
|
||||
class PresenceOfMindTrigger : public BuffTrigger
|
||||
{
|
||||
public:
|
||||
PresenceOfMindTrigger(PlayerbotAI* botAI) : BuffTrigger(botAI, "presence of mind") {}
|
||||
};
|
||||
|
||||
class ArcaneBlastStackTrigger : public HasAuraStackTrigger
|
||||
{
|
||||
public:
|
||||
ArcaneBlastStackTrigger(PlayerbotAI* botAI) : HasAuraStackTrigger(botAI, "arcane blast", 3, 1) {}
|
||||
};
|
||||
|
||||
class MirrorImageTrigger : public BoostTrigger
|
||||
{
|
||||
public:
|
||||
MirrorImageTrigger(PlayerbotAI* botAI) : BoostTrigger(botAI, "mirror image") {}
|
||||
};
|
||||
|
||||
class FrostNovaOnTargetTrigger : public DebuffTrigger
|
||||
{
|
||||
public:
|
||||
FrostNovaOnTargetTrigger(PlayerbotAI* botAI) : DebuffTrigger(botAI, "frost nova", 1, false) {}
|
||||
bool IsActive() override;
|
||||
};
|
||||
|
||||
class FrostbiteOnTargetTrigger : public DebuffTrigger
|
||||
{
|
||||
public:
|
||||
FrostbiteOnTargetTrigger(PlayerbotAI* botAI) : DebuffTrigger(botAI, "frostbite", 1, false) {}
|
||||
bool IsActive() override;
|
||||
};
|
||||
|
||||
#endif
|
||||
Reference in New Issue
Block a user