AzerothCore 3.3.5a
OpenSource WoW Emulator
Loading...
Searching...
No Matches
at_bring_your_orphan_to Class Reference
Inheritance diagram for at_bring_your_orphan_to:
AreaTriggerScript ScriptObject

Public Member Functions

 at_bring_your_orphan_to ()
 
bool OnTrigger (Player *player, AreaTrigger const *trigger) override
 
- Public Member Functions inherited from AreaTriggerScript
bool IsDatabaseBound () const override
 
- Public Member Functions inherited from ScriptObject
virtual bool isAfterLoadScript () const
 
virtual void checkValidity ()
 
const std::string & GetName () const
 
uint16 GetTotalAvailableHooks ()
 

Additional Inherited Members

- Protected Member Functions inherited from AreaTriggerScript
 AreaTriggerScript (const char *name)
 
- Protected Member Functions inherited from ScriptObject
 ScriptObject (const char *name, uint16 totalAvailableHooks=0)
 
virtual ~ScriptObject ()=default
 

Detailed Description

Constructor & Destructor Documentation

◆ at_bring_your_orphan_to()

at_bring_your_orphan_to::at_bring_your_orphan_to ( )
inline
810: AreaTriggerScript("at_bring_your_orphan_to") { }
Definition AreaTriggerScript.h:24

Member Function Documentation

◆ OnTrigger()

bool at_bring_your_orphan_to::OnTrigger ( Player player,
AreaTrigger const *  trigger 
)
inlineoverridevirtual

Reimplemented from AreaTriggerScript.

813 {
814 if (player->isDead() || !player->HasAura(SPELL_ORPHAN_OUT))
815 return false;
816
817 uint32 questId = 0;
818 uint32 orphanId = 0;
819
820 switch (trigger->entry)
821 {
823 questId = QUEST_DOWN_AT_THE_DOCKS;
824 orphanId = ORPHAN_ORCISH;
825 break;
828 orphanId = ORPHAN_ORCISH;
829 break;
832 orphanId = ORPHAN_ORCISH;
833 break;
835 questId = QUEST_BOUGHT_OF_ETERNALS;
836 orphanId = ORPHAN_HUMAN;
837 break;
839 questId = QUEST_SPOOKY_LIGHTHOUSE;
840 orphanId = ORPHAN_HUMAN;
841 break;
843 questId = QUEST_STONEWROUGHT_DAM;
844 orphanId = ORPHAN_HUMAN;
845 break;
846 case AT_DARK_PORTAL:
848 orphanId = player->GetTeamId() == TEAM_ALLIANCE ? ORPHAN_DRAENEI : ORPHAN_BLOOD_ELF;
849 break;
850 }
851
852 if (questId && orphanId && getOrphanGUID(player, orphanId) && player->GetQuestStatus(questId) == QUEST_STATUS_INCOMPLETE)
853 player->AreaExploredOrEventHappens(questId);
854
855 return true;
856 }
std::uint32_t uint32
Definition Define.h:107
@ QUEST_STATUS_INCOMPLETE
Definition QuestDef.h:103
@ TEAM_ALLIANCE
Definition SharedDefines.h:748
@ QUEST_DARK_PORTAL_H
Definition childrens_week.cpp:90
@ QUEST_DARK_PORTAL_A
Definition childrens_week.cpp:91
@ QUEST_STONEWROUGHT_DAM
Definition childrens_week.cpp:89
@ QUEST_BOUGHT_OF_ETERNALS
Definition childrens_week.cpp:87
@ QUEST_DOWN_AT_THE_DOCKS
Definition childrens_week.cpp:85
@ QUEST_LORDAERON_THRONE_ROOM
Definition childrens_week.cpp:92
@ QUEST_GATEWAY_TO_THE_FRONTIER
Definition childrens_week.cpp:86
@ QUEST_SPOOKY_LIGHTHOUSE
Definition childrens_week.cpp:88
@ SPELL_ORPHAN_OUT
Definition childrens_week.cpp:131
@ AT_BOUGHT_OF_ETERNALS
Definition childrens_week.cpp:112
@ AT_DOWN_AT_THE_DOCKS
Definition childrens_week.cpp:109
@ AT_LORDAERON_THRONE_ROOM
Definition childrens_week.cpp:111
@ AT_DARK_PORTAL
Definition childrens_week.cpp:115
@ AT_SPOOKY_LIGHTHOUSE
Definition childrens_week.cpp:113
@ AT_GATEWAY_TO_THE_FRONTIER
Definition childrens_week.cpp:110
@ AT_STONEWROUGHT_DAM
Definition childrens_week.cpp:114
ObjectGuid getOrphanGUID(Player *player, uint32 orphan)
Definition childrens_week.cpp:136
@ ORPHAN_BLOOD_ELF
Definition childrens_week.cpp:29
@ ORPHAN_ORCISH
Definition childrens_week.cpp:32
@ ORPHAN_HUMAN
Definition childrens_week.cpp:31
@ ORPHAN_DRAENEI
Definition childrens_week.cpp:30
TeamId GetTeamId(bool original=false) const
Definition Player.h:2128
void AreaExploredOrEventHappens(uint32 questId)
Definition PlayerQuest.cpp:1826
QuestStatus GetQuestStatus(uint32 quest_id) const
Definition PlayerQuest.cpp:1465
bool HasAura(uint32 spellId, ObjectGuid casterGUID=ObjectGuid::Empty, ObjectGuid itemCasterGUID=ObjectGuid::Empty, uint8 reqEffMask=0) const
Definition Unit.cpp:5999
bool isDead() const
Definition Unit.h:1796

References Player::AreaExploredOrEventHappens(), AT_BOUGHT_OF_ETERNALS, AT_DARK_PORTAL, AT_DOWN_AT_THE_DOCKS, AT_GATEWAY_TO_THE_FRONTIER, AT_LORDAERON_THRONE_ROOM, AT_SPOOKY_LIGHTHOUSE, AT_STONEWROUGHT_DAM, AreaTrigger::entry, getOrphanGUID(), Player::GetQuestStatus(), Player::GetTeamId(), Unit::HasAura(), Unit::isDead(), ORPHAN_BLOOD_ELF, ORPHAN_DRAENEI, ORPHAN_HUMAN, ORPHAN_ORCISH, QUEST_BOUGHT_OF_ETERNALS, QUEST_DARK_PORTAL_A, QUEST_DARK_PORTAL_H, QUEST_DOWN_AT_THE_DOCKS, QUEST_GATEWAY_TO_THE_FRONTIER, QUEST_LORDAERON_THRONE_ROOM, QUEST_SPOOKY_LIGHTHOUSE, QUEST_STATUS_INCOMPLETE, QUEST_STONEWROUGHT_DAM, SPELL_ORPHAN_OUT, and TEAM_ALLIANCE.


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