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:
_manuel_
2009-12-31 17:59:56 -03:00
parent 6cd8d1286f
commit ebe7b29987
3 changed files with 22 additions and 5 deletions

View File

@@ -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)