mirror of
https://github.com/mangosfour/server.git
synced 2025-12-15 10:37:02 +00:00
[8077] Resolve mixed store and use 2 different flags values types in single field.
* Create new monster move field in Creature class and use it in all cases when expected use MONSTER_MOVE_* flags. * Store and use MOVEMENTFLAG_* values in field in MovementInfo structure of Player class. * Cleanups and fix related code. NOTE: DB in creature_addon store values similar MONSTER_MOVE_* flags, scritps also expected set only this flags.
This commit is contained in:
parent
00fc1d7593
commit
21a6a26386
24 changed files with 215 additions and 201 deletions
|
|
@ -230,7 +230,7 @@ void WorldSession::HandleMovementOpcodes( WorldPacket & recv_data )
|
|||
return;
|
||||
|
||||
/* handle special cases */
|
||||
if (movementInfo.flags & MOVEMENTFLAG_ONTRANSPORT)
|
||||
if (movementInfo.HasMovementFlag(MOVEMENTFLAG_ONTRANSPORT))
|
||||
{
|
||||
// transports size limited
|
||||
// (also received at zeppelin leave by some reason with t_* as absolute in continent coordinates, can be safely skipped)
|
||||
|
|
@ -272,7 +272,7 @@ void WorldSession::HandleMovementOpcodes( WorldPacket & recv_data )
|
|||
if (opcode == MSG_MOVE_FALL_LAND && plMover && !plMover->isInFlight())
|
||||
plMover->HandleFall(movementInfo);
|
||||
|
||||
if (plMover && ((movementInfo.flags & MOVEMENTFLAG_SWIMMING) != 0) != plMover->IsInWater())
|
||||
if (plMover && (movementInfo.HasMovementFlag(MOVEMENTFLAG_SWIMMING) != plMover->IsInWater()))
|
||||
{
|
||||
// now client not include swimming flag in case jumping under water
|
||||
plMover->SetInWater( !plMover->IsInWater() || plMover->GetBaseMap()->IsUnderWater(movementInfo.x, movementInfo.y, movementInfo.z) );
|
||||
|
|
@ -331,7 +331,6 @@ void WorldSession::HandleMovementOpcodes( WorldPacket & recv_data )
|
|||
{
|
||||
if(Map *map = mover->GetMap())
|
||||
map->CreatureRelocation((Creature*)mover, movementInfo.x, movementInfo.y, movementInfo.z, movementInfo.o);
|
||||
mover->SetUnitMovementFlags(movementInfo.flags);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue