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

Public Member Functions

 achievement_wg_vehicular_gnomeslaughter ()
 
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_vehicular_gnomeslaughter()

achievement_wg_vehicular_gnomeslaughter::achievement_wg_vehicular_gnomeslaughter ( )
inline
1134: AchievementCriteriaScript("achievement_wg_vehicular_gnomeslaughter") { }
Definition: AchievementCriteriaScript.h:24

Member Function Documentation

◆ OnCheck()

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

Reimplemented from AchievementCriteriaScript.

1137 {
1138 if (!target)
1139 return false;
1140
1141 if (Unit* vehicle = source->GetVehicleBase())
1142 if (vehicle->GetEntry() == NPC_WINTERGRASP_SIEGE_ENGINE_ALLIANCE || vehicle->GetEntry() == NPC_WINTERGRASP_SIEGE_ENGINE_HORDE ||
1143 vehicle->GetEntry() == NPC_WINTERGRASP_CATAPULT || vehicle->GetEntry() == NPC_WINTERGRASP_DEMOLISHER ||
1144 vehicle->GetEntry() == NPC_WINTERGRASP_TOWER_CANNON)
1145 return true;
1146
1147 return false;
1148 }
@ NPC_WINTERGRASP_SIEGE_ENGINE_HORDE
Definition: BattlefieldWG.h:211
@ NPC_WINTERGRASP_CATAPULT
Definition: BattlefieldWG.h:212
@ NPC_WINTERGRASP_DEMOLISHER
Definition: BattlefieldWG.h:213
@ NPC_WINTERGRASP_TOWER_CANNON
Definition: BattlefieldWG.h:214
@ NPC_WINTERGRASP_SIEGE_ENGINE_ALLIANCE
Definition: BattlefieldWG.h:210
Definition: Unit.h:630
Unit * GetVehicleBase() const
Definition: Unit.cpp:18742

References Unit::GetVehicleBase(), NPC_WINTERGRASP_CATAPULT, NPC_WINTERGRASP_DEMOLISHER, NPC_WINTERGRASP_SIEGE_ENGINE_ALLIANCE, NPC_WINTERGRASP_SIEGE_ENGINE_HORDE, and NPC_WINTERGRASP_TOWER_CANNON.