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

Classes

struct  npc_wyrmrest_defenderAI
 

Public Member Functions

 npc_wyrmrest_defender ()
 
bool OnGossipHello (Player *player, Creature *creature) override
 
bool OnGossipSelect (Player *player, Creature *creature, uint32, uint32 action) override
 
CreatureAIGetAI (Creature *creature) const 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 *)
 
- 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_wyrmrest_defender::npc_wyrmrest_defender ( )
inline
494 : CreatureScript("npc_wyrmrest_defender") { }
CreatureScript(const char *name)
Definition: ScriptMgr.cpp:1586

Member Function Documentation

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

Reimplemented from CreatureScript.

595  {
596  return new npc_wyrmrest_defenderAI(creature);
597  }
bool npc_wyrmrest_defender::OnGossipHello ( Player player,
Creature creature 
)
inlineoverridevirtual

Reimplemented from CreatureScript.

497  {
498  if (player->GetQuestStatus(QUEST_DEFENDING_WYRMREST_TEMPLE) == QUEST_STATUS_INCOMPLETE)
499  {
501  player->SEND_GOSSIP_MENU(GOSSIP_TEXTID_DEF1, creature->GetGUID());
502  }
503  else
504  player->SEND_GOSSIP_MENU(player->GetGossipTextId(creature), creature->GetGUID());
505 
506  return true;
507  }
Definition: ScriptedGossip.h:71
Definition: zone_dragonblight.cpp:473
Definition: zone_dragonblight.cpp:472
Definition: ScriptedGossip.h:73
ObjectGuid const & GetGUID() const
Definition: Object.h:105
Definition: GossipDef.h:59
Definition: QuestDef.h:113
#define GOSSIP_ITEM_1
Definition: zone_dragonblight.cpp:489

+ Here is the call graph for this function:

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

Reimplemented from CreatureScript.

510  {
511  player->PlayerTalkClass->ClearMenus();
512  if (action == GOSSIP_ACTION_INFO_DEF+1)
513  {
514  player->SEND_GOSSIP_MENU(GOSSIP_TEXTID_DEF2, creature->GetGUID());
515  // Makes player cast trigger spell for 49207 on self
516  player->CastSpell(player, SPELL_CHARACTER_SCRIPT, true);
517  // The gossip should not auto close
518  }
519 
520  return true;
521  }
Definition: ScriptedGossip.h:71
Definition: zone_dragonblight.cpp:476
ObjectGuid const & GetGUID() const
Definition: Object.h:105
Definition: zone_dragonblight.cpp:479

+ Here is the call graph for this function:


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