Modify file structure

This commit is contained in:
Yunfan Li
2024-12-13 20:14:25 +08:00
parent a7496b3eb5
commit e7416db7dc
183 changed files with 0 additions and 0 deletions

View File

@@ -1,111 +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 "BloodDKStrategy.h"
#include "Playerbots.h"
class BloodDKStrategyActionNodeFactory : public NamedObjectFactory<ActionNode>
{
public:
BloodDKStrategyActionNodeFactory()
{
// creators["melee"] = &melee;
// creators["blood strike"] = &blood_strike;
creators["rune strike"] = &rune_strike;
creators["heart strike"] = &heart_strike;
creators["death strike"] = &death_strike;
// creators["death grip"] = &death_grip;
// creators["plague strike"] = &plague_strike;
// creators["pestilence"] = &pestilence;
creators["icy touch"] = &icy_touch;
// creators["obliterate"] = &obliterate;
// creators["blood boil"] = &blood_boil;
// creators["mark of_blood"] = &mark_of_blood;
// creators["blood presence"] = &blood_presence;
// creators["rune tap"] = &rune_tap;
// creators["vampiric blood"] = &vampiric_blood;
// creators["death pact"] = &death_pact;
// creators["death rune_mastery"] = &death_rune_mastery;
// creators["hysteria"] = &hysteria;
// creators["dancing weapon"] = &dancing_weapon;
creators["dark command"] = &dark_command;
creators["taunt spell"] = &dark_command;
}
private:
static ActionNode* rune_strike([[maybe_unused]] PlayerbotAI* botAI)
{
return new ActionNode("rune strike",
/*P*/ NextAction::array(0, new NextAction("frost presence"), nullptr),
/*A*/ nullptr,
/*C*/ nullptr);
}
static ActionNode* icy_touch([[maybe_unused]] PlayerbotAI* botAI)
{
return new ActionNode("icy touch",
/*P*/ NextAction::array(0, new NextAction("frost presence"), nullptr),
/*A*/ nullptr,
/*C*/ nullptr);
}
static ActionNode* heart_strike([[maybe_unused]] PlayerbotAI* botAI)
{
return new ActionNode("heart strike",
/*P*/ NextAction::array(0, new NextAction("frost presence"), nullptr),
/*A*/ nullptr,
/*C*/ nullptr);
}
static ActionNode* death_strike([[maybe_unused]] PlayerbotAI* botAI)
{
return new ActionNode("death strike",
/*P*/ NextAction::array(0, new NextAction("frost presence"), nullptr),
/*A*/ nullptr,
/*C*/ nullptr);
}
static ActionNode* dark_command([[maybe_unused]] PlayerbotAI* botAI)
{
return new ActionNode("dark command",
/*P*/ NextAction::array(0, new NextAction("frost presence"), NULL),
/*A*/ NextAction::array(0, new NextAction("death grip"), NULL),
/*C*/ NULL);
}
};
BloodDKStrategy::BloodDKStrategy(PlayerbotAI* botAI) : GenericDKStrategy(botAI)
{
actionNodeFactories.Add(new BloodDKStrategyActionNodeFactory());
}
NextAction** BloodDKStrategy::getDefaultActions()
{
return NextAction::array(
0, new NextAction("rune strike", ACTION_DEFAULT + 0.8f), new NextAction("icy touch", ACTION_DEFAULT + 0.7f),
new NextAction("heart strike", ACTION_DEFAULT + 0.6f), new NextAction("blood strike", ACTION_DEFAULT + 0.5f),
new NextAction("dancing rune weapon", ACTION_DEFAULT + 0.4f),
new NextAction("death coil", ACTION_DEFAULT + 0.3f), new NextAction("plague strike", ACTION_DEFAULT + 0.2f),
new NextAction("horn of winter", ACTION_DEFAULT + 0.1f), new NextAction("melee", ACTION_DEFAULT), NULL);
}
void BloodDKStrategy::InitTriggers(std::vector<TriggerNode*>& triggers)
{
GenericDKStrategy::InitTriggers(triggers);
triggers.push_back(new TriggerNode(
"rune strike", NextAction::array(0, new NextAction("rune strike", ACTION_NORMAL + 3), nullptr)));
triggers.push_back(
new TriggerNode("blood tap", NextAction::array(0, new NextAction("blood tap", ACTION_HIGH + 5), nullptr)));
triggers.push_back(
new TriggerNode("lose aggro", NextAction::array(0, new NextAction("dark command", ACTION_HIGH + 3), nullptr)));
triggers.push_back(
new TriggerNode("low health", NextAction::array(0, new NextAction("army of the dead", ACTION_HIGH + 4),
new NextAction("death strike", ACTION_HIGH + 3), nullptr)));
triggers.push_back(
new TriggerNode("critical health", NextAction::array(0, new NextAction("vampiric blood", ACTION_HIGH + 5), nullptr)));
triggers.push_back(
new TriggerNode("icy touch", NextAction::array(0, new NextAction("icy touch", ACTION_HIGH + 2), nullptr)));
triggers.push_back(new TriggerNode(
"plague strike", NextAction::array(0, new NextAction("plague strike", ACTION_HIGH + 2), nullptr)));
}

View File

@@ -1,24 +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_BLOODDKSTRATEGY_H
#define _PLAYERBOT_BLOODDKSTRATEGY_H
#include "GenericDKStrategy.h"
class PlayerbotAI;
class BloodDKStrategy : public GenericDKStrategy
{
public:
BloodDKStrategy(PlayerbotAI* botAI);
void InitTriggers(std::vector<TriggerNode*>& triggers) override;
std::string const getName() override { return "blood"; }
NextAction** getDefaultActions() override;
uint32 GetType() const override { return STRATEGY_TYPE_TANK | STRATEGY_TYPE_MELEE; }
};
#endif

View File

@@ -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.
*/
#include "DKActions.h"
#include "Duration.h"
#include "GenericSpellActions.h"
#include "Playerbots.h"
#include "SpellInfo.h"
#include "SpellMgr.h"
NextAction** CastDeathchillAction::getPrerequisites()
{
return NextAction::merge(NextAction::array(0, new NextAction("frost presence"), nullptr),
CastSpellAction::getPrerequisites());
}
NextAction** CastUnholyMeleeSpellAction::getPrerequisites()
{
return NextAction::merge(NextAction::array(0, new NextAction("unholy presence"), nullptr),
CastMeleeSpellAction::getPrerequisites());
}
NextAction** CastFrostMeleeSpellAction::getPrerequisites()
{
return NextAction::merge(NextAction::array(0, new NextAction("frost presence"), nullptr),
CastMeleeSpellAction::getPrerequisites());
}
NextAction** CastBloodMeleeSpellAction::getPrerequisites()
{
return NextAction::merge(NextAction::array(0, new NextAction("blood presence"), nullptr),
CastMeleeSpellAction::getPrerequisites());
}
bool CastRaiseDeadAction::Execute(Event event)
{
bool result = CastBuffSpellAction::Execute(event);
if (!result)
{
return false;
}
uint32 spellId = AI_VALUE2(uint32, "spell id", spell);
// const SpellInfo *spellInfo = sSpellMgr->GetSpellInfo(spellId);
bot->AddSpellCooldown(spellId, 0, 3 * 60 * 1000);
return true;
}

View File

