AzerothCore 3.3.5a
OpenSource WoW Emulator
Loading...
Searching...
No Matches
npc_koltira_deathweaver::npc_koltira_deathweaverAI Struct Reference
Inheritance diagram for npc_koltira_deathweaver::npc_koltira_deathweaverAI:
npc_escortAI ScriptedAI CreatureAI UnitAI

Public Member Functions

 npc_koltira_deathweaverAI (Creature *creature)
 
void Reset () override
 
void EnterEvadeMode (EvadeReason) override
 
void AttackStart (Unit *who) override
 
void WaypointReached (uint32 waypointId) override
 
void JustSummoned (Creature *summoned) override
 
void SummonAcolyte (uint32 uiAmount)
 
void UpdateAI (uint32 uiDiff) override
 Use to start attacking a target. Called just before JustEngagedWith()
 
- Public Member Functions inherited from npc_escortAI
 npc_escortAI (Creature *creature)
 
 ~npc_escortAI () override
 
void MoveInLineOfSight (Unit *who) override
 
void JustDied (Unit *) override
 
void JustRespawned () override
 
void ReturnToLastPoint ()
 
virtual void UpdateEscortAI (uint32 diff)
 
void MovementInform (uint32, uint32) override
 
void AddWaypoint (uint32 id, float x, float y, float z, uint32 waitTime=0)
 
bool SetNextWaypoint (uint32 pointId, float x, float y, float z, float orientation)
 
bool SetNextWaypoint (uint32 pointId, bool setPosition=true)
 
bool GetWaypointPosition (uint32 pointId, float &x, float &y, float &z)
 
void GenerateWaypointArray (Movement::PointsArray *points)
 
virtual void WaypointStart (uint32)
 
void Start (bool isActiveAttacker=true, bool run=false, ObjectGuid playerGUID=ObjectGuid::Empty, Quest const *quest=nullptr, bool instantRespawn=false, bool canLoopPath=false, bool resetWaypoints=true)
 
void SetRun (bool on=true)
 
void SetEscortPaused (bool on)
 
bool HasEscortState (uint32 escortState)
 
bool IsEscorted () override
 
void SetMaxPlayerDistance (float newMax)
 
float GetMaxPlayerDistance ()
 
void SetDespawnAtEnd (bool despawn)
 
void SetDespawnAtFar (bool despawn)
 
bool GetAttack ()
 
void SetCanAttack (bool attack)
 
ObjectGuid GetEventStarterGUID ()
 
void AddEscortState (uint32 escortState)
 
void RemoveEscortState (uint32 escortState)
 
- Public Member Functions inherited from ScriptedAI
 ScriptedAI (Creature *creature)
 
 ~ScriptedAI () override
 
void AttackStartNoMove (Unit *target)
 
void DamageTaken (Unit *, uint32 &, DamageEffectType, SpellSchoolMask) override
 Called at any Damage from any attacker (before damage apply)
 
void UpdateAI (uint32 diff) override
 Use to start attacking a target. Called just before JustEngagedWith()
 
void JustDied (Unit *) override
 
void KilledUnit (Unit *) override
 
void JustSummoned (Creature *) override
 
void SummonedCreatureDespawn (Creature *) override
 
void SpellHit (Unit *, SpellInfo const *) override
 
void SpellHitTarget (Unit *, SpellInfo const *) override
 
void MovementInform (uint32, uint32) override
 
void OnPossess (bool)
 
bool IsInRoom (const Position *pos, Axis axis, bool above)
 
void Reset () override
 
void JustEngagedWith (Unit *) override
 Called for reaction when initially engaged.
 
void AttackStart (Unit *) override
 
void DoStartMovement (Unit *target, float distance=0.0f, float angle=0.0f)
 
void DoStartNoMovement (Unit *target)
 
void DoStopAttack ()
 
void DoCastSpell (Unit *target, SpellInfo const *spellInfo, bool triggered=false)
 
void DoPlaySoundToSet (WorldObject *source, uint32 soundId)
 
void DoPlayMusic (uint32 soundId, bool zone)
 
void DoAddThreat (Unit *unit, float amount)
 
void DoModifyThreatByPercent (Unit *unit, int32 pct)
 
void DoResetThreat (Unit *unit)
 
void DoResetThreatList ()
 
float DoGetThreat (Unit *unit)
 
void DoTeleportPlayer (Unit *unit, float x, float y, float z, float o)
 
