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

Public Member Functions

 achievement_wg_didnt_stand_a_chance ()
 
bool OnCheck (Player *source, 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
 
uint16 GetTotalAvailableHooks ()
 

Additional Inherited Members

- Protected Member Functions inherited from AchievementCriteriaScript
 AchievementCriteriaScript (const char *name)
 
- Protected Member Functions inherited from ScriptObject
 ScriptObject (const char *name, uint16 totalAvailableHooks=0)
 
virtual ~ScriptObject ()=default
 

Detailed Description

Constructor & Destructor Documentation

◆ achievement_wg_didnt_stand_a_chance()

achievement_wg_didnt_stand_a_chance::achievement_wg_didnt_stand_a_chance ( )
inline
1110: AchievementCriteriaScript("achievement_wg_didnt_stand_a_chance") { }
Definition: AchievementCriteriaScript.h:24

Member Function Documentation

◆ OnCheck()

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

Reimplemented from AchievementCriteriaScript.

1113 {
1114 if (!target)
1115 return false;
1116
1117 if (Player* victim = target->ToPlayer())
1118 {
1119 if (!victim->IsMounted())
1120 return false;
1121
1122 if (Vehicle* vehicle = source->GetVehicle())
1123 if (vehicle->GetVehicleInfo()->m_ID == 244) // Wintergrasp Tower Cannon
1124 return true;
1125 }
1126
1127 return false;
1128 }
Player * ToPlayer()
Definition: Object.h:198
Definition: Player.h:1064
Vehicle * GetVehicle() const
Definition: Unit.h:1673
Definition: Vehicle.h:28

References Unit::GetVehicle(), and Object::ToPlayer().