@@ -1,357 +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_DKACTIONS_H
#define _PLAYERBOT_DKACTIONS_H
#include "Event.h"
#include "GenericSpellActions.h"
class PlayerbotAI;
class CastBloodPresenceAction : public CastBuffSpellAction
{
public:
CastBloodPresenceAction(PlayerbotAI* botAI) : CastBuffSpellAction(botAI, "blood presence") {}
};
class CastFrostPresenceAction : public CastBuffSpellAction
{
public:
CastFrostPresenceAction(PlayerbotAI* botAI) : CastBuffSpellAction(botAI, "frost presence") {}
};
class CastUnholyPresenceAction : public CastBuffSpellAction
{
public:
CastUnholyPresenceAction(PlayerbotAI* botAI) : CastBuffSpellAction(botAI, "unholy presence") {}
};
class CastDeathchillAction : public CastBuffSpellAction
{
public:
CastDeathchillAction(PlayerbotAI* botAI) : CastBuffSpellAction(botAI, "deathchill") {}
NextAction** getPrerequisites() override;
};
class CastDarkCommandAction : public CastSpellAction
{
public:
CastDarkCommandAction(PlayerbotAI* botAI) : CastSpellAction(botAI, "dark command") {}
};
BEGIN_RANGED_SPELL_ACTION(CastDeathGripAction, "death grip")
END_SPELL_ACTION()
// Unholy presence
class CastUnholyMeleeSpellAction : public CastMeleeSpellAction
{
public:
CastUnholyMeleeSpellAction(PlayerbotAI* botAI, std::string const spell) : CastMeleeSpellAction(botAI, spell) {}
NextAction** getPrerequisites() override;
};
// Frost presence
class CastFrostMeleeSpellAction : public CastMeleeSpellAction
{
public:
CastFrostMeleeSpellAction(PlayerbotAI* botAI, std::string const spell) : CastMeleeSpellAction(botAI, spell) {}
NextAction** getPrerequisites() override;
};
// Blood presence
class CastBloodMeleeSpellAction : public CastMeleeSpellAction
{
public:
CastBloodMeleeSpellAction(PlayerbotAI* botAI, std::string const spell) : CastMeleeSpellAction(botAI, spell) {}
NextAction** getPrerequisites() override;
};
class CastRuneStrikeAction : public CastMeleeSpellAction
{
public:
CastRuneStrikeAction(PlayerbotAI* botAI) : CastMeleeSpellAction(botAI, "rune strike") {}
};
// debuff
// BEGIN_DEBUFF_ACTION(CastPestilenceAction, "pestilence")
// END_SPELL_ACTION()
class CastPestilenceAction : public CastSpellAction
{
public:
CastPestilenceAction(PlayerbotAI* ai) : CastSpellAction(ai, "pestilence") {}
ActionThreatType getThreatType() override { return ActionThreatType::None; }
};
// debuff
// BEGIN_DEBUFF_ACTION(CastHowlingBlastAction, "howling blast")
// END_SPELL_ACTION()
class CastHowlingBlastAction : public CastSpellAction
{
public:
CastHowlingBlastAction(PlayerbotAI* ai) : CastSpellAction(ai, "howling blast") {}
};
// debuff it
// BEGIN_DEBUFF_ACTION(CastIcyTouchAction, "icy touch")
// END_SPELL_ACTION()
class CastIcyTouchAction : public CastSpellAction
{
public:
CastIcyTouchAction(PlayerbotAI* ai) : CastSpellAction(ai, "icy touch") {}
};
class CastIcyTouchOnAttackerAction : public CastDebuffSpellOnAttackerAction
{
public:
CastIcyTouchOnAttackerAction(PlayerbotAI* botAI)
: CastDebuffSpellOnAttackerAction(botAI, "icy touch", true, .0f)
{
}
};
// debuff ps
class CastPlagueStrikeAction : public CastSpellAction
{
public:
CastPlagueStrikeAction(PlayerbotAI* ai) : CastSpellAction(ai, "plague strike") {}
};
// BEGIN_DEBUFF_ACTION(CastPlagueStrikeAction, "plague strike")
// END_SPELL_ACTION()
class CastPlagueStrikeOnAttackerAction : public CastDebuffSpellOnMeleeAttackerAction
{
public:
CastPlagueStrikeOnAttackerAction(PlayerbotAI* botAI)
: CastDebuffSpellOnMeleeAttackerAction(botAI, "plague strike", true, .0f)
{
}
};
// debuff
BEGIN_DEBUFF_ACTION(CastMarkOfBloodAction, "mark of blood")
END_SPELL_ACTION()
class CastMarkOfBloodOnAttackerAction : public CastDebuffSpellOnAttackerAction
{
public:
CastMarkOfBloodOnAttackerAction(PlayerbotAI* botAI) : CastDebuffSpellOnAttackerAction(botAI, "mark of blood", true)
{
}
};
class CastUnholyBlightAction : public CastBuffSpellAction
{
public:
CastUnholyBlightAction(PlayerbotAI* botAI) : CastBuffSpellAction(botAI, "unholy blight") {}
};
class CastSummonGargoyleAction : public CastSpellAction
{
public:
CastSummonGargoyleAction(PlayerbotAI* botAI) : CastSpellAction(botAI, "summon gargoyle") {}
};
class CastGhoulFrenzyAction : public CastBuffSpellAction
{
public:
CastGhoulFrenzyAction(PlayerbotAI* botAI) : CastBuffSpellAction(botAI, "ghoul frenzy", false, 5000) {}
std::string const GetTargetName() override { return "pet target"; }
};
BEGIN_MELEE_SPELL_ACTION(CastCorpseExplosionAction, "corpse explosion")
END_SPELL_ACTION()
BEGIN_MELEE_SPELL_ACTION(CastAntiMagicShellAction, "anti magic shell")
END_SPELL_ACTION()
BEGIN_MELEE_SPELL_ACTION(CastAntiMagicZoneAction, "anti magic zone")
END_SPELL_ACTION()
class CastChainsOfIceAction : public CastSpellAction
{
public:
CastChainsOfIceAction(PlayerbotAI* botAI) : CastSpellAction(botAI, "chains of ice") {}
};
class CastHungeringColdAction : public CastMeleeSpellAction
{
public:
CastHungeringColdAction(PlayerbotAI* botAI) : CastMeleeSpellAction(botAI, "hungering cold") {}
};
class CastHeartStrikeAction : public CastMeleeSpellAction
{
public:
CastHeartStrikeAction(PlayerbotAI* botAI) : CastMeleeSpellAction(botAI, "heart strike") {}
};
class CastBloodStrikeAction : public CastMeleeSpellAction
{
public:
CastBloodStrikeAction(PlayerbotAI* botAI) : CastMeleeSpellAction(botAI, "blood strike") {}
};
class CastFrostStrikeAction : public CastMeleeSpellAction
{
public:
CastFrostStrikeAction(PlayerbotAI* botAI) : CastMeleeSpellAction(botAI, "frost strike") {}
};
class CastObliterateAction : public CastMeleeSpellAction
{
public:
CastObliterateAction(PlayerbotAI* botAI) : CastMeleeSpellAction(botAI, "obliterate") {}
};
class CastDeathStrikeAction : public CastMeleeSpellAction
{
public:
CastDeathStrikeAction(PlayerbotAI* botAI) : CastMeleeSpellAction(botAI, "death strike") {}
};
class CastScourgeStrikeAction : public CastMeleeSpellAction
{
public:
CastScourgeStrikeAction(PlayerbotAI* botAI) : CastMeleeSpellAction(botAI, "scourge strike") {}
};
class CastDeathCoilAction : public CastSpellAction
{
public:
CastDeathCoilAction(PlayerbotAI* botAI) : CastSpellAction(botAI, "death coil") {}
};
class CastBloodBoilAction : public CastMeleeSpellAction
{
public:
CastBloodBoilAction(PlayerbotAI* botAI) : CastMeleeSpellAction(botAI, "blood boil") {}
};
class CastDeathAndDecayAction : public CastSpellAction
{
public:
CastDeathAndDecayAction(PlayerbotAI* botAI) : CastSpellAction(botAI, "death and decay") {}
// ActionThreatType getThreatType() override { return ActionThreatType::Aoe; }
};
class CastHornOfWinterAction : public CastSpellAction
{
public:
CastHornOfWinterAction(PlayerbotAI* botAI) : CastSpellAction(botAI, "horn of winter") {}
};
class CastImprovedIcyTalonsAction : public CastBuffSpellAction
{
public:
CastImprovedIcyTalonsAction(PlayerbotAI* botAI) : CastBuffSpellAction(botAI, "improved icy talons") {}
};
class CastBoneShieldAction : public CastBuffSpellAction
{
public:
CastBoneShieldAction(PlayerbotAI* botAI) : CastBuffSpellAction(botAI, "bone shield") {}
};
class CastDeathPactAction : public CastBuffSpellAction
{
public:
CastDeathPactAction(PlayerbotAI* botAI) : CastBuffSpellAction(botAI, "death pact") {}
};
class CastDeathRuneMasteryAction : public CastBuffSpellAction
{
public:
CastDeathRuneMasteryAction(PlayerbotAI* botAI) : CastBuffSpellAction(botAI, "death rune mastery") {}
};
class CastDancingRuneWeaponAction : public CastSpellAction
{
public:
CastDancingRuneWeaponAction(PlayerbotAI* botAI) : CastSpellAction(botAI, "dancing rune weapon") {}
};
class CastEmpowerRuneWeaponAction : public CastBuffSpellAction
{
public:
CastEmpowerRuneWeaponAction(PlayerbotAI* botAI) : CastBuffSpellAction(botAI, "empower rune weapon") {}
};
class CastArmyOfTheDeadAction : public CastBuffSpellAction
{
public:
CastArmyOfTheDeadAction(PlayerbotAI* botAI) : CastBuffSpellAction(botAI, "army of the dead") {}
};
class CastRaiseDeadAction : public CastBuffSpellAction
{
public:
CastRaiseDeadAction(PlayerbotAI* botAI) : CastBuffSpellAction(botAI, "raise dead") {}
virtual bool Execute(Event event) override;
};
class CastKillingMachineAction : public CastBuffSpellAction
{
public:
CastKillingMachineAction(PlayerbotAI* botAI) : CastBuffSpellAction(botAI, "killing machine") {}
};
class CastIceboundFortitudeAction : public CastBuffSpellAction
{
public:
CastIceboundFortitudeAction(PlayerbotAI* botAI) : CastBuffSpellAction(botAI, "icebound fortitude") {}
};
class CastUnbreakableArmorAction : public CastBuffSpellAction
{
public:
CastUnbreakableArmorAction(PlayerbotAI* botAI) : CastBuffSpellAction(botAI, "unbreakable armor") {}
};
class CastVampiricBloodAction : public CastBuffSpellAction
{
public:
CastVampiricBloodAction(PlayerbotAI* botAI) : CastBuffSpellAction(botAI, "vampiric blood") {}
};
class CastMindFreezeAction : public CastMeleeSpellAction
{
public:
CastMindFreezeAction(PlayerbotAI* botAI) : CastMeleeSpellAction(botAI, "mind freeze") {}
};
class CastStrangulateAction : public CastMeleeSpellAction
{
public:
CastStrangulateAction(PlayerbotAI* botAI) : CastMeleeSpellAction(botAI, "strangulate") {}
};
class CastMindFreezeOnEnemyHealerAction : public CastSpellOnEnemyHealerAction
{
public:
CastMindFreezeOnEnemyHealerAction(PlayerbotAI* botAI) : CastSpellOnEnemyHealerAction(botAI, "mind freeze") {}
};
class CastRuneTapAction : public CastMeleeSpellAction
{
public:
CastRuneTapAction(PlayerbotAI* botAI) : CastMeleeSpellAction(botAI, "rune tap") {}
};
class CastBloodTapAction : public CastMeleeSpellAction
{
public:
CastBloodTapAction(PlayerbotAI* botAI) : CastMeleeSpellAction(botAI, "blood tap") {}
};
#endif

