AzerothCore 3.3.5a
OpenSource WoW Emulator
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
- 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)
virtual ~ScriptObject ()=default
- Protected Member Functions inherited from UpdatableScript< Creature >
 UpdatableScript ()=default

Detailed Description

Constructor & Destructor Documentation

◆ npc_vekjik()

npc_vekjik::npc_vekjik ( )
556: CreatureScript("npc_vekjik") { }
Definition: ScriptMgr.h:719

Member Function Documentation

◆ OnGossipHello()

bool npc_vekjik::OnGossipHello ( Player player,
Creature creature 

Reimplemented from CreatureScript.

559 {
560 if (creature->IsQuestGiver())
561 player->PrepareQuestMenu(creature->GetGUID());
564 {
567 return true;
568 }
570 SendGossipMenuFor(player, player->GetGossipTextId(creature), creature->GetGUID());
571 return true;
572 }
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
Definition: ScriptedGossip.h:70
Definition: ScriptedGossip.h:68
Definition: QuestDef.h:103
Definition: zone_sholazar_basin.cpp:543
Definition: zone_sholazar_basin.cpp:550
Definition: zone_sholazar_basin.cpp:540
static ObjectGuid GetGUID(Object const *o)
Definition: Object.h:106
void PrepareQuestMenu(ObjectGuid guid)
Definition: PlayerQuest.cpp:38
QuestStatus GetQuestStatus(uint32 quest_id) const
Definition: PlayerQuest.cpp:1414
uint32 GetGossipTextId(uint32 menuId, WorldObject *source)
Definition: PlayerGossip.cpp:405
bool IsQuestGiver() const
Definition: Unit.h:1653

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 

Reimplemented from CreatureScript.

575 {
576 ClearGossipMenuFor(player);
577 switch (action)
578 {
582 break;
584 CloseGossipMenuFor(player);
585 creature->AI()->Talk(SAY_TEXTID_VEKJIK1, player);
587 //creature->CastSpell(player, SPELL_FREANZYHEARTS_FURY, true);
588 player->KnockbackFrom(creature->GetPositionX(), creature->GetPositionY(), 30.0f, 18.0f);
589 break;
590 }
592 return true;
593 }
void ClearGossipMenuFor(Player *player)
Definition: ScriptedGossip.cpp:22
void CloseGossipMenuFor(Player *player)
Definition: ScriptedGossip.cpp:56
Definition: zone_sholazar_basin.cpp:546
Definition: zone_sholazar_basin.cpp:541
Definition: zone_sholazar_basin.cpp:544
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:135
float GetPositionX() const
Definition: Position.h:117
float GetPositionY() const
Definition: Position.h:118
void AreaExploredOrEventHappens(uint32 questId)
Definition: PlayerQuest.cpp:1775
void KnockbackFrom(float x, float y, float speedXY, float speedZ)
Definition: Unit.cpp:19311

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