mirror of
https://github.com/TrinityCore/TrinityCore.git
synced 2026-01-19 08:55:32 +01:00
Implemented function CheckPlayerCondition, it will be used before the player enters in vehicles. Now vehicles Argent Warhorse and Argent Battleworg can't be used if the player dosen't have Argent Lance eqquiped.
--HG-- branch : trunk
This commit is contained in:
@@ -15420,6 +15420,19 @@ void Unit::JumpTo(WorldObject *obj, float speedZ)
|
||||
GetMotionMaster()->MoveJump(x, y, z, speedXY, speedZ);
|
||||
}
|
||||
|
||||
bool Unit::CheckPlayerCondition(Player* pPlayer)
|
||||
{
|
||||
switch(GetEntry())
|
||||
{
|
||||
case 35644: //Argent Warhorse
|
||||
case 36558: //Argent Battleworg
|
||||
if (!pPlayer->HasItemOrGemWithIdEquipped(46106,1)) //Check item Argent Lance
|
||||
return false;
|
||||
default:
|
||||
return true;
|
||||
}
|
||||
}
|
||||
|
||||
void Unit::EnterVehicle(Vehicle *vehicle, int8 seatId)
|
||||
{
|
||||
if (!isAlive() || GetVehicleKit() == vehicle)
|
||||
|
||||
Reference in New Issue
Block a user