public static OPLInfo FreeOPLInfoPacket(IPropertyListObject obj) { if (OPLInfoPackets.TryRemove(obj, out OPLInfo p)) { Packet.Release(p); } return(p); }
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; })); }
public static void SendOPLInfo(this NetState ns, IPropertyListObject obj) => ns.SendOPLInfo(obj.Serial, obj.PropertyList.Hash);