Esempio n. 1
0
        public static WgStatsShip FromRanked(WgStatsRankedShip rankedShipSolo, WgStatsRankedShip rankedShipDiv2, WgStatsRankedShip rankedShipDiv3, long accountId, long shipId)
        {
            var ship = new WgStatsShip
            {
                AccountId = accountId,
                ShipId    = shipId
            };

            if (rankedShipSolo != null)
            {
                ship.Battles += rankedShipSolo.Battles;
            }
            if (rankedShipDiv2 != null)
            {
                ship.Battles += rankedShipDiv2.Battles;
            }
            if (rankedShipDiv3 != null)
            {
                ship.Battles += rankedShipDiv3.Battles;
            }

            ship.Pvp = WgStatsPvp.FromRanked(rankedShipSolo, rankedShipDiv2, rankedShipDiv3);

            return(ship);
        }
Esempio n. 2
0
        public static WgStatsPvp FromRanked(WgStatsRankedShip rankedShipSolo, WgStatsRankedShip rankedShipDiv2, WgStatsRankedShip rankedShipDiv3)
        {
            var stats = new WgStatsPvp();

            if (rankedShipSolo != null)
            {
                stats.Battles     += rankedShipSolo.Battles;
                stats.Wins        += rankedShipSolo.Wins;
                stats.DamageDealt += rankedShipSolo.DamageDealt;
                stats.Frags       += rankedShipSolo.Frags;
                stats.Xp          += rankedShipSolo.Xp;
            }
            if (rankedShipDiv2 != null)
            {
                stats.Battles     += rankedShipDiv2.Battles;
                stats.Wins        += rankedShipDiv2.Wins;
                stats.DamageDealt += rankedShipDiv2.DamageDealt;
                stats.Frags       += rankedShipDiv2.Frags;
                stats.Xp          += rankedShipDiv2.Xp;
            }
            if (rankedShipDiv3 != null)
            {
                stats.Battles     += rankedShipDiv3.Battles;
                stats.Wins        += rankedShipDiv3.Wins;
                stats.DamageDealt += rankedShipDiv3.DamageDealt;
                stats.Frags       += rankedShipDiv3.Frags;
                stats.Xp          += rankedShipDiv3.Xp;
            }

            return(stats);
        }
 public static WgStatsShip FromRanked(WgStatsRankedShip rankedShip, long accountId, long shipId)
 {
     return(new WgStatsShip
     {
         AccountId = accountId,
         ShipId = shipId,
         Battles = rankedShip.Battles,
         Pvp = WgStatsPvp.FromRanked(rankedShip)
     });
 }
Esempio n. 4
0
 public static WgStatsPvp FromRanked(WgStatsRankedShip rankedShip)
 {
     return(new WgStatsPvp
     {
         Battles = rankedShip.Battles,
         Wins = rankedShip.Wins,
         DamageDealt = rankedShip.DamageDealt,
         Frags = rankedShip.Frags,
         Xp = rankedShip.Xp
     });
 }