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

Public Member Functions

 npc_vekjik ()
 
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_vekjik()

npc_vekjik::npc_vekjik ( )
inline
548: CreatureScript("npc_vekjik") { }
Definition: CreatureScript.h:25

Member Function Documentation

◆ OnGossipHello()

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

Reimplemented from CreatureScript.

551 {
552 if (creature->IsQuestGiver())
553 player->PrepareQuestMenu(creature->GetGUID());
554
556 {
559 return true;
560 }
561
562 SendGossipMenuFor(player, player->GetGossipTextId(creature), creature->GetGUID());
563 return true;
564 }
@ GOSSIP_TEXTID_VEKJIK_1
Definition: zone_sholazar_basin.cpp:535
@ QUEST_MAKING_PEACE
Definition: zone_sholazar_basin.cpp:542
@ GOSSIP_VEKJIK_MENU_1
Definition: zone_sholazar_basin.cpp:532
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
uint32 GetGossipTextId(uint32 menuId, WorldObject *source)
Definition: PlayerGossip.cpp:404
bool IsQuestGiver() const
Definition: Unit.h:762

References AddGossipItemFor(), Player::GetGossipTextId(), Object::GetGUID(), Player::GetQuestStatus(), GOSSIP_ACTION_INFO_DEF, GOSSIP_SENDER_MAIN, GOSSIP_TEXTID_VEKJIK_1, GOSSIP_VEKJIK_MENU_1, Unit::IsQuestGiver(), Player::PrepareQuestMenu(), QUEST_MAKING_PEACE, QUEST_STATUS_INCOMPLETE, and SendGossipMenuFor().

◆ OnGossipSelect()

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

Reimplemented from CreatureScript.

567 {
568 ClearGossipMenuFor(player);
569 switch (action)
570 {
574 break;
576 CloseGossipMenuFor(player);
577 creature->AI()->Talk(SAY_TEXTID_VEKJIK1, player);
579 //creature->CastSpell(player, SPELL_FREANZYHEARTS_FURY, true);
580 player->KnockbackFrom(creature->GetPositionX(), creature->GetPositionY(), 30.0f, 18.0f);
581 break;
582 }
583
584 return true;
585 }
@ SAY_TEXTID_VEKJIK1
Definition: zone_sholazar_basin.cpp:538
@ GOSSIP_VEKJIK_MENU_2
Definition: zone_sholazar_basin.cpp:533
@ GOSSIP_TEXTID_VEKJIK_2
Definition: zone_sholazar_basin.cpp:536
void ClearGossipMenuFor(Player *player)
Definition: ScriptedGossip.cpp:22
void CloseGossipMenuFor(Player *player)
Definition: ScriptedGossip.cpp:56
void Talk(uint8 id, WorldObject const *whisperTarget=nullptr, Milliseconds delay=0s)
Causes the creature to talk/say the text assigned to their entry in the creature_text database table.
Definition: CreatureAI.cpp:50
CreatureAI * AI() const
Definition: Creature.h:140
float GetPositionX() const
Definition: Position.h:116
float GetPositionY() const
Definition: Position.h:117
void AreaExploredOrEventHappens(uint32 questId)
Definition: PlayerQuest.cpp:1790
void KnockbackFrom(float x, float y, float speedXY, float speedZ)
Definition: Unit.cpp:19143

References AddGossipItemFor(), Creature::AI(), Player::AreaExploredOrEventHappens(), ClearGossipMenuFor(), CloseGossipMenuFor(), Object::GetGUID(), Position::GetPositionX(), Position::GetPositionY(), GOSSIP_ACTION_INFO_DEF, GOSSIP_SENDER_MAIN, GOSSIP_TEXTID_VEKJIK_2, GOSSIP_VEKJIK_MENU_2, Unit::KnockbackFrom(), QUEST_MAKING_PEACE, SAY_TEXTID_VEKJIK1, SendGossipMenuFor(), and CreatureAI::Talk().