AzeorthCore 3.3.5a
OpenSource WoW Emulator
Loading...
Searching...
No Matches
achievement_kologarn_looks_could_kill Class Reference
Inheritance diagram for achievement_kologarn_looks_could_kill:
AchievementCriteriaScript ScriptObject

Public Member Functions

 achievement_kologarn_looks_could_kill ()
 
bool OnCheck (Player *, Unit *target, uint32) override
 
- Public Member Functions inherited from AchievementCriteriaScript
bool IsDatabaseBound () const override
 
virtual bool OnCheck (Player *, Unit *, uint32)
 
- Public Member Functions inherited from ScriptObject
virtual bool IsDatabaseBound () const
 
virtual bool isAfterLoadScript () const
 
virtual void checkValidity ()
 
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 ()=default
 

Detailed Description

Constructor & Destructor Documentation

◆ achievement_kologarn_looks_could_kill()

achievement_kologarn_looks_could_kill::achievement_kologarn_looks_could_kill ( )
inline
843: AchievementCriteriaScript("achievement_kologarn_looks_could_kill") {}
Definition: ScriptMgr.h:975

Member Function Documentation

◆ OnCheck()

bool achievement_kologarn_looks_could_kill::OnCheck ( Player ,
Unit target,
uint32   
)
inlineoverridevirtual

Reimplemented from AchievementCriteriaScript.

846 {
847 if (target)
848 if (InstanceScript* instance = target->GetInstanceScript())
849 if (Creature* cr = ObjectAccessor::GetCreature(*target, instance->GetGuidData(TYPE_KOLOGARN)))
850 return cr->AI()->GetData(DATA_KOLOGARN_LOOKS_ACHIEV);
851
852 return false;
853 }
@ DATA_KOLOGARN_LOOKS_ACHIEV
Definition: boss_kologarn.cpp:136
@ TYPE_KOLOGARN
Definition: ulduar.h:38
Creature * GetCreature(WorldObject const &u, ObjectGuid const guid)
Definition: ObjectAccessor.cpp:215
Definition: Creature.h:46
InstanceScript * GetInstanceScript() const
Definition: Object.cpp:1192
Definition: InstanceScript.h:140

References DATA_KOLOGARN_LOOKS_ACHIEV, ObjectAccessor::GetCreature(), WorldObject::GetInstanceScript(), and TYPE_KOLOGARN.