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

Public Member Functions

 at_bring_your_orphan_to ()
 
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

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

Member Function Documentation

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

Reimplemented from AreaTriggerScript.

924  {
925  if (player->isDead() || !player->HasAura(SPELL_ORPHAN_OUT))
926  return false;
927 
928  uint32 questId = 0;
929  uint32 orphanId = 0;
930 
931  switch (areaTrigger->ID)
932  {
934  questId = QUEST_DOWN_AT_THE_DOCKS;
935  orphanId = ORPHAN_ORCISH;
936  break;
939  orphanId = ORPHAN_ORCISH;
940  break;
942  questId = QUEST_LORDAERON_THRONE_ROOM;
943  orphanId = ORPHAN_ORCISH;
944  break;
946  questId = QUEST_BOUGHT_OF_ETERNALS;
947  orphanId = ORPHAN_HUMAN;
948  break;
950  questId = QUEST_SPOOKY_LIGHTHOUSE;
951  orphanId = ORPHAN_HUMAN;
952  break;
953  case AT_STONEWROUGHT_DAM:
954  questId = QUEST_STONEWROUGHT_DAM;
955  orphanId = ORPHAN_HUMAN;
956  break;
957  case AT_DARK_PORTAL:
958  questId = player->GetTeam() == ALLIANCE ? QUEST_DARK_PORTAL_A : QUEST_DARK_PORTAL_H;
959  orphanId = player->GetTeam() == ALLIANCE ? ORPHAN_DRAENEI : ORPHAN_BLOOD_ELF;
960  break;
961  }
962 
963  if (questId && orphanId && !getOrphanGUID(player, orphanId).IsEmpty() && player->GetQuestStatus(questId) == QUEST_STATUS_INCOMPLETE)
964  player->AreaExploredOrEventHappens(questId);
965 
966  return true;
967  }
Definition: childrens_week.cpp:89
Definition: childrens_week.cpp:112
Definition: childrens_week.cpp:29
Definition: childrens_week.cpp:27
Definition: childrens_week.cpp:90
Definition: childrens_week.cpp:111
Definition: childrens_week.cpp:87
Definition: childrens_week.cpp:85
ObjectGuid getOrphanGUID(Player *player, uint32 orphan)
Definition: childrens_week.cpp:134
Definition: childrens_week.cpp:28
Definition: childrens_week.cpp:88
Definition: SharedDefines.h:1000
Definition: childrens_week.cpp:86
Definition: childrens_week.cpp:84
Definition: childrens_week.cpp:110
uint32_t uint32
Definition: Define.h:150
Definition: childrens_week.cpp:108
Definition: childrens_week.cpp:113
Definition: childrens_week.cpp:30
Definition: QuestDef.h:113
Definition: childrens_week.cpp:107
Definition: childrens_week.cpp:129
Definition: childrens_week.cpp:109
Definition: childrens_week.cpp:83

+ Here is the call graph for this function:


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