mirror of
https://github.com/araxiaonline/TrinityCore.git
synced 2026-06-14 12:12:34 -04:00
Core/Movement
* Implemented a generic way of sending movement packets depending on who controls the unit (player or server controlled) * Added possibility to specify extra elements in movement packets (such as speed, extra passenger guid, collision height and similar) without having to add a special element only for these * Removed Unit::SendMovementFlagUpdate as it was something working only in 3.3.5a and earlier (no serverside HEARTBEAT opcode exists now)
This commit is contained in:
@@ -1331,7 +1331,15 @@ public:
|
||||
target->SetExtraUnitMovementFlags(moveFlagsExtra);
|
||||
}
|
||||
|
||||
target->SendMovementFlagUpdate();
|
||||
if (target->GetTypeId() != TYPEID_PLAYER)
|
||||
target->DestroyForNearbyPlayers(); // Force new SMSG_UPDATE_OBJECT:CreateObject
|
||||
else
|
||||
{
|
||||
WorldPacket data(SMSG_PLAYER_MOVE);
|
||||
target->WriteMovementInfo(data);
|
||||
target->SendMessageToSet(&data, true);
|
||||
}
|
||||
|
||||
handler->PSendSysMessage(LANG_MOVEFLAGS_SET, target->GetUnitMovementFlags(), target->GetExtraUnitMovementFlags());
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user