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

Public Member Functions

 npc_vh_sinclari ()
 
bool OnGossipHello (Player *player, Creature *creature) override
 
bool OnGossipSelect (Player *player, Creature *creature, uint32, uint32 uiAction) 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_vh_sinclari()

npc_vh_sinclari::npc_vh_sinclari ( )
inline
68: CreatureScript("npc_vh_sinclari") { }
Definition: CreatureScript.h:25

Member Function Documentation

◆ OnGossipHello()

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

Reimplemented from CreatureScript.

71 {
72 if (InstanceScript* pInstance = creature->GetInstanceScript())
73 switch (pInstance->GetData(DATA_ENCOUNTER_STATUS))
74 {
75 case NOT_STARTED:
79 break;
80 case IN_PROGRESS:
83 break;
84 default: // DONE or invalid
86 }
87 return true;
88 }
@ IN_PROGRESS
Definition: InstanceScript.h:58
@ NOT_STARTED
Definition: InstanceScript.h:57
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
@ DATA_ENCOUNTER_STATUS
Definition: eye_of_eternity.h:57
@ GOSSIP_MENU_LATE_JOIN
Definition: violet_hold.cpp:36
@ GOSSIP_MENU_ITEM
Definition: violet_hold.cpp:35
@ GOSSIP_MENU_START_EVENT
Definition: violet_hold.cpp:34
@ NPC_TEXT_SINCLARI_LATE_JOIN
Definition: violet_hold.cpp:41
@ NPC_TEXT_SINCLARI_DONE
Definition: violet_hold.cpp:40
@ NPC_TEXT_SINCLARI_IN
Definition: violet_hold.cpp:38
static ObjectGuid GetGUID(Object const *o)
Definition: Object.h:109
InstanceScript * GetInstanceScript() const
Definition: Object.cpp:1192
Definition: InstanceScript.h:142

References AddGossipItemFor(), DATA_ENCOUNTER_STATUS, Object::GetGUID(), WorldObject::GetInstanceScript(), GOSSIP_ACTION_INFO_DEF, GOSSIP_MENU_ITEM, GOSSIP_MENU_LATE_JOIN, GOSSIP_MENU_START_EVENT, GOSSIP_SENDER_MAIN, IN_PROGRESS, NOT_STARTED, NPC_TEXT_SINCLARI_DONE, NPC_TEXT_SINCLARI_IN, NPC_TEXT_SINCLARI_LATE_JOIN, and SendGossipMenuFor().

◆ OnGossipSelect()

bool npc_vh_sinclari::OnGossipSelect ( Player player,
Creature creature,
uint32  ,
uint32  uiAction 
)
inlineoverridevirtual

Reimplemented from CreatureScript.

91 {
92 ClearGossipMenuFor(player);
93
94 switch (uiAction)
95 {
97 CloseGossipMenuFor(player);
98 if (InstanceScript* pInstance = creature->GetInstanceScript())
99 pInstance->SetData(DATA_START_INSTANCE, 1);
100 break;
103 break;
106 CloseGossipMenuFor(player);
107 break;
108 }
109 return true;
110 }
void ClearGossipMenuFor(Player *player)
Definition: ScriptedGossip.cpp:22
void CloseGossipMenuFor(Player *player)
Definition: ScriptedGossip.cpp:56
const Position playerTeleportPosition
Definition: violet_hold.h:166
@ DATA_START_INSTANCE
Definition: violet_hold.h:133
@ NPC_TEXT_SINCLARI_ITEM
Definition: violet_hold.cpp:39
float GetPositionZ() const
Definition: Position.h:119
float GetOrientation() const
Definition: Position.h:120
float GetPositionX() const
Definition: Position.h:117
float GetPositionY() const
Definition: Position.h:118
void NearTeleportTo(Position &pos, bool casting=false, bool vehicleTeleport=false, bool withPet=false, bool removeTransport=false)
Definition: Unit.cpp:19937

References ClearGossipMenuFor(), CloseGossipMenuFor(), DATA_START_INSTANCE, Object::GetGUID(), WorldObject::GetInstanceScript(), Position::GetOrientation(), Position::GetPositionX(), Position::GetPositionY(), Position::GetPositionZ(), GOSSIP_ACTION_INFO_DEF, Unit::NearTeleportTo(), NPC_TEXT_SINCLARI_ITEM, playerTeleportPosition, and SendGossipMenuFor().