Пример #1
0
        public static OPLInfo FreeOPLInfoPacket(IPropertyListObject obj)
        {
            if (OPLInfoPackets.TryRemove(obj, out OPLInfo p))
            {
                Packet.Release(p);
            }

            return(p);
        }
Пример #2
0
 public static OPLInfo GetOPLInfoPacket(IPropertyListObject obj)
 {
     return(OPLInfoPackets.GetOrAdd(obj, value =>
     {
         OPLInfo packet = new OPLInfo(value.PropertyList.Entity.Serial, value.PropertyList.Hash);
         packet.SetStatic();
         return packet;
     }));
 }
Пример #3
0
 public static void SendOPLInfo(this NetState ns, IPropertyListObject obj) =>
 ns.SendOPLInfo(obj.Serial, obj.PropertyList.Hash);