public Builder MergeFrom(Hc_Notify_Zonesvr other)
 {
     if (other == DefaultInstance)
     {
         return(this);
     }
     PrepareBuilder();
     return(this);
 }
 private Hc_Notify_Zonesvr PrepareBuilder()
 {
     if (resultIsReadOnly)
     {
         Hc_Notify_Zonesvr original = result;
         result           = new Hc_Notify_Zonesvr();
         resultIsReadOnly = false;
         MergeFrom(original);
     }
     return(result);
 }
Exemple #3
0
        public void Parse(Shared.PC sender, Packet packet)
        {
            using (var ms = new MemoryStream(packet.Data))
                using (var br = new BinaryReader(ms))
                {
                    CharNum = br.ReadByte();
                }

            Logging.Debug(string.Format("Ch_Select_Char {{\n\tCharNum: {0}\n}}", CharNum));
            var character = ((PC)sender).Characters.FirstOrDefault(x => x.CharNum == CharNum);

            if (character != null)
            {
                var mapserver = Worker.Singleton.Maps.FirstOrDefault(m => m.Key == character.mapname);
                var server    = Worker.Singleton.Serverlist.FirstOrDefault(s => s.SID == mapserver.Value);

                sender.PacketQueue.Enqueue(Hc_Notify_Zonesvr.CreateBuilder().SetGid(character.GID).SetMapname(character.mapname).SetIp(server.ip).SetPort(server.port).Build());
            }
        }