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

Classes

struct  brann_bronzebeardAI
 

Public Member Functions

 brann_bronzebeard ()
 
bool OnGossipHello (Player *player, Creature *creature) override
 
bool OnGossipSelect (Player *player, Creature *creature, uint32, uint32 action) override
 
CreatureAIGetAI (Creature *creature) const 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

◆ brann_bronzebeard()

brann_bronzebeard::brann_bronzebeard ( )
inline
172: CreatureScript("brann_bronzebeard") { }
Definition: CreatureScript.h:25

Referenced by AddSC_brann_bronzebeard().

Member Function Documentation

◆ GetAI()

CreatureAI * brann_bronzebeard::GetAI ( Creature creature) const
inlineoverridevirtual

Reimplemented from CreatureScript.

239 {
240 return new brann_bronzebeardAI (creature);
241 }

◆ OnGossipHello()

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

Reimplemented from CreatureScript.

175 {
176 InstanceScript* pInstance = (creature->GetInstanceScript());
177
178 player->TalkedToCreature(creature->GetEntry(), creature->GetGUID());
179 player->PrepareGossipMenu(creature, 0, true);
180 if (pInstance)
181 {
182 uint32 brann = pInstance->GetData(BRANN_BRONZEBEARD);
183 switch (brann)
184 {
185 case 1:
187 SendGossipMenuFor(player, TEXT_ID_START, creature->GetGUID());
188 break;
189 case 2:
192 break;
193 case 3:
195 SendGossipMenuFor(player, TEXT_ID_TRIBUNAL_END, creature->GetGUID());
196 break;
197 case 4:
199 SendGossipMenuFor(player, TEXT_ID_SJONNIR_DOOR, creature->GetGUID());
200 break;
201 case 5:
202 SendGossipMenuFor(player, TEXT_ID_SJONNIR_END, creature->GetGUID());
203 break;
204 default:
205 break;
206 }
207 }
208 return true;
209 }
std::uint32_t uint32
Definition: Define.h:107
#define TEXT_ID_SJONNIR_END
Definition: brann_bronzebeard.cpp:35
#define GOSSIP_ITEM_3
Definition: brann_bronzebeard.cpp:29
#define GOSSIP_ITEM_2
Definition: brann_bronzebeard.cpp:28
#define GOSSIP_ITEM_1
Definition: brann_bronzebeard.cpp:27
#define TEXT_ID_TRIBUNAL_START
Definition: brann_bronzebeard.cpp:32
#define GOSSIP_ITEM_4
Definition: brann_bronzebeard.cpp:30
#define TEXT_ID_SJONNIR_DOOR
Definition: brann_bronzebeard.cpp:34
#define TEXT_ID_START
Definition: brann_bronzebeard.cpp:31
#define TEXT_ID_TRIBUNAL_END
Definition: brann_bronzebeard.cpp:33
@ BRANN_BRONZEBEARD
Definition: halls_of_stone.h:50
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
@ GOSSIP_ICON_CHAT
Definition: GossipDef.h:61
uint32 GetEntry() const
Definition: Object.h:115
static ObjectGuid GetGUID(Object const *o)
Definition: Object.h:112
InstanceScript * GetInstanceScript() const
Definition: Object.cpp:1203
void TalkedToCreature(uint32 entry, ObjectGuid guid)
Definition: PlayerQuest.cpp:2111
void PrepareGossipMenu(WorldObject *source, uint32 menuId=0, bool showQuests=false)
Definition: PlayerGossip.cpp:32
Definition: InstanceScript.h:142
virtual uint32 GetData(uint32) const
Definition: ZoneScript.h:51

References AddGossipItemFor(), BRANN_BRONZEBEARD, ZoneScript::GetData(), Object::GetEntry(), Object::GetGUID(), WorldObject::GetInstanceScript(), GOSSIP_ACTION_INFO_DEF, GOSSIP_ICON_CHAT, GOSSIP_ITEM_1, GOSSIP_ITEM_2, GOSSIP_ITEM_3, GOSSIP_ITEM_4, GOSSIP_SENDER_MAIN, Player::PrepareGossipMenu(), SendGossipMenuFor(), Player::TalkedToCreature(), TEXT_ID_SJONNIR_DOOR, TEXT_ID_SJONNIR_END, TEXT_ID_START, TEXT_ID_TRIBUNAL_END, and TEXT_ID_TRIBUNAL_START.

◆ OnGossipSelect()

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

Reimplemented from CreatureScript.

212 {
213 if (action)
214 {
215 switch (action)
216 {
219 CloseGossipMenuFor(player);
220 break;
222 creature->AI()->DoAction(ACTION_START_TRIBUNAL);
223 CloseGossipMenuFor(player);
224 break;
226 creature->AI()->DoAction(ACTION_GO_TO_SJONNIR);
227 CloseGossipMenuFor(player);
228 break;
230 creature->AI()->DoAction(ACTION_OPEN_DOOR);
231 CloseGossipMenuFor(player);
232 break;
233 }
234 }
235 return true;
236 }
@ ACTION_OPEN_DOOR
Definition: halls_of_stone.h:86
@ ACTION_START_ESCORT_EVENT
Definition: halls_of_stone.h:82
@ ACTION_START_TRIBUNAL
Definition: halls_of_stone.h:83
@ ACTION_GO_TO_SJONNIR
Definition: halls_of_stone.h:85
void CloseGossipMenuFor(Player *player)
Definition: ScriptedGossip.cpp:56
virtual void DoAction(int32)
Definition: UnitAI.h:212
CreatureAI * AI() const
Definition: Creature.h:140

References ACTION_GO_TO_SJONNIR, ACTION_OPEN_DOOR, ACTION_START_ESCORT_EVENT, ACTION_START_TRIBUNAL, Creature::AI(), CloseGossipMenuFor(), UnitAI::DoAction(), and GOSSIP_ACTION_INFO_DEF.