public static byte SaveCity(BigInteger serverID, City city)
 {
     return(IO.SetStorageWithKeyPath(City2Bytes(city)
                                     , Const.preServer
                                     , Op.BigInt2String(serverID)
                                     , Const.preCity
                                     , Op.BigInt2String(city.cityId)
                                     ));
 }
 public static byte SaveSiege(Siege siege)
 {
     byte[] data = Seige2Bytes(siege);
     return(IO.SetStorageWithKeyPath(data,
                                     Const.preServer,
                                     Op.BigInt2String(siege.serverID),
                                     Const.preCity,
                                     Op.BigInt2String(siege.cityID)
                                     ));
 }
        public static BigInteger AddSiegeCityHist(BigInteger serverId, BigInteger cityId, byte[] siegeId)
        {
            BigInteger histId = NumCitySiegeHistory(serverId, cityId);

            IO.SetStorageWithKeyPath(siegeId,
                                     Const.preServer, Op.BigInt2String(serverId),
                                     Const.preCity, Op.BigInt2String(cityId),
                                     Const.preSeige, Op.BigInt2String(histId)
                                     );

            IO.SetStorageWithKeyPath(Op.BigInt2Bytes(histId + 1),
                                     Const.preServer, Op.BigInt2String(serverId),
                                     Const.preCity, Op.BigInt2String(cityId),
                                     Const.keyTotSiege
                                     );
            return(histId);
        }
 public static byte SaveUser(User user)
 {
     return(IO.SetStorageWithKeyPath(User2Bytes(user), Const.preUser, user.email));
 }
 public static byte SaveCard(Card card)
 {
     return(IO.SetStorageWithKeyPath(Card2Bytes(card), Const.preCard, Op.Bytes2String(card.cardID)));
 }