Ejemplo n.º 1
0
        public IResponse createExchangeCoinsResultsResponse(WinCoinEN pProgressGame, int coins)
        {
            ExchangeCoinsResponse response = new ExchangeCoinsResponse();

            if (pProgressGame.Achievement.Code != "00" && pProgressGame.Achievement.Code != "01")
            {
                response.Code    = pProgressGame.Achievement.Code;
                response.Message = pProgressGame.Achievement.Message;
            }
            else
            {
                response.tracking      = new TrackingResponse();
                response.ExchangeCoins = coins;
                response.tracking.CurrentCoinsProgress = pProgressGame.Tracking.CurrentCoinsProgress;
                response.tracking.TotalWinCoins        = pProgressGame.Tracking.TotalWinCoins;
                response.tracking.TotalWinPrizes       = pProgressGame.Tracking.TotalWinPrizes;
                response.tracking.TotalSouvenirs       = pProgressGame.Tracking.TotalSouvenirs;
                response.tracking.AgeID = pProgressGame.Tracking.AgeID;

                if (pProgressGame.Achievement != null)
                {
                    if (pProgressGame.Achievement.NewLevel > 0)
                    {
                        response.Achievement                = new NewAchievement();
                        response.Achievement.Name           = pProgressGame.Achievement.Name;
                        response.Achievement.Level          = pProgressGame.Achievement.Level;
                        response.Achievement.Score          = pProgressGame.Achievement.Score;
                        response.Achievement.ValueNextLevel = pProgressGame.Achievement.ValueNextLevel;
                        response.Achievement.Prize          = pProgressGame.Achievement.Prize;
                    }
                }
                response.Code = "00";

                response.Type = 1;
            }

            return(response);
        }
Ejemplo n.º 2
0
        public IResponse createExchangeCoinsResultsResponse(WinCoinEN pProgressGame, int coins, int type)
        {
            ExchangeCoinsResponse response = new ExchangeCoinsResponse();

            if (pProgressGame.Achievement.Code != "00" && pProgressGame.Achievement.Code != "01")
            {
                response.Code    = pProgressGame.Achievement.Code;
                response.Message = pProgressGame.Achievement.Message;
            }
            else
            {
                response.tracking      = new TrackingResponse();
                response.ExchangeCoins = coins;
                response.tracking.CurrentCoinsProgress = pProgressGame.Tracking.CurrentCoinsProgress;
                response.tracking.TotalWinCoins        = pProgressGame.Tracking.TotalWinCoins;
                response.tracking.TotalWinPrizes       = pProgressGame.Tracking.TotalWinPrizes;
                response.tracking.TotalSouvenirs       = pProgressGame.Tracking.TotalSouvenirs;
                response.tracking.AgeID = pProgressGame.Tracking.AgeID;
                response.Code           = pProgressGame.Achievement.Code;
                response.Type           = type;
            }

            return(response);
        }