18#ifndef TRINITY_PLAYERAI_H
19#define TRINITY_PLAYERAI_H
36 static bool IsPlayerHealer(
Player const* who);
37 bool IsHealer(
Player const* who =
nullptr)
const {
return (!who || who == me) ? _isSelfHealer : IsPlayerHealer(who); }
38 static bool IsPlayerRangedAttacker(
Player const* who);
39 bool IsRangedAttacker(
Player const* who =
nullptr)
const {
return (!who || who == me) ? _isSelfRangedAttacker : IsPlayerRangedAttacker(who); }
46 explicit operator bool() {
return !!first; }
63 TargetedSpell VerifySpellCast(
uint32 spellId,
Unit* target);
66 TargetedSpell VerifySpellCast(
uint32 spellId, SpellTarget target);
72 spells.push_back({ spell,weight });
77 TargetedSpell SelectSpellCast(PossibleSpellVector& spells);
79 void DoCastAtTarget(TargetedSpell spell);
81 virtual Unit* SelectAttackTarget()
const;
82 void DoRangedAttackIfReady();
83 void DoAutoAttackIfReady();
86 void CancelAllShapeshifts();
103 Unit* SelectAttackTarget()
const override;
106 TargetedSpell SelectAppropriateCastForSpec();
void VerifyAndPushSpellCast(PossibleSpellVector &spells, uint32 spellId, T target, uint32 weight)
std::pair< TargetedSpell, uint32 > PossibleSpell
void SetIsRangedAttacker(bool state)
bool _isSelfRangedAttacker
ChrSpecialization const _selfSpec
bool IsRangedAttacker(Player const *who=nullptr) const
std::vector< PossibleSpell > PossibleSpellVector
bool IsHealer(Player const *who=nullptr) const
SimpleCharmedPlayerAI(Player *player)
virtual bool CanAIAttack(Unit const *) const
virtual void OnCharmed(bool isNew)
virtual void UpdateAI(uint32 diff)=0
TargetedSpell(Spell *first, Unit *second)