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

Public Member Functions

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

Member Function Documentation

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

Reimplemented from CreatureScript.

491  {
492  if (creature->IsQuestGiver())
493  player->PrepareQuestMenu(creature->GetGUID());
494 
495  if (player->GetQuestStatus(QUEST_4001) == QUEST_STATUS_INCOMPLETE)
497 
498  if (player->GetQuestStatus(4342) == QUEST_STATUS_INCOMPLETE)
500 
501  if (player->GetTeam() == HORDE)
502  player->SEND_GOSSIP_MENU(2473, creature->GetGUID());
503  else
504  player->SEND_GOSSIP_MENU(2474, creature->GetGUID());
505 
506  return true;
507  }
Definition: blackrock_depths.cpp:421
Definition: ScriptedGossip.h:71
bool IsQuestGiver() const
Definition: Unit.h:1566
#define GOSSIP_ITEM_KHARAN_1
Definition: blackrock_depths.cpp:425
Definition: SharedDefines.h:999
Definition: ScriptedGossip.h:73
ObjectGuid const & GetGUID() const
Definition: Object.h:105
Definition: GossipDef.h:59
Definition: QuestDef.h:113
#define GOSSIP_ITEM_KHARAN_2
Definition: blackrock_depths.cpp:426

+ Here is the call graph for this function:

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

Reimplemented from CreatureScript.

442  {
443  player->PlayerTalkClass->ClearMenus();
444  switch (action)
445  {
446  case GOSSIP_ACTION_INFO_DEF+1:
448  player->SEND_GOSSIP_MENU(2475, creature->GetGUID());
449  break;
450  case GOSSIP_ACTION_INFO_DEF+2:
452  player->SEND_GOSSIP_MENU(2476, creature->GetGUID());
453  break;
454 
455  case GOSSIP_ACTION_INFO_DEF+3:
457  player->SEND_GOSSIP_MENU(2477, creature->GetGUID());
458  break;
459  case GOSSIP_ACTION_INFO_DEF+4:
461  player->SEND_GOSSIP_MENU(2478, creature->GetGUID());
462  break;
463  case GOSSIP_ACTION_INFO_DEF+5:
465  player->SEND_GOSSIP_MENU(2479, creature->GetGUID());
466  break;
467  case GOSSIP_ACTION_INFO_DEF+6:
469  player->SEND_GOSSIP_MENU(2480, creature->GetGUID());
470  break;
471  case GOSSIP_ACTION_INFO_DEF+7:
473  player->SEND_GOSSIP_MENU(2481, creature->GetGUID());
474  break;
475  case GOSSIP_ACTION_INFO_DEF+8:
477  player->SEND_GOSSIP_MENU(2482, creature->GetGUID());
478  break;
479  case GOSSIP_ACTION_INFO_DEF+9:
480  player->CLOSE_GOSSIP_MENU();
481  if (player->GetTeam() == HORDE)
482  player->AreaExploredOrEventHappens(QUEST_4001);
483  else
484  player->AreaExploredOrEventHappens(QUEST_4342);
485  break;
486  }
487  return true;
488  }
Definition: blackrock_depths.cpp:421
Definition: ScriptedGossip.h:71
#define GOSSIP_ITEM_KHARAN_10
Definition: blackrock_depths.cpp:434
#define GOSSIP_ITEM_KHARAN_5
Definition: blackrock_depths.cpp:429
#define GOSSIP_ITEM_KHARAN_6
Definition: blackrock_depths.cpp:430
Definition: blackrock_depths.cpp:422
Definition: SharedDefines.h:999
Definition: ScriptedGossip.h:73
ObjectGuid const & GetGUID() const
Definition: Object.h:105
Definition: GossipDef.h:59
#define GOSSIP_ITEM_KHARAN_4
Definition: blackrock_depths.cpp:428
#define GOSSIP_ITEM_KHARAN_3
Definition: blackrock_depths.cpp:427
#define GOSSIP_ITEM_KHARAN_8
Definition: blackrock_depths.cpp:432
#define GOSSIP_ITEM_KHARAN_9
Definition: blackrock_depths.cpp:433
#define GOSSIP_ITEM_KHARAN_7
Definition: blackrock_depths.cpp:431

+ Here is the call graph for this function:


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