void DoTeleportPlayer (Unit *unit, Position pos)
 
void DoTeleportAll (float x, float y, float z, float o)
 
UnitDoSelectLowestHpFriendly (float range, uint32 minHPDiff=1)
 
std::list< Creature * > DoFindFriendlyCC (float range)
 
std::list< Creature * > DoFindFriendlyMissingBuff (float range, uint32 spellId)
 
PlayerGetPlayerAtMinimumRange (float minRange)
 
CreatureDoSpawnCreature (uint32 entry, float offsetX, float offsetY, float offsetZ, float angle, uint32 type, uint32 despawntime)
 
bool IsUniqueTimedEventDone (uint32 id) const
 
void SetUniqueTimedEventDone (uint32 id)
 
void ResetUniqueTimedEvent (uint32 id)
 
void ClearUniqueTimedEventsDone ()
 
void ScheduleTimedEvent (Milliseconds timerMin, Milliseconds timerMax, std::function< void()> exec, Milliseconds repeatMin, Milliseconds repeatMax=0s, uint32 uniqueId=0)
 
void ScheduleTimedEvent (Milliseconds timerMax, std::function< void()> exec, Milliseconds repeatMin, Milliseconds repeatMax=0s, uint32 uniqueId=0)
 
void ScheduleUniqueTimedEvent (Milliseconds timer, std::function< void()> exec, uint32 uniqueId)
 
bool HealthBelowPct (uint32 pct) const
 
bool HealthAbovePct (uint32 pct) const
 
SpellInfo const * SelectSpell (Unit *target, uint32 school, uint32 mechanic, SelectTargetType targets, uint32 powerCostMin, uint32 powerCostMax, float rangeMin, float rangeMax, SelectEffect effect)
 
void SetEquipmentSlots (bool loadDefault, int32 mainHand=EQUIP_NO_CHANGE, int32 offHand=EQUIP_NO_CHANGE, int32 ranged=EQUIP_NO_CHANGE)
 
virtual bool CheckEvadeIfOutOfCombatArea () const
 
bool IsHeroic () const
 
Difficulty GetDifficulty () const
 
bool Is25ManRaid () const
 
template<class T >
const T & DUNGEON_MODE (const T &normal5, const T &heroic10) const
 
template<class T >
const T & RAID_MODE (const T &normal10, const T &normal25) const
 
template<class T >
const T & RAID_MODE (const T &normal10, const T &normal25, const T &heroic10, const T &heroic25) const
 
PlayerSelectTargetFromPlayerList (float maxdist, uint32 excludeAura=0, bool mustBeInLOS=false) const
 
void SetInvincibility (bool apply)
 
bool IsInvincible () const
 
void SetAutoAttackAllowed (bool allow)
 
bool IsAutoAttackAllowed () const
 
- 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.
 
void Talk (uint8 id, Milliseconds delay)
 
WorldObjectGetSummoner () const
 Returns the summoner creature/object, if the creature is a temporary summon.
 
 CreatureAI (Creature *creature)
 
 ~CreatureAI () override
 
void MoveCircleChecks ()
 
void MoveBackwardsChecks ()
 
void MoveInLineOfSight_Safe (Unit *who)
 == Reactions At =================================
 
void TriggerAlert (Unit const *who) const
 
virtual bool CanRespawn ()
 
virtual void IsSummonedBy (WorldObject *)
 
virtual void SummonedCreatureDies (Creature *, Unit *)
 
virtual void SummonedCreatureDespawnAll ()
 
virtual void SummonedCreatureEvade (Creature *)
 
virtual void AttackedBy (Unit *)
 
virtual void PathEndReached (uint32)
 
void OnCharmed (bool apply) override
 Called when unit is charmed.
 
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 ==================
 
virtual void PassengerBoarded (Unit *, int8, bool)
 == Fields =======================================
 
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 InitializeAI ()
 
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:
 
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.
 
virtual void JustExitedCombat ()
 Called when the unit leaves combat.
 
virtual void DamageDealt (Unit *, uint32 &, DamageEffectType, SpellSchoolMask)
 Called at any Damage to any victim (before damage apply)
 
virtual void HealReceived (Unit *, uint32 &)
 Called when the creature receives heal.
 
virtual void OnPowerUpdate (Powers, int32, int32, uint32)
 Called when the creature power updates.
 
virtual void HealDone (Unit *, uint32 &)
 Called when the unit heals.
 
