AzerothCore 3.3.5a
OpenSource WoW Emulator
Loading...
Searching...
No Matches
npc_pet_mage_mirror_image Struct Reference
Inheritance diagram for npc_pet_mage_mirror_image:
CasterAI CombatAI CreatureAI UnitAI

Public Member Functions

 npc_pet_mage_mirror_image (Creature *creature)
 
void InitializeAI () override
 
void EnterEvadeMode (EvadeReason) override
 
void MySelectNextTarget ()
 
void Reset () override
 
void UpdateAI (uint32 diff) override
 Use to start attacking a target. Called just before JustEngagedWith() More...
 
- Public Member Functions inherited from CasterAI
 CasterAI (Creature *c)
 
void InitializeAI () override
 
void AttackStart (Unit *victim) override
 
void UpdateAI (uint32 diff) override
 Use to start attacking a target. Called just before JustEngagedWith() More...
 
void JustEngagedWith (Unit *) override
 Called for reaction when initially engaged. More...
 
- Public Member Functions inherited from CombatAI
 CombatAI (Creature *c)
 
void InitializeAI () override
 
void Reset () override
 
void JustEngagedWith (Unit *who) override
 Called for reaction when initially engaged. More...
 
void JustDied (Unit *killer) override
 
void UpdateAI (uint32 diff) override
 Use to start attacking a target. Called just before JustEngagedWith() More...
 
- Public Member Functions inherited from CreatureAI
void Talk (uint8 id, WorldObject const *whisperTarget=nullptr, Milliseconds delay=0s)
 Causes the creature to talk/say the text assigned to their entry in the creature_text database table. More...
 
void Talk (uint8 id, Milliseconds delay)
 
 CreatureAI (Creature *creature)
 
 ~CreatureAI () override
 
void MoveCircleChecks ()
 
void MoveBackwardsChecks ()
 
void MoveInLineOfSight_Safe (Unit *who)
 == Reactions At ================================= More...
 
void TriggerAlert (Unit const *who) const
 
virtual bool CanRespawn ()
 
virtual void EnterEvadeMode (EvadeReason why=EVADE_REASON_OTHER)
 
virtual void JustEngagedWith (Unit *)
 Called for reaction when initially engaged. More...
 
virtual void JustDied (Unit *)
 
virtual void KilledUnit (Unit *)
 
virtual void JustSummoned (Creature *)
 
virtual void IsSummonedBy (WorldObject *)
 
virtual void SummonedCreatureDespawn (Creature *)
 
virtual void SummonedCreatureDies (Creature *, Unit *)
 
virtual void SummonedCreatureDespawnAll ()
 
virtual void SummonedCreatureEvade (Creature *)
 
virtual void SpellHit (Unit *, SpellInfo const *)
 
virtual void SpellHitTarget (Unit *, SpellInfo const *)
 
virtual void AttackedBy (Unit *)
 
virtual bool IsEscorted ()
 
virtual void JustRespawned ()
 
virtual void MovementInform (uint32, uint32)
 
virtual void PathEndReached (uint32)
 
void OnCharmed (bool apply) override
 Called when unit is charmed. More...
 
virtual void JustReachedHome ()
 
void DoZoneInCombat (Creature *creature=nullptr, float maxRangeToNearestTarget=250.0f)
 
virtual void ReceiveEmote (Player *, uint32)
 
virtual void OwnerAttackedBy (Unit *)
 
virtual void OwnerAttacked (Unit *)
 
virtual void CorpseRemoved (uint32 &)
 == Triggered Actions Requested ================== More...
 
virtual void PassengerBoarded (Unit *, int8, bool)
 == Fields ======================================= More...
 
virtual bool BeforeSpellClick (Unit *)
 
virtual void OnSpellClick (Unit *, bool &)
 
virtual bool CanSeeAlways (WorldObject const *)
 
virtual bool CanBeSeen (Player const *)
 