View File

@@ -1,273 +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 "DKAiObjectContext.h"
#include "BloodDKStrategy.h"
#include "DKActions.h"
#include "DKTriggers.h"
#include "FrostDKStrategy.h"
#include "GenericDKNonCombatStrategy.h"
#include "GenericTriggers.h"
#include "Playerbots.h"
#include "PullStrategy.h"
#include "UnholyDKStrategy.h"
class DeathKnightStrategyFactoryInternal : public NamedObjectContext<Strategy>
{
public:
DeathKnightStrategyFactoryInternal()
{
creators["nc"] = &DeathKnightStrategyFactoryInternal::nc;
creators["pull"] = &DeathKnightStrategyFactoryInternal::pull;
creators["frost aoe"] = &DeathKnightStrategyFactoryInternal::frost_aoe;
creators["unholy aoe"] = &DeathKnightStrategyFactoryInternal::unholy_aoe;
}
private:
static Strategy* nc(PlayerbotAI* botAI) { return new GenericDKNonCombatStrategy(botAI); }
static Strategy* pull(PlayerbotAI* botAI) { return new PullStrategy(botAI, "icy touch"); }
static Strategy* frost_aoe(PlayerbotAI* botAI) { return new FrostDKAoeStrategy(botAI); }
static Strategy* unholy_aoe(PlayerbotAI* botAI) { return new UnholyDKAoeStrategy(botAI); }
};
class DeathKnightCombatStrategyFactoryInternal : public NamedObjectContext<Strategy>
{
public:
DeathKnightCombatStrategyFactoryInternal() : NamedObjectContext<Strategy>(false, true)
{
creators["tank"] = &DeathKnightCombatStrategyFactoryInternal::blood;
creators["blood"] = &DeathKnightCombatStrategyFactoryInternal::blood;
creators["frost"] = &DeathKnightCombatStrategyFactoryInternal::frost_dps;
creators["unholy"] = &DeathKnightCombatStrategyFactoryInternal::unholy_dps;
}
private:
static Strategy* frost_dps(PlayerbotAI* botAI) { return new FrostDKStrategy(botAI); }
static Strategy* unholy_dps(PlayerbotAI* botAI) { return new UnholyDKStrategy(botAI); }
static Strategy* tank(PlayerbotAI* botAI) { return new BloodDKStrategy(botAI); }
static Strategy* blood(PlayerbotAI* botAI) { return new BloodDKStrategy(botAI); }
};
class DeathKnightDKBuffStrategyFactoryInternal : public NamedObjectContext<Strategy>
{
public:
DeathKnightDKBuffStrategyFactoryInternal() : NamedObjectContext<Strategy>(false, true)
{
creators["bdps"] = &DeathKnightDKBuffStrategyFactoryInternal::bdps;
}
private:
static Strategy* bdps(PlayerbotAI* botAI) { return new DKBuffDpsStrategy(botAI); }
};
class DeathKnightTriggerFactoryInternal : public NamedObjectContext<Trigger>
{
public:
DeathKnightTriggerFactoryInternal()
{
creators["bone shield"] = &DeathKnightTriggerFactoryInternal::bone_shield;
creators["pestilence glyph"] = &DeathKnightTriggerFactoryInternal::pestilence_glyph;
creators["blood strike"] = &DeathKnightTriggerFactoryInternal::blood_strike;
creators["plague strike"] = &DeathKnightTriggerFactoryInternal::plague_strike;
creators["plague strike on attacker"] = &DeathKnightTriggerFactoryInternal::plague_strike_on_attacker;
creators["icy touch"] = &DeathKnightTriggerFactoryInternal::icy_touch;
creators["icy touch 8s"] = &DeathKnightTriggerFactoryInternal::icy_touch_8s;
creators["dd cd and icy touch 8s"] = &DeathKnightTriggerFactoryInternal::dd_cd_and_icy_touch_8s;
creators["death coil"] = &DeathKnightTriggerFactoryInternal::death_coil;
creators["icy touch on attacker"] = &DeathKnightTriggerFactoryInternal::icy_touch_on_attacker;
creators["improved icy talons"] = &DeathKnightTriggerFactoryInternal::improved_icy_talons;
creators["plague strike"] = &DeathKnightTriggerFactoryInternal::plague_strike;
creators["plague strike 8s"] = &DeathKnightTriggerFactoryInternal::plague_strike_8s;
creators["dd cd and plague strike 8s"] = &DeathKnightTriggerFactoryInternal::dd_cd_and_plague_strike_8s;
creators["horn of winter"] = &DeathKnightTriggerFactoryInternal::horn_of_winter;
creators["mind freeze"] = &DeathKnightTriggerFactoryInternal::mind_freeze;
creators["mind freeze on enemy healer"] = &DeathKnightTriggerFactoryInternal::mind_freeze_on_enemy_healer;
creators["strangulate"] = &DeathKnightTriggerFactoryInternal::strangulate;
creators["strangulate on enemy healer"] = &DeathKnightTriggerFactoryInternal::strangulate_on_enemy_healer;
creators["blood tap"] = &DeathKnightTriggerFactoryInternal::blood_tap;
creators["raise dead"] = &DeathKnightTriggerFactoryInternal::raise_dead;
creators["chains of ice"] = &DeathKnightTriggerFactoryInternal::chains_of_ice;
creators["unbreakable armor"] = &DeathKnightTriggerFactoryInternal::unbreakable_armor;
creators["high blood rune"] = &DeathKnightTriggerFactoryInternal::high_blood_rune;
creators["high frost rune"] = &DeathKnightTriggerFactoryInternal::high_frost_rune;
creators["high unholy rune"] = &DeathKnightTriggerFactoryInternal::high_unholy_rune;
creators["freezing fog"] = &DeathKnightTriggerFactoryInternal::freezing_fog;
creators["no desolation"] = &DeathKnightTriggerFactoryInternal::no_desolation;
creators["dd cd and no desolation"] = &DeathKnightTriggerFactoryInternal::dd_cd_and_no_desolation;
creators["death and decay cooldown"] = &DeathKnightTriggerFactoryInternal::death_and_decay_cooldown;
creators["army of the dead"] = &DeathKnightTriggerFactoryInternal::army_of_the_dead;
}
private:
static Trigger* bone_shield(PlayerbotAI* botAI) { return new BoneShieldTrigger(botAI); }
static Trigger* pestilence_glyph(PlayerbotAI* botAI) { return new PestilenceGlyphTrigger(botAI); }
static Trigger* blood_strike(PlayerbotAI* botAI) { return new BloodStrikeTrigger(botAI); }
static Trigger* plague_strike(PlayerbotAI* botAI) { return new PlagueStrikeDebuffTrigger(botAI); }
static Trigger* plague_strike_8s(PlayerbotAI* botAI) { return new PlagueStrike8sDebuffTrigger(botAI); }
static Trigger* dd_cd_and_plague_strike_8s(PlayerbotAI* botAI) { return new TwoTriggers(botAI, "death and decay cooldown", "plague strike 8s"); }
static Trigger* plague_strike_on_attacker(PlayerbotAI* botAI)
{
return new PlagueStrikeDebuffOnAttackerTrigger(botAI);
}
static Trigger* icy_touch(PlayerbotAI* botAI) { return new IcyTouchDebuffTrigger(botAI); }
static Trigger* icy_touch_8s(PlayerbotAI* botAI) { return new IcyTouch8sDebuffTrigger(botAI); }
static Trigger* dd_cd_and_icy_touch_8s(PlayerbotAI* botAI) { return new TwoTriggers(botAI, "death and decay cooldown", "icy touch 8s"); }
static Trigger* death_coil(PlayerbotAI* botAI) { return new DeathCoilTrigger(botAI); }
static Trigger* icy_touch_on_attacker(PlayerbotAI* botAI) { return new IcyTouchDebuffOnAttackerTrigger(botAI); }
static Trigger* improved_icy_talons(PlayerbotAI* botAI) { return new ImprovedIcyTalonsTrigger(botAI); }
static Trigger* horn_of_winter(PlayerbotAI* botAI) { return new HornOfWinterTrigger(botAI); }
static Trigger* mind_freeze(PlayerbotAI* botAI) { return new MindFreezeInterruptSpellTrigger(botAI); }
static Trigger* mind_freeze_on_enemy_healer(PlayerbotAI* botAI)
{
return new MindFreezeOnEnemyHealerTrigger(botAI);
}
static Trigger* strangulate(PlayerbotAI* botAI) { return new StrangulateInterruptSpellTrigger(botAI); }
static Trigger* strangulate_on_enemy_healer(PlayerbotAI* botAI)
{
return new StrangulateOnEnemyHealerTrigger(botAI);
}
static Trigger* blood_tap(PlayerbotAI* botAI) { return new BloodTapTrigger(botAI); }
static Trigger* raise_dead(PlayerbotAI* botAI) { return new RaiseDeadTrigger(botAI); }
static Trigger* chains_of_ice(PlayerbotAI* botAI) { return new ChainsOfIceSnareTrigger(botAI); }
static Trigger* unbreakable_armor(PlayerbotAI* botAI) { return new UnbreakableArmorTrigger(botAI); }
static Trigger* high_blood_rune(PlayerbotAI* botAI) { return new HighBloodRuneTrigger(botAI); }
static Trigger* high_frost_rune(PlayerbotAI* botAI) { return new HighFrostRuneTrigger(botAI); }
static Trigger* high_unholy_rune(PlayerbotAI* botAI) { return new HighUnholyRuneTrigger(botAI); }
static Trigger* freezing_fog(PlayerbotAI* botAI) { return new FreezingFogTrigger(botAI); }
static Trigger* no_desolation(PlayerbotAI* botAI) { return new DesolationTrigger(botAI); }
static Trigger* dd_cd_and_no_desolation(PlayerbotAI* botAI) { return new TwoTriggers(botAI, "death and decay cooldown", "no desolation"); }
static Trigger* death_and_decay_cooldown(PlayerbotAI* botAI) { return new DeathAndDecayCooldownTrigger(botAI); }
static Trigger* army_of_the_dead(PlayerbotAI* botAI) { return new ArmyOfTheDeadTrigger(botAI); }
};
class DeathKnightAiObjectContextInternal : public NamedObjectContext<Action>
{
public:
DeathKnightAiObjectContextInternal()
{
// Unholy
creators["bone shield"] = &DeathKnightAiObjectContextInternal::bone_shield;
creators["plague strike"] = &DeathKnightAiObjectContextInternal::plague_strike;
creators["plague strike on attacker"] = &DeathKnightAiObjectContextInternal::plague_strike_on_attacker;
creators["death grip"] = &DeathKnightAiObjectContextInternal::death_grip;
creators["death coil"] = &DeathKnightAiObjectContextInternal::death_coil;
creators["death strike"] = &DeathKnightAiObjectContextInternal::death_strike;
creators["unholy blight"] = &DeathKnightAiObjectContextInternal::unholy_blight;
creators["scourge strike"] = &DeathKnightAiObjectContextInternal::scourge_strike;
creators["death and decay"] = &DeathKnightAiObjectContextInternal::death_and_decay;
creators["unholy presence"] = &DeathKnightAiObjectContextInternal::unholy_presence;
creators["raise dead"] = &DeathKnightAiObjectContextInternal::raise_dead;
creators["army of the dead"] = &DeathKnightAiObjectContextInternal::army_of_the_dead;
creators["summon gargoyle"] = &DeathKnightAiObjectContextInternal::summon_gargoyle;
creators["anti magic shell"] = &DeathKnightAiObjectContextInternal::anti_magic_shell;
creators["anti magic zone"] = &DeathKnightAiObjectContextInternal::anti_magic_zone;
creators["ghoul frenzy"] = &DeathKnightAiObjectContextInternal::ghoul_frenzy;
creators["corpse explosion"] = &DeathKnightAiObjectContextInternal::corpse_explosion;
// Frost
creators["icy touch"] = &DeathKnightAiObjectContextInternal::icy_touch;
creators["icy touch on attacker"] = &DeathKnightAiObjectContextInternal::icy_touch_on_attacker;
creators["obliterate"] = &DeathKnightAiObjectContextInternal::obliterate;
creators["howling blast"] = &DeathKnightAiObjectContextInternal::howling_blast;
creators["frost strike"] = &DeathKnightAiObjectContextInternal::frost_strike;
creators["chains of ice"] = &DeathKnightAiObjectContextInternal::chains_of_ice;
creators["rune strike"] = &DeathKnightAiObjectContextInternal::rune_strike;
// creators["icy clutch"] = &DeathKnightAiObjectContextInternal::icy_clutch;
creators["horn of winter"] = &DeathKnightAiObjectContextInternal::horn_of_winter;
creators["killing machine"] = &DeathKnightAiObjectContextInternal::killing_machine;
creators["frost presence"] = &DeathKnightAiObjectContextInternal::frost_presence;
creators["deathchill"] = &DeathKnightAiObjectContextInternal::deathchill;
creators["icebound fortitude"] = &DeathKnightAiObjectContextInternal::icebound_fortitude;
creators["mind freeze"] = &DeathKnightAiObjectContextInternal::mind_freeze;
creators["empower rune weapon"] = &DeathKnightAiObjectContextInternal::empower_rune_weapon;
creators["hungering cold"] = &DeathKnightAiObjectContextInternal::hungering_cold;
creators["unbreakable armor"] = &DeathKnightAiObjectContextInternal::unbreakable_armor;
creators["improved icy talons"] = &DeathKnightAiObjectContextInternal::improved_icy_talons;
// blood
creators["blood strike"] = &DeathKnightAiObjectContextInternal::blood_strike;
creators["blood tap"] = &DeathKnightAiObjectContextInternal::blood_tap;
creators["pestilence"] = &DeathKnightAiObjectContextInternal::pestilence;
creators["strangulate"] = &DeathKnightAiObjectContextInternal::strangulate;
creators["blood boil"] = &DeathKnightAiObjectContextInternal::blood_boil;
creators["heart strike"] = &DeathKnightAiObjectContextInternal::heart_strike;
creators["mark of_blood"] = &DeathKnightAiObjectContextInternal::mark_of_blood;
creators["blood presence"] = &DeathKnightAiObjectContextInternal::blood_presence;
creators["rune tap"] = &DeathKnightAiObjectContextInternal::rune_tap;
creators["vampiric blood"] = &DeathKnightAiObjectContextInternal::vampiric_blood;
creators["death pact"] = &DeathKnightAiObjectContextInternal::death_pact;
creators["death rune_mastery"] = &DeathKnightAiObjectContextInternal::death_rune_mastery;
// creators["hysteria"] = &DeathKnightAiObjectContextInternal::hysteria;
creators["dancing rune weapon"] = &DeathKnightAiObjectContextInternal::dancing_rune_weapon;
creators["dark command"] = &DeathKnightAiObjectContextInternal::dark_command;
}
private:
// Unholy
static Action* bone_shield(PlayerbotAI* botAI) { return new CastBoneShieldAction(botAI); }
static Action* plague_strike(PlayerbotAI* botAI) { return new CastPlagueStrikeAction(botAI); }
static Action* plague_strike_on_attacker(PlayerbotAI* botAI) { return new CastPlagueStrikeOnAttackerAction(botAI); }
static Action* death_grip(PlayerbotAI* botAI) { return new CastDeathGripAction(botAI); }
static Action* death_coil(PlayerbotAI* botAI) { return new CastDeathCoilAction(botAI); }
static Action* death_strike(PlayerbotAI* botAI) { return new CastDeathStrikeAction(botAI); }
static Action* unholy_blight(PlayerbotAI* botAI) { return new CastUnholyBlightAction(botAI); }
static Action* scourge_strike(PlayerbotAI* botAI) { return new CastScourgeStrikeAction(botAI); }
static Action* death_and_decay(PlayerbotAI* botAI) { return new CastDeathAndDecayAction(botAI); }
static Action* unholy_presence(PlayerbotAI* botAI) { return new CastUnholyPresenceAction(botAI); }
static Action* raise_dead(PlayerbotAI* botAI) { return new CastRaiseDeadAction(botAI); }
static Action* army_of_the_dead(PlayerbotAI* botAI) { return new CastArmyOfTheDeadAction(botAI); }
static Action* summon_gargoyle(PlayerbotAI* botAI) { return new CastSummonGargoyleAction(botAI); }
static Action* anti_magic_shell(PlayerbotAI* botAI) { return new CastAntiMagicShellAction(botAI); }
static Action* anti_magic_zone(PlayerbotAI* botAI) { return new CastAntiMagicZoneAction(botAI); }
static Action* ghoul_frenzy(PlayerbotAI* botAI) { return new CastGhoulFrenzyAction(botAI); }
static Action* corpse_explosion(PlayerbotAI* botAI) { return new CastCorpseExplosionAction(botAI); }
// Frost
static Action* icy_touch(PlayerbotAI* botAI) { return new CastIcyTouchAction(botAI); }
static Action* icy_touch_on_attacker(PlayerbotAI* botAI) { return new CastIcyTouchOnAttackerAction(botAI); }
static Action* obliterate(PlayerbotAI* botAI) { return new CastObliterateAction(botAI); }
static Action* howling_blast(PlayerbotAI* botAI) { return new CastHowlingBlastAction(botAI); }
static Action* frost_strike(PlayerbotAI* botAI) { return new CastFrostStrikeAction(botAI); }
static Action* chains_of_ice(PlayerbotAI* botAI) { return new CastChainsOfIceAction(botAI); }
static Action* rune_strike(PlayerbotAI* botAI) { return new CastRuneStrikeAction(botAI); }
// static Action* icy_clutch(PlayerbotAI* botAI) { return new CastIcyClutchAction(botAI); }
static Action* horn_of_winter(PlayerbotAI* botAI) { return new CastHornOfWinterAction(botAI); }
static Action* killing_machine(PlayerbotAI* botAI) { return new CastKillingMachineAction(botAI); }
static Action* frost_presence(PlayerbotAI* botAI) { return new CastFrostPresenceAction(botAI); }
static Action* deathchill(PlayerbotAI* botAI) { return new CastDeathchillAction(botAI); }
static Action* icebound_fortitude(PlayerbotAI* botAI) { return new CastIceboundFortitudeAction(botAI); }
static Action* mind_freeze(PlayerbotAI* botAI) { return new CastMindFreezeAction(botAI); }
static Action* empower_rune_weapon(PlayerbotAI* botAI) { return new CastEmpowerRuneWeaponAction(botAI); }
static Action* hungering_cold(PlayerbotAI* botAI) { return new CastHungeringColdAction(botAI); }
static Action* unbreakable_armor(PlayerbotAI* botAI) { return new CastUnbreakableArmorAction(botAI); }
static Action* improved_icy_talons(PlayerbotAI* botAI) { return new CastImprovedIcyTalonsAction(botAI); }
// blood
static Action* blood_strike(PlayerbotAI* botAI) { return new CastBloodStrikeAction(botAI); }
static Action* blood_tap(PlayerbotAI* botAI) { return new CastBloodTapAction(botAI); }
static Action* pestilence(PlayerbotAI* botAI) { return new CastPestilenceAction(botAI); }
static Action* strangulate(PlayerbotAI* botAI) { return new CastStrangulateAction(botAI); }
static Action* blood_boil(PlayerbotAI* botAI) { return new CastBloodBoilAction(botAI); }
static Action* heart_strike(PlayerbotAI* botAI) { return new CastHeartStrikeAction(botAI); }
static Action* mark_of_blood(PlayerbotAI* botAI) { return new CastMarkOfBloodAction(botAI); }
static Action* blood_presence(PlayerbotAI* botAI) { return new CastBloodPresenceAction(botAI); }
static Action* rune_tap(PlayerbotAI* botAI) { return new CastRuneTapAction(botAI); }
static Action* vampiric_blood(PlayerbotAI* botAI) { return new CastVampiricBloodAction(botAI); }
static Action* death_pact(PlayerbotAI* botAI) { return new CastDeathPactAction(botAI); }
static Action* death_rune_mastery(PlayerbotAI* botAI) { return new CastDeathRuneMasteryAction(botAI); }
// static Action* hysteria(PlayerbotAI* botAI) { return new CastHysteriaAction(botAI); }
static Action* dancing_rune_weapon(PlayerbotAI* botAI) { return new CastDancingRuneWeaponAction(botAI); }
static Action* dark_command(PlayerbotAI* botAI) { return new CastDarkCommandAction(botAI); }
static Action* mind_freeze_on_enemy_healer(PlayerbotAI* botAI)
{
return new CastMindFreezeOnEnemyHealerAction(botAI);
}
};
DKAiObjectContext::DKAiObjectContext(PlayerbotAI* botAI) : AiObjectContext(botAI)
{
strategyContexts.Add(new DeathKnightStrategyFactoryInternal());
strategyContexts.Add(new DeathKnightCombatStrategyFactoryInternal());
strategyContexts.Add(new DeathKnightDKBuffStrategyFactoryInternal());
actionContexts.Add(new DeathKnightAiObjectContextInternal());
triggerContexts.Add(new DeathKnightTriggerFactoryInternal());
}

