Example #1
0
        /// <summary>
        /// Handles re-routing of a zonelist message to the appropriate player
        /// </summary>
        static public void Handle_SC_ZoneList(SC_Zones <Database> pkt, Database db)
        {
            Player recipient = db._server.getPlayer(pkt.requestee);

            if (recipient == null)
            {
                return;
            }

            //Give him his list of zones!
            SC_ZoneList zl = new SC_ZoneList(pkt.zoneList, recipient);

            recipient._client.sendReliable(zl, 1);
        }
Example #2
0
        private void Serialize(List <Zone> zones)
        {
            _data = new byte[] { 0x01 };

            foreach (Zone zone in zones)
            {
                _data = _data.Concat(zone.ToBytes()).ToArray();
            }

            // Construct the packets
            for (int i = 0; i < Count; i++)
            {
                SC_ZoneList packet = new SC_ZoneList();
                packet.data              = this[i];
                packet.frameNum          = (uint)i;
                packet.streamSizeInBytes = (uint)ByteSize;

                Packets.Add(packet);
            }
        }