virtual bool CanAlwaysBeDetectable (WorldObject const *)
 
virtual void PetStopAttack ()
 
virtual bool CheckInRoom ()
 
CreatureBoundary const * GetBoundary () const
 
void SetBoundary (CreatureBoundary const *boundary, bool negativeBoundaries=false)
 
bool IsInBoundary (Position const *who=nullptr) const
 
virtual void CalculateThreat (Unit *, float &, SpellInfo const *)
 
virtual bool OnTeleportUnreacheablePlayer (Player *)
 
virtual void OnAuraRemove (AuraApplication *, AuraRemoveMode)
 
- Public Member Functions inherited from UnitAI
 UnitAI (Unit *unit)
 
virtual ~UnitAI ()
 
virtual bool CanAIAttack (Unit const *) const
 
virtual void AttackStart (Unit *)
 
virtual void UpdateAI (uint32)=0
 Use to start attacking a target. Called just before JustEngagedWith() More...
 
virtual void InitializeAI ()
 
virtual void Reset ()
 
virtual void OnCharmed (bool apply)=0
 Called when unit is charmed. More...
 
virtual void DoAction (int32)
 
virtual uint32 GetData (uint32) const
 
virtual void SetData (uint32, uint32)
 
virtual void SetGUID (ObjectGuid, int32=0)
 
virtual ObjectGuid GetGUID (int32=0) const
 
UnitSelectTarget (SelectTargetMethod targetType, uint32 position=0, float dist=0.0f, bool playerOnly=false, bool withTank=true, int32 aura=0)
 
template<class PREDICATE >
UnitSelectTarget (SelectTargetMethod targetType, uint32 position, PREDICATE const &predicate)
 
void SelectTargetList (std::list< Unit * > &targetList, uint32 num, SelectTargetMethod targetType, uint32 position=0, float dist=0.0f, bool playerOnly=false, bool withTank=true, int32 aura=0)
 Select the best (up to) <num> targets (in <targetType> order) from the threat list that fulfill the following: More...
 
template<class PREDICATE >
void SelectTargetList (std::list< Unit * > &targetList, uint32 num, SelectTargetMethod targetType, uint32 position, PREDICATE const &predicate)
 
virtual void JustEnteredCombat (Unit *)
 Called when the unit enters combat. More...
 
virtual void JustExitedCombat ()
 Called when the unit leaves combat. More...
 
virtual void DamageDealt (Unit *, uint32 &, DamageEffectType)
 Called at any Damage to any victim (before damage apply) More...
 
virtual void DamageTaken (Unit *, uint32 &, DamageEffectType, SpellSchoolMask)
 Called at any Damage from any attacker (before damage apply) More...
 
virtual void HealReceived (Unit *, uint32 &)
 Called when the creature receives heal. More...
 
virtual void OnPowerUpdate (Powers, int32, int32, uint32)
 Called when the creature power updates. More...
 
virtual void HealDone (Unit *, uint32 &)
 Called when the unit heals. More...
 
virtual void OnCalculateMeleeDamageReceived (uint32 &, Unit *)
 Called during damage calculations. More...
 
virtual void OnCalculateSpellDamageReceived (int32 &, Unit *)
 
virtual void OnCalculatePeriodicTickReceived (uint32 &, Unit *)
 Called during calculation when receiving periodic healing or damage (DoT or HoT) More...
 
void AttackStartCaster (Unit *victim, float dist)
 
SpellCastResult DoAddAuraToAllHostilePlayers (uint32 spellid)
 
SpellCastResult DoCast (uint32 spellId)
 
SpellCastResult DoCast (Unit *victim, uint32 spellId, bool triggered=false)
 
SpellCastResult DoCastSelf (uint32 spellId, bool triggered=false)
 
SpellCastResult DoCastToAllHostilePlayers (uint32 spellid, bool triggered=false)
 To specify the caster as target if the spell is self-cast. More...
 
SpellCastResult DoCastVictim (uint32 spellId, bool triggered=false)
 
