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

Public Member Functions

 npcs_rutgar_and_frankal ()
 
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

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

Member Function Documentation

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

Reimplemented from CreatureScript.

133  {
134  if (creature->IsQuestGiver())
135  player->PrepareQuestMenu(creature->GetGUID());
136 
137  if (player->GetQuestStatus(8304) == QUEST_STATUS_INCOMPLETE &&
138  creature->GetEntry() == 15170 &&
139  !player->GetReqKillOrCastCurrentCount(8304, TRIGGER_RUTGAR))
141 
142  if (player->GetQuestStatus(8304) == QUEST_STATUS_INCOMPLETE &&
143  creature->GetEntry() == 15171 &&
144  player->GetReqKillOrCastCurrentCount(8304, TRIGGER_RUTGAR))
146 
147  player->SEND_GOSSIP_MENU(7754, creature->GetGUID());
148 
149  return true;
150  }
Definition: ScriptedGossip.h:71
bool IsQuestGiver() const
Definition: Unit.h:1566
Definition: zone_silithus.cpp:60
Definition: ScriptedGossip.h:73
#define GOSSIP_ITEM1
Definition: zone_silithus.cpp:42
ObjectGuid const & GetGUID() const
Definition: Object.h:105
Definition: GossipDef.h:59
Definition: QuestDef.h:113
uint32 GetEntry() const
Definition: Object.h:107

+ Here is the call graph for this function:

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

Reimplemented from CreatureScript.

69  {
70  player->PlayerTalkClass->ClearMenus();
71  switch (action)
72  {
75  player->SEND_GOSSIP_MENU(7755, creature->GetGUID());
76  break;
77  case GOSSIP_ACTION_INFO_DEF + 1:
79  player->SEND_GOSSIP_MENU(7756, creature->GetGUID());
80  break;
81  case GOSSIP_ACTION_INFO_DEF + 2:
83  player->SEND_GOSSIP_MENU(7757, creature->GetGUID());
84  break;
85  case GOSSIP_ACTION_INFO_DEF + 3:
87  player->SEND_GOSSIP_MENU(7758, creature->GetGUID());
88  break;
89  case GOSSIP_ACTION_INFO_DEF + 4:
91  player->SEND_GOSSIP_MENU(7759, creature->GetGUID());
92  break;
93  case GOSSIP_ACTION_INFO_DEF + 5:
95  player->SEND_GOSSIP_MENU(7760, creature->GetGUID());
96  break;
97  case GOSSIP_ACTION_INFO_DEF + 6:
98  player->SEND_GOSSIP_MENU(7761, creature->GetGUID());
99  //'kill' our trigger to update quest status
100  player->KilledMonsterCredit(TRIGGER_RUTGAR);
101  break;
102 
103  case GOSSIP_ACTION_INFO_DEF + 9:
105  player->SEND_GOSSIP_MENU(7762, creature->GetGUID());
106  break;
107  case GOSSIP_ACTION_INFO_DEF + 10:
109  player->SEND_GOSSIP_MENU(7763, creature->GetGUID());
110  break;
111  case GOSSIP_ACTION_INFO_DEF + 11:
113  player->SEND_GOSSIP_MENU(7764, creature->GetGUID());
114  break;
115  case GOSSIP_ACTION_INFO_DEF + 12:
117  player->SEND_GOSSIP_MENU(7765, creature->GetGUID());
118  break;
119  case GOSSIP_ACTION_INFO_DEF + 13:
121  player->SEND_GOSSIP_MENU(7766, creature->GetGUID());
122  break;
123  case GOSSIP_ACTION_INFO_DEF + 14:
124  player->SEND_GOSSIP_MENU(7767, creature->GetGUID());
125  //'kill' our trigger to update quest status
126  player->KilledMonsterCredit(TRIGGER_FRANKAL);
127  break;
128  }
129  return true;
130  }
#define GOSSIP_ITEM12
Definition: zone_silithus.cpp:52
#define GOSSIP_ITEM2
Definition: zone_silithus.cpp:44
Definition: ScriptedGossip.h:71
#define GOSSIP_ITEM3
Definition: zone_silithus.cpp:45
#define GOSSIP_ITEM15
Definition: zone_silithus.cpp:55
#define GOSSIP_ITEM14
Definition: zone_silithus.cpp:54
#define GOSSIP_ITEM5
Definition: zone_silithus.cpp:47
Definition: zone_silithus.cpp:60
Definition: zone_silithus.cpp:59
Definition: ScriptedGossip.h:73
ObjectGuid const & GetGUID() const
Definition: Object.h:105
Definition: GossipDef.h:59
#define GOSSIP_ITEM6
Definition: zone_silithus.cpp:48
#define GOSSIP_ITEM13
Definition: zone_silithus.cpp:53
#define GOSSIP_ITEM4
Definition: zone_silithus.cpp:46
#define GOSSIP_ITEM7
Definition: zone_silithus.cpp:49
#define GOSSIP_ITEM11
Definition: zone_silithus.cpp:51

+ Here is the call graph for this function:


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