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

Classes

struct  ishanahAI
 

Public Member Functions

 npc_ishanah ()
 
bool OnGossipSelect (Player *player, Creature *creature, uint32, uint32 action) override
 
bool OnGossipHello (Player *player, Creature *creature) override
 
CreatureAIGetAI (Creature *creature) const 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_ishanah()

npc_ishanah::npc_ishanah ( )
inline
448: CreatureScript("npc_ishanah") { }
Definition: ScriptMgr.h:718

Member Function Documentation

◆ GetAI()

CreatureAI * npc_ishanah::GetAI ( Creature creature) const
inlineoverridevirtual

Reimplemented from CreatureScript.

534 {
535 return new ishanahAI(creature);
536 }

◆ OnGossipHello()

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

Reimplemented from CreatureScript.

462 {
463 if (creature->IsQuestGiver())
464 player->PrepareQuestMenu(creature->GetGUID());
465
468
469 SendGossipMenuFor(player, player->GetGossipTextId(creature), creature->GetGUID());
470
471 return true;
472 }
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_ICON_CHAT
Definition: GossipDef.h:60
#define ISANAH_GOSSIP_2
Definition: zone_shattrath_city.cpp:443
#define ISANAH_GOSSIP_1
Definition: zone_shattrath_city.cpp:442
static ObjectGuid GetGUID(Object const *o)
Definition: Object.h:106
void PrepareQuestMenu(ObjectGuid guid)
Definition: PlayerQuest.cpp:38
uint32 GetGossipTextId(uint32 menuId, WorldObject *source)
Definition: PlayerGossip.cpp:405
bool IsQuestGiver() const
Definition: Unit.h:1653

References AddGossipItemFor(), Player::GetGossipTextId(), Object::GetGUID(), GOSSIP_ACTION_INFO_DEF, GOSSIP_ICON_CHAT, GOSSIP_SENDER_MAIN, ISANAH_GOSSIP_1, ISANAH_GOSSIP_2, Unit::IsQuestGiver(), Player::PrepareQuestMenu(), and SendGossipMenuFor().

◆ OnGossipSelect()

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

Reimplemented from CreatureScript.

451 {
452 ClearGossipMenuFor(player);
453 if (action == GOSSIP_ACTION_INFO_DEF + 1)
454 SendGossipMenuFor(player, 9458, creature->GetGUID());
455 else if (action == GOSSIP_ACTION_INFO_DEF + 2)
456 SendGossipMenuFor(player, 9459, creature->GetGUID());
457
458 return true;
459 }
void ClearGossipMenuFor(Player *player)
Definition: ScriptedGossip.cpp:22

References ClearGossipMenuFor(), Object::GetGUID(), GOSSIP_ACTION_INFO_DEF, and SendGossipMenuFor().