virtual void OnCalculateMeleeDamageReceived (uint32 &, Unit *)
 Called during damage calculations.
 
virtual void OnCalculateSpellDamageReceived (int32 &, Unit *)
 
virtual void OnCalculatePeriodicTickReceived (uint32 &, Unit *)
 Called during calculation when receiving periodic healing or damage (DoT or HoT)
 
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.
 
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.
 
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.
 
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.
 
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 m_uiWave
 
uint32 m_uiWave_Timer
 
ObjectGuid m_uiValrothGUID
 
SummonList summons
 
- Public Attributes inherited from ScriptedAI
Creatureme
 

Additional Inherited Members

- Public Types inherited from ScriptedAI
enum class  Axis {
  AXIS_X ,
  AXIS_Y
}
 
- 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 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 npc_escortAI
PlayerGetPlayerForEscort ()
 
- 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)
 
bool _EnterEvadeMode (EvadeReason why=EVADE_REASON_OTHER)
 
- 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_koltira_deathweaverAI()

npc_koltira_deathweaver::npc_koltira_deathweaverAI::npc_koltira_deathweaverAI ( Creature creature)
inline
237 : npc_escortAI(creature), summons(me)
238 {
240 }
@ REACT_DEFENSIVE
Definition Unit.h:549
void SetReactState(ReactStates state)
A creature can have 3 ReactStates : Agressive, Passive, Neutral.
Definition Creature.h:95
Creature * me
Definition ScriptedCreature.h:280
Definition ScriptedEscortAI.h:53
SummonList summons
Definition chapter2.cpp:245

References ScriptedAI::me, REACT_DEFENSIVE, and Creature::SetReactState().

Member Function Documentation

◆ AttackStart()

void npc_koltira_deathweaver::npc_koltira_deathweaverAI::AttackStart ( Unit who)
inlineoverridevirtual

Reimplemented from npc_escortAI.

282 {
284 return;
285
287 }
@ STATE_ESCORT_PAUSED
Definition ScriptedEscortAI.h:49
bool HasEscortState(uint32 escortState)
Definition ScriptedEscortAI.h:98
void AttackStart(Unit *who) override
Definition ScriptedEscortAI.cpp:52

References npc_escortAI::AttackStart(), npc_escortAI::HasEscortState(), and STATE_ESCORT_PAUSED.

◆ EnterEvadeMode()

void npc_koltira_deathweaver::npc_koltira_deathweaverAI::EnterEvadeMode ( EvadeReason  )
inlineoverridevirtual

Reimplemented from npc_escortAI.

262 {
264 me->CombatStop(false);
265 me->SetLootRecipient(nullptr);
266
268 {
271 LOG_DEBUG("scripts.ai", "EscortAI has left combat and is now returning to last point");
272 }
273 else
274 {
276 me->SetImmuneToNPC(true);
277 Reset();
278 }
279 }
#define LOG_DEBUG(filterType__,...)
Definition Log.h:169
@ STATE_ESCORT_ESCORTING
Definition ScriptedEscortAI.h:47
@ STATE_ESCORT_RETURNING
Definition ScriptedEscortAI.h:48
void SetLootRecipient(Unit *unit, bool withGroup=true)
Definition Creature.cpp:1326
void MoveTargetedHome(bool walk=false)
The unit will return this initial position (owner for pets and summoned creatures)....
Definition MotionMaster.cpp:259
void ClearAllThreat()
Definition ThreatMgr.cpp:417
void CombatStop(bool includingCast=false)
Definition Unit.cpp:10481
void SetImmuneToNPC(bool apply, bool keepCombat=false)
Definition Unit.cpp:13662
MotionMaster * GetMotionMaster()
Definition Unit.h:1673
ThreatMgr & GetThreatMgr()
Definition Unit.h:912
void AddEscortState(uint32 escortState)
Definition ScriptedEscortAI.h:110
void ReturnToLastPoint()
Definition ScriptedEscortAI.cpp:193
void Reset() override
Definition chapter2.cpp:247

References npc_escortAI::AddEscortState(), ThreatMgr::ClearAllThreat(), Unit::CombatStop(), Unit::GetMotionMaster(), Unit::GetThreatMgr(), npc_escortAI::HasEscortState(), LOG_DEBUG, ScriptedAI::me, MotionMaster::MoveTargetedHome(), Reset(), npc_escortAI::ReturnToLastPoint(), Unit::SetImmuneToNPC(), Creature::SetLootRecipient(), STATE_ESCORT_ESCORTING, and STATE_ESCORT_RETURNING.

