[HOT FIX] MS build issues regarding folder / command lenght usage or rc.exe (#2038)

This commit is contained in:
bashermens
2026-01-19 22:45:28 +01:00
committed by GitHub
parent fd07e02a8a
commit 41c53365ae
1119 changed files with 27 additions and 27 deletions

View File

@@ -0,0 +1,50 @@
/*
* Copyright (C) 2016+ AzerothCore <www.azerothcore.org>, released under GNU AGPL v3 license, you may redistribute it
* and/or modify it under version 3 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"
std::vector<NextAction> CastDeathchillAction::getPrerequisites()
{
return NextAction::merge({ NextAction("frost presence") },
CastSpellAction::getPrerequisites());
}
std::vector<NextAction> CastUnholyMeleeSpellAction::getPrerequisites()
{
return NextAction::merge({ NextAction("unholy presence") },
CastMeleeSpellAction::getPrerequisites());
}
std::vector<NextAction> CastFrostMeleeSpellAction::getPrerequisites()
{
return NextAction::merge({ NextAction("frost presence") },
CastMeleeSpellAction::getPrerequisites());
}
std::vector<NextAction> CastBloodMeleeSpellAction::getPrerequisites()
{
return NextAction::merge({ NextAction("blood presence") },
CastMeleeSpellAction::getPrerequisites());
}
bool CastRaiseDeadAction::Execute(Event event)
{
const bool result = CastBuffSpellAction::Execute(event);
if (!result)
return false;
const uint32_t spellId = AI_VALUE2(uint32_t, "spell id", spell);
bot->AddSpellCooldown(spellId, 0, 3 * 60 * 1000);
return true;
}

View File

@@ -0,0 +1,343 @@
/*
* Copyright (C) 2016+ AzerothCore <www.azerothcore.org>, released under GNU AGPL v3 license, you may redistribute it
* and/or modify it under version 3 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") {}
std::vector<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) {}
std::vector<NextAction> getPrerequisites() override;
};
// Frost presence
class CastFrostMeleeSpellAction : public CastMeleeSpellAction
{
public:
CastFrostMeleeSpellAction(PlayerbotAI* botAI, std::string const spell) : CastMeleeSpellAction(botAI, spell) {}
std::vector<NextAction> getPrerequisites() override;
};
// Blood presence
class CastBloodMeleeSpellAction : public CastMeleeSpellAction
{
public:
CastBloodMeleeSpellAction(PlayerbotAI* botAI, std::string const spell) : CastMeleeSpellAction(botAI, spell) {}
std::vector<NextAction> getPrerequisites() override;
};
class CastRuneStrikeAction : public CastMeleeSpellAction
{
public:
CastRuneStrikeAction(PlayerbotAI* botAI) : CastMeleeSpellAction(botAI, "rune strike") {}
};
class CastPestilenceAction : public CastSpellAction
{
public:
CastPestilenceAction(PlayerbotAI* ai) : CastSpellAction(ai, "pestilence") {}
ActionThreatType getThreatType() override { return ActionThreatType::None; }
};
class CastHowlingBlastAction : public CastSpellAction
{
public:
CastHowlingBlastAction(PlayerbotAI* ai) : CastSpellAction(ai, "howling blast") {}
};
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") {}
};
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

@@ -0,0 +1,318 @@
/*
* Copyright (C) 2016+ AzerothCore <www.azerothcore.org>, released under GNU AGPL v3 license, you may redistribute it
* and/or modify it under version 3 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 3s"] = &DeathKnightTriggerFactoryInternal::icy_touch_3s;
creators["dd cd and icy touch 3s"] = &DeathKnightTriggerFactoryInternal::dd_cd_and_icy_touch_3s;
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 3s"] = &DeathKnightTriggerFactoryInternal::plague_strike_3s;
creators["dd cd and plague strike 3s"] = &DeathKnightTriggerFactoryInternal::dd_cd_and_plague_strike_3s;
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["no rune"] = &DeathKnightTriggerFactoryInternal::no_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_3s(PlayerbotAI* botAI) { return new PlagueStrike3sDebuffTrigger(botAI); }
static Trigger* dd_cd_and_plague_strike_3s(PlayerbotAI* botAI)
{
return new TwoTriggers(botAI, "death and decay cooldown", "plague strike 3s");
}
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_3s(PlayerbotAI* botAI) { return new IcyTouch3sDebuffTrigger(botAI); }
static Trigger* dd_cd_and_icy_touch_3s(PlayerbotAI* botAI)
{
return new TwoTriggers(botAI, "death and decay cooldown", "icy touch 3s");
}
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* no_rune(PlayerbotAI* botAI) { return new NoRuneTrigger(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);
}
};
SharedNamedObjectContextList<Strategy> DKAiObjectContext::sharedStrategyContexts;
SharedNamedObjectContextList<Action> DKAiObjectContext::sharedActionContexts;
SharedNamedObjectContextList<Trigger> DKAiObjectContext::sharedTriggerContexts;
SharedNamedObjectContextList<UntypedValue> DKAiObjectContext::sharedValueContexts;
DKAiObjectContext::DKAiObjectContext(PlayerbotAI* botAI)
: AiObjectContext(botAI, sharedStrategyContexts, sharedActionContexts, sharedTriggerContexts, sharedValueContexts)
{
}
void DKAiObjectContext::BuildSharedContexts()
{
BuildSharedStrategyContexts(sharedStrategyContexts);
BuildSharedActionContexts(sharedActionContexts);
BuildSharedTriggerContexts(sharedTriggerContexts);
BuildSharedValueContexts(sharedValueContexts);
}
void DKAiObjectContext::BuildSharedStrategyContexts(SharedNamedObjectContextList<Strategy>& strategyContexts)
{
AiObjectContext::BuildSharedStrategyContexts(strategyContexts);
strategyContexts.Add(new DeathKnightStrategyFactoryInternal());
strategyContexts.Add(new DeathKnightCombatStrategyFactoryInternal());
strategyContexts.Add(new DeathKnightDKBuffStrategyFactoryInternal());
}
void DKAiObjectContext::BuildSharedActionContexts(SharedNamedObjectContextList<Action>& actionContexts)
{
AiObjectContext::BuildSharedActionContexts(actionContexts);
actionContexts.Add(new DeathKnightAiObjectContextInternal());
}
void DKAiObjectContext::BuildSharedTriggerContexts(SharedNamedObjectContextList<Trigger>& triggerContexts)
{
AiObjectContext::BuildSharedTriggerContexts(triggerContexts);
triggerContexts.Add(new DeathKnightTriggerFactoryInternal());
}
void DKAiObjectContext::BuildSharedValueContexts(SharedNamedObjectContextList<UntypedValue>& valueContexts)
{
AiObjectContext::BuildSharedValueContexts(valueContexts);
}

View File

@@ -0,0 +1,30 @@
/*
* Copyright (C) 2016+ AzerothCore <www.azerothcore.org>, released under GNU AGPL v3 license, you may redistribute it
* and/or modify it under version 3 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);
static void BuildSharedContexts();
static void BuildSharedStrategyContexts(SharedNamedObjectContextList<Strategy>& strategyContexts);
static void BuildSharedActionContexts(SharedNamedObjectContextList<Action>& actionContexts);
static void BuildSharedTriggerContexts(SharedNamedObjectContextList<Trigger>& triggerContexts);
static void BuildSharedValueContexts(SharedNamedObjectContextList<UntypedValue>& valueContexts);
static SharedNamedObjectContextList<Strategy> sharedStrategyContexts;
static SharedNamedObjectContextList<Action> sharedActionContexts;
static SharedNamedObjectContextList<Trigger> sharedTriggerContexts;
static SharedNamedObjectContextList<UntypedValue> sharedValueContexts;
};
#endif

View File

@@ -0,0 +1,165 @@
/*
* Copyright (C) 2016+ AzerothCore <www.azerothcore.org>, released under GNU AGPL v3 license, you may redistribute it
* and/or modify it under version 3 of the License, or (at your option), any later version.
*/
#include "BloodDKStrategy.h"
#include "Playerbots.h"
class BloodDKStrategyActionNodeFactory : public NamedObjectFactory<ActionNode>
{
public:
BloodDKStrategyActionNodeFactory()
{
creators["rune strike"] = &rune_strike;
creators["heart strike"] = &heart_strike;
creators["death strike"] = &death_strike;
creators["icy touch"] = &icy_touch;
creators["dark command"] = &dark_command;
creators["taunt spell"] = &dark_command;
}
private:
static ActionNode* rune_strike([[maybe_unused]] PlayerbotAI* botAI)
{
return new ActionNode(
"rune strike",
{
NextAction("frost presence")
},
/*A*/ {},
/*C*/ {}
);
}
static ActionNode* icy_touch([[maybe_unused]] PlayerbotAI* botAI)
{
return new ActionNode(
"icy touch",
{
NextAction("frost presence")
},
/*A*/ {},
/*C*/ {}
);
}
static ActionNode* heart_strike([[maybe_unused]] PlayerbotAI* botAI)
{
return new ActionNode(
"heart strike",
{
NextAction("frost presence")
},
/*A*/ {},
/*C*/ {}
);
}
static ActionNode* death_strike([[maybe_unused]] PlayerbotAI* botAI)
{
return new ActionNode(
"death strike",
{
NextAction("frost presence")
},
/*A*/ {},
/*C*/ {}
);
}
static ActionNode* dark_command([[maybe_unused]] PlayerbotAI* botAI)
{
return new ActionNode(
"dark command",
{
NextAction("frost presence")
},
/*A*/ {
NextAction("death grip")
},
/*C*/ {}
);
}
};
BloodDKStrategy::BloodDKStrategy(PlayerbotAI* botAI) : GenericDKStrategy(botAI)
{
actionNodeFactories.Add(new BloodDKStrategyActionNodeFactory());
}
std::vector<NextAction> BloodDKStrategy::getDefaultActions()
{
return {
NextAction("rune strike", ACTION_DEFAULT + 0.8f),
NextAction("icy touch", ACTION_DEFAULT + 0.7f),
NextAction("heart strike", ACTION_DEFAULT + 0.6f),
NextAction("blood strike", ACTION_DEFAULT + 0.5f),
NextAction("dancing rune weapon", ACTION_DEFAULT + 0.4f),
NextAction("death coil", ACTION_DEFAULT + 0.3f),
NextAction("plague strike", ACTION_DEFAULT + 0.2f),
NextAction("horn of winter", ACTION_DEFAULT + 0.1f),
NextAction("melee", ACTION_DEFAULT)
};
}
void BloodDKStrategy::InitTriggers(std::vector<TriggerNode*>& triggers)
{
GenericDKStrategy::InitTriggers(triggers);
triggers.push_back(
new TriggerNode(
"rune strike",
{
NextAction("rune strike", ACTION_NORMAL + 3)
}
)
);
triggers.push_back(
new TriggerNode(
"blood tap",
{
NextAction("blood tap", ACTION_HIGH + 5)
}
)
);
triggers.push_back(
new TriggerNode(
"lose aggro",
{
NextAction("dark command", ACTION_HIGH + 3)
}
)
);
triggers.push_back(
new TriggerNode(
"low health",
{
NextAction("army of the dead", ACTION_HIGH + 4),
NextAction("death strike", ACTION_HIGH + 3)
}
)
);
triggers.push_back(
new TriggerNode(
"critical health",
{
NextAction("vampiric blood", ACTION_HIGH + 5)
}
)
);
triggers.push_back(
new TriggerNode(
"icy touch",
{
NextAction("icy touch", ACTION_HIGH + 2)
}
)
);
triggers.push_back(
new TriggerNode(
"plague strike",
{
NextAction("plague strike", ACTION_HIGH + 2)
}
)
);
}

View File

@@ -0,0 +1,24 @@
/*
* Copyright (C) 2016+ AzerothCore <www.azerothcore.org>, released under GNU AGPL v3 license, you may redistribute it
* and/or modify it under version 3 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"; }
std::vector<NextAction> getDefaultActions() override;
uint32 GetType() const override { return STRATEGY_TYPE_TANK | STRATEGY_TYPE_MELEE; }
};
#endif

View File

@@ -0,0 +1,169 @@
/*
* Copyright (C) 2016+ AzerothCore <www.azerothcore.org>, released under GNU AGPL v3 license, you may redistribute it
* and/or modify it under version 3 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["rune strike"] = &rune_strike;
creators["unbreakable armor"] = &unbreakable_armor;
}
private:
static ActionNode* icy_touch([[maybe_unused]] PlayerbotAI* botAI)
{
return new ActionNode(
"icy touch",
/*P*/ { NextAction("blood presence") },
/*A*/ {},
/*C*/ {}
);
}
static ActionNode* obliterate([[maybe_unused]] PlayerbotAI* botAI)
{
return new ActionNode(
"obliterate",
/*P*/ { NextAction("blood presence") },
/*A*/ {},
/*C*/ {}
);
}
static ActionNode* rune_strike([[maybe_unused]] PlayerbotAI* botAI)
{
return new ActionNode(
"rune strike",
/*P*/ { NextAction("blood presence") },
/*A*/ { NextAction("melee") },
/*C*/ {}
);
}
static ActionNode* frost_strike([[maybe_unused]] PlayerbotAI* botAI)
{
return new ActionNode(
"frost strike",
/*P*/ { NextAction("blood presence") },
/*A*/ {},
/*C*/ {}
);
}
static ActionNode* howling_blast([[maybe_unused]] PlayerbotAI* botAI)
{
return new ActionNode(
"howling blast",
/*P*/ { NextAction("blood presence") },
/*A*/ {},
/*C*/ {}
);
}
static ActionNode* unbreakable_armor([[maybe_unused]] PlayerbotAI* botAI)
{
return new ActionNode(
"unbreakable armor",
/*P*/ { NextAction("blood tap") },
/*A*/ {},
/*C*/ {}
);
}
};
FrostDKStrategy::FrostDKStrategy(PlayerbotAI* botAI) : GenericDKStrategy(botAI)
{
actionNodeFactories.Add(new FrostDKStrategyActionNodeFactory());
}
std::vector<NextAction> FrostDKStrategy::getDefaultActions()
{
return {
NextAction("obliterate", ACTION_DEFAULT + 0.7f),
NextAction("frost strike", ACTION_DEFAULT + 0.4f),
NextAction("empower rune weapon", ACTION_DEFAULT + 0.3f),
NextAction("horn of winter", ACTION_DEFAULT + 0.1f),
NextAction("melee", ACTION_DEFAULT)
};
}
void FrostDKStrategy::InitTriggers(std::vector<TriggerNode*>& triggers)
{
GenericDKStrategy::InitTriggers(triggers);
triggers.push_back(
new TriggerNode(
"unbreakable armor",
{
NextAction("unbreakable armor", ACTION_DEFAULT + 0.6f)
}
)
);
triggers.push_back(
new TriggerNode(
"freezing fog",
{
NextAction("howling blast", ACTION_DEFAULT + 0.5f)
}
)
);
triggers.push_back(
new TriggerNode(
"high blood rune",
{
NextAction("blood strike", ACTION_DEFAULT + 0.2f)
}
)
);
triggers.push_back(
new TriggerNode(
"army of the dead",
{
NextAction("army of the dead", ACTION_HIGH + 6)
}
)
);
triggers.push_back(
new TriggerNode(
"icy touch",
{
NextAction("icy touch", ACTION_HIGH + 2)
}
)
);
triggers.push_back(
new TriggerNode(
"plague strike",
{
NextAction("plague strike", ACTION_HIGH + 2)
}
)
);
}
void FrostDKAoeStrategy::InitTriggers(std::vector<TriggerNode*>& triggers)
{
triggers.push_back(
new TriggerNode(
"medium aoe",
{
NextAction("howling blast", ACTION_HIGH + 4)
}
)
);
}

View File

@@ -0,0 +1,33 @@
/*
* Copyright (C) 2016+ AzerothCore <www.azerothcore.org>, released under GNU AGPL v3 license, you may redistribute it
* and/or modify it under version 3 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"; }
std::vector<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

@@ -0,0 +1,61 @@
/*
* Copyright (C) 2016+ AzerothCore <www.azerothcore.org>, released under GNU AGPL v3 license, you may redistribute it
* and/or modify it under version 3 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*/ {},
/*A*/ {},
/*C*/ {});
}
static ActionNode* horn_of_winter([[maybe_unused]] PlayerbotAI* botAI)
{
return new ActionNode("horn of winter",
/*P*/ {},
/*A*/ {},
/*C*/ {});
}
};
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("raise dead", ACTION_NORMAL + 1) }));
triggers.push_back(
new TriggerNode("horn of winter", { NextAction("horn of winter", 21.0f) }));
triggers.push_back(
new TriggerNode("bone shield", { NextAction("bone shield", 21.0f) }));
triggers.push_back(
new TriggerNode("has pet", { NextAction("toggle pet spell", 60.0f) }));
triggers.push_back(
new TriggerNode("new pet", { NextAction("set pet stance", 60.0f) }));
}
void DKBuffDpsStrategy::InitTriggers(std::vector<TriggerNode*>& triggers)
{
}

View File

@@ -0,0 +1,32 @@
/*
* Copyright (C) 2016+ AzerothCore <www.azerothcore.org>, released under GNU AGPL v3 license, you may redistribute it
* and/or modify it under version 3 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

@@ -0,0 +1,193 @@
#/*
* Copyright (C) 2016+ AzerothCore <www.azerothcore.org>, released under GNU AGPL v3 license, you may redistribute it and/or modify it under version 3 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*/ {},
/*A*/ {},
/*C*/ {});
}
static ActionNode* death_grip([[maybe_unused]] PlayerbotAI* botAI)
{
return new ActionNode("death grip",
/*P*/ {},
/*A*/ { NextAction("icy touch") },
/*C*/ {});
}
static ActionNode* plague_strike([[maybe_unused]] PlayerbotAI* botAI)
{
return new ActionNode("plague strike",
/*P*/ {},
/*A*/ {},
/*C*/ {});
}
static ActionNode* icy_touch([[maybe_unused]] PlayerbotAI* botAI)
{
return new ActionNode("icy touch",
/*P*/ {},
/*A*/ {},
/*C*/ {});
}
static ActionNode* heart_strike([[maybe_unused]] PlayerbotAI* botAI)
{
return new ActionNode("heart strike",
/*P*/ {},
/*A*/ {},
/*C*/ {});
}
static ActionNode* pestilence([[maybe_unused]] PlayerbotAI* botAI)
{
return new ActionNode("pestilence",
/*P*/ {},
/*A*/ {},
/*C*/ {});
}
static ActionNode* horn_of_winter([[maybe_unused]] PlayerbotAI* botAI)
{
return new ActionNode("horn of winter",
/*P*/ {},
/*A*/ {},
/*C*/ {});
}
static ActionNode* bone_shield([[maybe_unused]] PlayerbotAI* botAI)
{
return new ActionNode("bone shield",
/*P*/ {},
/*A*/ {},
/*C*/ {});
}
static ActionNode* killing_machine([[maybe_unused]] PlayerbotAI* botAI)
{
return new ActionNode("killing machine",
/*P*/ {},
/*A*/ { NextAction("improved icy talons") },
/*C*/ {});
}
static ActionNode* corpse_explosion([[maybe_unused]] PlayerbotAI* botAI)
{
return new ActionNode("corpse explosion",
/*P*/ {},
/*A*/ {},
/*C*/ {});
}
static ActionNode* death_and_decay([[maybe_unused]] PlayerbotAI* botAI)
{
return new ActionNode("death and decay",
/*P*/ {},
/*A*/ {},
/*C*/ {});
}
static ActionNode* anti_magic_zone([[maybe_unused]] PlayerbotAI* botAI)
{
return new ActionNode("anti magic zone",
/*P*/ {},
/*A*/ { NextAction("anti magic shell") },
/*C*/ {});
}
static ActionNode* icebound_fortitude([[maybe_unused]] PlayerbotAI* botAI)
{
return new ActionNode("icebound fortitude",
/*P*/ {},
/*A*/ {},
/*C*/ {});
}
};
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("no pet", { NextAction("raise dead", ACTION_NORMAL + 5) }));
triggers.push_back(
new TriggerNode("has pet", { NextAction("toggle pet spell", 60.0f) }));
triggers.push_back(
new TriggerNode("new pet", { NextAction("set pet stance", 60.0f) }));
triggers.push_back(
new TriggerNode("mind freeze", { NextAction("mind freeze", ACTION_HIGH + 1) }));
triggers.push_back(
new TriggerNode("mind freeze on enemy healer",
{ NextAction("mind freeze on enemy healer", ACTION_HIGH + 1) }));
triggers.push_back(new TriggerNode(
"horn of winter", { NextAction("horn of winter", ACTION_NORMAL + 1) }));
triggers.push_back(new TriggerNode("critical health",
{ NextAction("death pact", ACTION_HIGH + 5) }));
triggers.push_back(
new TriggerNode("low health", { NextAction("icebound fortitude", ACTION_HIGH + 5),
NextAction("rune tap", ACTION_HIGH + 4) }));
triggers.push_back(
new TriggerNode("medium aoe", { NextAction("death and decay", ACTION_HIGH + 9),
NextAction("pestilence", ACTION_NORMAL + 4),
NextAction("blood boil", ACTION_NORMAL + 3) }));
triggers.push_back(
new TriggerNode("pestilence glyph", { NextAction("pestilence", ACTION_HIGH + 9) }));
}

