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

Public Member Functions

 npc_silva_filnaveth ()
 
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_silva_filnaveth()

npc_silva_filnaveth::npc_silva_filnaveth ( )
inline
181: CreatureScript("npc_silva_filnaveth") { }
Definition: CreatureScript.h:25

Member Function Documentation

◆ OnGossipHello()

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

Reimplemented from CreatureScript.

204 {
205 if (player->GetTeamId() != TEAM_ALLIANCE)
206 {
208 {
210 }
211 if (player->IsClass(CLASS_DRUID))
212 {
213 SendGossipMenuFor(player, 4915, creature->GetGUID());
214 }
215 else
216 {
217 SendGossipMenuFor(player, 4913, creature->GetGUID());
218 }
219 }
220 else if (player->GetTeamId() == TEAM_ALLIANCE)
221 {
223 {
225 }
226
228 {
230 }
231
232 if (player->IsClass(CLASS_DRUID))
233 {
234 SendGossipMenuFor(player, 4914, creature->GetGUID());
235 }
236 else
237 {
238 SendGossipMenuFor(player, 4913, creature->GetGUID());
239 }
240 }
241 return true;
242 }
@ QUEST_SEA_LION_HORDE
Definition: zone_moonglade.cpp:48
@ QUEST_SEA_LION_ALLY
Definition: zone_moonglade.cpp:49
@ CLASS_DRUID
Definition: SharedDefines.h:151
@ TEAM_ALLIANCE
Definition: SharedDefines.h:760
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
@ CLASS_CONTEXT_TAXI
Definition: UnitDefines.h:210
@ CLASS_CONTEXT_QUEST
Definition: UnitDefines.h:208
static ObjectGuid GetGUID(Object const *o)
Definition: Object.h:109
TeamId GetTeamId(bool original=false) const
Definition: Player.h:2091
bool IsClass(Classes playerClass, ClassContext context=CLASS_CONTEXT_NONE) const override
Definition: Player.cpp:1281
QuestStatus GetQuestStatus(uint32 quest_id) const
Definition: PlayerQuest.cpp:1429

References AddGossipItemFor(), CLASS_CONTEXT_QUEST, CLASS_CONTEXT_TAXI, CLASS_DRUID, Object::GetGUID(), Player::GetQuestStatus(), Player::GetTeamId(), GOSSIP_ACTION_INFO_DEF, GOSSIP_SENDER_MAIN, Player::IsClass(), QUEST_SEA_LION_ALLY, QUEST_SEA_LION_HORDE, QUEST_STATUS_INCOMPLETE, SendGossipMenuFor(), and TEAM_ALLIANCE.

◆ OnGossipSelect()

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

Reimplemented from CreatureScript.

184 {
185 ClearGossipMenuFor(player);
186 switch (action)
187 {
188 case GOSSIP_ACTION_INFO_DEF + 1:
189 CloseGossipMenuFor(player);
190 if (player->IsClass(CLASS_DRUID, CLASS_CONTEXT_TAXI) && player->GetTeamId() == TEAM_ALLIANCE)
192 break;
193 case GOSSIP_ACTION_INFO_DEF + 2:
194 SendGossipMenuFor(player, 5376, creature->GetGUID());
195 break;
196 case GOSSIP_ACTION_INFO_DEF + 3:
197 SendGossipMenuFor(player, 5375, creature->GetGUID());
198 break;
199 }
200 return true;
201 }
@ TAXI_PATH_ID_ALLY
Definition: zone_moonglade.cpp:50
void ClearGossipMenuFor(Player *player)
Definition: ScriptedGossip.cpp:22
void CloseGossipMenuFor(Player *player)
Definition: ScriptedGossip.cpp:56
bool ActivateTaxiPathTo(std::vector< uint32 > const &nodes, Creature *npc=nullptr, uint32 spellid=1)
Definition: Player.cpp:10240

References Player::ActivateTaxiPathTo(), CLASS_CONTEXT_TAXI, CLASS_DRUID, ClearGossipMenuFor(), CloseGossipMenuFor(), Object::GetGUID(), Player::GetTeamId(), GOSSIP_ACTION_INFO_DEF, Player::IsClass(), SendGossipMenuFor(), TAXI_PATH_ID_ALLY, and TEAM_ALLIANCE.