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

Public Member Functions

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

Member Function Documentation

bool achievement_wg_didnt_stand_a_chance::OnCheck ( Player source,
Unit target 
)
inlineoverridevirtual

Implements AchievementCriteriaScript.

548  {
549  if (!target)
550  return false;
551 
552  if (Player* victim = target->ToPlayer())
553  {
554  if (!victim->IsMounted())
555  return false;
556 
557  if (Vehicle* vehicle = source->GetVehicle())
558  if (vehicle->GetVehicleInfo()->ID == 244) // Wintergrasp Tower Cannon
559  return true;
560  }
561 
562  return false;
563  }
Definition: Vehicle.h:32
Player * ToPlayer()
Definition: Object.h:191

+ Here is the call graph for this function:


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