예제 #1
0
            public static void WriteDelete(BaseVobInstance instance)
            {
                var stream = GameServer.SetupStream(ServerMessages.VobInstanceDeleteMessage);

                stream.Write((ushort)instance.ID);
                GameClient.ForEach(c => c.Send(stream, NetPriority.Low, NetReliability.Reliable, '\0'));
            }
예제 #2
0
 public static void ReadDelete(PacketReader stream)
 {
     if (BaseVobInstance.TryGet(stream.ReadUShort(), out BaseVobInstance inst))
     {
         inst.ScriptObject.Delete();
     }
 }
예제 #3
0
            public static void WriteCreate(BaseVobInstance instance)
            {
                var stream = GameServer.SetupStream(ServerMessages.VobInstanceCreateMessage);

                stream.Write((byte)instance.ScriptObject.GetVobType());
                instance.WriteStream(stream);
                GameClient.ForEach(c => c.Send(stream, NetPriority.Low, NetReliability.Reliable, '\0'));
            }
예제 #4
0
            public static void ReadCreate(PacketReader stream)
            {
                byte            type = stream.ReadByte();
                BaseVobInstance inst = ScriptManager.Interface.CreateInstance(type);

                inst.ReadStream(stream);
                inst.ScriptObject.Create();
            }
예제 #5
0
 /// <summary> Gets any Instance with the given ID or null from the static Instance collection. </summary>
 public static bool TryGet(int id, out BaseVobInstance instance)
 {
     return(idColl.TryGet(id, out instance));
 }