SpellCastResult DoCastAOE (uint32 spellId, bool triggered=false)
 
SpellCastResult DoCastRandomTarget (uint32 spellId, uint32 threatTablePosition=0, float dist=0.0f, bool playerOnly=true, bool triggered=false, bool withTank=true)
 Cast the spell on a random unit from the threat list. More...
 
SpellCastResult DoCastMaxThreat (uint32 spellId, uint32 threatTablePosition=0, float dist=0.0f, bool playerOnly=true, bool triggered=false)
 Cast spell on the top threat target, which may not be the current victim. More...
 
float DoGetSpellMaxRange (uint32 spellId, bool positive=false)
 
void DoMeleeAttackIfReady ()
 
bool DoSpellAttackIfReady (uint32 spell)
 
void DoSpellAttackToRandomTargetIfReady (uint32 spell, uint32 threatTablePosition=0, float dist=0.f, bool playerOnly=true)
 
virtual void SummonMovementInform (Creature *, uint32, uint32)
 Called when a summon reaches a waypoint or point movement finished. More...
 
virtual void sGossipHello (Player *)
 
virtual void sGossipSelect (Player *, uint32, uint32)
 
virtual void sGossipSelectCode (Player *, uint32, uint32, char const *)
 
virtual void sQuestAccept (Player *, Quest const *)
 
virtual void sQuestSelect (Player *, Quest const *)
 
virtual void sQuestComplete (Player *, Quest const *)
 
virtual void sQuestReward (Player *, Quest const *, uint32)
 
virtual void sOnGameEvent (bool, uint16)
 
virtual std::string GetDebugInfo () const
 

Public Attributes

uint32 selectionTimer
 
ObjectGuid _ebonGargoyleGUID
 
uint32 checktarget
 
uint32 dist = urand(1, 5)
 

Additional Inherited Members

- Public Types inherited from CreatureAI
enum  EvadeReason {
  EVADE_REASON_NO_HOSTILES ,
  EVADE_REASON_BOUNDARY ,
  EVADE_REASON_SEQUENCE_BREAK ,
  EVADE_REASON_NO_PATH ,
  EVADE_REASON_OTHER
}
 
- Static Public Member Functions inherited from CombatAI
static int32 Permissible (Creature const *)
 
- Static Public Member Functions inherited from CreatureAI
static bool IsInBounds (CreatureBoundary const &boundary, Position const *who)
 
- Static Public Member Functions inherited from UnitAI
static void FillAISpellInfo ()
 
- Static Public Attributes inherited from UnitAI
static AISpellInfoTypeAISpellInfo
 
- Protected Member Functions inherited from CreatureAI
bool UpdateVictim ()
 
bool UpdateVictimWithGaze ()
 
void SetGazeOn (Unit *target)
 
CreatureDoSummon (uint32 entry, Position const &pos, uint32 despawnTime=30000, TempSummonType summonType=TEMPSUMMON_CORPSE_TIMED_DESPAWN)
 
CreatureDoSummon (uint32 entry, WorldObject *obj, float radius=5.0f, uint32 despawnTime=30000, TempSummonType summonType=TEMPSUMMON_CORPSE_TIMED_DESPAWN)
 
CreatureDoSummonFlyer (uint32 entry, WorldObject *obj, float flightZ, float radius=5.0f, uint32 despawnTime=30000, TempSummonType summonType=TEMPSUMMON_CORPSE_TIMED_DESPAWN)
 
virtual void MoveInLineOfSight (Unit *)
 
bool _EnterEvadeMode (EvadeReason why=EVADE_REASON_OTHER)
 
- Protected Attributes inherited from CombatAI
EventMap events
 
SpellVct spells
 
- Protected Attributes inherited from CreatureAI
Creature *const me
 
EventMap events
 
TaskScheduler scheduler
 
CreatureBoundary const * _boundary
 
bool _negateBoundary
 
