Core/PacketIO: Move writing data sizes in SMSG_UPDATE_OBJECT to shared functions instead of spreading it in all overrides
Port From (https://github.com/TrinityCore/TrinityCore/commit/067fa31d152ecb10e5bea0419f84f7b79b96abf5)
This commit is contained in:
@@ -126,28 +126,6 @@ namespace Game.Entities
|
||||
ushort _aiAnimKitId;
|
||||
ushort _movementAnimKitId;
|
||||
ushort _meleeAnimKitId;
|
||||
|
||||
class ValuesUpdateForPlayerWithMaskSender : IDoWork<Player>
|
||||
{
|
||||
Unit Owner;
|
||||
ObjectFieldData ObjectMask = new();
|
||||
UnitData UnitMask = new();
|
||||
|
||||
public ValuesUpdateForPlayerWithMaskSender(Unit owner)
|
||||
{
|
||||
Owner = owner;
|
||||
}
|
||||
|
||||
public void Invoke(Player player)
|
||||
{
|
||||
UpdateData udata = new(Owner.GetMapId());
|
||||
|
||||
Owner.BuildValuesUpdateForPlayerWithMask(udata, ObjectMask.GetUpdateMask(), UnitMask.GetUpdateMask(), player);
|
||||
|
||||
udata.BuildPacket(out UpdateObject packet);
|
||||
player.SendPacket(packet);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
public struct DiminishingReturn
|
||||
|
||||
Reference in New Issue
Block a user