TrinityCore
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Modules Pages
npc_razael_and_lyana Class Reference

Public Member Functions

 npc_razael_and_lyana ()
 
bool OnGossipHello (Player *player, Creature *creature) override
 
bool OnGossipSelect (Player *player, Creature *creature, uint32, uint32 action) override
 
- Public Member Functions inherited from CreatureScript
virtual bool OnDummyEffect (Unit *, uint32, SpellEffIndex, Creature *)
 
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 OnQuestReward (Player *, Creature *, Quest const *, uint32)
 
virtual uint32 GetDialogStatus (Player *, Creature *)
 
virtual CreatureAIGetAI (Creature *) const
 
- Public Member Functions inherited from UnitScript
virtual void OnHeal (Unit *, Unit *, uint32 &)
 
virtual void OnDamage (Unit *, Unit *, uint32 &)
 
virtual void ModifyPeriodicDamageAurasTick (Unit *, Unit *, uint32 &)
 
virtual void ModifyMeleeDamage (Unit *, Unit *, uint32 &)
 
virtual void ModifySpellDamageTaken (Unit *, Unit *, int32 &)
 
- Public Member Functions inherited from ScriptObject
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 UnitScript
 UnitScript (const char *name, bool addToScripts=true)
 
- Protected Member Functions inherited from ScriptObject
 ScriptObject (const char *name)
 
virtual ~ScriptObject ()
 
- Protected Member Functions inherited from UpdatableScript< Creature >
 UpdatableScript ()
 
virtual ~UpdatableScript ()
 

Constructor & Destructor Documentation

npc_razael_and_lyana::npc_razael_and_lyana ( )
inline
241 : CreatureScript("npc_razael_and_lyana") { }
CreatureScript(const char *name)
Definition: ScriptMgr.cpp:1586

Member Function Documentation

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

Reimplemented from CreatureScript.

244  {
245  if (creature->IsQuestGiver())
246  player->PrepareQuestMenu(creature->GetGUID());
247 
248  if (player->GetQuestStatus(QUEST_REPORTS_FROM_THE_FIELD) == QUEST_STATUS_INCOMPLETE)
249  switch (creature->GetEntry())
250  {
251  case NPC_RAZAEL:
252  if (!player->GetReqKillOrCastCurrentCount(QUEST_REPORTS_FROM_THE_FIELD, NPC_RAZAEL))
253  {
255  player->SEND_GOSSIP_MENU(GOSSIP_TEXTID_RAZAEL1, creature->GetGUID());
256  return true;
257  }
258  break;
259  case NPC_LYANA:
260  if (!player->GetReqKillOrCastCurrentCount(QUEST_REPORTS_FROM_THE_FIELD, NPC_LYANA))
261  {
263  player->SEND_GOSSIP_MENU(GOSSIP_TEXTID_LYANA1, creature->GetGUID());
264  return true;
265  }
266  break;
267  }
268  player->SEND_GOSSIP_MENU(player->GetGossipTextId(creature), creature->GetGUID());
269  return true;
270  }
#define GOSSIP_RAZAEL_REPORT
Definition: zone_howling_fjord.cpp:224
#define GOSSIP_LYANA_REPORT
Definition: zone_howling_fjord.cpp:225
Definition: zone_howling_fjord.cpp:231
Definition: ScriptedGossip.h:71
Definition: zone_howling_fjord.cpp:232
Definition: zone_howling_fjord.cpp:234
bool IsQuestGiver() const
Definition: Unit.h:1566
Definition: zone_howling_fjord.cpp:230
Definition: ScriptedGossip.h:73
ObjectGuid const & GetGUID() const
Definition: Object.h:105
Definition: GossipDef.h:59
Definition: QuestDef.h:113
uint32 GetEntry() const
Definition: Object.h:107
Definition: zone_howling_fjord.cpp:229

+ Here is the call graph for this function:

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

Reimplemented from CreatureScript.

273  {
274  player->PlayerTalkClass->ClearMenus();
275  switch (action)
276  {
277  case GOSSIP_ACTION_INFO_DEF + 1:
278  player->SEND_GOSSIP_MENU(GOSSIP_TEXTID_RAZAEL2, creature->GetGUID());
279  player->TalkedToCreature(NPC_RAZAEL, creature->GetGUID());
280  break;
281  case GOSSIP_ACTION_INFO_DEF + 2:
282  player->SEND_GOSSIP_MENU(GOSSIP_TEXTID_LYANA2, creature->GetGUID());
283  player->TalkedToCreature(NPC_LYANA, creature->GetGUID());
284  break;
285  }
286  return true;
287  }
Definition: zone_howling_fjord.cpp:231
Definition: ScriptedGossip.h:71
Definition: zone_howling_fjord.cpp:233
Definition: zone_howling_fjord.cpp:230
ObjectGuid const & GetGUID() const
Definition: Object.h:105
Definition: zone_howling_fjord.cpp:235

+ Here is the call graph for this function:


The documentation for this class was generated from the following file: