Core/Objects: Added helper structures to allow using customized updatefield sending packet functions with Trinity::MessageDistDeliverer
Port From (https://github.com/TrinityCore/TrinityCore/commit/ee835671b4f572f92f79c9b302764ee591c6de11)
This commit is contained in:
@@ -137,6 +137,28 @@ 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