AzerothCore 3.3.5a
OpenSource WoW Emulator
Loading...
Searching...
No Matches
go_bashir_crystalforge Class Reference
Inheritance diagram for go_bashir_crystalforge:
GameObjectScript ScriptObject UpdatableScript< GameObject >

Public Member Functions

 go_bashir_crystalforge ()
 
bool OnGossipHello (Player *player, GameObject *go) override
 
bool OnGossipSelect (Player *player, GameObject *go, 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
 
uint16 GetTotalAvailableHooks ()
 
- 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, uint16 totalAvailableHooks=0)
 
virtual ~ScriptObject ()=default
 
- Protected Member Functions inherited from UpdatableScript< GameObject >
 UpdatableScript ()=default
 

Detailed Description

Constructor & Destructor Documentation

◆ go_bashir_crystalforge()

go_bashir_crystalforge::go_bashir_crystalforge ( )
inline
1238: GameObjectScript("go_bashir_crystalforge") { }
Definition: GameObjectScript.h:25

Member Function Documentation

◆ OnGossipHello()

bool go_bashir_crystalforge::OnGossipHello ( Player player,
GameObject go 
)
inlineoverridevirtual

Reimplemented from GameObjectScript.

1241 {
1242 if (go->GetGoType() == GAMEOBJECT_TYPE_QUESTGIVER) /* != GAMEOBJECT_TYPE_QUESTGIVER) */
1243 player->PrepareQuestMenu(go->GetGUID()); /* return true*/
1244
1247
1249
1250 return true;
1251 }
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
#define GOSSIP_BASHIR_CRYSTALFORGE_TEXT
Definition: go_scripts.cpp:1223
#define GOSSIP_BASHIR_CRYSTALFORGE_ITEM_1
Definition: go_scripts.cpp:1225
#define GOSSIP_BASHIR_CRYSTALFORGE_ITEM_5
Definition: go_scripts.cpp:1226
@ GAMEOBJECT_TYPE_QUESTGIVER
Definition: SharedDefines.h:1562
GameobjectTypes GetGoType() const
Definition: GameObject.h:204
static ObjectGuid GetGUID(Object const *o)
Definition: Object.h:109
void PrepareQuestMenu(ObjectGuid guid)
Definition: PlayerQuest.cpp:39

References AddGossipItemFor(), GAMEOBJECT_TYPE_QUESTGIVER, GameObject::GetGoType(), Object::GetGUID(), GOSSIP_ACTION_INFO_DEF, GOSSIP_BASHIR_CRYSTALFORGE_ITEM_1, GOSSIP_BASHIR_CRYSTALFORGE_ITEM_5, GOSSIP_BASHIR_CRYSTALFORGE_TEXT, GOSSIP_ICON_CHAT, GOSSIP_SENDER_MAIN, Player::PrepareQuestMenu(), and SendGossipMenuFor().

◆ OnGossipSelect()

bool go_bashir_crystalforge::OnGossipSelect ( Player player,
GameObject go,
uint32  ,
uint32  action 
)
inlineoverridevirtual

Reimplemented from GameObjectScript.

1254 {
1255 ClearGossipMenuFor(player);
1256 switch (action)
1257 {
1259 player->CastSpell(player, SPELL_CREATE_1_FLASK_OF_SORCERER, false);
1262 break;
1263 case GOSSIP_ACTION_INFO_DEF + 1:
1264 player->CastSpell(player, SPELL_CREATE_5_FLASK_OF_SORCERER, false);
1267 break;
1268 case GOSSIP_ACTION_INFO_DEF + 2:
1272 break;
1273 }
1274 return true;
1275 }
void ClearGossipMenuFor(Player *player)
Definition: ScriptedGossip.cpp:22
#define GOSSIP_BASHIR_CRYSTALFORGE_ITEM_RETURN
Definition: go_scripts.cpp:1227
@ SPELL_CREATE_5_FLASK_OF_SORCERER
Definition: go_scripts.cpp:1232
@ SPELL_CREATE_1_FLASK_OF_SORCERER
Definition: go_scripts.cpp:1231
#define GOSSIP_BASHIR_CRYSTALFORGE_ITEM_TEXT_RETURN
Definition: go_scripts.cpp:1224
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:1168

References AddGossipItemFor(), Unit::CastSpell(), ClearGossipMenuFor(), Object::GetGUID(), GOSSIP_ACTION_INFO_DEF, GOSSIP_BASHIR_CRYSTALFORGE_ITEM_1, GOSSIP_BASHIR_CRYSTALFORGE_ITEM_5, GOSSIP_BASHIR_CRYSTALFORGE_ITEM_RETURN, GOSSIP_BASHIR_CRYSTALFORGE_ITEM_TEXT_RETURN, GOSSIP_BASHIR_CRYSTALFORGE_TEXT, GOSSIP_ICON_CHAT, GOSSIP_SENDER_MAIN, SendGossipMenuFor(), SPELL_CREATE_1_FLASK_OF_SORCERER, and SPELL_CREATE_5_FLASK_OF_SORCERER.