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

Public Member Functions

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

npc_parqual_fintallas::npc_parqual_fintallas ( )
inline
320: CreatureScript("npc_parqual_fintallas") { }
Definition: CreatureScript.h:25

Member Function Documentation

◆ OnGossipHello()

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

Reimplemented from CreatureScript.

339 {
340 if (creature->IsQuestGiver())
341 {
342 player->PrepareQuestMenu(creature->GetGUID());
343 }
344
346 {
351 }
352 else
353 {
355 }
356
357 return true;
358 }
@ GOSSIP_MENU_ID_TEST_OF_LORE
Definition: zone_undercity.cpp:312
@ GOSSIP_TEXTID_TEST_OF_LORE
Definition: zone_undercity.cpp:314
@ SPELL_MARK_OF_SHAME
Definition: zone_undercity.cpp:310
@ GOSSIP_TEXTID_PARQUAL_FINTALLAS
Definition: zone_undercity.cpp:313
@ QUEST_ID_TEST_OF_LORE
Definition: zone_undercity.cpp:311
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
bool HasAura(uint32 spellId, ObjectGuid casterGUID=ObjectGuid::Empty, ObjectGuid itemCasterGUID=ObjectGuid::Empty, uint8 reqEffMask=0) const
Definition: Unit.cpp:5698

References AddGossipItemFor(), Object::GetGUID(), Player::GetQuestStatus(), GOSSIP_ACTION_INFO_DEF, GOSSIP_MENU_ID_TEST_OF_LORE, GOSSIP_SENDER_MAIN, GOSSIP_TEXTID_PARQUAL_FINTALLAS, GOSSIP_TEXTID_TEST_OF_LORE, Unit::HasAura(), Unit::IsQuestGiver(), Player::PrepareQuestMenu(), QUEST_ID_TEST_OF_LORE, QUEST_STATUS_INCOMPLETE, SendGossipMenuFor(), and SPELL_MARK_OF_SHAME.

◆ OnGossipSelect()

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

Reimplemented from CreatureScript.

323 {
324 ClearGossipMenuFor(player);
325 if (action == GOSSIP_ACTION_INFO_DEF + 1)
326 {
327 CloseGossipMenuFor(player);
328 creature->CastSpell(player, SPELL_MARK_OF_SHAME, false);
329 }
330 if (action == GOSSIP_ACTION_INFO_DEF + 2)
331 {
332 CloseGossipMenuFor(player);
333 player->AreaExploredOrEventHappens(6628);
334 }
335 return true;
336 }
void ClearGossipMenuFor(Player *player)
Definition: ScriptedGossip.cpp:22
void CloseGossipMenuFor(Player *player)
Definition: ScriptedGossip.cpp:56
void AreaExploredOrEventHappens(uint32 questId)
Definition: PlayerQuest.cpp:1790
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 Player::AreaExploredOrEventHappens(), Unit::CastSpell(), ClearGossipMenuFor(), CloseGossipMenuFor(), GOSSIP_ACTION_INFO_DEF, and SPELL_MARK_OF_SHAME.