View File

@@ -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_DKAIOBJECTCONTEXT_H
#define _PLAYERBOT_DKAIOBJECTCONTEXT_H
#include "AiObjectContext.h"
class PlayerbotAI;
class DKAiObjectContext : public AiObjectContext
{
public:
DKAiObjectContext(PlayerbotAI* botAI);
};
#endif

View File

@@ -1,66 +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 "DKTriggers.h"
#include <string>
#include "GenericTriggers.h"
#include "Playerbots.h"
#include "SharedDefines.h"
bool DKPresenceTrigger::IsActive()
{
Unit* target = GetTarget();
return !botAI->HasAura("blood presence", target) && !botAI->HasAura("unholy presence", target) &&
!botAI->HasAura("frost presence", target);
}
bool PestilenceGlyphTrigger::IsActive()
{
if (!SpellTrigger::IsActive())
{
return false;
}
if (!bot->HasAura(63334))
{
return false;
}
Aura* blood_plague = botAI->GetAura("blood plague", GetTarget(), true, true);
Aura* frost_fever = botAI->GetAura("frost fever", GetTarget(), true, true);
if ((blood_plague && blood_plague->GetDuration() <= 3000) || (frost_fever && frost_fever->GetDuration() <= 3000))
{
return true;
}
return false;
}
bool HighBloodRuneTrigger::IsActive()
{
return !bot->GetRuneCooldown(0) && !bot->GetRuneCooldown(1);
}
bool HighFrostRuneTrigger::IsActive()
{
return !bot->GetRuneCooldown(2) && !bot->GetRuneCooldown(3);
}
bool HighUnholyRuneTrigger::IsActive()
{
return !bot->GetRuneCooldown(4) && !bot->GetRuneCooldown(5);
}
bool DesolationTrigger::IsActive()
{
return bot->HasAura(66817) && BuffTrigger::IsActive();
}
bool DeathAndDecayCooldownTrigger::IsActive()
{
uint32 spellId = AI_VALUE2(uint32, "spell id", name);
if (!spellId)
return true;
return bot->GetSpellCooldownDelay(spellId) >= 3000;
}

