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

Public Member Functions

 achievement_watch_him_die ()
 
bool OnCheck (Player *, Unit *target) override
 
- Public Member Functions inherited from ScriptObject
const std::string & GetName () const
 

Additional Inherited Members

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

Constructor & Destructor Documentation

achievement_watch_him_die::achievement_watch_him_die ( )
inline
648 : AchievementCriteriaScript("achievement_watch_him_die") { }
AchievementCriteriaScript(const char *name)
Definition: ScriptMgr.cpp:1658

Member Function Documentation

bool achievement_watch_him_die::OnCheck ( Player ,
Unit target 
)
inlineoverridevirtual

Implements AchievementCriteriaScript.

651  {
652  if (!target)
653  return false;
654 
655  InstanceScript* instance = target->GetInstanceScript();
656  if (!instance)
657  return false;
658 
659  for (uint8 n = 0; n < 3; ++n)
660  {
661  if (Creature* watcher = instance->GetCreature(DATA_WATCHER_GASHRA + n))
662  if (!watcher->IsAlive())
663  return false;
664  }
665 
666  return true;
667  }
InstanceScript * GetInstanceScript()
Definition: Object.cpp:1540
Creature * GetCreature(uint32 type)
Definition: InstanceScript.h:180
Definition: Creature.h:467
Definition: azjol_nerub.h:34
Definition: InstanceScript.h:141
uint8_t uint8
Definition: Define.h:152

+ Here is the call graph for this function:


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