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:
1 parent
6cd8d1286f
commit
ebe7b29987
3 files changed
+22
-5
No files matched your search
@@ -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