void getDateCompleted(BaseHttpRequest request, BaseResponse response) { ComLoading.Close(); if (response != null && response.status != BaseResponse.ERROR) { GetVipLevelRewardResponse res = response as GetVipLevelRewardResponse; GetRewardSucUI.OpenUI(res.data.p, Core.Data.stringManager.getString(5047)); if (!UIDragonMallMgr.GetInstance().m_VipStatusDic.ContainsKey(m_Id)) { UIDragonMallMgr.GetInstance().m_VipStatusDic.Add(m_Id, null); m_GetReward.isEnabled = false; } if (UIDragonMallMgr.GetInstance().GetIsVipGift == true) { Core.Data.ActivityManager.SetActState(ActivityManager.vipLibaoType, "1"); } else { Core.Data.ActivityManager.SetActState(ActivityManager.vipLibaoType, "2"); } // 领取vip成功 if (UIWXLActivityMainController.Instance != null) { UIWXLActivityMainController.Instance.Refresh(); } } else if (response != null && response.status == BaseResponse.ERROR) { SQYAlertViewMove.CreateAlertViewMove(Core.Data.stringManager.getNetworkErrorString(response.errorCode)); } }
//购买物品成功 public void BuyItemSuc(BaseResponse response) { if (response.status != BaseResponse.ERROR) { BuyItemResponse resp = response as BuyItemResponse; if (resp != null && resp.data != null) { if (resp.data.Result != null && resp.data.Result.p != null) { AddGems(resp.data.Result.p); } else if (resp.data.p != null) { AddGems(resp.data.p); } } SecretShopBuyResponse secretshop = response as SecretShopBuyResponse; if (secretshop != null && secretshop.data != null && secretshop.data.p != null) { AddGems(secretshop.data.p); } if (response is QiangDuoGoldBuyItemResponse) { QiangDuoGoldBuyItemResponse buyitemResp = response as QiangDuoGoldBuyItemResponse; if (buyitemResp != null && buyitemResp.data != null) { AddGems(buyitemResp.data.p); } } else if (response is ZhanGongBuyItemResponse) { ZhanGongBuyItemResponse buyitemResp1 = response as ZhanGongBuyItemResponse; if (buyitemResp1 != null && buyitemResp1.data != null) { AddGems(buyitemResp1.data.p); } } else if (response is GetVipLevelRewardResponse) { GetVipLevelRewardResponse resp1 = response as GetVipLevelRewardResponse; if (resp1 != null && resp1.data != null) { AddGems(resp1.data.p); } } else if (response is GetActivityLimittimeRewardResponse) { GetActivityLimittimeRewardResponse resp1 = response as GetActivityLimittimeRewardResponse; if (resp1 != null && resp1.data != null) { AddGems(resp1.data.p); } } } }
public void BuyItemSuc(BaseResponse response) { if (response != null && response.status != BaseResponse.ERROR) { if (response is QiangDuoGoldBuyItemResponse) { QiangDuoGoldBuyItemResponse buyitemResp = response as QiangDuoGoldBuyItemResponse; if (buyitemResp != null && buyitemResp.data != null) { addMonster(buyitemResp.data.p); } } else if (response is ZhanGongBuyItemResponse) { ZhanGongBuyItemResponse buyitemResp1 = response as ZhanGongBuyItemResponse; if (buyitemResp1 != null && buyitemResp1.data != null) { addMonster(buyitemResp1.data.p); } } else if (response is GetVipLevelRewardResponse) { GetVipLevelRewardResponse resp = response as GetVipLevelRewardResponse; if (resp != null && resp.data != null) { addMonster(resp.data.p); } } else if (response is GetActivityLimittimeRewardResponse) { GetActivityLimittimeRewardResponse resp = response as GetActivityLimittimeRewardResponse; if (resp != null && resp.data != null) { addMonster(resp.data.p); } } else if (response is BuyItemResponse) { BuyItemResponse resp = response as BuyItemResponse; if (resp != null && resp.data != null) { if (resp.data.Result != null && resp.data.Result.p != null) { addMonster(resp.data.Result.p); } else if (resp.data.p != null) { addMonster(resp.data.p); } } } } }
public void addItemshop(BaseResponse response) { if (response != null && response.status != BaseResponse.ERROR) { if (response is BuyItemResponse) { BuyItemResponse buyitemResp = response as BuyItemResponse; if (buyitemResp != null && buyitemResp.data != null) { if (buyitemResp.data.ndProp != null && buyitemResp.data.ndProp.Length != 0) { int pid = Core.Data.itemManager.GetBagItemPid(buyitemResp.data.ndProp[0]); if (pid != -1) { Core.Data.itemManager.UseItem(pid, buyitemResp.data.ndProp[1]); } } if (buyitemResp.data.Result != null) { if (buyitemResp.data.Result.p != null) { addItem(buyitemResp.data.Result.p); } } else { addItem(buyitemResp.data.p); } } } else if (response is ZhanGongBuyItemResponse) { ZhanGongBuyItemResponse buyitemResp = response as ZhanGongBuyItemResponse; if (buyitemResp != null && buyitemResp.data != null) { addItem(buyitemResp.data.p); // foreach (ItemdataStruct ids in buyitemResp.data.p) { // AddItem (ids); // } } } else if (response is QiangDuoGoldBuyItemResponse) { QiangDuoGoldBuyItemResponse buyitemResp = response as QiangDuoGoldBuyItemResponse; if (buyitemResp != null && buyitemResp.data != null) { addItem(buyitemResp.data.p); // foreach (ItemdataStruct ids in buyitemResp.data.p) { // AddItem (ids); // } } } else if (response is SecretShopBuyResponse) { SecretShopBuyResponse buyitemResp = response as SecretShopBuyResponse; if (buyitemResp != null) { addItem(buyitemResp.data.p); } } else if (response is SevenDaysBuyResponse) { SevenDaysBuyResponse sevenbuy = response as SevenDaysBuyResponse; if (sevenbuy != null) { AddSevenDayRewardItem(sevenbuy); } } else if (response is UsePropResponse) { UsePropResponse propose = response as UsePropResponse; if (propose != null) { addItem(propose.data.p); } } else if (response is GetMailAttachmentResponse) { GetMailAttachmentResponse resp = response as GetMailAttachmentResponse; if (resp != null && resp.data != null) { for (int i = 0; i < resp.data.p.Length; i++) { AddRewardToBag(resp.data.p [i]); } } } else if (response is GetFirstChargeGiftResponse) { GetFirstChargeGiftResponse resp = response as GetFirstChargeGiftResponse; if (resp != null && resp.data != null) { for (int i = 0; i < resp.data.award.Length; i++) { AddRewardToBag(resp.data.award [i]); } } } else if (response is GetVipLevelRewardResponse) { GetVipLevelRewardResponse resp = response as GetVipLevelRewardResponse; if (resp != null && resp.data != null) { addItem(resp.data.p); } } else if (response is GetMonthGiftResponse) { GetMonthGiftResponse resp = response as GetMonthGiftResponse; if (resp != null && resp.data != null) { addItem(resp.data); } } else if (response is GetActivityLimittimeRewardResponse) { GetActivityLimittimeRewardResponse resp = response as GetActivityLimittimeRewardResponse; if (resp != null && resp.data != null) { addItem(resp.data.p); } } } }
public void AddShopItem(BaseResponse response) { if (response != null && response.status != BaseResponse.ERROR) { if (response is SecretShopBuyResponse) { SecretShopBuyResponse secretshop = response as SecretShopBuyResponse; if (secretshop != null && secretshop.data != null && secretshop.data.p != null) { AddEquip(secretshop.data.p); } } if (response is QiangDuoGoldBuyItemResponse) { QiangDuoGoldBuyItemResponse buyitemResp = response as QiangDuoGoldBuyItemResponse; if (buyitemResp != null && buyitemResp.data != null) { AddEquip(buyitemResp.data.p); } } else if (response is ZhanGongBuyItemResponse) { ZhanGongBuyItemResponse buyitemResp1 = response as ZhanGongBuyItemResponse; if (buyitemResp1 != null && buyitemResp1.data != null) { AddEquip(buyitemResp1.data.p); } } else if (response is GetVipLevelRewardResponse) { GetVipLevelRewardResponse resp = response as GetVipLevelRewardResponse; if (resp != null && resp.data != null) { AddEquip(resp.data.p); } } else if (response is UsePropResponse) { UsePropResponse resp = response as UsePropResponse; if (resp != null && resp.data != null && resp.data.p != null) { AddEquip(resp.data.p); } } else if (response is GetActivityLimittimeRewardResponse) { GetActivityLimittimeRewardResponse resp = response as GetActivityLimittimeRewardResponse; if (resp != null && resp.data != null && resp.data.p != null) { AddEquip(resp.data.p); } } } if (response != null && response.status != BaseResponse.ERROR) { BuyItemResponse buyres = response as BuyItemResponse; if (buyres != null && buyres.data != null) { if (buyres.data.Result != null && buyres.data.Result.p != null) { AddEquip(buyres.data.Result.p); } else if (buyres.data.p != null) { AddEquip(buyres.data.p); } } } }