View File

@@ -1,194 +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_DKTRIGGERS_H
#define _PLAYERBOT_DKTRIGGERS_H
#include "GenericTriggers.h"
class PlayerbotAI;
BUFF_TRIGGER(HornOfWinterTrigger, "horn of winter");
BUFF_TRIGGER(BoneShieldTrigger, "bone shield");
BUFF_TRIGGER(ImprovedIcyTalonsTrigger, "improved icy talons");
// DEBUFF_CHECKISOWNER_TRIGGER(PlagueStrikeDebuffTrigger, "blood plague");
class PlagueStrikeDebuffTrigger : public DebuffTrigger
{
public:
PlagueStrikeDebuffTrigger(PlayerbotAI* botAI) : DebuffTrigger(botAI, "blood plague", 1, true, .0f) {}
};
class PlagueStrike8sDebuffTrigger : public DebuffTrigger
{
public:
PlagueStrike8sDebuffTrigger(PlayerbotAI* botAI) : DebuffTrigger(botAI, "blood plague", 1, true, .0f, 3000) {}
};
// DEBUFF_CHECKISOWNER_TRIGGER(IcyTouchDebuffTrigger, "frost fever");
class IcyTouchDebuffTrigger : public DebuffTrigger
{
public:
IcyTouchDebuffTrigger(PlayerbotAI* botAI) : DebuffTrigger(botAI, "frost fever", 1, true, .0f) {}
};
class IcyTouch8sDebuffTrigger : public DebuffTrigger
{
public:
IcyTouch8sDebuffTrigger(PlayerbotAI* botAI) : DebuffTrigger(botAI, "frost fever", 1, true, .0f, 3000) {}
};
BUFF_TRIGGER(UnbreakableArmorTrigger, "unbreakable armor");
class PlagueStrikeDebuffOnAttackerTrigger : public DebuffOnMeleeAttackerTrigger
{
public:
PlagueStrikeDebuffOnAttackerTrigger(PlayerbotAI* botAI)
: DebuffOnMeleeAttackerTrigger(botAI, "blood plague", true, .0f)
{
}
};
class IcyTouchDebuffOnAttackerTrigger : public DebuffOnMeleeAttackerTrigger
{
public:
IcyTouchDebuffOnAttackerTrigger(PlayerbotAI* botAI) : DebuffOnMeleeAttackerTrigger(botAI, "frost fever", true, .0f)
{
}
};
class DKPresenceTrigger : public BuffTrigger
{
public:
DKPresenceTrigger(PlayerbotAI* botAI) : BuffTrigger(botAI, "blood presence") {}
bool IsActive() override;
};
class BloodTapTrigger : public BuffTrigger
{
public:
BloodTapTrigger(PlayerbotAI* botAI) : BuffTrigger(botAI, "blood tap") {}
};
class RaiseDeadTrigger : public BuffTrigger
{
public:
RaiseDeadTrigger(PlayerbotAI* botAI) : BuffTrigger(botAI, "raise dead") {}
};
class RuneStrikeTrigger : public SpellCanBeCastTrigger
{
public:
RuneStrikeTrigger(PlayerbotAI* botAI) : SpellCanBeCastTrigger(botAI, "rune strike") {}
};
class DeathCoilTrigger : public SpellCanBeCastTrigger
{
public:
DeathCoilTrigger(PlayerbotAI* botAI) : SpellCanBeCastTrigger(botAI, "death coil") {}
};
class PestilenceGlyphTrigger : public SpellTrigger
{
public:
PestilenceGlyphTrigger(PlayerbotAI* botAI) : SpellTrigger(botAI, "pestilence") {}
virtual bool IsActive() override;
};
class BloodStrikeTrigger : public DebuffTrigger
{
public:
BloodStrikeTrigger(PlayerbotAI* botAI) : DebuffTrigger(botAI, "blood strike", 1, true) {}
};
class HowlingBlastTrigger : public DebuffTrigger
{
public:
HowlingBlastTrigger(PlayerbotAI* botAI) : DebuffTrigger(botAI, "howling blast", 1, true) {}
};
class MindFreezeInterruptSpellTrigger : public InterruptSpellTrigger
{
public:
MindFreezeInterruptSpellTrigger(PlayerbotAI* botAI) : InterruptSpellTrigger(botAI, "mind freeze") {}
};
class StrangulateInterruptSpellTrigger : public InterruptSpellTrigger
{
public:
StrangulateInterruptSpellTrigger(PlayerbotAI* botAI) : InterruptSpellTrigger(botAI, "strangulate") {}
};
class KillingMachineTrigger : public BoostTrigger
{
public:
KillingMachineTrigger(PlayerbotAI* botAI) : BoostTrigger(botAI, "killing machine") {}
};
class MindFreezeOnEnemyHealerTrigger : public InterruptEnemyHealerTrigger
{
public:
MindFreezeOnEnemyHealerTrigger(PlayerbotAI* botAI) : InterruptEnemyHealerTrigger(botAI, "mind freeze") {}
};
class ChainsOfIceSnareTrigger : public SnareTargetTrigger
{
public:
ChainsOfIceSnareTrigger(PlayerbotAI* botAI) : SnareTargetTrigger(botAI, "chains of ice") {}
};
class StrangulateOnEnemyHealerTrigger : public InterruptEnemyHealerTrigger
{
public:
StrangulateOnEnemyHealerTrigger(PlayerbotAI* botAI) : InterruptEnemyHealerTrigger(botAI, "strangulate") {}
};
class HighBloodRuneTrigger : public Trigger
{
public:
HighBloodRuneTrigger(PlayerbotAI* botAI) : Trigger(botAI, "high blood rune") {}
bool IsActive() override;
};
class HighFrostRuneTrigger : public Trigger
{
public:
HighFrostRuneTrigger(PlayerbotAI* botAI) : Trigger(botAI, "high frost rune") {}
bool IsActive() override;
};
class HighUnholyRuneTrigger : public Trigger
{
public:
HighUnholyRuneTrigger(PlayerbotAI* botAI) : Trigger(botAI, "high unholy rune") {}
bool IsActive() override;
};
class FreezingFogTrigger : public HasAuraTrigger
{
public:
FreezingFogTrigger(PlayerbotAI* botAI) : HasAuraTrigger(botAI, "freezing fog") {}
};
class DesolationTrigger : public BuffTrigger
{
public:
DesolationTrigger(PlayerbotAI* botAI) : BuffTrigger(botAI, "desolation", 1, false, true, 10000) {}
bool IsActive() override;
};
class DeathAndDecayCooldownTrigger : public SpellCooldownTrigger
{
public:
DeathAndDecayCooldownTrigger(PlayerbotAI* botAI) : SpellCooldownTrigger(botAI, "death and decay") {}
bool IsActive() override;
};
class ArmyOfTheDeadTrigger : public BoostTrigger
{
public:
ArmyOfTheDeadTrigger(PlayerbotAI* botAI) : BoostTrigger(botAI, "army of the dead") {}
};
#endif

View File

@@ -1,124 +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 "FrostDKStrategy.h"
#include "Playerbots.h"
class FrostDKStrategyActionNodeFactory : public NamedObjectFactory<ActionNode>
{
public:
FrostDKStrategyActionNodeFactory()
{
creators["icy touch"] = &icy_touch;
creators["obliterate"] = &obliterate;
creators["howling blast"] = &howling_blast;
creators["frost strike"] = &frost_strike;
// creators["chains of ice"] = &chains_of_ice;
creators["rune strike"] = &rune_strike;
// creators["icy clutch"] = &icy_clutch;
// creators["horn of winter"] = &horn_of_winter;
// creators["killing machine"] = &killing_machine;
// creators["frost presence"] = &frost_presence;
// creators["deathchill"] = &deathchill;
// creators["icebound fortitude"] = &icebound_fortitude;
// creators["mind freeze"] = &mind_freeze;
// creators["hungering cold"] = &hungering_cold;
creators["unbreakable armor"] = &unbreakable_armor;
// creators["improved icy talons"] = &improved_icy_talons;
}
private:
static ActionNode* icy_touch([[maybe_unused]] PlayerbotAI* botAI)
{
return new ActionNode("icy touch",
/*P*/ NextAction::array(0, new NextAction("blood presence"), nullptr),
/*A*/ nullptr,
/*C*/ nullptr);
}
static ActionNode* obliterate([[maybe_unused]] PlayerbotAI* botAI)
{
return new ActionNode("obliterate",
/*P*/ NextAction::array(0, new NextAction("blood presence"), nullptr),
/*A*/ nullptr,
/*C*/ nullptr);
}
static ActionNode* rune_strike([[maybe_unused]] PlayerbotAI* botAI)
{
return new ActionNode("rune strike",
/*P*/ NextAction::array(0, new NextAction("blood presence"), nullptr),
/*A*/ NextAction::array(0, new NextAction("melee"), nullptr),
/*C*/ nullptr);
}
static ActionNode* frost_strike([[maybe_unused]] PlayerbotAI* botAI)
{
return new ActionNode("frost strike",
/*P*/ NextAction::array(0, new NextAction("blood presence"), nullptr),
/*A*/ nullptr,
/*C*/ nullptr);
}
static ActionNode* howling_blast([[maybe_unused]] PlayerbotAI* botAI)
{
return new ActionNode("howling blast",
/*P*/ NextAction::array(0, new NextAction("blood presence"), nullptr),
/*A*/ nullptr,
/*C*/ nullptr);
}
static ActionNode* unbreakable_armor([[maybe_unused]] PlayerbotAI* botAI)
{
return new ActionNode("unbreakable armor",
/*P*/ NextAction::array(0, new NextAction("blood tap"), nullptr),
/*A*/ nullptr,
/*C*/ nullptr);
}
};
FrostDKStrategy::FrostDKStrategy(PlayerbotAI* botAI) : GenericDKStrategy(botAI)
{
actionNodeFactories.Add(new FrostDKStrategyActionNodeFactory());
}
NextAction** FrostDKStrategy::getDefaultActions()
{
return NextAction::array(
0, new NextAction("obliterate", ACTION_DEFAULT + 0.7f),
new NextAction("frost strike", ACTION_DEFAULT + 0.4f),
new NextAction("empower rune weapon", ACTION_DEFAULT + 0.3f),
new NextAction("horn of winter", ACTION_DEFAULT + 0.1f), new NextAction("melee", ACTION_DEFAULT), NULL);
}
void FrostDKStrategy::InitTriggers(std::vector<TriggerNode*>& triggers)
{
GenericDKStrategy::InitTriggers(triggers);
triggers.push_back(new TriggerNode(
"unbreakable armor", NextAction::array(0, new NextAction("unbreakable armor", ACTION_DEFAULT + 0.6f), nullptr)));
triggers.push_back(new TriggerNode(
"freezing fog", NextAction::array(0, new NextAction("howling blast", ACTION_DEFAULT + 0.5f), nullptr)));
triggers.push_back(new TriggerNode(
"high blood rune", NextAction::array(0, new NextAction("blood strike", ACTION_DEFAULT + 0.2f), nullptr)));
triggers.push_back(new TriggerNode(
"army of the dead", NextAction::array(0, new NextAction("army of the dead", ACTION_HIGH + 6), nullptr)));
triggers.push_back(
new TriggerNode("icy touch", NextAction::array(0, new NextAction("icy touch", ACTION_HIGH + 2), nullptr)));
triggers.push_back(new TriggerNode(
"plague strike", NextAction::array(0, new NextAction("plague strike", ACTION_HIGH + 2), nullptr)));
// triggers.push_back(new TriggerNode("empower rune weapon", NextAction::array(0, new NextAction("empower rune
// weapon", ACTION_NORMAL + 4), nullptr)));
}
void FrostDKAoeStrategy::InitTriggers(std::vector<TriggerNode*>& triggers)
{
triggers.push_back(
new TriggerNode("medium aoe", NextAction::array(0, new NextAction("howling blast", ACTION_HIGH + 4), nullptr)));
}

View File

@@ -1,33 +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_FROSTDKSTRATEGY_H
#define _PLAYERBOT_FROSTDKSTRATEGY_H
#include "GenericDKStrategy.h"
class PlayerbotAI;
class FrostDKStrategy : public GenericDKStrategy
{
public:
FrostDKStrategy(PlayerbotAI* botAI);
void InitTriggers(std::vector<TriggerNode*>& triggers) override;
std::string const getName() override { return "frost"; }
NextAction** getDefaultActions() override;
uint32 GetType() const override { return STRATEGY_TYPE_COMBAT | STRATEGY_TYPE_DPS | STRATEGY_TYPE_MELEE; }
};
class FrostDKAoeStrategy : public CombatStrategy
{
public:
FrostDKAoeStrategy(PlayerbotAI* botAI) : CombatStrategy(botAI) {}
void InitTriggers(std::vector<TriggerNode*>& triggers) override;
std::string const getName() override { return "frost aoe"; }
};
#endif

