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
 
- 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)
 
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
1572: 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.

1575 {
1577 if (status == QUEST_STATUS_INCOMPLETE || status == QUEST_STATUS_COMPLETE || status == QUEST_STATUS_REWARDED)
1578 {
1581 }
1582 else
1584
1585 return true;
1586 }
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
@ QUEST_DOING_YOUR_DUTY
Definition: go_scripts.cpp:1560
@ GOSSIP_USE_OUTHOUSE
Definition: go_scripts.cpp:1566
@ GOSSIP_OUTHOUSE_INUSE
Definition: go_scripts.cpp:1564
@ GOSSIP_OUTHOUSE_VACANT
Definition: go_scripts.cpp:1565
static ObjectGuid GetGUID(Object const *o)
Definition: Object.h:106
QuestStatus GetQuestStatus(uint32 quest_id) const
Definition: PlayerQuest.cpp:1416

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.

1589 {
1590 ClearGossipMenuFor(player);
1591 if (action == GOSSIP_ACTION_INFO_DEF + 1)
1592 {
1593 CloseGossipMenuFor(player);
1594 player->CastSpell(player, SPELL_INDISPOSED);
1595 player->CastSpell(player, SPELL_INDISPOSED_II);
1596 player->CastSpell(player, SPELL_INDISPOSED_III);
1597 return true;
1598 }
1599 else
1600 {
1601 CloseGossipMenuFor(player);
1603 return false;
1604 }
1605 }
void ClearGossipMenuFor(Player *player)
Definition: ScriptedGossip.cpp:22
void CloseGossipMenuFor(Player *player)
Definition: ScriptedGossip.cpp:56
@ SPELL_INDISPOSED_II
Definition: go_scripts.cpp:1562
@ SPELL_INDISPOSED_III
Definition: go_scripts.cpp:1563
@ SPELL_INDISPOSED
Definition: go_scripts.cpp:1561
#define GO_ANDERHOLS_SLIDER_CIDER_NOT_FOUND
Definition: go_scripts.cpp:1556
WorldSession * GetSession() const
Definition: Player.h:1961
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:1169
void SendNotification(const char *format,...) ATTR_PRINTF(2
Definition: WorldSession.cpp:785

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