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

Public Member Functions

 achievement_split_personality ()
 
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_split_personality::achievement_split_personality ( )
inline
362  : AchievementCriteriaScript("achievement_split_personality")
363  {
364  }
AchievementCriteriaScript(const char *name)
Definition: ScriptMgr.cpp:1658

Member Function Documentation

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

Implements AchievementCriteriaScript.

367  {
368  if (!target)
369  return false;
370 
371  if (Creature* Telestra = target->ToCreature())
372  if (Telestra->AI()->GetData(DATA_SPLIT_PERSONALITY) == 2)
373  return true;
374 
375  return false;
376  }
Definition: Creature.h:467
Definition: boss_magus_telestra.cpp:59
Creature * ToCreature()
Definition: Object.h:194

+ Here is the call graph for this function:


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