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

Public Member Functions

 npc_zephyr ()
 
bool OnGossipSelect (Player *player, 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_zephyr()

npc_zephyr::npc_zephyr ( )
inline
98: CreatureScript("npc_zephyr") { }
Definition: CreatureScript.h:25

Member Function Documentation

◆ OnGossipHello()

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

Reimplemented from CreatureScript.

110 {
111 if (player->GetReputationRank(989) >= REP_REVERED)
113
114 SendGossipMenuFor(player, player->GetGossipTextId(creature), creature->GetGUID());
115
116 return true;
117 }
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
@ GOSSIP_MENU_ZEPHYR
Definition: zone_shattrath_city.cpp:91
@ REP_REVERED
Definition: SharedDefines.h:186
static ObjectGuid GetGUID(Object const *o)
Definition: Object.h:109
ReputationRank GetReputationRank(uint32 faction_id) const
Definition: Player.cpp:5862
uint32 GetGossipTextId(uint32 menuId, WorldObject *source)
Definition: PlayerGossip.cpp:404

References AddGossipItemFor(), Player::GetGossipTextId(), Object::GetGUID(), Player::GetReputationRank(), GOSSIP_ACTION_INFO_DEF, GOSSIP_MENU_ZEPHYR, GOSSIP_SENDER_MAIN, REP_REVERED, and SendGossipMenuFor().

◆ OnGossipSelect()

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

Reimplemented from CreatureScript.

101 {
102 ClearGossipMenuFor(player);
103 if (action == GOSSIP_ACTION_INFO_DEF + 1)
104 player->CastSpell(player, SPELL_TELEPORT_CAVERNS_OF_TIME, false);
105
106 return true;
107 }
void ClearGossipMenuFor(Player *player)
Definition: ScriptedGossip.cpp:22
@ SPELL_TELEPORT_CAVERNS_OF_TIME
Definition: zone_shattrath_city.cpp:92
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:1168

References Unit::CastSpell(), ClearGossipMenuFor(), GOSSIP_ACTION_INFO_DEF, and SPELL_TELEPORT_CAVERNS_OF_TIME.