Esempio n. 1
0
 public static void WriteUintToPacket(
     uint value,
     CompressionInfo.UnsignedInteger compressionInfo)
 {
     MBAPI.IMBNetwork.WriteUintToPacket(value, ref compressionInfo);
     DebugNetworkEventStatistics.AddDataToStatistic(compressionInfo.GetNumBits());
 }
Esempio 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());
 }
Esempio 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);
        }
Esempio 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));
        }
Esempio n. 5
0
 public void WriteUintToPacket(
     uint value,
     ref CompressionInfo.UnsignedInteger compressionInfo)
 {
     ScriptingInterfaceOfIMBNetwork.call_WriteUintToPacketDelegate(value, ref compressionInfo);
 }
Esempio n. 6
0
 public bool ReadUintFromPacket(
     ref CompressionInfo.UnsignedInteger compressionInfo,
     out uint output)
 {
     return(ScriptingInterfaceOfIMBNetwork.call_ReadUintFromPacketDelegate(ref compressionInfo, out output));
 }