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
 
virtual bool OnTrigger (Player *, AreaTrigger const *)
 
- Public Member Functions inherited from ScriptObject
virtual bool IsDatabaseBound () const
 
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
783: 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.

786 {
787 if (player->isDead() || !player->HasAura(SPELL_ORPHAN_OUT))
788 return false;
789
790 uint32 questId = 0;
791 uint32 orphanId = 0;
792
793 switch (trigger->entry)
794 {
796 questId = QUEST_DOWN_AT_THE_DOCKS;
797 orphanId = ORPHAN_ORCISH;
798 break;
801 orphanId = ORPHAN_ORCISH;
802 break;
805 orphanId = ORPHAN_ORCISH;
806 break;
808 questId = QUEST_BOUGHT_OF_ETERNALS;
809 orphanId = ORPHAN_HUMAN;
810 break;
812 questId = QUEST_SPOOKY_LIGHTHOUSE;
813 orphanId = ORPHAN_HUMAN;
814 break;
816 questId = QUEST_STONEWROUGHT_DAM;
817 orphanId = ORPHAN_HUMAN;
818 break;
819 case AT_DARK_PORTAL:
821 orphanId = player->GetTeamId() == TEAM_ALLIANCE ? ORPHAN_DRAENEI : ORPHAN_BLOOD_ELF;
822 break;
823 }
824
825 if (questId && orphanId && getOrphanGUID(player, orphanId) && player->GetQuestStatus(questId) == QUEST_STATUS_INCOMPLETE)
826 player->AreaExploredOrEventHappens(questId);
827
828 return true;
829 }
std::uint32_t uint32
Definition: Define.h:107
@ QUEST_DARK_PORTAL_H
Definition: childrens_week.cpp:89
@ QUEST_DARK_PORTAL_A
Definition: childrens_week.cpp:90
@ QUEST_STONEWROUGHT_DAM
Definition: childrens_week.cpp:88
@ QUEST_BOUGHT_OF_ETERNALS
Definition: childrens_week.cpp:86
@ QUEST_DOWN_AT_THE_DOCKS
Definition: childrens_week.cpp:84
@ QUEST_LORDAERON_THRONE_ROOM
Definition: childrens_week.cpp:91
@ QUEST_GATEWAY_TO_THE_FRONTIER
Definition: childrens_week.cpp:85
@ QUEST_SPOOKY_LIGHTHOUSE
Definition: childrens_week.cpp:87
@ SPELL_ORPHAN_OUT
Definition: childrens_week.cpp:130
@ AT_BOUGHT_OF_ETERNALS
Definition: childrens_week.cpp:111
@ AT_DOWN_AT_THE_DOCKS
Definition: childrens_week.cpp:108
@ AT_LORDAERON_THRONE_ROOM
Definition: childrens_week.cpp:110
@ AT_DARK_PORTAL
Definition: childrens_week.cpp:114
@ AT_SPOOKY_LIGHTHOUSE
Definition: childrens_week.cpp:112
@ AT_GATEWAY_TO_THE_FRONTIER
Definition: childrens_week.cpp:109
@ AT_STONEWROUGHT_DAM
Definition: childrens_week.cpp:113
ObjectGuid getOrphanGUID(Player *player, uint32 orphan)
Definition: childrens_week.cpp:135
@ ORPHAN_BLOOD_ELF
Definition: childrens_week.cpp:28
@ ORPHAN_ORCISH
Definition: childrens_week.cpp:31
@ ORPHAN_HUMAN
Definition: childrens_week.cpp:30
@ ORPHAN_DRAENEI
Definition: childrens_week.cpp:29
@ TEAM_ALLIANCE
Definition: SharedDefines.h:760
@ QUEST_STATUS_INCOMPLETE
Definition: QuestDef.h:103
TeamId GetTeamId(bool original=false) const
Definition: Player.h:2108
void AreaExploredOrEventHappens(uint32 questId)
Definition: PlayerQuest.cpp:1790
QuestStatus GetQuestStatus(uint32 quest_id) const
Definition: PlayerQuest.cpp:1429
bool HasAura(uint32 spellId, ObjectGuid casterGUID=ObjectGuid::Empty, ObjectGuid itemCasterGUID=ObjectGuid::Empty, uint8 reqEffMask=0) const
Definition: Unit.cpp:5698
bool isDead() const
Definition: Unit.h:1656

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.