View File

@@ -1,60 +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 "GenericDKNonCombatStrategy.h"
#include "Playerbots.h"
class GenericDKNonCombatStrategyActionNodeFactory : public NamedObjectFactory<ActionNode>
{
public:
GenericDKNonCombatStrategyActionNodeFactory()
{
creators["bone shield"] = &bone_shield;
creators["horn of winter"] = &horn_of_winter;
}
private:
static ActionNode* bone_shield([[maybe_unused]] PlayerbotAI* botAI)
{
return new ActionNode("bone shield",
/*P*/ nullptr,
/*A*/ nullptr,
/*C*/ nullptr);
}
static ActionNode* horn_of_winter([[maybe_unused]] PlayerbotAI* botAI)
{
return new ActionNode("horn of winter",
/*P*/ nullptr,
/*A*/ nullptr,
/*C*/ nullptr);
}
};
GenericDKNonCombatStrategy::GenericDKNonCombatStrategy(PlayerbotAI* botAI) : NonCombatStrategy(botAI)
{
actionNodeFactories.Add(new GenericDKNonCombatStrategyActionNodeFactory());
}
void GenericDKNonCombatStrategy::InitTriggers(std::vector<TriggerNode*>& triggers)
{
NonCombatStrategy::InitTriggers(triggers);
triggers.push_back(
new TriggerNode("no pet", NextAction::array(0, new NextAction("raise dead", ACTION_NORMAL + 1), nullptr)));
triggers.push_back(
new TriggerNode("horn of winter", NextAction::array(0, new NextAction("horn of winter", 21.0f), nullptr)));
triggers.push_back(
new TriggerNode("bone shield", NextAction::array(0, new NextAction("bone shield", 21.0f), nullptr)));
triggers.push_back(
new TriggerNode("has pet", NextAction::array(0, new NextAction("toggle pet spell", 11.0f), NULL)));
}
void DKBuffDpsStrategy::InitTriggers(std::vector<TriggerNode*>& triggers)
{
// triggers.push_back(new TriggerNode("improved icy talons", NextAction::array(0, new NextAction("improved icy
// talons", 19.0f), nullptr)));
}

View File

@@ -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_GENERICDKNONCOMBATSTRATEGY_H
#define _PLAYERBOT_GENERICDKNONCOMBATSTRATEGY_H
#include "GenericDKStrategy.h"
#include "NonCombatStrategy.h"
class PlayerbotAI;
class GenericDKNonCombatStrategy : public NonCombatStrategy
{
public:
GenericDKNonCombatStrategy(PlayerbotAI* botAI);
std::string const getName() override { return "nc"; }
void InitTriggers(std::vector<TriggerNode*>& triggers) override;
};
class DKBuffDpsStrategy : public Strategy
{
public:
DKBuffDpsStrategy(PlayerbotAI* botAI) : Strategy(botAI) {}
void InitTriggers(std::vector<TriggerNode*>& triggers) override;
std::string const getName() override { return "bdps"; }
};
#endif

View File

@@ -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.
*/
#include "GenericDKStrategy.h"
#include "DKAiObjectContext.h"
#include "Playerbots.h"
class GenericDKStrategyActionNodeFactory : public NamedObjectFactory<ActionNode>
{
public:
GenericDKStrategyActionNodeFactory()
{
// blood
// creators["rune tap"] = &rune_tap; cd
// creators["vampiric blood"] = &vampiric_blood;
// creators["death pact"] = &death_pact;
// creators["hysteria"] = &hysteria; boost party
// creators["dancing rune weapon"] = &dancing_rune_weapon; //cd
// creators["dark command"] = &dark_command; taunt
// frost
// creators["chains of ice"] = &chains_of_ice;
// creators["icy clutch"] = &icy_clutch;
creators["horn of winter"] = &horn_of_winter;
creators["killing machine"] = &killing_machine; // buff
// creators["deathchill"] = &deathchill; //boost
creators["icebound fortitude"] = &icebound_fortitude;
// creators["mind freeze"] = &mind_freeze; interrupt
// creators["empower rune weapon"] = &empower_rune_weapon; boost
// creators["hungering cold"] = &hungering_cold; snare
// creators["unbreakable armor"] = &unbreakable_armor; boost +cd
// creators["improved icy talons"] = &improved_icy_talons; boost party
// unholy
creators["death and decay"] = &death_and_decay;
// creators["raise dead"] = &raise_dead;
// creators["army of the dead"] = &army of the dead;
// creators["summon gargoyle"] = &army of the dead;
// creators["anti magic shell"] = &anti_magic_shell; cd
creators["anti magic zone"] = &anti_magic_zone;
// creators["ghoul frenzy"] = &ghoul_frenzy;
creators["corpse explosion"] = &corpse_explosion;
creators["bone shield"] = &bone_shield;
creators["heart strike"] = &heart_strike;
creators["death grip"] = &death_grip;
creators["plague strike"] = &plague_strike;
creators["pestilence"] = &pestilence;
creators["icy touch"] = &icy_touch;
}
private:
static ActionNode* death_coil([[maybe_unused]] PlayerbotAI* botAI)
{
return new ActionNode("death coil",
/*P*/ nullptr,
/*A*/ nullptr,
/*C*/ nullptr);
}
static ActionNode* death_grip([[maybe_unused]] PlayerbotAI* botAI)
{
return new ActionNode("death grip",
/*P*/ nullptr,
/*A*/ NextAction::array(0, new NextAction("icy touch"), nullptr),
/*C*/ nullptr);
}
static ActionNode* plague_strike([[maybe_unused]] PlayerbotAI* botAI)
{
return new ActionNode("plague strike",
/*P*/ nullptr,
/*A*/ nullptr,
/*C*/ nullptr);
}
static ActionNode* icy_touch([[maybe_unused]] PlayerbotAI* botAI)
{
return new ActionNode("icy touch",
/*P*/ nullptr,
/*A*/ nullptr,
/*C*/ nullptr);
}
static ActionNode* heart_strike([[maybe_unused]] PlayerbotAI* botAI)
{
return new ActionNode("heart strike",
/*P*/ nullptr,
/*A*/ nullptr,
/*C*/ nullptr);
}
static ActionNode* pestilence([[maybe_unused]] PlayerbotAI* botAI)
{
return new ActionNode("pestilence",
/*P*/ nullptr,
/*A*/ nullptr,
/*C*/ nullptr);
}
static ActionNode* horn_of_winter([[maybe_unused]] PlayerbotAI* botAI)
{
return new ActionNode("horn of winter",
/*P*/ nullptr,
/*A*/ nullptr,
/*C*/ nullptr);
}
static ActionNode* bone_shield([[maybe_unused]] PlayerbotAI* botAI)
{
return new ActionNode("bone shield",
/*P*/ nullptr,
/*A*/ nullptr,
/*C*/ nullptr);
}
static ActionNode* killing_machine([[maybe_unused]] PlayerbotAI* botAI)
{
return new ActionNode("killing machine",
/*P*/ nullptr,
/*A*/ NextAction::array(0, new NextAction("improved icy talons"), nullptr),
/*C*/ nullptr);
}
static ActionNode* corpse_explosion([[maybe_unused]] PlayerbotAI* botAI)
{
return new ActionNode("corpse explosion",
/*P*/ nullptr,
/*A*/ nullptr,
/*C*/ nullptr);
}
static ActionNode* death_and_decay([[maybe_unused]] PlayerbotAI* botAI)
{
return new ActionNode("death and decay",
/*P*/ nullptr,
/*A*/ nullptr,
/*C*/ nullptr);
}
static ActionNode* anti_magic_zone([[maybe_unused]] PlayerbotAI* botAI)
{
return new ActionNode("anti magic zone",
/*P*/ nullptr,
/*A*/ NextAction::array(0, new NextAction("anti magic shell"), nullptr),
/*C*/ nullptr);
}
static ActionNode* icebound_fortitude([[maybe_unused]] PlayerbotAI* botAI)
{
return new ActionNode("icebound fortitude",
/*P*/ nullptr,
/*A*/ nullptr,
/*C*/ nullptr);
}
};
GenericDKStrategy::GenericDKStrategy(PlayerbotAI* botAI) : MeleeCombatStrategy(botAI)
{
actionNodeFactories.Add(new GenericDKStrategyActionNodeFactory());
}
void GenericDKStrategy::InitTriggers(std::vector<TriggerNode*>& triggers)
{
MeleeCombatStrategy::InitTriggers(triggers);
// triggers.push_back(new TriggerNode("high aoe", NextAction::array(0, new NextAction("anti magic shell",
// ACTION_NORMAL + 3), nullptr))); triggers.push_back(new TriggerNode("death coil", NextAction::array(0, new
// NextAction("death coil", ACTION_NORMAL + 3), nullptr))); triggers.push_back(new TriggerNode("critical aoe heal",
// NextAction::array(0, new NextAction("anti magic zone", ACTION_EMERGENCY + 1), nullptr)));
triggers.push_back(
new TriggerNode("no pet", NextAction::array(0, new NextAction("raise dead", ACTION_NORMAL + 5), nullptr)));
triggers.push_back(
new TriggerNode("mind freeze", NextAction::array(0, new NextAction("mind freeze", ACTION_HIGH + 1), nullptr)));
triggers.push_back(
new TriggerNode("mind freeze on enemy healer",
NextAction::array(0, new NextAction("mind freeze on enemy healer", ACTION_HIGH + 1), nullptr)));
triggers.push_back(new TriggerNode(
"horn of winter", NextAction::array(0, new NextAction("horn of winter", ACTION_NORMAL + 1), nullptr)));
triggers.push_back(new TriggerNode("critical health",
NextAction::array(0, new NextAction("death pact", ACTION_HIGH + 5), nullptr)));
triggers.push_back(
new TriggerNode("low health", NextAction::array(0, new NextAction("icebound fortitude", ACTION_HIGH + 5),
new NextAction("rune tap", ACTION_HIGH + 4), nullptr)));
triggers.push_back(
new TriggerNode("medium aoe", NextAction::array(0, new NextAction("death and decay", ACTION_HIGH + 9),
new NextAction("pestilence", ACTION_NORMAL + 4),
new NextAction("blood boil", ACTION_NORMAL + 3), nullptr)));
// triggers.push_back(new TriggerNode("light aoe", NextAction::array(0,
// new NextAction("pestilence", ACTION_NORMAL + 4),
// nullptr)));
triggers.push_back(
new TriggerNode("pestilence glyph", NextAction::array(0, new NextAction("pestilence", ACTION_HIGH + 9), NULL)));
}

