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

Public Member Functions

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

npc_avatar_of_freya::npc_avatar_of_freya ( )
inline
610: CreatureScript("npc_avatar_of_freya") { }
Definition: CreatureScript.h:25

Member Function Documentation

◆ OnGossipHello()

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

Reimplemented from CreatureScript.

613 {
614 if (creature->IsQuestGiver())
615 player->PrepareQuestMenu(creature->GetGUID());
616
619
620 SendGossipMenuFor(player, GOSSIP_TEXTID_AVATAR_1, creature);
621 return true;
622 }
@ QUEST_FREYA_PACT
Definition: zone_sholazar_basin.cpp:594
@ GOSSIP_TEXTID_AVATAR_1
Definition: zone_sholazar_basin.cpp:602
@ GOSSIP_AVATAR_MENU_1
Definition: zone_sholazar_basin.cpp:598
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
@ QUEST_STATUS_INCOMPLETE
Definition: QuestDef.h:103
static ObjectGuid GetGUID(Object const *o)
Definition: Object.h:112
void PrepareQuestMenu(ObjectGuid guid)
Definition: PlayerQuest.cpp:39
QuestStatus GetQuestStatus(uint32 quest_id) const
Definition: PlayerQuest.cpp:1429
bool IsQuestGiver() const
Definition: Unit.h:762

References AddGossipItemFor(), Object::GetGUID(), Player::GetQuestStatus(), GOSSIP_ACTION_INFO_DEF, GOSSIP_AVATAR_MENU_1, GOSSIP_SENDER_MAIN, GOSSIP_TEXTID_AVATAR_1, Unit::IsQuestGiver(), Player::PrepareQuestMenu(), QUEST_FREYA_PACT, QUEST_STATUS_INCOMPLETE, and SendGossipMenuFor().

◆ OnGossipSelect()

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

Reimplemented from CreatureScript.

625 {
626 ClearGossipMenuFor(player);
627 switch (action)
628 {
631 SendGossipMenuFor(player, GOSSIP_TEXTID_AVATAR_2, creature);
632 break;
635 SendGossipMenuFor(player, GOSSIP_TEXTID_AVATAR_3, creature);
636 break;
638 player->CastSpell(player, SPELL_FREYA_CONVERSATION, true);
639 CloseGossipMenuFor(player);
640 break;
641 }
642 return true;
643 }
@ GOSSIP_AVATAR_MENU_3
Definition: zone_sholazar_basin.cpp:600
@ SPELL_FREYA_CONVERSATION
Definition: zone_sholazar_basin.cpp:596
@ GOSSIP_TEXTID_AVATAR_2
Definition: zone_sholazar_basin.cpp:603
@ GOSSIP_TEXTID_AVATAR_3
Definition: zone_sholazar_basin.cpp:604
@ GOSSIP_AVATAR_MENU_2
Definition: zone_sholazar_basin.cpp:599
void ClearGossipMenuFor(Player *player)
Definition: ScriptedGossip.cpp:22
void CloseGossipMenuFor(Player *player)
Definition: ScriptedGossip.cpp:56
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:1167

References AddGossipItemFor(), Unit::CastSpell(), ClearGossipMenuFor(), CloseGossipMenuFor(), GOSSIP_ACTION_INFO_DEF, GOSSIP_AVATAR_MENU_2, GOSSIP_AVATAR_MENU_3, GOSSIP_SENDER_MAIN, GOSSIP_TEXTID_AVATAR_2, GOSSIP_TEXTID_AVATAR_3, SendGossipMenuFor(), and SPELL_FREYA_CONVERSATION.