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

Classes

struct  npc_tarethaAI
 

Public Member Functions

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

Member Function Documentation

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

Reimplemented from CreatureScript.

567  {
568  return GetInstanceAI<npc_tarethaAI>(creature);
569  }
bool npc_taretha::OnGossipHello ( Player player,
Creature creature 
)
inlineoverridevirtual

Reimplemented from CreatureScript.

598  {
599  InstanceScript* instance = creature->GetInstanceScript();
600  if (instance->GetData(TYPE_THRALL_PART3) == DONE && instance->GetData(TYPE_THRALL_PART4) == NOT_STARTED)
601  {
603  player->SEND_GOSSIP_MENU(GOSSIP_ID_EPOCH1, creature->GetGUID());
604  }
605  return true;
606  }
Definition: ScriptedGossip.h:71
Definition: old_hillsbrad.h:31
InstanceScript * GetInstanceScript()
Definition: Object.cpp:1540
virtual uint32 GetData(uint32) const
Definition: ZoneScript.h:51
Definition: old_hillsbrad.h:30
Definition: inflate.h:49
Definition: InstanceScript.h:58
Definition: old_hillsbrad.cpp:554
Definition: ScriptedGossip.h:73
ObjectGuid const & GetGUID() const
Definition: Object.h:105
Definition: GossipDef.h:59
Definition: InstanceScript.h:141
#define GOSSIP_ITEM_EPOCH1
Definition: old_hillsbrad.cpp:558

+ Here is the call graph for this function:

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

Reimplemented from CreatureScript.

572  {
573  player->PlayerTalkClass->ClearMenus();
574  InstanceScript* instance = creature->GetInstanceScript();
575  if (action == GOSSIP_ACTION_INFO_DEF+1)
576  {
578  player->SEND_GOSSIP_MENU(GOSSIP_ID_EPOCH2, creature->GetGUID());
579  }
580  if (action == GOSSIP_ACTION_INFO_DEF+2)
581  {
582  player->CLOSE_GOSSIP_MENU();
583 
584  if (instance->GetData(TYPE_THRALL_EVENT) == IN_PROGRESS)
585  {
587  if (instance->GetGuidData(DATA_EPOCH).IsEmpty())
588  creature->SummonCreature(ENTRY_EPOCH, 2639.13f, 698.55f, 65.43f, 4.59f, TEMPSUMMON_TIMED_OR_DEAD_DESPAWN, 120000);
589 
590  if (Creature* thrall = (ObjectAccessor::GetCreature(*creature, instance->GetGuidData(DATA_THRALL))))
592  }
593  }
594  return true;
595  }
Definition: old_hillsbrad.h:27
Definition: old_hillsbrad.cpp:555
Definition: ScriptedGossip.h:71
Definition: old_hillsbrad.h:31
InstanceScript * GetInstanceScript()
Definition: Object.cpp:1540
virtual uint32 GetData(uint32) const
Definition: ZoneScript.h:51
Definition: Creature.h:467
#define ENSURE_AI(a, b)
Definition: ScriptedCreature.h:29
virtual ObjectGuid GetGuidData(uint32 type) const override
Definition: InstanceScript.cpp:93
Definition: InstanceScript.h:59
virtual void SetData(uint32, uint32)
Definition: ZoneScript.h:52
#define GOSSIP_ITEM_EPOCH2
Definition: old_hillsbrad.cpp:559
Definition: culling_of_stratholme.h:30
Definition: hyjal.h:39
TC_GAME_API Creature * GetCreature(WorldObject const &u, ObjectGuid const &guid)
Definition: ObjectAccessor.cpp:174
Definition: ScriptedGossip.h:73
ObjectGuid const & GetGUID() const
Definition: Object.h:105
Definition: GossipDef.h:59
Definition: InstanceScript.h:141
bool IsEmpty() const
Definition: ObjectGuid.h:242
Definition: old_hillsbrad.cpp:163
TempSummon * SummonCreature(uint32 id, Position const &pos, TempSummonType spwtype=TEMPSUMMON_MANUAL_DESPAWN, uint32 despwtime=0, uint32 vehId=0) const
Definition: Object.cpp:2346
Definition: Object.h:54

+ Here is the call graph for this function:


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