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

Public Member Functions

 npc_great_bear_spirit ()
 
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

◆ npc_great_bear_spirit()

npc_great_bear_spirit::npc_great_bear_spirit ( )
inline
130: CreatureScript("npc_great_bear_spirit") { }
Definition: CreatureScript.h:25

Member Function Documentation

◆ OnGossipHello()

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

Reimplemented from CreatureScript.

161 {
162 //ally or horde quest
163 if (player->GetQuestStatus(5929) == QUEST_STATUS_INCOMPLETE || player->GetQuestStatus(5930) == QUEST_STATUS_INCOMPLETE)
164 {
166 SendGossipMenuFor(player, 4719, creature->GetGUID());
167 }
168 else
169 SendGossipMenuFor(player, 4718, creature->GetGUID());
170
171 return true;
172 }
@ QUEST_STATUS_INCOMPLETE
Definition: QuestDef.h:103
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:109
QuestStatus GetQuestStatus(uint32 quest_id) const
Definition: PlayerQuest.cpp:1424

References AddGossipItemFor(), Object::GetGUID(), Player::GetQuestStatus(), GOSSIP_ACTION_INFO_DEF, GOSSIP_SENDER_MAIN, QUEST_STATUS_INCOMPLETE, and SendGossipMenuFor().

◆ OnGossipSelect()

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

Reimplemented from CreatureScript.

133 {
134 ClearGossipMenuFor(player);
135 switch (action)
136 {
139 SendGossipMenuFor(player, 4721, creature->GetGUID());
140 break;
141 case GOSSIP_ACTION_INFO_DEF + 1:
143 SendGossipMenuFor(player, 4733, creature->GetGUID());
144 break;
145 case GOSSIP_ACTION_INFO_DEF + 2:
147 SendGossipMenuFor(player, 4734, creature->GetGUID());
148 break;
149 case GOSSIP_ACTION_INFO_DEF + 3:
150 SendGossipMenuFor(player, 4735, creature->GetGUID());
151 if (player->GetQuestStatus(5929) == QUEST_STATUS_INCOMPLETE)
152 player->AreaExploredOrEventHappens(5929);
153 if (player->GetQuestStatus(5930) == QUEST_STATUS_INCOMPLETE)
154 player->AreaExploredOrEventHappens(5930);
155 break;
156 }
157 return true;
158 }
void ClearGossipMenuFor(Player *player)
Definition: ScriptedGossip.cpp:22
void AreaExploredOrEventHappens(uint32 questId)
Definition: PlayerQuest.cpp:1785

References AddGossipItemFor(), Player::AreaExploredOrEventHappens(), ClearGossipMenuFor(), Object::GetGUID(), Player::GetQuestStatus(), GOSSIP_ACTION_INFO_DEF, GOSSIP_SENDER_MAIN, QUEST_STATUS_INCOMPLETE, and SendGossipMenuFor().