TrinityCore
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Modules Pages
npc_ranshalla::npc_ranshallaAI Struct Reference

Public Member Functions

 npc_ranshallaAI (Creature *creature)
 
void Initialize ()
 
void Reset () override
 
void DoContinueEscort (bool isAltarWaypoint=false)
 
void DoChannelTorchSpell (bool isAltarWaypoint=false)
 
void DoSummonPriestess ()
 
void SummonedMovementInform (Creature *summoned, uint32 type, uint32 pointId)
 
void WaypointReached (uint32 pointId) override
 
void JustDidDialogueStep (int32 entry) override
 Will be called when a dialogue step was done. More...
 
CreatureGetSpeakerByEntry (int32 entry) override
 Will be called to get a speaker, MUST be implemented if not used in instances. More...
 
void UpdateEscortAI (uint32 diff) override
 
- Public Member Functions inherited from npc_escortAI
 npc_escortAI (Creature *creature)
 
 ~npc_escortAI ()
 
void AttackStart (Unit *who) override
 
void MoveInLineOfSight (Unit *who) override
 
void JustDied (Unit *) override
 
void JustRespawned () override
 
void ReturnToLastPoint ()
 
void EnterEvadeMode (EvadeReason=EVADE_REASON_OTHER) override
 
void UpdateAI (uint32 diff) override
 
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 resetWaypointsOnFail=true)
 
bool GetWaypointPosition (uint32 pointId, float &x, float &y, float &z)
 
virtual void WaypointStart (uint32)
 
void Start (bool isActiveAttacker=true, bool run=false, ObjectGuid playerGUID=ObjectGuid::Empty, Quest const *quest=NULL, bool instantRespawn=false, bool canLoopPath=false, bool resetWaypoints=true)
 
void SetRun (bool on=true)
 
void SetEscortPaused (bool on)
 
bool HasEscortState (uint32 escortState)
 
virtual bool IsEscorted () const override
 
void SetMaxPlayerDistance (float newMax)
 
float GetMaxPlayerDistance () const
 
void SetDespawnAtEnd (bool despawn)
 
void SetDespawnAtFar (bool despawn)
 
bool GetAttack () const
 
void SetCanAttack (bool attack)
 
ObjectGuid GetEventStarterGUID () const
 
- Public Member Functions inherited from ScriptedAI
 ScriptedAI (Creature *creature)
 
virtual ~ScriptedAI ()
 
void AttackStartNoMove (Unit *target)
 
void DamageTaken (Unit *, uint32 &) 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 OnPossess (bool)
 
