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

Public Member Functions

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

Member Function Documentation

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

Implements AchievementCriteriaScript.

134  {
135  if (!target)
136  return false;
137 
138  InstanceScript* instance = target->GetInstanceScript();
139  if (!instance)
140  return false;
141 
142  return instance->GetData(DATA_DEFENSELESS) != 0;
143  }
Definition: violet_hold.h:63
InstanceScript * GetInstanceScript()
Definition: Object.cpp:1540
virtual uint32 GetData(uint32) const
Definition: ZoneScript.h:51
Definition: InstanceScript.h:141

+ Here is the call graph for this function:


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