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

Public Member Functions

 go_skull_pile ()
 
bool OnGossipSelect (Player *player, GameObject *go, uint32 sender, uint32 action) override
 
bool OnGossipHello (Player *player, GameObject *go) override
 
void SendActionMenu (Player *player, GameObject *go, uint32 action)
 
- 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)
 

Private Attributes

SpellCastResult _result
 

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

go_skull_pile::go_skull_pile ( )
inline
516: GameObjectScript("go_skull_pile") { }
Definition: GameObjectScript.h:25

Member Function Documentation

◆ OnGossipHello()

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

Reimplemented from GameObjectScript.

531 {
533 {
538
540 }
541 else
543
544 return true;
545 }
@ 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
@ GOSSIP_OPTION_SUMMON_DARKSCREECHER_AKKARAI
Definition: zone_terokkar_forest.cpp:503
@ GOSSIP_MENU_SKULL_PILE
Definition: zone_terokkar_forest.cpp:498
@ GOSSIP_MENU_TEXT_SKULL_PILE
Definition: zone_terokkar_forest.cpp:499
@ QUEST_ADVERSARIAL_BLOOD
Definition: zone_terokkar_forest.cpp:496
@ GOSSIP_OPTION_SUMMON_KARROG
Definition: zone_terokkar_forest.cpp:504
@ GOSSIP_OPTION_SUMMON_VAKKIZ_THE_WINDRAGER
Definition: zone_terokkar_forest.cpp:505
@ GOSSIP_OPTION_SUMMON_GEZZARAK_THE_HUNTRESS
Definition: zone_terokkar_forest.cpp:502
@ GOSSIP_MENU_TEXT_SKULL_PILE_QUEST
Definition: zone_terokkar_forest.cpp:500
static ObjectGuid GetGUID(Object const *o)
Definition: Object.h:109
bool GetQuestRewardStatus(uint32 quest_id) const
Definition: PlayerQuest.cpp:1409
QuestStatus GetQuestStatus(uint32 quest_id) const
Definition: PlayerQuest.cpp:1424

References AddGossipItemFor(), Object::GetGUID(), Player::GetQuestRewardStatus(), Player::GetQuestStatus(), GOSSIP_ACTION_INFO_DEF, GOSSIP_MENU_SKULL_PILE, GOSSIP_MENU_TEXT_SKULL_PILE, GOSSIP_MENU_TEXT_SKULL_PILE_QUEST, GOSSIP_OPTION_SUMMON_DARKSCREECHER_AKKARAI, GOSSIP_OPTION_SUMMON_GEZZARAK_THE_HUNTRESS, GOSSIP_OPTION_SUMMON_KARROG, GOSSIP_OPTION_SUMMON_VAKKIZ_THE_WINDRAGER, GOSSIP_SENDER_MAIN, QUEST_ADVERSARIAL_BLOOD, QUEST_STATUS_INCOMPLETE, and SendGossipMenuFor().

◆ OnGossipSelect()

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

Reimplemented from GameObjectScript.

519 {
520 ClearGossipMenuFor(player);
521
522 if (sender == GOSSIP_SENDER_MAIN)
523 {
524 SendActionMenu(player, go, action);
525 CloseGossipMenuFor(player);
526 }
527 return true;
528 }
void ClearGossipMenuFor(Player *player)
Definition: ScriptedGossip.cpp:22
void CloseGossipMenuFor(Player *player)
Definition: ScriptedGossip.cpp:56
void SendActionMenu(Player *player, GameObject *go, uint32 action)
Definition: zone_terokkar_forest.cpp:547

References ClearGossipMenuFor(), CloseGossipMenuFor(), GOSSIP_SENDER_MAIN, and SendActionMenu().

◆ SendActionMenu()

void go_skull_pile::SendActionMenu ( Player player,
GameObject go,
uint32  action 
)
inline
548 {
549 switch (action)
550 {
551 case GOSSIP_ACTION_INFO_DEF + 1:
552 _result = player->CastSpell(player, SPELL_SUMMON_GEZZARAK_THE_HUNTRESS, false);
553 break;
554 case GOSSIP_ACTION_INFO_DEF + 2:
555 _result = player->CastSpell(player, SPELL_SUMMON_DARKSCREECHER_AKKARAI, false);
556 break;
557 case GOSSIP_ACTION_INFO_DEF + 3:
558 _result = player->CastSpell(player, SPELL_SUMMON_KARROG, false);
559 break;
560 case GOSSIP_ACTION_INFO_DEF + 4:
561 _result = player->CastSpell(player, SPELL_SUMMON_VAKKIZ_THE_WINDRAGER, false);
562 break;
563 default:
565 break;
566 }
567 if (_result == SPELL_CAST_OK)
568 {
569 go->DespawnOrUnsummon();
570 }
571 }
@ SPELL_SUMMON_VAKKIZ_THE_WINDRAGER
Definition: zone_terokkar_forest.cpp:510
@ SPELL_SUMMON_KARROG
Definition: zone_terokkar_forest.cpp:509
@ SPELL_SUMMON_GEZZARAK_THE_HUNTRESS
Definition: zone_terokkar_forest.cpp:507
@ SPELL_SUMMON_DARKSCREECHER_AKKARAI
Definition: zone_terokkar_forest.cpp:508
@ SPELL_CAST_OK
Definition: SharedDefines.h:1138
void DespawnOrUnsummon(Milliseconds delay=0ms, Seconds forcedRespawnTime=0s)
Definition: GameObject.cpp:933
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
SpellCastResult _result
Definition: zone_terokkar_forest.cpp:573

References _result, Unit::CastSpell(), GameObject::DespawnOrUnsummon(), GOSSIP_ACTION_INFO_DEF, SPELL_CAST_OK, SPELL_SUMMON_DARKSCREECHER_AKKARAI, SPELL_SUMMON_GEZZARAK_THE_HUNTRESS, SPELL_SUMMON_KARROG, and SPELL_SUMMON_VAKKIZ_THE_WINDRAGER.

Referenced by OnGossipSelect().

Member Data Documentation

◆ _result

SpellCastResult go_skull_pile::_result
private

Referenced by SendActionMenu().