AzerothCore 3.3.5a
OpenSource WoW Emulator
Loading...
Searching...
No Matches
go_amberpine_outhouse Class Reference
Inheritance diagram for go_amberpine_outhouse:
GameObjectScript ScriptObject UpdatableScript< GameObject >

Public Member Functions

 go_amberpine_outhouse ()
 
bool OnGossipHello (Player *player, GameObject *go) override
 
bool OnGossipSelect (Player *player, GameObject *, uint32, uint32 action) override
 
- Public Member Functions inherited from GameObjectScript
bool IsDatabaseBound () const override
 
virtual bool OnGossipHello (Player *, GameObject *)
 
virtual bool OnGossipSelect (Player *, GameObject *, uint32, uint32)
 
virtual bool OnGossipSelectCode (Player *, GameObject *, uint32, uint32, const char *)
 
virtual bool OnQuestAccept (Player *, GameObject *, Quest const *)
 
virtual bool OnQuestReward (Player *, GameObject *, Quest const *, uint32)
 
virtual uint32 GetDialogStatus (Player *, GameObject *)
 
virtual void OnDestroyed (GameObject *, Player *)
 
virtual void OnDamaged (GameObject *, Player *)
 
virtual void OnModifyHealth (GameObject *, Unit *, int32 &, SpellInfo const *)
 
virtual void OnLootStateChanged (GameObject *, uint32, Unit *)
 
virtual void OnGameObjectStateChanged (GameObject *, uint32)
 
virtual GameObjectAIGetAI (GameObject *) 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 ()
 
- Public Member Functions inherited from UpdatableScript< GameObject >
virtual void OnUpdate (GameObject *, uint32)
 

Additional Inherited Members

- Protected Member Functions inherited from GameObjectScript
 GameObjectScript (const char *name)
 
- Protected Member Functions inherited from ScriptObject
 ScriptObject (const char *name, uint16 totalAvailableHooks=0)
 
virtual ~ScriptObject ()=default
 
- Protected Member Functions inherited from UpdatableScript< GameObject >
 UpdatableScript ()=default
 

Detailed Description

Constructor & Destructor Documentation

◆ go_amberpine_outhouse()

go_amberpine_outhouse::go_amberpine_outhouse ( )
inline
1623: GameObjectScript("go_amberpine_outhouse") { }
Definition: GameObjectScript.h:25

Member Function Documentation

◆ OnGossipHello()

bool go_amberpine_outhouse::OnGossipHello ( Player player,
GameObject go 
)
inlineoverridevirtual

Reimplemented from GameObjectScript.

1626 {
1628 if (status == QUEST_STATUS_INCOMPLETE || status == QUEST_STATUS_COMPLETE || status == QUEST_STATUS_REWARDED)
1629 {
1632 }
1633 else
1635
1636 return true;
1637 }
@ QUEST_DOING_YOUR_DUTY
Definition: go_scripts.cpp:1611
@ GOSSIP_USE_OUTHOUSE
Definition: go_scripts.cpp:1617
@ GOSSIP_OUTHOUSE_INUSE
Definition: go_scripts.cpp:1615
@ GOSSIP_OUTHOUSE_VACANT
Definition: go_scripts.cpp:1616
void SendGossipMenuFor(Player *player, uint32 npcTextID, ObjectGuid const guid)
Definition: ScriptedGossip.cpp:45
void AddGossipItemFor(Player *player, uint32 icon, std::string const &text, uint32 sender, uint32 action)
Definition: ScriptedGossip.cpp:28
@ GOSSIP_SENDER_MAIN
Definition: ScriptedGossip.h:70
@ GOSSIP_ACTION_INFO_DEF
Definition: ScriptedGossip.h:68
QuestStatus
Definition: QuestDef.h:99
@ QUEST_STATUS_REWARDED
Definition: QuestDef.h:106
@ QUEST_STATUS_INCOMPLETE
Definition: QuestDef.h:103
@ QUEST_STATUS_COMPLETE
Definition: QuestDef.h:101
static ObjectGuid GetGUID(Object const *o)
Definition: Object.h:112
QuestStatus GetQuestStatus(uint32 quest_id) const
Definition: PlayerQuest.cpp:1429

References AddGossipItemFor(), Object::GetGUID(), Player::GetQuestStatus(), GOSSIP_ACTION_INFO_DEF, GOSSIP_OUTHOUSE_INUSE, GOSSIP_OUTHOUSE_VACANT, GOSSIP_SENDER_MAIN, GOSSIP_USE_OUTHOUSE, QUEST_DOING_YOUR_DUTY, QUEST_STATUS_COMPLETE, QUEST_STATUS_INCOMPLETE, QUEST_STATUS_REWARDED, and SendGossipMenuFor().

◆ OnGossipSelect()

bool go_amberpine_outhouse::OnGossipSelect ( Player player,
GameObject ,
uint32  ,
uint32  action 
)
inlineoverridevirtual

Reimplemented from GameObjectScript.

1640 {
1641 ClearGossipMenuFor(player);
1642 if (action == GOSSIP_ACTION_INFO_DEF + 1)
1643 {
1644 CloseGossipMenuFor(player);
1645 player->CastSpell(player, SPELL_INDISPOSED);
1646 player->CastSpell(player, SPELL_INDISPOSED_II);
1647 player->CastSpell(player, SPELL_INDISPOSED_III);
1648 return true;
1649 }
1650 else
1651 {
1652 CloseGossipMenuFor(player);
1654 return false;
1655 }
1656 }
@ SPELL_INDISPOSED_II
Definition: go_scripts.cpp:1613
@ SPELL_INDISPOSED_III
Definition: go_scripts.cpp:1614
@ SPELL_INDISPOSED
Definition: go_scripts.cpp:1612
#define GO_ANDERHOLS_SLIDER_CIDER_NOT_FOUND
Definition: go_scripts.cpp:1607
void ClearGossipMenuFor(Player *player)
Definition: ScriptedGossip.cpp:22
void CloseGossipMenuFor(Player *player)
Definition: ScriptedGossip.cpp:56
Definition: Chat.h:37
void SendNotification(std::string_view str)
Definition: Chat.cpp:104
WorldSession * GetSession() const
Definition: Player.h:1998
SpellCastResult CastSpell(SpellCastTargets const &targets, SpellInfo const *spellInfo, CustomSpellValues const *value, TriggerCastFlags triggerFlags=TRIGGERED_NONE, Item *castItem=nullptr, AuraEffect const *triggeredByAura=nullptr, ObjectGuid originalCaster=ObjectGuid::Empty)
Definition: Unit.cpp:1167

References Unit::CastSpell(), ClearGossipMenuFor(), CloseGossipMenuFor(), Player::GetSession(), GO_ANDERHOLS_SLIDER_CIDER_NOT_FOUND, GOSSIP_ACTION_INFO_DEF, ChatHandler::SendNotification(), SPELL_INDISPOSED, SPELL_INDISPOSED_II, and SPELL_INDISPOSED_III.