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

Classes

struct  npc_hidden_cultistAI
 

Public Member Functions

 npc_hidden_cultist ()
 
CreatureAIGetAI (Creature *creature) const override
 
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 *)
 
- 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_hidden_cultist::npc_hidden_cultist ( )
inline
2229 : CreatureScript("npc_hidden_cultist") { }
CreatureScript(const char *name)
Definition: ScriptMgr.cpp:1586

Member Function Documentation

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

Reimplemented from CreatureScript.

2355  {
2356  return new npc_hidden_cultistAI(creature);
2357  }
bool npc_hidden_cultist::OnGossipHello ( Player player,
Creature creature 
)
inlineoverridevirtual

Reimplemented from CreatureScript.

2360  {
2361  uint32 uiGossipText = 0;
2362  const char* charGossipItem;
2363 
2364  switch (creature->GetEntry())
2365  {
2366  case NPC_TOM_HEGGER:
2367  uiGossipText = GOSSIP_TEXT_TOM_HEGGER;
2368  charGossipItem = GOSSIP_ITEM_TOM_HEGGER;
2369  break;
2370  case NPC_SALTY_JOHN_THORPE:
2371  uiGossipText = GOSSIP_TEXT_SALTY_JOHN_THORPE;
2372  charGossipItem = GOSSIP_ITEM_SALTY_JOHN_THORPE;
2373  break;
2374  case NPC_GUARD_MITCHELLS:
2375  uiGossipText = GOSSIP_TEXT_GUARD_MITCHELSS;
2376  charGossipItem = GOSSIP_ITEM_GUARD_MITCHELLS;
2377  break;
2378  default:
2379  charGossipItem = "";
2380  return false;
2381  }
2382 
2383  if (player->HasAura(SPELL_RIGHTEOUS_VISION) && player->GetQuestStatus(QUEST_THE_HUNT_IS_ON) == QUEST_STATUS_INCOMPLETE)
2384  player->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, charGossipItem, GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF+1);
2385 
2386  if (creature->IsVendor())
2388 
2389  player->SEND_GOSSIP_MENU(uiGossipText, creature->GetGUID());
2390 
2391  return true;
2392  }
Definition: zone_borean_tundra.cpp:2206
bool IsVendor() const
Definition: Unit.h:1564
Definition: zone_borean_tundra.cpp:2204
Definition: zone_borean_tundra.cpp:2210
Definition: ScriptedGossip.h:71
Definition: ScriptedGossip.h:59
#define GOSSIP_TEXT_BROWSE_GOODS
Definition: ScriptedGossip.h:26
const char * GOSSIP_ITEM_SALTY_JOHN_THORPE
Definition: zone_borean_tundra.cpp:2224
Definition: zone_borean_tundra.cpp:2213
Definition: zone_borean_tundra.cpp:2212
Definition: zone_borean_tundra.cpp:2214
Definition: GossipDef.h:60
const char * GOSSIP_ITEM_GUARD_MITCHELLS
Definition: zone_borean_tundra.cpp:2223
uint32_t uint32
Definition: Define.h:150
Definition: zone_borean_tundra.cpp:2209
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_borean_tundra.cpp:2208
const char * GOSSIP_ITEM_TOM_HEGGER
Definition: zone_borean_tundra.cpp:2222

+ Here is the call graph for this function:

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

Reimplemented from CreatureScript.

2395  {
2396  player->PlayerTalkClass->ClearMenus();
2397 
2398  if (action == GOSSIP_ACTION_INFO_DEF+1)
2399  {
2400  player->CLOSE_GOSSIP_MENU();
2401  creature->AI()->SetGUID(player->GetGUID());
2402  creature->AI()->DoAction(1);
2403  }
2404 
2405  if (action == GOSSIP_ACTION_TRADE)
2406  player->GetSession()->SendListInventory(creature->GetGUID());
2407 
2408  return true;
2409  }
Definition: ScriptedGossip.h:71
Definition: ScriptedGossip.h:59
virtual void SetGUID(ObjectGuid, int32=0)
Definition: UnitAI.h:141
CreatureAI * AI() const
Definition: Creature.h:525
virtual void DoAction(int32)
Definition: UnitAI.h:138
ObjectGuid const & GetGUID() const
Definition: Object.h:105

+ Here is the call graph for this function:


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