◆ JustSummoned()

void npc_koltira_deathweaver::npc_koltira_deathweaverAI::JustSummoned ( Creature summoned)
inlineoverridevirtual

Reimplemented from CreatureAI.

326 {
327 if (Player* player = GetPlayerForEscort())
328 summoned->AI()->AttackStart(player);
329
330 if (summoned->GetEntry() == NPC_HIGH_INQUISITOR_VALROTH)
331 m_uiValrothGUID = summoned->GetGUID();
332
333 summoned->AddThreat(me, 0.0f);
334 summoned->SetImmuneToPC(false);
335 summons.Summon(summoned);
336 }
@ NPC_HIGH_INQUISITOR_VALROTH
Definition chapter2.cpp:205
CreatureAI * AI() const
Definition Creature.h:141
uint32 GetEntry() const
Definition Object.h:115
static ObjectGuid GetGUID(Object const *o)
Definition Object.h:112
Definition Player.h:1081
void Summon(Creature const *summon)
Definition ScriptedCreature.h:88
virtual void AttackStart(Unit *)
Definition UnitAI.cpp:27
void AddThreat(Unit *victim, float fThreat, SpellSchoolMask schoolMask=SPELL_SCHOOL_MASK_NORMAL, SpellInfo const *threatSpell=nullptr)
Definition Unit.cpp:14705
void SetImmuneToPC(bool apply, bool keepCombat=false)
Definition Unit.cpp:13653
Player * GetPlayerForEscort()
Definition ScriptedEscortAI.h:114
ObjectGuid m_uiValrothGUID
Definition chapter2.cpp:244

References Unit::AddThreat(), Creature::AI(), UnitAI::AttackStart(), Object::GetEntry(), Object::GetGUID(), npc_escortAI::GetPlayerForEscort(), m_uiValrothGUID, ScriptedAI::me, NPC_HIGH_INQUISITOR_VALROTH, Unit::SetImmuneToPC(), SummonList::Summon(), and summons.

◆ Reset()

void npc_koltira_deathweaver::npc_koltira_deathweaverAI::Reset ( )
inlineoverridevirtual

Reimplemented from UnitAI.

248 {
250 {
251 m_uiWave = 0;
252 m_uiWave_Timer = 3000;
255 me->LoadEquipment(0, true);
258 }
259 }
@ UNIT_FLAG_NON_ATTACKABLE
Definition UnitDefines.h:251
void LoadEquipment(int8 id=1, bool force=false)
Definition Creature.cpp:1804
void Clear()
Definition ObjectGuid.h:138
void DespawnAll(uint32 delay=0)
Definition ScriptedCreature.cpp:71
void RemoveAllAuras()
Definition Unit.cpp:5351
void SetUnitFlag(UnitFlags flags)
UnitFlags available in UnitDefines.h.
Definition Unit.h:719
uint32 m_uiWave
Definition chapter2.cpp:242
uint32 m_uiWave_Timer
Definition chapter2.cpp:243

References ObjectGuid::Clear(), SummonList::DespawnAll(), npc_escortAI::HasEscortState(), Creature::LoadEquipment(), m_uiValrothGUID, m_uiWave, m_uiWave_Timer, ScriptedAI::me, Unit::RemoveAllAuras(), Unit::SetUnitFlag(), STATE_ESCORT_ESCORTING, summons, and UNIT_FLAG_NON_ATTACKABLE.

Referenced by EnterEvadeMode().

◆ SummonAcolyte()

void npc_koltira_deathweaver::npc_koltira_deathweaverAI::SummonAcolyte ( uint32  uiAmount)
inline
339 {
340 for (uint32 i = 0; i < uiAmount; ++i)
341 me->SummonCreature(NPC_CRIMSON_ACOLYTE, 1642.329f, -6045.818f, 127.583f, 0.0f, TEMPSUMMON_TIMED_DESPAWN_OUT_OF_COMBAT, 5000);
342 }
std::uint32_t uint32
Definition Define.h:107
@ TEMPSUMMON_TIMED_DESPAWN_OUT_OF_COMBAT
Definition Object.h:49
@ NPC_CRIMSON_ACOLYTE
Definition chapter2.cpp:204
TempSummon * SummonCreature(uint32 id, const Position &pos, TempSummonType spwtype=TEMPSUMMON_MANUAL_DESPAWN, uint32 despwtime=0, uint32 vehId=0, SummonPropertiesEntry const *properties=nullptr, bool visibleBySummonerOnly=false) const
Definition Object.cpp:2368

