Core/Movement: Corrected movement info structure written in WriteMovementInfo

This commit is contained in:
Shauren
2012-03-17 18:01:56 +01:00
parent 5d25dc8926
commit 01f3620d45
3 changed files with 8 additions and 7 deletions

View File

@@ -528,7 +528,7 @@ void WorldSession::HandleMoveKnockBackAck(WorldPacket & recv_data)
MovementInfo movementInfo;
ReadMovementInfo(recv_data, &movementInfo);
if (movementInfo.Violated)
{
recv_data.rfinish();
@@ -592,5 +592,3 @@ void WorldSession::HandleSummonResponseOpcode(WorldPacket& recv_data)
_player->SummonIfPossible(agree);
}
#undef IF_VIOLATED_RETURN

View File

@@ -864,9 +864,9 @@ void WorldSession::ReadMovementInfo(WorldPacket &data, MovementInfo* mi)
situations it may be feasable to use .gm fly on as a GM without having .gm on,
e.g. aerial combat.
*/
if (mi->HasMovementFlag(MOVEMENTFLAG_FLYING | MOVEMENTFLAG_CAN_FLY) && GetSecurity() == SEC_PLAYER &&
!GetPlayer()->m_mover->HasAuraType(SPELL_AURA_FLY) &&
!GetPlayer()->m_mover->HasAuraType(SPELL_AURA_FLY) &&
!GetPlayer()->m_mover->HasAuraType(SPELL_AURA_MOD_INCREASE_MOUNTED_FLIGHT_SPEED))
VIOLATE_AND_RETURN;
@@ -889,6 +889,9 @@ void WorldSession::WriteMovementInfo(WorldPacket* data, MovementInfo* mi)
*data << mi->t_pos.PositionXYZOStream();
*data << mi->t_time;
*data << mi->t_seat;
if (mi->HasExtraMovementFlag(MOVEMENTFLAG2_INTERPOLATED_MOVEMENT))
*data << mi->t_time2;
}
if (mi->HasMovementFlag(MovementFlags(MOVEMENTFLAG_SWIMMING | MOVEMENTFLAG_FLYING)) || mi->HasExtraMovementFlag(MOVEMENTFLAG2_ALWAYS_ALLOW_PITCHING))

View File

@@ -2882,7 +2882,7 @@ void AuraEffect::HandleAuraWaterWalk(AuraApplication const* aurApp, uint8 mode,
target->AddUnitMovementFlag(MOVEMENTFLAG_WATERWALKING);
else
target->RemoveUnitMovementFlag(MOVEMENTFLAG_WATERWALKING);
target->SendMovementWaterWalking();
}
@@ -3234,7 +3234,7 @@ void AuraEffect::HandleAuraModIncreaseFlightSpeed(AuraApplication const* aurApp,
Unit* target = aurApp->GetTarget();
//! Update ability to fly
//! Update ability to fly
if (GetAuraType() == SPELL_AURA_MOD_INCREASE_MOUNTED_FLIGHT_SPEED)
{
// do not remove unit flag if there are more than this auraEffect of that kind on unit on unit