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

Public Member Functions

 at_nethekurse_exit ()
 
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_nethekurse_exit::at_nethekurse_exit ( )
inline
30 : AreaTriggerScript("at_nethekurse_exit") { };
AreaTriggerScript(const char *name)
Definition: ScriptMgr.cpp:1598

Member Function Documentation

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

Reimplemented from AreaTriggerScript.

33  {
34  if (InstanceScript* is = player->GetInstanceScript())
35  {
36  if (is->instance->IsHeroic())
37  {
38  Creature* executioner = nullptr;
39 
40  is->instance->LoadGrid(Executioner.GetPositionX(), Executioner.GetPositionY());
41  if (Creature* kargath = ObjectAccessor::GetCreature(*player, is->GetGuidData(NPC_KARGATH_BLADEFIST)))
42  {
43  if (is->GetGuidData(NPC_SHATTERED_EXECUTIONER).IsEmpty())
44  {
45  executioner = kargath->SummonCreature(NPC_SHATTERED_EXECUTIONER, Executioner);
47  }
48  }
49 
50  if (executioner)
51  for (uint8 i = 0; i < VictimCount; ++i)
52  executioner->SummonCreature(executionerVictims[i](is->GetData(DATA_TEAM_IN_INSTANCE)), executionerVictims[i].GetPos());
53  }
54  }
55 
56  return false;
57  }
uint32 const VictimCount
Definition: shattered_halls.h:25
Definition: forge_of_souls.h:33
Definition: Creature.h:467
const FactionSpawnerHelper executionerVictims[VictimCount]
Definition: shattered_halls.h:106
Definition: shattered_halls.h:48
float GetPositionY() const
Definition: Position.h:105
CreatureAI * AI() const
Definition: Creature.h:525
Definition: shattered_halls.h:46
virtual void DoAction(int32)
Definition: UnitAI.h:138
TC_GAME_API Creature * GetCreature(WorldObject const &u, ObjectGuid const &guid)
Definition: ObjectAccessor.cpp:174
const Position Executioner
Definition: shattered_halls.h:91
Definition: InstanceScript.h:141
uint8_t uint8
Definition: Define.h:152
Definition: shattered_halls.h:88
float GetPositionX() const
Definition: Position.h:104
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:


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