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

Public Member Functions

 at_icc_saurfang_portal ()
 
bool OnTrigger (Player *player, AreaTriggerEntry const *, bool) override
 
- Public Member Functions inherited from ScriptObject
const std::string & GetName () const
 

Additional Inherited Members

- Protected Member Functions inherited from AreaTriggerScript
 AreaTriggerScript (const char *name)
 
- Protected Member Functions inherited from ScriptObject
 ScriptObject (const char *name)
 
virtual ~ScriptObject ()
 

Constructor & Destructor Documentation

at_icc_saurfang_portal::at_icc_saurfang_portal ( )
inline
2085 : AreaTriggerScript("at_icc_saurfang_portal") { }
AreaTriggerScript(const char *name)
Definition: ScriptMgr.cpp:1598

Member Function Documentation

bool at_icc_saurfang_portal::OnTrigger ( Player player,
AreaTriggerEntry const ,
bool   
)
inlineoverridevirtual

Reimplemented from AreaTriggerScript.

2088  {
2089  InstanceScript* instance = player->GetInstanceScript();
2090  if (!instance || instance->GetBossState(DATA_DEATHBRINGER_SAURFANG) != DONE)
2091  return true;
2092 
2093  player->TeleportTo(631, 4126.35f, 2769.23f, 350.963f, 0.0f);
2094 
2095  if (instance->GetData(DATA_COLDFLAME_JETS) == NOT_STARTED)
2096  {
2097  // Process relocation now, to preload the grid and initialize traps
2098  player->GetMap()->PlayerRelocation(player, 4126.35f, 2769.23f, 350.963f, 0.0f);
2099 
2101  std::list<Creature*> traps;
2102  GetCreatureListWithEntryInGrid(traps, player, NPC_FROST_FREEZE_TRAP, 120.0f);
2103  traps.sort(Trinity::ObjectDistanceOrderPred(player));
2104  bool instant = false;
2105  for (std::list<Creature*>::iterator itr = traps.begin(); itr != traps.end(); ++itr)
2106  {
2107  (*itr)->AI()->DoAction(instant ? 1000 : 11000);
2108  instant = !instant;
2109  }
2110  }
2111 
2112  return true;
2113  }
Definition: icecrown_citadel.h:103
Definition: icecrown_citadel.h:78
virtual uint32 GetData(uint32) const
Definition: ZoneScript.h:51
Definition: inflate.h:49
TC_GAME_API void GetCreatureListWithEntryInGrid(std::list< Creature * > &list, WorldObject *source, uint32 entry, float maxSearchRange)
Definition: ScriptedCreature.cpp:621
Definition: Object.h:668
Definition: icecrown_citadel.h:214
Definition: InstanceScript.h:59
virtual void SetData(uint32, uint32)
Definition: ZoneScript.h:52
Definition: InstanceScript.h:58
Definition: InstanceScript.h:141
EncounterState GetBossState(uint32 id) const
Definition: InstanceScript.h:227

+ Here is the call graph for this function:


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