mirror of
https://github.com/ACEmulator/ACE
synced 2026-08-17 12:26:06 -04:00
* Remove RunActions() from IActor interface * make Landblock an IActor * Make WorldManager an IActor * Remove AgressiveInlinding from ActionQueue.RunActions (Helps break up profiling results) * Fix WorldManager EnqueueAction * Split WorldObject ActionQueues into Landblock and Player * Switch Landblock from o(n) to o(1) * Loop in reverse order, no need to create a new list using FindAll. * use an ArrayPool<byte> to conserve resources and improve performance * cosmetic * Update/Tick Age every 7 seconds for Players (Before, this was consuming 1% CPU) * More packet transmission improvements
22 lines
664 B
C#
22 lines
664 B
C#
using System.IO;
|
|
|
|
using ACE.Common.Cryptography;
|
|
|
|
namespace ACE.Server.Network
|
|
{
|
|
public class ClientPacketFragment : PacketFragment
|
|
{
|
|
public ClientPacketFragment(BinaryReader payload)
|
|
{
|
|
Header = new PacketFragmentHeader(payload);
|
|
Data = payload.ReadBytes(Header.Size - PacketFragmentHeader.HeaderSize);
|
|
}
|
|
|
|
public uint CalculateHash32()
|
|
{
|
|
byte[] fragmentHeaderBytes = Header.GetRaw();
|
|
uint fragmentChecksum = Hash32.Calculate(fragmentHeaderBytes, fragmentHeaderBytes.Length) + Hash32.Calculate(Data, Data.Length);
|
|
return fragmentChecksum;
|
|
}
|
|
}
|
|
}
|