void EnterCombat (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 DoResetThreat ()
 
float DoGetThreat (Unit *unit)
 
void DoModifyThreatPercent (Unit *unit, int32 pct)
 
void DoTeleportTo (float x, float y, float z, uint32 time=0)
 
void DoTeleportTo (float const pos[4])
 
void DoTeleportPlayer (Unit *unit, float x, float y, float z, float o)
 
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 HealthBelowPct (uint32 pct) const
 
bool HealthAbovePct (uint32 pct) const
 
SpellInfo constSelectSpell (Unit *target, uint32 school, uint32 mechanic, SelectTargetType targets, 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)
 
void SetCombatMovement (bool allowMovement)
 
bool IsCombatMovementAllowed () 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
 
- Public Member Functions inherited from CreatureAI
void Talk (uint8 id, WorldObject const *whisperTarget=nullptr)
 
 CreatureAI (Creature *creature)
 
virtual ~CreatureAI ()
 
void MoveInLineOfSight_Safe (Unit *who)
 == Reactions At ================================= More...
 
void TriggerAlert (Unit const *who) const
 
virtual bool CanRespawn ()
 
virtual void IsSummonedBy (Unit *)
 
virtual void SummonedCreatureDies (Creature *, Unit *)
 
virtual void AttackedBy (Unit *)
 
void OnCharmed (bool apply) override
 
virtual void JustReachedHome ()
 
void DoZoneInCombat (Creature *creature=NULL, float maxRangeToNearestTarget=50.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 void OnSpellClick (Unit *, bool &)
 
virtual bool CanSeeAlways (WorldObject const *)
 
int32 VisualizeBoundary (uint32 duration, Unit *owner=nullptr, bool fill=false) const
 
virtual bool CheckInRoom ()
 
CreatureBoundary constGetBoundary () const
 
- 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 (SelectAggroTarget targetType, uint32 position=0, float dist=0.0f, bool playerOnly=false, int32 aura=0)
 
template<class PREDICATE >
UnitSelectTarget (SelectAggroTarget targetType, uint32 position, PREDICATE const &predicate)
 
void SelectTargetList (std::list< Unit * > &targetList, uint32 num, SelectAggroTarget targetType, float dist=0.0f, bool playerOnly=false, int32 aura=0)
 
template<class PREDICATE >
void SelectTargetList (std::list< Unit * > &targetList, PREDICATE const &predicate, uint32 maxTargets, SelectAggroTarget targetType)
 
virtual void DamageDealt (Unit *, uint32 &, DamageEffectType)
 
virtual void HealReceived (Unit *, uint32 &)
 
virtual void HealDone (Unit *, uint32 &)
 
virtual void SpellInterrupted (uint32, uint32)
 
void AttackStartCaster (Unit *victim, float dist)
 
void DoCast (uint32 spellId)
 
void DoCast (Unit *victim, uint32 spellId, bool triggered=false)
 
void DoCastVictim (uint32 spellId, bool triggered=false)
 
void DoCastAOE (uint32 spellId, bool triggered=false)
 
void DoMeleeAttackIfReady ()
 
bool DoSpellAttackIfReady (uint32 spellId)
 
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 sQuestReward (Player *, Quest const *, uint32)
 
virtual bool sOnDummyEffect (Unit *, uint32, SpellEffIndex)
 
virtual void sOnGameEvent (bool, uint16)
 

Public Attributes

uint32 _delayTimer
 
ObjectGuid _firstPriestessGUID
 
ObjectGuid _secondPriestessGUID
 
ObjectGuid _guardEluneGUID
 
ObjectGuid _voiceEluneGUID
 
ObjectGuid _altarGUID
 
- Public Attributes inherited from ScriptedAI
bool IsFleeing
 

Private Attributes

EventMap events
 

Additional Inherited Members

- Public Types inherited from CreatureAI
enum  EvadeReason { EVADE_REASON_NO_HOSTILES, EVADE_REASON_BOUNDARY, EVADE_REASON_SEQUENCE_BREAK, EVADE_REASON_OTHER }
 
- 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 CheckBoundary (Position const *who=nullptr) const
 
void SetBoundary (CreatureBoundary const *boundary)
 
bool _EnterEvadeMode (EvadeReason why=EVADE_REASON_OTHER)
 
- Protected Attributes inherited from CreatureAI
Creature *const me
 
CreatureBoundary const_boundary
 
- Protected Attributes inherited from UnitAI
Unit *const me
 
- Private Member Functions inherited from DialogueHelper
 DialogueHelper (DialogueEntry const *dialogueArray)
 
void StartNextDialogueText (int32 textEntry)
 
void DialogueUpdate (uint32 diff)
 

Constructor & Destructor Documentation

npc_ranshalla::npc_ranshallaAI::npc_ranshallaAI ( Creature creature)
inline
317  : npc_escortAI(creature),
319  {
320  Initialize();
321  }
npc_escortAI(Creature *creature)
Definition: ScriptedEscortAI.cpp:37
DialogueHelper(DialogueEntry const *dialogueArray)
Definition: zone_winterspring.cpp:158
void Initialize()
Definition: zone_winterspring.cpp:323
const DialogueEntry introDialogue[]
Definition: zone_winterspring.cpp:241

+ Here is the call graph for this function:

Member Function Documentation

void npc_ranshalla::npc_ranshallaAI::DoChannelTorchSpell ( bool  isAltarWaypoint = false)
inline
356  {
357  // Check if we are using the fire or the altar and remove the no_interact flag
358  if (isAltarWaypoint)
359  {
361  {
362  go->RemoveFlag(GAMEOBJECT_FLAGS, GO_FLAG_NOT_SELECTABLE);
363  me->SetFacingToObject(go);
364  _altarGUID = go->GetGUID();
365  }
366  }
368  go->RemoveFlag(GAMEOBJECT_FLAGS, GO_FLAG_NOT_SELECTABLE);
369 
370  // Yell and set escort to pause
373  SetEscortPaused(true);
375  }
Definition: zone_winterspring.cpp:106
Definition: SharedDefines.h:2125
Creature *const me
Definition: CreatureAI.h:71
void SetFacingToObject(WorldObject const *object)
Definition: Unit.cpp:15787
Definition: zone_winterspring.cpp:124
void DoCast(uint32 spellId)
Definition: UnitAI.cpp:101
Definition: GameObject.h:880
void Talk(uint8 id, WorldObject const *whisperTarget=nullptr)
Definition: CreatureAI.cpp:42
ObjectGuid _altarGUID
Definition: zone_winterspring.cpp:334
Definition: UpdateFields.h:319
Definition: zone_winterspring.cpp:125
void SetEscortPaused(bool on)
Definition: ScriptedEscortAI.cpp:507
Definition: zone_winterspring.cpp:111
Definition: zone_winterspring.cpp:76
TC_GAME_API GameObject * GetClosestGameObjectWithEntry(WorldObject *source, uint32 entry, float maxSearchRange)
Definition: ScriptedCreature.cpp:616

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

void npc_ranshalla::npc_ranshallaAI::DoContinueEscort ( bool  isAltarWaypoint = false)
inline
343  {
344  me->InterruptNonMeleeSpells(false);
345 
346  if (isAltarWaypoint)
348  else
350 
351  _delayTimer = 2000;
352  }
Creature *const me
Definition: CreatureAI.h:71
Definition: zone_winterspring.cpp:77
void Talk(uint8 id, WorldObject const *whisperTarget=nullptr)
Definition: CreatureAI.cpp:42
uint32 _delayTimer
Definition: zone_winterspring.cpp:328
void InterruptNonMeleeSpells(bool withDelayed, uint32 spellid=0, bool withInstant=true)
Definition: Unit.cpp:2916
Definition: zone_winterspring.cpp:82

+ Here is the call graph for this function:

void npc_ranshalla::npc_ranshallaAI::DoSummonPriestess ( )
inline
378  {
379  // Summon 2 Elune priestess and make each of them move to a different spot
381  {
382  priestess->GetMotionMaster()->MovePoint(0, wingThicketLocations[3]);
383  _firstPriestessGUID = priestess->GetGUID();
384  }
386  {
387  // Left priestess should have a distinct move point because she is the one who starts the dialogue at point reach
388  priestess->GetMotionMaster()->MovePoint(1, wingThicketLocations[4]);
389  _secondPriestessGUID = priestess->GetGUID();
390  }
391  }
static Position wingThicketLocations[]
Definition: zone_winterspring.cpp:275
Definition: Object.h:58
Definition: Creature.h:467
ObjectGuid _firstPriestessGUID
Definition: zone_winterspring.cpp:330
Creature *const me
Definition: CreatureAI.h:71
ObjectGuid _secondPriestessGUID
Definition: zone_winterspring.cpp:331
Definition: zone_winterspring.cpp:117
TempSummon * SummonCreature(uint32 id, Position const &pos, TempSummonType spwtype=TEMPSUMMON_MANUAL_DESPAWN, uint32 despwtime=0, uint32 vehId=0) const
Definition: Object.cpp:2346

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

Creature* npc_ranshalla::npc_ranshallaAI::GetSpeakerByEntry ( int32  )
inlineoverridevirtual

Will be called to get a speaker, MUST be implemented if not used in instances.

Reimplemented from DialogueHelper.

554  {
555  switch (entry)
556  {
557  case NPC_RANSHALLA:
558  return me;
559  case NPC_VOICE_ELUNE:
560  return me->GetMap()->GetCreature(_voiceEluneGUID);
565  default:
566  return NULL;
567  }
568 
569  }
Definition: zone_winterspring.cpp:118
Map * GetMap() const
Definition: Object.h:543
arena_t NULL
Definition: jemalloc_internal.h:624
ObjectGuid _firstPriestessGUID
Definition: zone_winterspring.cpp:330
Creature *const me
Definition: CreatureAI.h:71
ObjectGuid _secondPriestessGUID
Definition: zone_winterspring.cpp:331
ObjectGuid _voiceEluneGUID
Definition: zone_winterspring.cpp:333
Creature * GetCreature(ObjectGuid const &guid)
Definition: Map.cpp:3535
Definition: zone_winterspring.cpp:116
Definition: zone_winterspring.cpp:138
Definition: zone_winterspring.cpp:137

+ Here is the call graph for this function:

void npc_ranshalla::npc_ranshallaAI::Initialize ( void  )
inline
324  {
325  _delayTimer = 0;
326  }
uint32 _delayTimer
Definition: zone_winterspring.cpp:328

+ Here is the caller graph for this function:

void npc_ranshalla::npc_ranshallaAI::JustDidDialogueStep ( int32  )
inlineoverridevirtual

Will be called when a dialogue step was done.

Reimplemented from DialogueHelper.

455  {
456  switch (entry)
457  {
458  case NPC_RANSHALLA:
459  // Start the altar channeling
460  DoChannelTorchSpell(true);
461  break;
463  SetEscortPaused(false);
464  break;
466  // make the gem respawn
468  {
469  if (gem->isSpawned())
470  break;
471 
472  gem->SetRespawnTime(90);
473  gem->Refresh();
474  }
475  break;
477  // move near the escort npc
478  if (Creature* priestess = me->GetMap()->GetCreature(_firstPriestessGUID))
479  priestess->GetMotionMaster()->MovePoint(0, wingThicketLocations[6]);
480  break;
482  // summon the Guardian of Elune
484  {
485  guard->GetMotionMaster()->MovePoint(0, wingThicketLocations[5]);
486  _guardEluneGUID = guard->GetGUID();
487  }
488  // summon the Voice of Elune
489  if (GameObject* altar = me->GetMap()->GetGameObject(_altarGUID))
490  {
491  if (Creature* voice = me->SummonCreature(NPC_VOICE_ELUNE, *altar, TEMPSUMMON_TIMED_DESPAWN, 30000))
492  _voiceEluneGUID = voice->GetGUID();
493  }
494  break;
495  case SAY_VOICE_ALTAR_15:
496  // move near the escort npc and continue dialogue
497  if (Creature* priestess = me->GetMap()->GetCreature(_secondPriestessGUID))
498  {
499  priestess->AI()->Talk(SAY_PRIESTESS_ALTAR_14);
500  priestess->GetMotionMaster()->MovePoint(0, wingThicketLocations[7]);
501  }
502  break;
504  // make the voice of elune leave
505  if (Creature* guard = me->GetMap()->GetCreature(_guardEluneGUID))
506  {
507  guard->GetMotionMaster()->MovePoint(0, wingThicketLocations[2]);
508  guard->DespawnOrUnsummon(4000);
509  }
510  break;
512  // make the first priestess leave
513  if (Creature* priestess = me->GetMap()->GetCreature(_firstPriestessGUID))
514  {
515  priestess->GetMotionMaster()->MovePoint(0, wingThicketLocations[0]);
516  priestess->DespawnOrUnsummon(4000);
517  }
518  break;
520  // make the second priestess leave
521  if (Creature* priestess = me->GetMap()->GetCreature(_secondPriestessGUID))
522  {
523  priestess->GetMotionMaster()->MovePoint(0, wingThicketLocations[1]);
524  priestess->DespawnOrUnsummon(4000);
525  }
526  break;
527  case DATA_EVENT_END:
528  // Turn towards the player
529  if (Player* player = GetPlayerForEscort())
530  {
531  me->SetFacingToObject(player);
532  Talk(SAY_RANSHALLA_END_1, player);
533  }
534  break;
535  case SAY_RANSHALLA_END_2:
536  // Turn towards the altar and kneel - quest complete
537  if (GameObject* altar = me->GetMap()->GetGameObject(_altarGUID))
538  {
539  me->SetFacingToObject(altar);
540  altar->ResetDoorOrButton();
541  }
543  if (Player* player = GetPlayerForEscort())
544  {
545  player->GroupEventHappens(QUEST_GUARDIANS_ALTAR, me);
546  Talk(SAY_RANSHALLA_END_2, player);
547  }
548  me->DespawnOrUnsummon(4000);
549  break;
550  }
551  }
static Position wingThicketLocations[]
Definition: zone_winterspring.cpp:275
void DespawnOrUnsummon(uint32 msTimeToDespawn=0)
Definition: Creature.cpp:1774
Definition: Unit.h:215
Definition: zone_winterspring.cpp:118
Map * GetMap() const
Definition: Object.h:543
Definition: zone_winterspring.cpp:132
Definition: zone_winterspring.cpp:96
Player * GetPlayerForEscort()
Definition: ScriptedEscortAI.h:109
Definition: Object.h:58
Definition: Creature.h:467
ObjectGuid _firstPriestessGUID
Definition: zone_winterspring.cpp:330
Definition: zone_winterspring.cpp:104
Definition: zone_winterspring.cpp:100
Definition: zone_winterspring.cpp:90
Creature *const me
Definition: CreatureAI.h:71
ObjectGuid _secondPriestessGUID
Definition: zone_winterspring.cpp:331
Definition: zone_winterspring.cpp:103
void SetFacingToObject(WorldObject const *object)
Definition: Unit.cpp:15787
Definition: zone_winterspring.cpp:101
void DoChannelTorchSpell(bool isAltarWaypoint=false)
Definition: zone_winterspring.cpp:355
Definition: Object.h:56
Definition: zone_winterspring.cpp:89
Definition: GameObject.h:880
void Talk(uint8 id, WorldObject const *whisperTarget=nullptr)
Definition: CreatureAI.cpp:42
ObjectGuid _altarGUID
Definition: zone_winterspring.cpp:334
ObjectGuid _voiceEluneGUID
Definition: zone_winterspring.cpp:333
Definition: zone_winterspring.cpp:94
Definition: zone_winterspring.cpp:102
Definition: zone_winterspring.cpp:95
Definition: zone_winterspring.cpp:140
ObjectGuid _guardEluneGUID
Definition: zone_winterspring.cpp:332
Definition: zone_winterspring.cpp:87
void SetEscortPaused(bool on)
Definition: ScriptedEscortAI.cpp:507
Creature * GetCreature(ObjectGuid const &guid)
Definition: Map.cpp:3535
Definition: zone_winterspring.cpp:119
void SetStandState(UnitStandStateType state, uint32 animKitID=0)
Definition: Unit.cpp:12772
Definition: zone_winterspring.cpp:116
GameObject * GetGameObject(ObjectGuid const &guid)
Definition: Map.cpp:3545
Definition: zone_winterspring.cpp:126
TC_GAME_API GameObject * GetClosestGameObjectWithEntry(WorldObject *source, uint32 entry, float maxSearchRange)
Definition: ScriptedCreature.cpp:616
TempSummon * SummonCreature(uint32 id, Position const &pos, TempSummonType spwtype=TEMPSUMMON_MANUAL_DESPAWN, uint32 despwtime=0, uint32 vehId=0) const
Definition: Object.cpp:2346

+ Here is the call graph for this function:

void npc_ranshalla::npc_ranshallaAI::Reset ( )
inlineoverridevirtual

Reimplemented from ScriptedAI.

337  {
338  Initialize();
339  }
void Initialize()
Definition: zone_winterspring.cpp:323

+ Here is the call graph for this function:

void npc_ranshalla::npc_ranshallaAI::SummonedMovementInform ( Creature summoned,
uint32  type,
uint32  pointId 
)
inline
394  {
395  if (type != POINT_MOTION_TYPE || summoned->GetEntry() != NPC_PRIESTESS_ELUNE || pointId != 1)
396  return;
397 
398  // Start the dialogue when the priestess reach the altar (they should both reach the point in the same time)
400  }
Definition: zone_winterspring.cpp:84
void StartNextDialogueText(int32 textEntry)
Definition: zone_winterspring.cpp:168
Definition: zone_winterspring.cpp:117
uint32 GetEntry() const
Definition: Object.h:107
Definition: MotionMaster.h:46

+ Here is the call graph for this function:

void npc_ranshalla::npc_ranshallaAI::UpdateEscortAI ( uint32  diff)
inlineoverridevirtual

Reimplemented from npc_escortAI.

572  {
573  DialogueUpdate(diff);
574 
575  if (_delayTimer)
576  {
577  if (_delayTimer <= diff)
578  {
579  SetEscortPaused(false);
580  _delayTimer = 0;
581  }
582  else
583  _delayTimer -= diff;
584  }
585  events.Update(diff);
588 
590  }
Definition: zone_winterspring.cpp:84
virtual void UpdateEscortAI(uint32 diff)
Definition: ScriptedEscortAI.cpp:315
EventMap events
Definition: zone_winterspring.cpp:592
void StartNextDialogueText(int32 textEntry)
Definition: zone_winterspring.cpp:168
void Update(uint32 time)
Definition: EventMap.h:54
void SetEscortPaused(bool on)
Definition: ScriptedEscortAI.cpp:507
uint32 _delayTimer
Definition: zone_winterspring.cpp:328
uint32 ExecuteEvent()
Definition: EventMap.cpp:46
void DialogueUpdate(uint32 diff)
Definition: zone_winterspring.cpp:189
Definition: zone_winterspring.cpp:142

+ Here is the call graph for this function:

void npc_ranshalla::npc_ranshallaAI::WaypointReached ( uint32  pointId)
inlineoverridevirtual

Implements npc_escortAI.

403  {
404  switch (pointId)
405  {
406  case 3:
408  break;
409  case 10: // Cavern 1
410  case 15: // Cavern 2
411  case 20: // Cavern 3
412  case 25: // Cavern 4
413  case 36: // Cavern 5
415  break;
416  case 39:
418  SetEscortPaused(true);
419  break;
420  case 41:
421  {
422  // Search for all nearest lights and respawn them
423  std::list<GameObject*> eluneLights;
424  GetGameObjectListWithEntryInGrid(eluneLights, me, GO_ELUNE_LIGHT, 20.0f);
425  for (std::list<GameObject*>::const_iterator itr = eluneLights.begin(); itr != eluneLights.end(); ++itr)
426  {
427  if ((*itr)->isSpawned())
428  continue;
429 
430  (*itr)->SetRespawnTime(115);
431  (*itr)->Refresh();
432  }
433 
434  if (GameObject* altar = me->GetMap()->GetGameObject(_altarGUID))
435  me->SetFacingToObject(altar);
436  break;
437  }
438  case 42:
439  // Summon the 2 priestess
440  SetEscortPaused(true);
444  break;
445  case 44:
446  // Stop the escort and turn towards the altar
447  SetEscortPaused(true);
448  if (GameObject* altar = me->GetMap()->GetGameObject(_altarGUID))
449  me->SetFacingToObject(altar);
450  break;
451  }
452  }
Map * GetMap() const
Definition: Object.h:543
Definition: zone_winterspring.cpp:127
Creature *const me
Definition: CreatureAI.h:71
void SetFacingToObject(WorldObject const *object)
Definition: Unit.cpp:15787
void DoChannelTorchSpell(bool isAltarWaypoint=false)
Definition: zone_winterspring.cpp:355
EventMap events
Definition: zone_winterspring.cpp:592
void StartNextDialogueText(int32 textEntry)
Definition: zone_winterspring.cpp:168
Definition: GameObject.h:880
void Talk(uint8 id, WorldObject const *whisperTarget=nullptr)
Definition: CreatureAI.cpp:42
ObjectGuid _altarGUID
Definition: zone_winterspring.cpp:334
void ScheduleEvent(uint32 eventId, Milliseconds const &time, uint32 group=0, uint8 phase=0)
Definition: EventMap.h:123
Definition: zone_winterspring.cpp:78
void SetEscortPaused(bool on)
Definition: ScriptedEscortAI.cpp:507
Definition: zone_winterspring.cpp:75
void DoSummonPriestess()
Definition: zone_winterspring.cpp:377
Definition: zone_winterspring.cpp:142
GameObject * GetGameObject(ObjectGuid const &guid)
Definition: Map.cpp:3545
TC_GAME_API void GetGameObjectListWithEntryInGrid(std::list< GameObject * > &list, WorldObject *source, uint32 entry, float maxSearchRange)
Definition: ScriptedCreature.cpp:626
Definition: zone_winterspring.cpp:83

+ Here is the call graph for this function:

Member Data Documentation

ObjectGuid npc_ranshalla::npc_ranshallaAI::_altarGUID
uint32 npc_ranshalla::npc_ranshallaAI::_delayTimer
ObjectGuid npc_ranshalla::npc_ranshallaAI::_firstPriestessGUID
ObjectGuid npc_ranshalla::npc_ranshallaAI::_guardEluneGUID
ObjectGuid npc_ranshalla::npc_ranshallaAI::_secondPriestessGUID
ObjectGuid npc_ranshalla::npc_ranshallaAI::_voiceEluneGUID
EventMap npc_ranshalla::npc_ranshallaAI::events
private

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