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
1624: 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.

1627 {
1629 if (status == QUEST_STATUS_INCOMPLETE || status == QUEST_STATUS_COMPLETE || status == QUEST_STATUS_REWARDED)
1630 {
1633 }
1634 else
1636
1637 return true;
1638 }
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
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
@ QUEST_DOING_YOUR_DUTY
Definition: go_scripts.cpp:1612
@ GOSSIP_USE_OUTHOUSE
Definition: go_scripts.cpp:1618
@ GOSSIP_OUTHOUSE_INUSE
Definition: go_scripts.cpp:1616
@ GOSSIP_OUTHOUSE_VACANT
Definition: go_scripts.cpp:1617
static ObjectGuid GetGUID(Object const *o)
Definition: Object.h:109
QuestStatus GetQuestStatus(uint32 quest_id) const
Definition: PlayerQuest.cpp:1424

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.

1641 {
1642 ClearGossipMenuFor(player);
1643 if (action == GOSSIP_ACTION_INFO_DEF + 1)
1644 {
1645 CloseGossipMenuFor(player);
1646 player->CastSpell(player, SPELL_INDISPOSED);
1647 player->CastSpell(player, SPELL_INDISPOSED_II);
1648 player->CastSpell(player, SPELL_INDISPOSED_III);
1649 return true;
1650 }
1651 else
1652 {
1653 CloseGossipMenuFor(player);
1655 return false;
1656 }
1657 }
void ClearGossipMenuFor(Player *player)
Definition: ScriptedGossip.cpp:22
void CloseGossipMenuFor(Player *player)
Definition: ScriptedGossip.cpp:56
@ SPELL_INDISPOSED_II
Definition: go_scripts.cpp:1614
@ SPELL_INDISPOSED_III
Definition: go_scripts.cpp:1615
@ SPELL_INDISPOSED
Definition: go_scripts.cpp:1613
#define GO_ANDERHOLS_SLIDER_CIDER_NOT_FOUND
Definition: go_scripts.cpp:1608
Definition: Chat.h:39
void SendNotification(std::string_view str)
Definition: Chat.cpp:107
WorldSession * GetSession() const
Definition: Player.h:1978
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:1168

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.