예제 #1
0
        public void DeleteObject(ServerStaticWorldObject obj)
        {
            if (!objects.Remove(obj))
            {
                return;
            }

            var p = new StaticWorldObjectDeletePacket {
                ID = obj.ID
            };

            deleteTransporter.SendAll(p);
        }
예제 #2
0
        public ServerStaticWorldObject CreateNew()
        {
            var obj = new ServerStaticWorldObject();

            objects.Add(obj);

            obj.ID = nextID;
            nextID++;
            // We could already send an update here, but since there is no data in the object yet,
            //  it WILL be changed by the user of this method , so a 2nd update will occur, which is now the first update

            obj.Change = true; // Force update

            return(obj);
        }