*Some work on vehicles.

--HG--
branch : trunk
This commit is contained in:
megamage
2009-04-17 15:08:58 -05:00
parent af935468df
commit c7d78b5ff9
17 changed files with 392 additions and 190 deletions

View File

@@ -338,9 +338,6 @@ void WorldSession::HandleMovementOpcodes( WorldPacket & recv_data )
{
if(Map *map = mover->GetMap())
{
//if(GetPlayer()->m_seer != mover)
if(((Creature*)mover)->isVehicle())
map->PlayerRelocation(GetPlayer(), movementInfo.x, movementInfo.y, movementInfo.z, movementInfo.o);
map->CreatureRelocation((Creature*)mover, movementInfo.x, movementInfo.y, movementInfo.z, movementInfo.o);
}
mover->SetUnitMovementFlags(movementInfo.flags);
@@ -482,10 +479,33 @@ void WorldSession::HandleDismissControlledVehicle(WorldPacket &recv_data)
// using charm guid, because we don't have vehicle guid...
if(Vehicle *vehicle = ObjectAccessor::GetVehicle(vehicleGUID))
{
_player->ExitVehicle(vehicle);
vehicle->RemovePassenger(_player);
}
}
void WorldSession::HandleChangeSeatsOnControlledVehicle(WorldPacket &recv_data)
{
sLog.outDebug("WORLD: Recvd CMSG_CHANGE_SEATS_ON_CONTROLLED_VEHICLE");
recv_data.hexlike();
uint32 a;
uint16 b;
uint16 c;
uint32 d,e,f,g,h,i,j,k;
int8 seat;
recv_data >> a >> b >> c;
recv_data >> d >> e >> f >> g >> h >> i >> j >> k;
recv_data >> seat;
//sLog.outError("change seat %u %u %u %u %u %u %u %u %u %u %u %u", a, b,c,d,e,f,g,h,i,j,k,seat);
}
void WorldSession::HandleRequestVehicleExit(WorldPacket &recv_data)
{
sLog.outDebug("WORLD: Recvd CMSG_REQUEST_VEHICLE_EXIT");
recv_data.hexlike();
if(GetPlayer()->m_Vehicle)
GetPlayer()->m_Vehicle->RemovePassenger(GetPlayer());
}
void WorldSession::HandleMountSpecialAnimOpcode(WorldPacket& /*recvdata*/)
{
//sLog.outDebug("WORLD: Recvd CMSG_MOUNTSPECIAL_ANIM");