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

Public Member Functions

 AreaTrigger_at_last_rites ()
 
bool OnTrigger (Player *player, AreaTriggerEntry const *areaTrigger, 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

AreaTrigger_at_last_rites::AreaTrigger_at_last_rites ( )
inline
171 : AreaTriggerScript("at_last_rites") { }
AreaTriggerScript(const char *name)
Definition: ScriptMgr.cpp:1598

Member Function Documentation

bool AreaTrigger_at_last_rites::OnTrigger ( Player player,
AreaTriggerEntry const areaTrigger,
bool   
)
inlineoverridevirtual

Reimplemented from AreaTriggerScript.

174  {
175  if (!(player->GetQuestStatus(QUEST_LAST_RITES) == QUEST_STATUS_INCOMPLETE ||
176  player->GetQuestStatus(QUEST_LAST_RITES) == QUEST_STATUS_COMPLETE ||
177  player->GetQuestStatus(QUEST_BREAKING_THROUGH) == QUEST_STATUS_INCOMPLETE ||
178  player->GetQuestStatus(QUEST_BREAKING_THROUGH) == QUEST_STATUS_COMPLETE))
179  return false;
180 
181  WorldLocation pPosition;
182 
183  switch (areaTrigger->ID)
184  {
185  case 5332:
186  case 5338:
187  pPosition = WorldLocation(571, 3733.68f, 3563.25f, 290.812f, 3.665192f);
188  break;
189  case 5334:
190  pPosition = WorldLocation(571, 3802.38f, 3585.95f, 49.5765f, 0.0f);
191  break;
192  case 5340:
193  if (player->GetQuestStatus(QUEST_LAST_RITES) == QUEST_STATUS_INCOMPLETE ||
194  player->GetQuestStatus(QUEST_LAST_RITES) == QUEST_STATUS_COMPLETE)
195  pPosition = WorldLocation(571, 3687.91f, 3577.28f, 473.342f);
196  else
197  pPosition = WorldLocation(571, 3739.38f, 3567.09f, 341.58f);
198  break;
199  default:
200  return false;
201  }
202 
203  player->TeleportTo(pPosition);
204 
205  return false;
206  }
Definition: QuestDef.h:111
Definition: Position.h:228
Definition: areatrigger_scripts.cpp:164
Definition: areatrigger_scripts.cpp:165
Definition: QuestDef.h:113

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