コード例 #1
0
ファイル: ItemManager.cs プロジェクト: mengtest/DragonBallNew
    public override void addItem(BaseResponse response)
    {
        if (response != null && response.status != BaseResponse.ERROR)
        {
            BattleResponse battleResp = response as BattleResponse;
            if (battleResp != null && battleResp.data != null)
            {
                if (battleResp.data.reward != null)
                {
                    addItem(battleResp.data.reward);
                }
                if (battleResp.data.ext != null)
                {
                    addItem(battleResp.data.ext.p);
                }
            }

            NewFinalTrialFightResponse fightres = response as NewFinalTrialFightResponse;
            if (fightres != null && fightres.data != null && fightres.data.rushResult != null && fightres.data.rushResult.award != null)
            {
                addItem(fightres.data.rushResult.award);
            }

            GetVipGiftResponse res = response as GetVipGiftResponse;
            if (res != null && res.data != null && res.data.award != null)
            {
                addItem(res.data.award);
            }
        }
    }
コード例 #2
0
 void GetComplete(BaseHttpRequest request, BaseResponse response)
 {
     if (response != null && response.status != BaseResponse.ERROR)
     {
         GetVipGiftResponse res = response as GetVipGiftResponse;
         GetRewardSucUI.OpenUI(res.data.award, Core.Data.stringManager.getString(5047));
         //   Core.Data.ActivityManager.SetDailyGiftState(ActivityManager.vipLibaoType,"2");
         Core.Data.ActivityManager.SetActState(ActivityManager.vipLibaoType, "2");
         UIWXLActivityMainController.Instance.Refresh();
     }
 }