Пример #1
0
        public static byte[] City2Bytes(City city)
        {
            if (city == null)
            {
                return(Op.Void());
            }

            byte[] data = NuSD.SegInt(city.serverID)
                          .AddSegInt(city.cityId)
                          .AddSegStr(city.ownerID)
                          .AddSeg(city.siegeID);
            if (city.ownerID != "")
            {
                data = data.AddSeg(CardIDs2Table(city.ownerCards));
            }
            return(data);
        }
Пример #2
0
 public static byte[] WarToByteArray(War war)
 {
     return(NuSD.JoinSegs2Seg(NuSD.SegString(war.id), NuSD.SegInt(war.regEndBlock)));
 }