- Protected Attributes inherited from UnitAI
Unit *const me
 

Detailed Description

Constructor & Destructor Documentation

◆ npc_pet_mage_mirror_image()

npc_pet_mage_mirror_image::npc_pet_mage_mirror_image ( Creature creature)
inline
58: CasterAI(creature) { }
Definition: CombatAI.h:58

Member Function Documentation

◆ EnterEvadeMode()

void npc_pet_mage_mirror_image::EnterEvadeMode ( EvadeReason  )
inlineoverridevirtual

Reimplemented from CreatureAI.

137 {
138 if (me->IsInEvadeMode() || !me->IsAlive())
139 return;
140
141 Unit* owner = me->GetCharmerOrOwner();
142
143 me->CombatStop(true);
144 if (owner && !me->HasUnitState(UNIT_STATE_FOLLOW))
145 {
146 me->GetMotionMaster()->Clear(false);
148 }
149 }
@ MOTION_SLOT_ACTIVE
Definition: MotionMaster.h:62
@ UNIT_STATE_FOLLOW
Definition: UnitDefines.h:158
#define PET_FOLLOW_DIST
Definition: PetDefines.h:198
Creature *const me
Definition: CreatureAI.h:73
bool IsInEvadeMode() const
Definition: Creature.h:137
Definition: Unit.h:630
void CombatStop(bool includingCast=false)
Definition: Unit.cpp:10398
MotionMaster * GetMotionMaster()
Definition: Unit.h:1601
bool IsAlive() const
Definition: Unit.h:1204
Unit * GetCharmerOrOwner() const
Definition: Unit.h:1243
virtual float GetFollowAngle() const
Definition: Unit.h:1708
bool HasUnitState(const uint32 f) const
Definition: Unit.h:673
void MoveFollow(Unit *target, float dist, float angle, MovementSlot slot=MOTION_SLOT_ACTIVE, bool inheritWalkState=true)
The unit will follow this target. Doesn't work with UNIT_FLAG_DISABLE_MOVE.
Definition: MotionMaster.cpp:409
void Clear(bool reset=true)
Definition: MotionMaster.h:165

References MotionMaster::Clear(), Unit::CombatStop(), Unit::GetCharmerOrOwner(), Unit::GetFollowAngle(), Unit::GetMotionMaster(), Unit::HasUnitState(), Unit::IsAlive(), Creature::IsInEvadeMode(), CreatureAI::me, MOTION_SLOT_ACTIVE, MotionMaster::MoveFollow(), PET_FOLLOW_DIST, and UNIT_STATE_FOLLOW.

Referenced by MySelectNextTarget().

◆ InitializeAI()

void npc_pet_mage_mirror_image::InitializeAI ( )
inlineoverridevirtual

Reimplemented from CasterAI.

