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

232 {
233 return new brann_bronzebeardAI (creature);
234 }

◆ OnGossipHello()

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

Reimplemented from CreatureScript.

167 {
168 InstanceScript* pInstance = (creature->GetInstanceScript());
169
170 player->TalkedToCreature(creature->GetEntry(), creature->GetGUID());
171 player->PrepareGossipMenu(creature, 0, true);
172 if (pInstance)
173 {
174 uint32 brann = pInstance->GetData(BRANN_BRONZEBEARD);
175 switch (brann)
176 {
177 case 1:
179 break;
180 case 2:
182 break;
183 case 3:
185 break;
186 case 4:
188 break;
189 case 5:
191 break;
192 default:
193 break;
194 }
195 }
196 SendGossipMenuFor(player, TEXT_ID_START, creature->GetGUID());
197 return true;
198 }
std::uint32_t uint32
Definition: Define.h:107
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:60
@ BRANN_BRONZEBEARD
Definition: halls_of_stone.h:33
#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 GOSSIP_ITEM_4
Definition: brann_bronzebeard.cpp:30
#define TEXT_ID_START
Definition: brann_bronzebeard.cpp:31
uint32 GetEntry() const
Definition: Object.h:112
static ObjectGuid GetGUID(Object const *o)
Definition: Object.h:109
InstanceScript * GetInstanceScript() const
Definition: Object.cpp:1192
void TalkedToCreature(uint32 entry, ObjectGuid guid)
Definition: PlayerQuest.cpp:2106
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:52

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(), and TEXT_ID_START.

◆ OnGossipSelect()

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

Reimplemented from CreatureScript.

201 {
202 if (action)
203 {
204 switch (action)
205 {
207 creature->AI()->DoAction(ACTION_START_EVENT);
208 CloseGossipMenuFor(player);
209 break;
211 creature->AI()->DoAction(ACTION_START_TRIBUNAL);
212 CloseGossipMenuFor(player);
213 break;
215 creature->AI()->DoAction(ACTION_GO_TO_SJONNIR);
216 CloseGossipMenuFor(player);
217 break;
219 creature->AI()->DoAction(ACTION_WIPE_START);
220 CloseGossipMenuFor(player);
221 break;
223 creature->AI()->DoAction(ACTION_OPEN_DOOR);
224 CloseGossipMenuFor(player);
225 break;
226 }
227 }
228 return true;
229 }
void CloseGossipMenuFor(Player *player)
Definition: ScriptedGossip.cpp:56
@ ACTION_WIPE_START
Definition: brann_bronzebeard.cpp:75
@ ACTION_START_EVENT
Definition: brann_bronzebeard.cpp:69
@ ACTION_OPEN_DOOR
Definition: brann_bronzebeard.cpp:76
@ ACTION_START_TRIBUNAL
Definition: brann_bronzebeard.cpp:70
@ ACTION_GO_TO_SJONNIR
Definition: brann_bronzebeard.cpp:71
virtual void DoAction(int32)
Definition: UnitAI.h:212
CreatureAI * AI() const
Definition: Creature.h:143

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