References ScriptedAI::me, NPC_CRIMSON_ACOLYTE, WorldObject::SummonCreature(), and TEMPSUMMON_TIMED_DESPAWN_OUT_OF_COMBAT.

Referenced by UpdateAI().

◆ UpdateAI()

void npc_koltira_deathweaver::npc_koltira_deathweaverAI::UpdateAI ( uint32  )
inlineoverridevirtual

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

Reimplemented from npc_escortAI.

345 {
347
349 {
350 if (m_uiWave_Timer <= uiDiff)
351 {
352 switch (m_uiWave)
353 {
354 case 0:
356 SummonAcolyte(3);
357 m_uiWave_Timer = 20000;
358 break;
359 case 1:
361 SummonAcolyte(3);
362 m_uiWave_Timer = 20000;
363 break;
364 case 2:
366 SummonAcolyte(4);
367 m_uiWave_Timer = 20000;
368 break;
369 case 3:
371 me->SummonCreature(NPC_HIGH_INQUISITOR_VALROTH, 1642.329f, -6045.818f, 127.583f, 0.0f, TEMPSUMMON_TIMED_DESPAWN_OUT_OF_COMBAT, 1000);
372 m_uiWave_Timer = 1000;
373 break;
374 case 4:
375 {
377
378 if (!temp || !temp->IsAlive())
379 {
381 m_uiWave_Timer = 5000;
382 }
383 else
384 {
385 // xinef: despawn check
386 Player* player = GetPlayerForEscort();
387 if (!player || me->GetDistance(player) > 60.0f)
388 {
390 return;
391 }
392
393 m_uiWave_Timer = 2500;
394 return; //return, we don't want m_uiWave to increment now
395 }
396 break;
397 }
398 case 5:
401 // i do not know why the armor will also be removed
402 m_uiWave_Timer = 2500;
403 break;
404 case 6:
406 SetEscortPaused(false);
407 break;
408 }
409
410 ++m_uiWave;
411 }
412 else
413 m_uiWave_Timer -= uiDiff;
414 }
415 }
@ SAY_BREAKOUT8
Definition chapter2.cpp:195
@ SPELL_ANTI_MAGIC_ZONE
Definition chapter2.cpp:200
@ SAY_BREAKOUT5
Definition chapter2.cpp:192
@ SAY_BREAKOUT6
Definition chapter2.cpp:193
@ SAY_BREAKOUT3
Definition chapter2.cpp:190
@ SAY_BREAKOUT9
Definition chapter2.cpp:196
@ SAY_BREAKOUT10
Definition chapter2.cpp:197
@ SAY_BREAKOUT4
Definition chapter2.cpp:191
Definition Creature.h:43
void DespawnOrUnsummon(Milliseconds msTimeToDespawn, Seconds forcedRespawnTimer)
Definition Creature.cpp:2183
bool IsAlive() const
Definition Unit.h:1707
void RemoveAurasDueToSpell(uint32 spellId, ObjectGuid casterGUID=ObjectGuid::Empty, uint8 reqEffMask=0, AuraRemoveMode removeMode=AURA_REMOVE_BY_DEFAULT)
Definition Unit.cpp:4941
float GetDistance(WorldObject const *obj) const
Definition Object.cpp:1256
Talk
Definition hyjal.cpp:82
Creature * GetCreature(WorldObject const &u, ObjectGuid const guid)
Definition ObjectAccessor.cpp:210
void UpdateAI(uint32 diff) override
Use to start attacking a target. Called just before JustEngagedWith()
Definition ScriptedEscortAI.cpp:240
void SetEscortPaused(bool on)
Definition ScriptedEscortAI.cpp:523
void SummonAcolyte(uint32 uiAmount)
Definition chapter2.cpp:338

