Ejemplo n.º 1
0
 public static void WriteUintToPacket(
     uint value,
     CompressionInfo.UnsignedInteger compressionInfo)
 {
     MBAPI.IMBNetwork.WriteUintToPacket(value, ref compressionInfo);
     DebugNetworkEventStatistics.AddDataToStatistic(compressionInfo.GetNumBits());
 }
Ejemplo n.º 2
0
 public static void WriteObjectReferenceToPacket(
     MBObjectBase value,
     CompressionInfo.UnsignedInteger compressionInfo)
 {
     MBAPI.IMBNetwork.WriteUintToPacket(value != null ? value.Id.InternalValue : 0U, ref compressionInfo);
     DebugNetworkEventStatistics.AddDataToStatistic(compressionInfo.GetNumBits());
 }
Ejemplo n.º 3
0
        public static uint ReadUintFromPacket(
            CompressionInfo.UnsignedInteger compressionInfo,
            ref bool bufferReadValid)
        {
            uint output = 0;

            bufferReadValid = bufferReadValid && MBAPI.IMBNetwork.ReadUintFromPacket(ref compressionInfo, out output);
            return(output);
        }
Ejemplo n.º 4
0
        public static MBObjectBase ReadObjectReferenceFromPacket(
            MBObjectManager objectManager,
            CompressionInfo.UnsignedInteger compressionInfo,
            ref bool bufferReadValid)
        {
            uint id = GameNetworkMessage.ReadUintFromPacket(compressionInfo, ref bufferReadValid);

            if (!bufferReadValid || id <= 0U)
            {
                return((MBObjectBase)null);
            }
            MBGUID objectId = new MBGUID(id);

            return(objectManager.GetObject(objectId));
        }
Ejemplo n.º 5
0
 public void WriteUintToPacket(
     uint value,
     ref CompressionInfo.UnsignedInteger compressionInfo)
 {
     ScriptingInterfaceOfIMBNetwork.call_WriteUintToPacketDelegate(value, ref compressionInfo);
 }
Ejemplo n.º 6
0
 public bool ReadUintFromPacket(
     ref CompressionInfo.UnsignedInteger compressionInfo,
     out uint output)
 {
     return(ScriptingInterfaceOfIMBNetwork.call_ReadUintFromPacketDelegate(ref compressionInfo, out output));
 }