View File

@@ -1,22 +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_GENERICDKSTRATEGY_H
#define _PLAYERBOT_GENERICDKSTRATEGY_H
#include "MeleeCombatStrategy.h"
class PlayerbotAI;
class GenericDKStrategy : public MeleeCombatStrategy
{
public:
GenericDKStrategy(PlayerbotAI* botAI);
std::string const getName() override { return "DK"; }
void InitTriggers(std::vector<TriggerNode*>& triggers) override;
};
#endif

View File

@@ -1,141 +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 "UnholyDKStrategy.h"
#include "Playerbots.h"
class UnholyDKStrategyActionNodeFactory : public NamedObjectFactory<ActionNode>
{
public:
UnholyDKStrategyActionNodeFactory()
{
// Unholy
// creators["bone shield"] = &bone_shield;
// creators["plague strike"] = &plague_strike;
// creators["death grip"] = &death_grip;
// creators["death coil"] = &death_coil;
creators["death strike"] = &death_strike;
// creators["unholy blight"] = &unholy_blight;
creators["scourge strike"] = &scourge_strike;
// creators["death and decay"] = &death_and_decay;
// creators["unholy pressence"] = &unholy_pressence;
// creators["raise dead"] = &raise_dead;
// creators["army of the dead"] = &army of the dead;
// creators["summon gargoyle"] = &army of the dead;
// creators["anti magic shell"] = &anti_magic_shell;
// creators["anti magic zone"] = &anti_magic_zone;
creators["ghoul frenzy"] = &ghoul_frenzy;
creators["corpse explosion"] = &corpse_explosion;
creators["icy touch"] = &icy_touch;
}
private:
static ActionNode* death_strike([[maybe_unused]] PlayerbotAI* botAI)
{
return new ActionNode("death strike",
/*P*/ NextAction::array(0, new NextAction("blood presence"), nullptr),
/*A*/ nullptr,
/*C*/ nullptr);
}
static ActionNode* ghoul_frenzy([[maybe_unused]] PlayerbotAI* botAI)
{
return new ActionNode("ghoul frenzy",
/*P*/ NextAction::array(0, new NextAction("blood presence"), nullptr),
/*A*/ nullptr,
/*C*/ nullptr);
}
static ActionNode* corpse_explosion([[maybe_unused]] PlayerbotAI* botAI)
{
return new ActionNode("corpse explosion",
/*P*/ NextAction::array(0, new NextAction("blood presence"), nullptr),
/*A*/ nullptr,
/*C*/ nullptr);
}
static ActionNode* scourge_strike([[maybe_unused]] PlayerbotAI* botAI)
{
return new ActionNode("scourge strike",
/*P*/ NextAction::array(0, new NextAction("blood presence"), nullptr),
/*A*/ nullptr,
/*C*/ nullptr);
}
static ActionNode* icy_touch([[maybe_unused]] PlayerbotAI* botAI)
{
return new ActionNode("icy touch",
/*P*/ NextAction::array(0, new NextAction("blood presence"), nullptr),
/*A*/ nullptr,
/*C*/ nullptr);
}
};
UnholyDKStrategy::UnholyDKStrategy(PlayerbotAI* botAI) : GenericDKStrategy(botAI)
{
actionNodeFactories.Add(new UnholyDKStrategyActionNodeFactory());
}
NextAction** UnholyDKStrategy::getDefaultActions()
{
return NextAction::array(
0, new NextAction("death and decay", ACTION_HIGH + 5),
new NextAction("summon gargoyle", ACTION_DEFAULT + 0.4f),
new NextAction("empower rune weapon", ACTION_DEFAULT + 0.3f),
new NextAction("horn of winter", ACTION_DEFAULT + 0.2f),
new NextAction("death coil", ACTION_DEFAULT + 0.1f),
new NextAction("melee", ACTION_DEFAULT), nullptr);
}
void UnholyDKStrategy::InitTriggers(std::vector<TriggerNode*>& triggers)
{
GenericDKStrategy::InitTriggers(triggers);
triggers.push_back(new TriggerNode(
"death and decay cooldown", NextAction::array(0,
new NextAction("ghoul frenzy", ACTION_DEFAULT + 0.9f),
new NextAction("scourge strike", ACTION_DEFAULT + 0.8f),
new NextAction("blood boil", ACTION_DEFAULT + 0.7f),
new NextAction("icy touch", ACTION_DEFAULT + 0.6f),
new NextAction("plague strike", ACTION_DEFAULT + 0.5f),
nullptr)));
triggers.push_back(new TriggerNode("dd cd and no desolation",
NextAction::array(0, new NextAction("blood strike", ACTION_DEFAULT + 0.75f), nullptr)));
// triggers.push_back(
// new TriggerNode("icy touch", NextAction::array(0, new NextAction("icy touch", ACTION_HIGH + 2), nullptr)));
// triggers.push_back(new TriggerNode(
// "plague strike", NextAction::array(0, new NextAction("plague strike", ACTION_HIGH + 1), nullptr)));
triggers.push_back(new TriggerNode(
"high frost rune", NextAction::array(0,
new NextAction("icy touch", ACTION_NORMAL + 3), nullptr)));
triggers.push_back(new TriggerNode(
"high unholy rune", NextAction::array(0,
new NextAction("plague strike", ACTION_NORMAL + 2), nullptr)));
triggers.push_back(new TriggerNode(
"high blood rune", NextAction::array(0, new NextAction("blood strike", ACTION_NORMAL + 1), nullptr)));
triggers.push_back(
new TriggerNode("dd cd and plague strike 8s", NextAction::array(0, new NextAction("plague strike", ACTION_HIGH + 2), nullptr)));
triggers.push_back(
new TriggerNode("dd cd and icy touch 8s", NextAction::array(0, new NextAction("icy touch", ACTION_HIGH + 1), nullptr)));
// triggers.push_back(new TriggerNode("often", NextAction::array(0, new NextAction(, ACTION_NORMAL + 2), nullptr)));
triggers.push_back(new TriggerNode(
"army of the dead", NextAction::array(0, new NextAction("army of the dead", ACTION_HIGH + 6), nullptr)));
triggers.push_back(
new TriggerNode("bone shield", NextAction::array(0, new NextAction("bone shield", ACTION_HIGH + 1), nullptr)));
}
void UnholyDKAoeStrategy::InitTriggers(std::vector<TriggerNode*>& triggers)
{
triggers.push_back(new TriggerNode(
"loot available", NextAction::array(0, new NextAction("corpse explosion", ACTION_NORMAL + 1), nullptr)));
triggers.push_back(new TriggerNode(
"medium aoe", NextAction::array(0, new NextAction("death and decay", ACTION_NORMAL + 3),
new NextAction("corpse explosion", ACTION_NORMAL + 3), nullptr)));
}

View File

@@ -1,33 +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_UNHOLYDKSTRATEGY_H
#define _PLAYERBOT_UNHOLYDKSTRATEGY_H
#include "GenericDKStrategy.h"
class PlayerbotAI;
class UnholyDKStrategy : public GenericDKStrategy
{
public:
UnholyDKStrategy(PlayerbotAI* botAI);
void InitTriggers(std::vector<TriggerNode*>& triggers) override;
std::string const getName() override { return "unholy"; }
NextAction** getDefaultActions() override;
uint32 GetType() const override { return STRATEGY_TYPE_COMBAT | STRATEGY_TYPE_DPS | STRATEGY_TYPE_MELEE; }
};
class UnholyDKAoeStrategy : public CombatStrategy
{
public:
UnholyDKAoeStrategy(PlayerbotAI* botAI) : CombatStrategy(botAI) {}
void InitTriggers(std::vector<TriggerNode*>& triggers) override;
std::string const getName() override { return "unholy aoe"; }
};
#endif