References Creature::DespawnOrUnsummon(), ObjectAccessor::GetCreature(), WorldObject::GetDistance(), npc_escortAI::GetPlayerForEscort(), npc_escortAI::HasEscortState(), Unit::IsAlive(), m_uiValrothGUID, m_uiWave, m_uiWave_Timer, ScriptedAI::me, NPC_HIGH_INQUISITOR_VALROTH, Unit::RemoveAurasDueToSpell(), SAY_BREAKOUT10, SAY_BREAKOUT3, SAY_BREAKOUT4, SAY_BREAKOUT5, SAY_BREAKOUT6, SAY_BREAKOUT8, SAY_BREAKOUT9, npc_escortAI::SetEscortPaused(), SPELL_ANTI_MAGIC_ZONE, STATE_ESCORT_PAUSED, SummonAcolyte(), WorldObject::SummonCreature(), TEMPSUMMON_TIMED_DESPAWN_OUT_OF_COMBAT, and npc_escortAI::UpdateAI().

◆ WaypointReached()

void npc_koltira_deathweaver::npc_koltira_deathweaverAI::WaypointReached ( uint32  waypointId)
inlineoverridevirtual

Implements npc_escortAI.

290 {
291 switch (waypointId)
292 {
293 case 0:
296 break;
297 case 1:
299 break;
300 case 2:
302 //me->UpdateEntry(NPC_KOLTIRA_ALT); //unclear if we must update or not
304 me->LoadEquipment();
305 break;
306 case 3:
307 SetEscortPaused(true);
310 DoCast(me, SPELL_ANTI_MAGIC_ZONE); // cast again that makes bubble up
311 break;
312 case 4:
314 SetRun(true);
315 break;
316 case 9:
318 break;
319 case 10:
320 me->Dismount();
321 break;
322 }
323 }
@ IMMUNITY_DAMAGE
Definition SharedDefines.h:1397
@ SPELL_SCHOOL_MASK_ALL
Definition SharedDefines.h:315
@ UNIT_STAND_STATE_KNEEL
Definition UnitDefines.h:40
@ UNIT_STAND_STATE_STAND
Definition UnitDefines.h:32
@ SAY_BREAKOUT1
Definition chapter2.cpp:188
@ SAY_BREAKOUT2
Definition chapter2.cpp:189
@ SPELL_KOLTIRA_TRANSFORM
Definition chapter2.cpp:199
@ MODEL_DEATH_KNIGHT_MOUNT
Definition chapter2.cpp:209
SpellCastResult DoCast(uint32 spellId)
Definition UnitAI.cpp:177
void ApplySpellImmune(uint32 spellId, uint32 op, uint32 type, bool apply, SpellImmuneBlockType blockType=SPELL_BLOCK_TYPE_ALL)
Definition Unit.cpp:13434
void Dismount()
Definition Unit.cpp:13569
void Mount(uint32 mount, uint32 vehicleId=0, uint32 creatureEntry=0)
Definition Unit.cpp:13510
void SetStandState(uint8 state)
Definition Unit.cpp:16778
void RemoveUnitFlag(UnitFlags flags)
UnitFlags available in UnitDefines.h.
Definition Unit.h:720
void SetRun(bool on=true)
Definition ScriptedEscortAI.cpp:428

References Unit::ApplySpellImmune(), Unit::Dismount(), UnitAI::DoCast(), IMMUNITY_DAMAGE, Creature::LoadEquipment(), ScriptedAI::me, MODEL_DEATH_KNIGHT_MOUNT, Unit::Mount(), Unit::RemoveUnitFlag(), SAY_BREAKOUT1, SAY_BREAKOUT2, npc_escortAI::SetEscortPaused(), npc_escortAI::SetRun(), Unit::SetStandState(), SPELL_ANTI_MAGIC_ZONE, SPELL_KOLTIRA_TRANSFORM, SPELL_SCHOOL_MASK_ALL, UNIT_FLAG_NON_ATTACKABLE, UNIT_STAND_STATE_KNEEL, and UNIT_STAND_STATE_STAND.

Member Data Documentation

◆ m_uiValrothGUID

ObjectGuid npc_koltira_deathweaver::npc_koltira_deathweaverAI::m_uiValrothGUID

Referenced by JustSummoned(), Reset(), and UpdateAI().

◆ m_uiWave

uint32 npc_koltira_deathweaver::npc_koltira_deathweaverAI::m_uiWave

Referenced by Reset(), and UpdateAI().

◆ m_uiWave_Timer

uint32 npc_koltira_deathweaver::npc_koltira_deathweaverAI::m_uiWave_Timer

Referenced by Reset(), and UpdateAI().

◆ summons

SummonList npc_koltira_deathweaver::npc_koltira_deathweaverAI::summons

Referenced by JustSummoned(), and Reset().


The documentation for this struct was generated from the following file: