mirror of
https://github.com/mod-playerbots/mod-playerbots.git
synced 2026-01-13 00:58:33 +00:00
Hello everybody, I saw that the hunter class had one strategy for all 3 specs, and decided to create specialized strategies for each one. Here is a list of the changes: conf\playerbots.conf.dist: Redid the talent trees and glyphs slightly, for more consistent dps src\AiFactory.cpp: Changed the default strategies assigned for each spec. src\strategy\hunter\BeastMasteryHunterStrategy.cpp and src\strategy\hunter\BeastMasteryHunterStrategy.h: Strategy for BM hunters. Includes all of the original logic from DpsHunterStrategy, with the addition of kill command, bestial wrath, and intimidation. src\strategy\hunter\DpsHunterStrategy.cpp and src\strategy\hunter\DpsHunterStrategy.h: Old Dps strategy used for all 3 specs - removed. src\strategy\hunter\GenericHunterStrategy.cpp and src\strategy\hunter\GenericHunterStrategy.h: Tidied up code, added Dragonhawk passthrough to hawk, moved rapid fire to inittriggers for generichunterstrategy and increased its priority (it is still a boost trigger, so it will function the same). src\strategy\hunter\HunterActions.cpp: Added isuseful check for aspect of the hawk, to ensure it is never cast if the bot knows aspect of the dragonhawk. Added isuseful check for arcane shot to never use it after explosive shot is learned (so the hunter can use it as it levels survival, but drops it after that). Also added a check for arcane shot, so it won't use it above 435 armor pen rating (steady shot is superior after this arp). Added isuseful check for immolation trap so it won't use it after explosive shot is learned. src\strategy\hunter\HunterActions.h: General cleanup/alignment of actions based on type. Added TTL checks to all DoTs and debuffs - hunters weren't using hunter's mark, serpent sting, black arrow, explosive shot on enemies that it thought would die too soon. Black Arrow - added a strategy check here as well so the bot won't use it at all if trap weave is enabled. There was already a check in the trigger, but it was still getting cast, so I added this check. Explosive Shot Rank 4, 3, 2, 1 actions- Added these so the hunter can downrank explosive shot dynamically based on the level when lock and load procs. So if the hunter is level 70, and a lock and load proc happens, it will fire rank 2 - rank 1 - rank 2, similar to how the level 80 version will fire 4-3-4. src\strategy\hunter\HunterAiObjectContext.cpp: Added strategy support for bm, mm, and surv (and their aoes) Added trigger support for kill command, explosive shot, lock and load, silencing shot (as an spellcasting interrupt), and intimidation Added action support for the 4 ranks of explosive shot and intimidation. src\strategy\hunter\HunterTriggers.cpp: Kill command was completely non-functional because there was no buff trigger associated with it. Adding this will correct that, and the hunter will use kill command. src\strategy\hunter\HunterTriggers.h: Added Kill command, silencing shot, intimidation, lock and load, and explosive shot triggers. src\strategy\hunter\MarksmanshipHunterStrategy.cpp and src\strategy\hunter\MarksmanshipHunterStrategy.h: Strategy for MM hunters. Includes all of the original logic from DpsHunterStrategy, with the addition of kill command, silencing shot, chimera shot, and aimed shot. src\strategy\hunter\SurvivalHunterStrategy.cpp and src\strategy\hunter\SurvivalHunterStrategy.h: Strategy for Survival hunters. Includes all of the original logic from DpsHunterStrategy, with the addition of kill command, explosive shot, black arrow, aimed shot, lock and load triggers + downranking explosive shot.
248 lines
6.2 KiB
C++
248 lines
6.2 KiB
C++
/*
|
|
* 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_HUNTERTRIGGERS_H
|
|
#define _PLAYERBOT_HUNTERTRIGGERS_H
|
|
|
|
#include "CureTriggers.h"
|
|
#include "GenericTriggers.h"
|
|
#include "Trigger.h"
|
|
#include "PlayerbotAI.h"
|
|
|
|
class PlayerbotAI;
|
|
|
|
// Buff and Out of Combat Triggers
|
|
|
|
class HunterAspectOfTheMonkeyTrigger : public BuffTrigger
|
|
{
|
|
public:
|
|
HunterAspectOfTheMonkeyTrigger(PlayerbotAI* botAI) : BuffTrigger(botAI, "aspect of the monkey") {}
|
|
};
|
|
|
|
class HunterAspectOfTheHawkTrigger : public BuffTrigger
|
|
{
|
|
public:
|
|
HunterAspectOfTheHawkTrigger(PlayerbotAI* botAI) : BuffTrigger(botAI, "aspect of the hawk") {}
|
|
bool IsActive() override;
|
|
};
|
|
|
|
class HunterAspectOfTheWildTrigger : public BuffTrigger
|
|
{
|
|
public:
|
|
HunterAspectOfTheWildTrigger(PlayerbotAI* botAI) : BuffTrigger(botAI, "aspect of the wild") {}
|
|
};
|
|
|
|
class HunterAspectOfTheViperTrigger : public BuffTrigger
|
|
{
|
|
public:
|
|
HunterAspectOfTheViperTrigger(PlayerbotAI* botAI) : BuffTrigger(botAI, "aspect of the viper") {}
|
|
bool IsActive() override;
|
|
};
|
|
|
|
class HunterAspectOfThePackTrigger : public BuffTrigger
|
|
{
|
|
public:
|
|
HunterAspectOfThePackTrigger(PlayerbotAI* botAI) : BuffTrigger(botAI, "aspect of the pack") {}
|
|
bool IsActive() override;
|
|
};
|
|
|
|
class TrueshotAuraTrigger : public BuffTrigger
|
|
{
|
|
public:
|
|
TrueshotAuraTrigger(PlayerbotAI* botAI) : BuffTrigger(botAI, "trueshot aura") {}
|
|
};
|
|
|
|
class NoTrackTrigger : public BuffTrigger
|
|
{
|
|
public:
|
|
NoTrackTrigger(PlayerbotAI* botAI) : BuffTrigger(botAI, "no track") {}
|
|
bool IsActive() override;
|
|
};
|
|
|
|
class HunterLowAmmoTrigger : public AmmoCountTrigger
|
|
{
|
|
public:
|
|
HunterLowAmmoTrigger(PlayerbotAI* botAI) : AmmoCountTrigger(botAI, "ammo", 1, 30) {}
|
|
|
|
bool IsActive() override;
|
|
};
|
|
|
|
class HunterNoAmmoTrigger : public AmmoCountTrigger
|
|
{
|
|
public:
|
|
HunterNoAmmoTrigger(PlayerbotAI* botAI) : AmmoCountTrigger(botAI, "ammo", 1, 10) {}
|
|
};
|
|
|
|
class HunterHasAmmoTrigger : public AmmoCountTrigger
|
|
{
|
|
public:
|
|
HunterHasAmmoTrigger(PlayerbotAI* botAI) : AmmoCountTrigger(botAI, "ammo", 1, 10) {}
|
|
|
|
bool IsActive() override;
|
|
};
|
|
|
|
// Cooldown Triggers
|
|
|
|
class RapidFireTrigger : public BoostTrigger
|
|
{
|
|
public:
|
|
RapidFireTrigger(PlayerbotAI* botAI) : BoostTrigger(botAI, "rapid fire") {}
|
|
};
|
|
|
|
class BestialWrathTrigger : public BuffTrigger
|
|
{
|
|
public:
|
|
BestialWrathTrigger(PlayerbotAI* botAI) : BuffTrigger(botAI, "bestial wrath") {}
|
|
};
|
|
|
|
class IntimidationTrigger : public BuffTrigger
|
|
{
|
|
public:
|
|
IntimidationTrigger(PlayerbotAI* botAI) : BuffTrigger(botAI, "intimidation") {}
|
|
};
|
|
|
|
class KillCommandTrigger : public BuffTrigger
|
|
{
|
|
public:
|
|
KillCommandTrigger(PlayerbotAI* botAI) : BuffTrigger(botAI, "kill command") {}
|
|
bool IsActive() override;
|
|
};
|
|
|
|
class LockAndLoadTrigger : public BuffTrigger
|
|
{
|
|
public:
|
|
LockAndLoadTrigger(PlayerbotAI* botAI) : BuffTrigger(botAI, "lock and load") {}
|
|
|
|
bool IsActive() override
|
|
{
|
|
return botAI->HasAura("lock and load", botAI->GetBot());
|
|
}
|
|
};
|
|
|
|
// CC Triggers
|
|
|
|
class FreezingTrapTrigger : public HasCcTargetTrigger
|
|
{
|
|
public:
|
|
FreezingTrapTrigger(PlayerbotAI* botAI) : HasCcTargetTrigger(botAI, "freezing trap") {}
|
|
};
|
|
|
|
class ConsussiveShotSnareTrigger : public SnareTargetTrigger
|
|
{
|
|
public:
|
|
ConsussiveShotSnareTrigger(PlayerbotAI* botAI) : SnareTargetTrigger(botAI, "concussive shot") {}
|
|
};
|
|
|
|
class ScareBeastTrigger : public HasCcTargetTrigger
|
|
{
|
|
public:
|
|
ScareBeastTrigger(PlayerbotAI* botAI) : HasCcTargetTrigger(botAI, "scare beast") {}
|
|
};
|
|
|
|
class SilencingShotTrigger : public InterruptSpellTrigger
|
|
{
|
|
public:
|
|
SilencingShotTrigger(PlayerbotAI* botAI) : InterruptSpellTrigger(botAI, "silencing shot") {}
|
|
};
|
|
|
|
// DoT/Debuff Triggers
|
|
|
|
class HuntersMarkTrigger : public DebuffTrigger
|
|
{
|
|
public:
|
|
HuntersMarkTrigger(PlayerbotAI* botAI) : DebuffTrigger(botAI, "hunter's mark", 1, true, 0.5f) {}
|
|
bool IsActive() override { return BuffTrigger::IsActive(); }
|
|
};
|
|
|
|
class ExplosiveShotTrigger : public DebuffTrigger
|
|
{
|
|
public:
|
|
ExplosiveShotTrigger(PlayerbotAI* botAI) : DebuffTrigger(botAI, "explosive shot", 1, true) {}
|
|
bool IsActive() override { return BuffTrigger::IsActive(); }
|
|
};
|
|
|
|
class BlackArrowTrigger : public DebuffTrigger
|
|
{
|
|
public:
|
|
BlackArrowTrigger(PlayerbotAI* botAI) : DebuffTrigger(botAI, "black arrow", 1, true) {}
|
|
bool IsActive() override;
|
|
};
|
|
|
|
class HunterNoStingsActiveTrigger : public DebuffTrigger
|
|
{
|
|
public:
|
|
HunterNoStingsActiveTrigger(PlayerbotAI* botAI) : DebuffTrigger(botAI, "no stings") {}
|
|
bool IsActive() override;
|
|
};
|
|
|
|
class SerpentStingOnAttackerTrigger : public DebuffOnAttackerTrigger
|
|
{
|
|
public:
|
|
SerpentStingOnAttackerTrigger(PlayerbotAI* botAI) : DebuffOnAttackerTrigger(botAI, "serpent sting", true) {}
|
|
bool IsActive() override;
|
|
};
|
|
|
|
// Damage/Combat Triggers
|
|
|
|
class AutoShotTrigger : public Trigger
|
|
{
|
|
public:
|
|
AutoShotTrigger(PlayerbotAI* botAI) : Trigger(botAI, "auto shot") {}
|
|
};
|
|
|
|
class SwitchToRangedTrigger : public Trigger
|
|
{
|
|
public:
|
|
SwitchToRangedTrigger(PlayerbotAI* botAI) : Trigger(botAI, "switch to ranged") {}
|
|
|
|
bool IsActive() override;
|
|
};
|
|
|
|
class SwitchToMeleeTrigger : public Trigger
|
|
{
|
|
public:
|
|
SwitchToMeleeTrigger(PlayerbotAI* botAI) : Trigger(botAI, "switch to melee") {}
|
|
|
|
bool IsActive() override;
|
|
};
|
|
|
|
class MisdirectionOnMainTankTrigger : public BuffOnMainTankTrigger
|
|
{
|
|
public:
|
|
MisdirectionOnMainTankTrigger(PlayerbotAI* ai) : BuffOnMainTankTrigger(ai, "misdirection", true) {}
|
|
};
|
|
|
|
class TargetRemoveEnrageTrigger : public TargetAuraDispelTrigger
|
|
{
|
|
public:
|
|
TargetRemoveEnrageTrigger(PlayerbotAI* ai) : TargetAuraDispelTrigger(ai, "tranquilizing shot", DISPEL_ENRAGE) {}
|
|
};
|
|
|
|
class TargetRemoveMagicTrigger : public TargetAuraDispelTrigger
|
|
{
|
|
public:
|
|
TargetRemoveMagicTrigger(PlayerbotAI* ai) : TargetAuraDispelTrigger(ai, "tranquilizing shot", DISPEL_MAGIC) {}
|
|
};
|
|
|
|
class ImmolationTrapNoCdTrigger : public SpellNoCooldownTrigger
|
|
{
|
|
public:
|
|
ImmolationTrapNoCdTrigger(PlayerbotAI* ai) : SpellNoCooldownTrigger(ai, "immolation trap") {}
|
|
};
|
|
|
|
BEGIN_TRIGGER(HuntersPetDeadTrigger, Trigger)
|
|
END_TRIGGER()
|
|
|
|
BEGIN_TRIGGER(HuntersPetLowHealthTrigger, Trigger)
|
|
END_TRIGGER()
|
|
|
|
BEGIN_TRIGGER(HuntersPetMediumHealthTrigger, Trigger)
|
|
END_TRIGGER()
|
|
|
|
BEGIN_TRIGGER(HunterPetNotHappy, Trigger)
|
|
END_TRIGGER()
|
|
|
|
#endif
|