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

Public Member Functions

 AreaTrigger_at_frostgrips_hollow ()
 
bool OnTrigger (Player *player, AreaTriggerEntry const *, bool) override
 
- Public Member Functions inherited from ScriptObject
const std::string & GetName () const
 

Private Attributes

ObjectGuid stormforgedMonitorGUID
 
ObjectGuid stormforgedEradictorGUID
 

Additional Inherited Members

- Protected Member Functions inherited from AreaTriggerScript
 AreaTriggerScript (const char *name)
 
- Protected Member Functions inherited from ScriptObject
 ScriptObject (const char *name)
 
virtual ~ScriptObject ()
 

Constructor & Destructor Documentation

AreaTrigger_at_frostgrips_hollow::AreaTrigger_at_frostgrips_hollow ( )
inline
431  : AreaTriggerScript("at_frostgrips_hollow")
432  {
435  }
AreaTriggerScript(const char *name)
Definition: ScriptMgr.cpp:1598
ObjectGuid stormforgedMonitorGUID
Definition: areatrigger_scripts.cpp:471
void Clear()
Definition: ObjectGuid.h:215
ObjectGuid stormforgedEradictorGUID
Definition: areatrigger_scripts.cpp:472

+ Here is the call graph for this function:

Member Function Documentation

bool AreaTrigger_at_frostgrips_hollow::OnTrigger ( Player player,
AreaTriggerEntry const ,
bool   
)
inlineoverridevirtual

The npc would search an alternative way to get to the last waypoint without this unit state.

Reimplemented from AreaTriggerScript.

438  {
439  if (player->GetQuestStatus(QUEST_THE_LONESOME_WATCHER) != QUEST_STATUS_INCOMPLETE)
440  return false;
441 
442  Creature* stormforgedMonitor = ObjectAccessor::GetCreature(*player, stormforgedMonitorGUID);
443  if (stormforgedMonitor)
444  return false;
445 
446  Creature* stormforgedEradictor = ObjectAccessor::GetCreature(*player, stormforgedEradictorGUID);
447  if (stormforgedEradictor)
448  return false;
449 
451  if (stormforgedMonitor)
452  {
453  stormforgedMonitorGUID = stormforgedMonitor->GetGUID();
454  stormforgedMonitor->SetWalk(false);
456  stormforgedMonitor->AddUnitState(UNIT_STATE_IGNORE_PATHFINDING);
457  stormforgedMonitor->GetMotionMaster()->MovePath(NPC_STORMFORGED_MONITOR * 100, false);
458  }
459 
461  if (stormforgedEradictor)
462  {
463  stormforgedEradictorGUID = stormforgedEradictor->GetGUID();
464  stormforgedEradictor->GetMotionMaster()->MovePath(NPC_STORMFORGED_ERADICTOR * 100, false);
465  }
466 
467  return true;
468  }
Definition: areatrigger_scripts.cpp:419
Definition: areatrigger_scripts.cpp:418
void AddUnitState(uint32 f)
Definition: Unit.h:1394
Definition: areatrigger_scripts.cpp:416
MotionMaster * GetMotionMaster()
Definition: Unit.h:2101
Definition: Creature.h:467
ObjectGuid stormforgedMonitorGUID
Definition: areatrigger_scripts.cpp:471
Position const stormforgedEradictorPosition
Definition: areatrigger_scripts.cpp:426
TC_GAME_API Creature * GetCreature(WorldObject const &u, ObjectGuid const &guid)
Definition: ObjectAccessor.cpp:174
ObjectGuid const & GetGUID() const
Definition: Object.h:105
void MovePath(uint32 path_id, bool repeatable)
Definition: MotionMaster.cpp:618
bool SetWalk(bool enable)
Definition: Unit.cpp:15800
Definition: QuestDef.h:113
Position const stormforgedMonitorPosition
Definition: areatrigger_scripts.cpp:425
Definition: Unit.h:577
ObjectGuid stormforgedEradictorGUID
Definition: areatrigger_scripts.cpp:472
TempSummon * SummonCreature(uint32 id, Position const &pos, TempSummonType spwtype=TEMPSUMMON_MANUAL_DESPAWN, uint32 despwtime=0, uint32 vehId=0) const
Definition: Object.cpp:2346

+ Here is the call graph for this function:

Member Data Documentation

ObjectGuid AreaTrigger_at_frostgrips_hollow::stormforgedEradictorGUID
private
ObjectGuid AreaTrigger_at_frostgrips_hollow::stormforgedMonitorGUID
private

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