66 {
68 Unit* owner = me->GetOwner();
69 if (!owner)
70 return;
71
72 // Clone Me!
73 owner->CastSpell(me, SPELL_MAGE_CLONE_ME, true);
74
75 // xinef: Glyph of Mirror Image (4th copy)
76 float angle = 0.0f;
78 {
80 angle = 0.5f * M_PI;
81 break;
83 angle = M_PI;
84 break;
86 angle = 1.5f * M_PI;
87 break;
88 }
89
90 ((Minion*)me)->SetFollowAngle(angle);
91 if (owner->IsInCombat())
92 me->NearTeleportTo(me->GetPositionX() + cos(angle)*dist, me->GetPositionY() + std::sin(angle)*dist, me->GetPositionZ(), me->GetOrientation(), false, false, false, false);
93 else
95
97
98 // Xinef: Inherit Master's Threat List (not yet implemented)
99 //owner->CastSpell((Unit*)nullptr, SPELL_MAGE_MASTERS_THREAT_LIST, true);
101 while (ref)
102 {
103 if (Unit* unit = ref->GetSource()->GetOwner())
104 unit->AddThreat(me, ref->GetThreat() - ref->getTempThreatModifier());
105 ref = ref->next();
106 }
107
109
110 // Xinef: copy caster auras
111 Unit::VisibleAuraMap const* visibleAuraMap = owner->GetVisibleAuras();
112 for (Unit::VisibleAuraMap::const_iterator itr = visibleAuraMap->begin(); itr != visibleAuraMap->end(); ++itr)
113 if (Aura* visAura = itr->second->GetBase())
114 {
115 // Ebon Gargoyle
116 if (visAura->GetId() == 49206 && me->GetUInt32Value(UNIT_CREATED_BY_SPELL) == SPELL_SUMMON_MIRROR_IMAGE1)
117 {
118 if (Unit* gargoyle = visAura->GetCaster())
119 _ebonGargoyleGUID = gargoyle->GetGUID();
120 continue;
121 }
122 SpellScriptsBounds bounds = sObjectMgr->GetSpellScriptsBounds(visAura->GetId());
123 if (bounds.first != bounds.second)
124 continue;
125 std::vector<int32> const* spellTriggered = sSpellMgr->GetSpellLinked(visAura->GetId() + SPELL_LINK_AURA);
126 if (!spellTriggered || !spellTriggered->empty())
127 continue;
128 if (Aura* newAura = me->AddAura(visAura->GetId(), me))
129 newAura->SetDuration(visAura->GetDuration());
130 }
131
133 }
std::pair< SpellScriptsContainer::iterator, SpellScriptsContainer::iterator > SpellScriptsBounds
Definition: ObjectMgr.h:389
#define sObjectMgr
Definition: ObjectMgr.h:1623
@ REACT_DEFENSIVE
Definition: Unit.h:549
@ UNIT_CREATED_BY_SPELL
Definition: UpdateFields.h:138
#define sSpellMgr
Definition: SpellMgr.h:825
@ SPELL_LINK_AURA
Definition: SpellMgr.h:98
@ SPELL_MAGE_CLONE_ME
Definition: pet_mage.cpp:32
@ SPELL_SUMMON_MIRROR_IMAGE1
Definition: pet_mage.cpp:35
@ SPELL_SUMMON_MIRROR_IMAGE3
Definition: pet_mage.cpp:37
@ SPELL_SUMMON_MIRROR_IMAGE2
Definition: pet_mage.cpp:36
FROM * GetSource() const
Definition: Reference.h:97
void AddEvent(BasicEvent *Event, uint64 e_time, bool set_addtime=true)
Definition: EventProcessor.h:103
uint64 CalculateTime(uint64 t_offset) const
Definition: EventProcessor.cpp:159
void InitializeAI() override
Definition: CombatAI.cpp:110
HostileReference * getFirst()
Definition: HostileRefMgr.h:60
Definition: ThreatMgr.h:49
float GetThreat() const
Definition: ThreatMgr.h:63
void AddThreat(float modThreat)
Definition: ThreatMgr.cpp:138
float getTempThreatModifier()
Definition: ThreatMgr.h:94
HostileReference * next()
Definition: ThreatMgr.h:116
Unit * GetOwner() const
Definition: ThreatMgr.h:237
void SetReactState(ReactStates state)
A creature can have 3 ReactStates : Agressive, Passive, Neutral.
Definition: Creature.h:97
Definition: TemporarySummon.h:76
uint32 GetUInt32Value(uint16 index) const
Definition: Object.cpp:305
void Clear()
Definition: ObjectGuid.h:138
float GetPositionZ() const
Definition: Position.h:119
float GetOrientation() const
Definition: Position.h:120
float GetPositionX() const
Definition: Position.h:117
float GetPositionY() const
Definition: Position.h:118
Unit * GetOwner() const
Definition: Unit.cpp:10562
Aura * AddAura(uint32 spellId, Unit *target)
Definition: Unit.cpp:18819
std::map< uint8, AuraApplication * > VisibleAuraMap
Definition: Unit.h:652
HostileRefMgr & getHostileRefMgr()
Definition: Unit.h:843
EventProcessor m_Events
Definition: Unit.h:1792
SpellCastResult CastSpell(SpellCastTargets const &targets, SpellInfo const *spellInfo, CustomSpellValues const *value, TriggerCastFlags triggerFlags=TRIGGERED_NONE, Item *castItem=nullptr, AuraEffect const *triggeredByAura=nullptr, ObjectGuid originalCaster=ObjectGuid::Empty)
Definition: Unit.cpp:1168
VisibleAuraMap const * GetVisibleAuras()
Definition: Unit.h:1490
void NearTeleportTo(Position &pos, bool casting=false, bool vehicleTeleport=false, bool withPet=false, bool removeTransport=false)
Definition: Unit.cpp:19937
bool IsInCombat() const
Definition: Unit.h:820
Definition: SpellAuras.h:87
Definition: pet_mage.cpp:42
uint32 dist
Definition: pet_mage.cpp:63
ObjectGuid _ebonGargoyleGUID
Definition: pet_mage.cpp:61