View File

@@ -0,0 +1,22 @@
/*
* Copyright (C) 2016+ AzerothCore <www.azerothcore.org>, released under GNU AGPL v3 license, you may redistribute it
* and/or modify it under version 3 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

@@ -0,0 +1,192 @@
/*
* Copyright (C) 2016+ AzerothCore <www.azerothcore.org>, released under GNU AGPL v3 license, you may redistribute it and/or modify it under version 3 of the License, or (at your option), any later version.
*/
#include "UnholyDKStrategy.h"
#include "Playerbots.h"
class UnholyDKStrategyActionNodeFactory : public NamedObjectFactory<ActionNode>
{
public:
UnholyDKStrategyActionNodeFactory()
{
creators["death strike"] = &death_strike;
creators["scourge strike"] = &scourge_strike;
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("blood presence") },
/*A*/ {},
/*C*/ {}
);
}
static ActionNode* ghoul_frenzy([[maybe_unused]] PlayerbotAI* botAI)
{
return new ActionNode(
"ghoul frenzy",
/*P*/ { NextAction("blood presence") },
/*A*/ {},
/*C*/ {}
);
}
static ActionNode* corpse_explosion([[maybe_unused]] PlayerbotAI* botAI)
{
return new ActionNode(
"corpse explosion",
/*P*/ { NextAction("blood presence") },
/*A*/ {},
/*C*/ {}
);
}
static ActionNode* scourge_strike([[maybe_unused]] PlayerbotAI* botAI)
{
return new ActionNode(
"scourge strike",
/*P*/ { NextAction("blood presence") },
/*A*/ {},
/*C*/ {}
);
}
static ActionNode* icy_touch([[maybe_unused]] PlayerbotAI* botAI)
{
return new ActionNode(
"icy touch",
/*P*/ { NextAction("blood presence") },
/*A*/ {},
/*C*/ {}
);
}
};
UnholyDKStrategy::UnholyDKStrategy(PlayerbotAI* botAI) : GenericDKStrategy(botAI)
{
actionNodeFactories.Add(new UnholyDKStrategyActionNodeFactory());
}
std::vector<NextAction> UnholyDKStrategy::getDefaultActions()
{
return {
NextAction("death and decay", ACTION_HIGH + 5),
NextAction("summon gargoyle", ACTION_DEFAULT + 0.4f),
NextAction("horn of winter", ACTION_DEFAULT + 0.2f),
NextAction("death coil", ACTION_DEFAULT + 0.1f),
NextAction("melee", ACTION_DEFAULT)
};
}
void UnholyDKStrategy::InitTriggers(std::vector<TriggerNode*>& triggers)
{
GenericDKStrategy::InitTriggers(triggers);
triggers.push_back(
new TriggerNode(
"death and decay cooldown",
{
NextAction("ghoul frenzy", ACTION_DEFAULT + 0.9f),
NextAction("scourge strike", ACTION_DEFAULT + 0.8f),
NextAction("icy touch", ACTION_DEFAULT + 0.7f),
NextAction("blood strike", ACTION_DEFAULT + 0.6f),
NextAction("plague strike", ACTION_DEFAULT + 0.5f),
}
)
);
triggers.push_back(
new TriggerNode(
"dd cd and no desolation",
{
NextAction("blood strike", ACTION_DEFAULT + 0.75f)
}
)
);
triggers.push_back(
new TriggerNode(
"high frost rune",
{
NextAction("icy touch", ACTION_NORMAL + 3)
}
)
);
triggers.push_back(
new TriggerNode(
"high blood rune",
{
NextAction("blood strike", ACTION_NORMAL + 2)
}
)
);
triggers.push_back(
new TriggerNode(
"high unholy rune",
{
NextAction("plague strike", ACTION_NORMAL + 1)
}
)
);
triggers.push_back(
new TriggerNode("dd cd and plague strike 3s",
{
NextAction("plague strike", ACTION_HIGH + 1)
}
)
);
triggers.push_back(
new TriggerNode("dd cd and icy touch 3s",
{
NextAction("icy touch", ACTION_HIGH + 2)
}
)
);
triggers.push_back(
new TriggerNode("no rune",
{
NextAction("empower rune weapon", ACTION_HIGH + 1)
}
)
);
triggers.push_back(
new TriggerNode(
"army of the dead",
{
NextAction("army of the dead", ACTION_HIGH + 6)
}
)
);
triggers.push_back(
new TriggerNode("bone shield",
{
NextAction("bone shield", ACTION_HIGH + 3)
}
)
);
}
void UnholyDKAoeStrategy::InitTriggers(std::vector<TriggerNode*>& triggers)
{
triggers.push_back(
new TriggerNode(
"loot available",
{
NextAction("corpse explosion", ACTION_NORMAL + 1)
}
)
);
triggers.push_back(
new TriggerNode(
"medium aoe",
{
NextAction("death and decay", ACTION_NORMAL + 3),
NextAction("corpse explosion", ACTION_NORMAL + 3)
}
)
);
}

View File

@@ -0,0 +1,33 @@
/*
* Copyright (C) 2016+ AzerothCore <www.azerothcore.org>, released under GNU AGPL v3 license, you may redistribute it
* and/or modify it under version 3 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"; }
std::vector<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

View File

@@ -0,0 +1,78 @@
/*
* Copyright (C) 2016+ AzerothCore <www.azerothcore.org>, released under GNU AGPL v3 license, you may redistribute it
* and/or modify it under version 3 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;
}
// Based on runeSlotTypes
bool HighBloodRuneTrigger::IsActive()
{
return bot->GetRuneCooldown(0) <= 2000 && bot->GetRuneCooldown(1) <= 2000;
}
bool HighFrostRuneTrigger::IsActive()
{
return bot->GetRuneCooldown(4) <= 2000 && bot->GetRuneCooldown(5) <= 2000;
}
bool HighUnholyRuneTrigger::IsActive()
{
return bot->GetRuneCooldown(2) <= 2000 && bot->GetRuneCooldown(3) <= 2000;
}
bool NoRuneTrigger::IsActive()
{
for (uint32 i = 0; i < MAX_RUNES; ++i)
{
if (!bot->GetRuneCooldown(i))
return false;
}
return true;
}
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) >= 2000;
}

View File

@@ -0,0 +1,201 @@
/*
* Copyright (C) 2016+ AzerothCore <www.azerothcore.org>, released under GNU AGPL v3 license, you may redistribute it
* and/or modify it under version 3 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 PlagueStrike3sDebuffTrigger : public DebuffTrigger
{
public:
PlagueStrike3sDebuffTrigger(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 IcyTouch3sDebuffTrigger : public DebuffTrigger
{
public:
IcyTouch3sDebuffTrigger(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 NoRuneTrigger : public Trigger
{
public:
NoRuneTrigger(PlayerbotAI* botAI) : Trigger(botAI, "no 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