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

Public Member Functions

 achievement_share_the_love ()
 
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_share_the_love::achievement_share_the_love ( )
inline
285 : AchievementCriteriaScript("achievement_share_the_love") { }
AchievementCriteriaScript(const char *name)
Definition: ScriptMgr.cpp:1658

Member Function Documentation

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

Implements AchievementCriteriaScript.

288  {
289  if (!target)
290  return false;
291 
292  if (Creature* GalDarah = target->ToCreature())
293  if (GalDarah->AI()->GetData(DATA_SHARE_THE_LOVE) >= 5)
294  return true;
295 
296  return false;
297  }
Definition: Creature.h:467
Definition: boss_gal_darah.cpp:72
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: