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

Public Member Functions

 achievement_bg_sa_artillery ()
 
bool OnCheck (Player *source, Unit *) 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_bg_sa_artillery::achievement_bg_sa_artillery ( )
inline
118 : AchievementCriteriaScript("achievement_bg_sa_artillery") { }
AchievementCriteriaScript(const char *name)
Definition: ScriptMgr.cpp:1658

Member Function Documentation

bool achievement_bg_sa_artillery::OnCheck ( Player source,
Unit  
)
inlineoverridevirtual

Implements AchievementCriteriaScript.

121  {
122  if (Creature* vehicle = source->GetVehicleCreatureBase())
123  {
124  if (vehicle->GetEntry() == NPC_ANTI_PERSONNAL_CANNON)
125  return true;
126  }
127 
128  return false;
129  }
Definition: Creature.h:467
Definition: BattlegroundSA.h:86
Creature * GetVehicleCreatureBase() const
Definition: Unit.cpp:14346

+ Here is the call graph for this function:


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