TrinityCore
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Modules Pages
FrostwingGauntletRespawner Class Reference

Public Member Functions

void operator() (Creature *creature)
 

Member Function Documentation

void FrostwingGauntletRespawner::operator() ( Creature creature)
inline
325  {
326  switch (creature->GetOriginalEntry())
327  {
332  case NPC_YMIRJAR_WARLORD:
333  break;
335  case NPC_CAPTAIN_ARNATH:
336  case NPC_CAPTAIN_BRANDON:
337  case NPC_CAPTAIN_GRONDEL:
338  case NPC_CAPTAIN_RUPERT:
339  creature->AI()->DoAction(ACTION_RESET_EVENT);
340  break;
341  case NPC_SISTER_SVALNA:
342  creature->AI()->DoAction(ACTION_RESET_EVENT);
343  // return, this creature is never dead if event is reset
344  return;
345  default:
346  return;
347  }
348 
349  uint32 corpseDelay = creature->GetCorpseDelay();
350  uint32 respawnDelay = creature->GetRespawnDelay();
351  creature->SetCorpseDelay(1);
352  creature->SetRespawnDelay(2);
353 
354  if (CreatureData const* data = creature->GetCreatureData())
355  creature->SetPosition(data->posX, data->posY, data->posZ, data->orientation);
356  creature->DespawnOrUnsummon();
357 
358  creature->SetCorpseDelay(corpseDelay);
359  creature->SetRespawnDelay(respawnDelay);
360  }
Definition: icecrown_citadel.h:270
Definition: Creature.h:287
void DespawnOrUnsummon(uint32 msTimeToDespawn=0)
Definition: Creature.cpp:1774
Definition: pit_of_saron.h:88
uint32 GetRespawnDelay() const
Definition: Creature.h:637
CreatureData const * GetCreatureData() const
Definition: Creature.h:559
Definition: icecrown_citadel.h:266
Definition: icecrown_citadel.h:269
uint32 GetCorpseDelay() const
Definition: Creature.h:493
void SetPosition(float x, float y, float z, float o)
Definition: Creature.cpp:2537
Definition: icecrown_citadel.h:260
CreatureAI * AI() const
Definition: Creature.h:525
Definition: icecrown_citadel.h:257
void SetCorpseDelay(uint32 delay)
Definition: Creature.h:492
uint32_t uint32
Definition: Define.h:150
virtual void DoAction(int32)
Definition: UnitAI.h:138
Definition: icecrown_citadel.h:271
Definition: icecrown_citadel.h:259
Definition: icecrown_citadel.h:268
Definition: icecrown_citadel.cpp:272
void SetRespawnDelay(uint32 delay)
Definition: Creature.h:638
Definition: icecrown_citadel.h:258
uint32 GetOriginalEntry() const
Definition: Creature.h:699
Definition: icecrown_citadel.h:261

+ Here is the call graph for this function:


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