References _ebonGargoyleGUID, Unit::AddAura(), EventProcessor::AddEvent(), HostileReference::AddThreat(), EventProcessor::CalculateTime(), Unit::CastSpell(), ObjectGuid::Clear(), dist, HostileRefMgr::getFirst(), Unit::GetFollowAngle(), Unit::getHostileRefMgr(), Unit::GetMotionMaster(), Position::GetOrientation(), ThreatMgr::GetOwner(), Unit::GetOwner(), Position::GetPositionX(), Position::GetPositionY(), Position::GetPositionZ(), Reference< TO, FROM >::GetSource(), HostileReference::getTempThreatModifier(), HostileReference::GetThreat(), Object::GetUInt32Value(), Unit::GetVisibleAuras(), CasterAI::InitializeAI(), Unit::IsInCombat(), Unit::m_Events, CreatureAI::me, MOTION_SLOT_ACTIVE, MotionMaster::MoveFollow(), Unit::NearTeleportTo(), HostileReference::next(), PET_FOLLOW_DIST, REACT_DEFENSIVE, Creature::SetReactState(), sObjectMgr, SPELL_LINK_AURA, SPELL_MAGE_CLONE_ME, SPELL_SUMMON_MIRROR_IMAGE1, SPELL_SUMMON_MIRROR_IMAGE2, SPELL_SUMMON_MIRROR_IMAGE3, sSpellMgr, and UNIT_CREATED_BY_SPELL.

◆ MySelectNextTarget()

void npc_pet_mage_mirror_image::MySelectNextTarget ( )
inline
152 {
154 {
156 if (gargoyle && gargoyle->GetAI())
157 gargoyle->GetAI()->AttackStart(me);
159 }
160 Unit* owner = me->GetOwner();
161 if (owner && owner->IsPlayer())
162 {
163 Unit* selection = owner->ToPlayer()->GetSelectedUnit();
164
165 if (selection)
166 {
168 me->AddThreat(selection, 1000000.0f);
169
170 if (owner->IsInCombat())
171 AttackStart(selection);
172 }
173
174 if (!owner->IsInCombat() && !me->GetVictim())
176 }
177 }
Unit * GetUnit(WorldObject const &, ObjectGuid const guid)
Definition: ObjectAccessor.cpp:202
void AttackStart(Unit *victim) override
Definition: CombatAI.h:62
virtual void AttackStart(Unit *)
Definition: UnitAI.cpp:27
@ EVADE_REASON_OTHER
Definition: CreatureAI.h:94
void ResetAllThreat()
Definition: ThreatMgr.cpp:651
bool IsPlayer() const
Definition: Object.h:197
Player * ToPlayer()
Definition: Object.h:198
Unit * GetSelectedUnit() const
Definition: Player.cpp:11535
void AddThreat(Unit *victim, float fThreat, SpellSchoolMask schoolMask=SPELL_SCHOOL_MASK_NORMAL, SpellInfo const *threatSpell=nullptr)
Definition: Unit.cpp:14608
Unit * GetVictim() const
Definition: Unit.h:789
UnitAI * GetAI()
Definition: Unit.h:658
ThreatMgr & GetThreatMgr()
Definition: Unit.h:839
void EnterEvadeMode(EvadeReason) override
Definition: pet_mage.cpp:136

