AzerothCore 3.3.5a
OpenSource WoW Emulator
Loading...
Searching...
No Matches
boss_gloomrel Class Reference
Inheritance diagram for boss_gloomrel:
CreatureScript ScriptObject UpdatableScript< Creature >

Public Member Functions

 boss_gloomrel ()
 
bool OnGossipSelect (Player *player, Creature *creature, uint32, uint32 action) override
 
bool OnGossipHello (Player *player, Creature *creature) override
 
- Public Member Functions inherited from CreatureScript
bool IsDatabaseBound () const override
 
virtual bool OnGossipHello (Player *, Creature *)
 
virtual bool OnGossipSelect (Player *, Creature *, uint32, uint32)
 
virtual bool OnGossipSelectCode (Player *, Creature *, uint32, uint32, const char *)
 
virtual bool OnQuestAccept (Player *, Creature *, Quest const *)
 
virtual bool OnQuestSelect (Player *, Creature *, Quest const *)
 
virtual bool OnQuestComplete (Player *, Creature *, Quest const *)
 
virtual bool OnQuestReward (Player *, Creature *, Quest const *, uint32)
 
virtual uint32 GetDialogStatus (Player *, Creature *)
 
virtual CreatureAIGetAI (Creature *) const
 
virtual void OnFfaPvpStateUpdate (Creature *, bool)
 
- 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< Creature >
virtual void OnUpdate (Creature *, uint32)
 

Additional Inherited Members

- Protected Member Functions inherited from CreatureScript
 CreatureScript (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< Creature >
 UpdatableScript ()=default
 

Detailed Description

Constructor & Destructor Documentation

◆ boss_gloomrel()

boss_gloomrel::boss_gloomrel ( )
inline
59: CreatureScript("boss_gloomrel") { }
Definition: CreatureScript.h:25

Member Function Documentation

◆ OnGossipHello()

bool boss_gloomrel::OnGossipHello ( Player player,
Creature creature 
)
inlineoverridevirtual

Reimplemented from CreatureScript.

91 {
93 {
95 SendGossipMenuFor(player, SAY_QUEST_COMPLETED, creature->GetGUID());
96 }
97
100
101 SendGossipMenuFor(player, player->GetGossipTextId(creature), creature->GetGUID());
102 return true;
103 }
@ QUEST_SPECTRAL_CHALICE
Definition: boss_tomb_of_seven.cpp:32
@ DATA_SKILLPOINT_MIN
Definition: boss_tomb_of_seven.cpp:37
@ SPELL_SMELT_DARK_IRON
Definition: boss_tomb_of_seven.cpp:26
@ SAY_QUEST_COMPLETED
Definition: boss_tomb_of_seven.cpp:52
@ GOSSIP_GROOMREL
Definition: boss_tomb_of_seven.cpp:48
@ SKILL_MINING
Definition: SharedDefines.h:2919
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
static ObjectGuid GetGUID(Object const *o)
Definition: Object.h:112
uint16 GetSkillValue(uint32 skill) const
Definition: Player.cpp:5468
bool GetQuestRewardStatus(uint32 quest_id) const
Definition: PlayerQuest.cpp:1414
bool HasSpell(uint32 spell) const override
Definition: Player.cpp:3892
uint32 GetGossipTextId(uint32 menuId, WorldObject *source)
Definition: PlayerGossip.cpp:404

References AddGossipItemFor(), DATA_SKILLPOINT_MIN, Player::GetGossipTextId(), Object::GetGUID(), Player::GetQuestRewardStatus(), Player::GetSkillValue(), GOSSIP_ACTION_INFO_DEF, GOSSIP_GROOMREL, GOSSIP_SENDER_MAIN, Player::HasSpell(), QUEST_SPECTRAL_CHALICE, SAY_QUEST_COMPLETED, SendGossipMenuFor(), SKILL_MINING, and SPELL_SMELT_DARK_IRON.

◆ OnGossipSelect()

bool boss_gloomrel::OnGossipSelect ( Player player,
Creature creature,
uint32  ,
uint32  action 
)
inlineoverridevirtual

Reimplemented from CreatureScript.

62 {
63 ClearGossipMenuFor(player);
64 switch (action)
65 {
69 break;
71 CloseGossipMenuFor(player);
72 player->CastSpell(player, SPELL_LEARN_SMELT, false);
73 break;
76 SendGossipMenuFor(player, SAY_QUEST_ACCEPTED, creature->GetGUID());
77 break;
79 CloseGossipMenuFor(player);
80 if (InstanceScript* instance = creature->GetInstanceScript())
81 {
82 //are 5 minutes expected? go template may have data to despawn when used at quest
83 instance->DoRespawnGameObject(instance->GetGuidData(DATA_GO_CHALICE), MINUTE * 5);
84 }
85 break;
86 }
87 return true;
88 }
constexpr auto MINUTE
Definition: Common.h:47
@ SPELL_LEARN_SMELT
Definition: boss_tomb_of_seven.cpp:27
@ SAY_QUEST_COMPLETED_END
Definition: boss_tomb_of_seven.cpp:53
@ SAY_QUEST_ACCEPTED
Definition: boss_tomb_of_seven.cpp:51
@ GOSSIP_TEXT_CONTINUE
Definition: boss_tomb_of_seven.cpp:47
@ DATA_GO_CHALICE
Definition: blackrock_depths.h:58
void ClearGossipMenuFor(Player *player)
Definition: ScriptedGossip.cpp:22
void CloseGossipMenuFor(Player *player)
Definition: ScriptedGossip.cpp:56
InstanceScript * GetInstanceScript() const
Definition: Object.cpp:1203
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
Definition: InstanceScript.h:142

References AddGossipItemFor(), Unit::CastSpell(), ClearGossipMenuFor(), CloseGossipMenuFor(), DATA_GO_CHALICE, Object::GetGUID(), WorldObject::GetInstanceScript(), GOSSIP_ACTION_INFO_DEF, GOSSIP_SENDER_MAIN, GOSSIP_TEXT_CONTINUE, MINUTE, SAY_QUEST_ACCEPTED, SAY_QUEST_COMPLETED_END, SendGossipMenuFor(), and SPELL_LEARN_SMELT.