References _ebonGargoyleGUID, Unit::AddThreat(), UnitAI::AttackStart(), CasterAI::AttackStart(), ObjectGuid::Clear(), EnterEvadeMode(), CreatureAI::EVADE_REASON_OTHER, Unit::GetAI(), Unit::GetOwner(), Player::GetSelectedUnit(), Unit::GetThreatMgr(), ObjectAccessor::GetUnit(), Unit::GetVictim(), Unit::IsInCombat(), Object::IsPlayer(), CreatureAI::me, ThreatMgr::ResetAllThreat(), and Object::ToPlayer().

Referenced by UpdateAI().

◆ Reset()

void npc_pet_mage_mirror_image::Reset ( )
inlineoverridevirtual

Reimplemented from CombatAI.

180 {
181 selectionTimer = 0;
182 checktarget = 0;
183 }
uint32 checktarget
Definition: pet_mage.cpp:62
uint32 selectionTimer
Definition: pet_mage.cpp:60

References checktarget, and selectionTimer.

◆ UpdateAI()

void npc_pet_mage_mirror_image::UpdateAI ( uint32  )
inlineoverridevirtual

Use to start attacking a target. Called just before JustEngagedWith()

Reimplemented from CasterAI.

186 {
187 events.Update(diff);
188 if (events.GetTimer() < 1200)
189 return;
190
191 if (!me->IsInCombat() || !me->GetVictim())
192 {
194 return;
195 }
196
197 checktarget += diff;
198
199 if (checktarget >= 1000)
200 {
202 {
204 me->InterruptNonMeleeSpells(true); // Stop casting if target is CC or not Alive.
205 return;
206 }
207 }
208
210 return;
211
212 if (uint32 spellId = events.ExecuteEvent())
213 {
214 events.RescheduleEvent(spellId, spellId == 59637 ? 6500 : 2500);
215 me->CastSpell(me->GetVictim(), spellId, false);
216 }
217 }
std::uint32_t uint32
Definition: Define.h:107
@ UNIT_STATE_CASTING
Definition: UnitDefines.h:164
events
Definition: boss_sartura.cpp:43
bool HasBreakableByDamageCrowdControlAura(Unit *excludeCasterChannel=nullptr) const
Definition: Unit.cpp:788
void InterruptNonMeleeSpells(bool withDelayed, uint32 spellid=0, bool withInstant=true, bool bySelf=false)
Definition: Unit.cpp:4111
void MySelectNextTarget()
Definition: pet_mage.cpp:151

References Unit::CastSpell(), checktarget, Unit::GetVictim(), Unit::HasBreakableByDamageCrowdControlAura(), Unit::HasUnitState(), Unit::InterruptNonMeleeSpells(), Unit::IsAlive(), Unit::IsInCombat(), CreatureAI::me, MySelectNextTarget(), and UNIT_STATE_CASTING.

Member Data Documentation

◆ _ebonGargoyleGUID

ObjectGuid npc_pet_mage_mirror_image::_ebonGargoyleGUID

Referenced by InitializeAI(), and MySelectNextTarget().

◆ checktarget

uint32 npc_pet_mage_mirror_image::checktarget

Referenced by Reset(), and UpdateAI().

◆ dist

uint32 npc_pet_mage_mirror_image::dist = urand(1, 5)

Referenced by InitializeAI().

◆ selectionTimer

uint32 npc_pet_mage_mirror_image::selectionTimer

Referenced by Reset().