public uint GetBuyPrice(RES_SHOPBUY_COINTYPE coinType) { switch (coinType) { case RES_SHOPBUY_COINTYPE.RES_SHOPBUY_TYPE_COUPONS: return(this.m_dianQuanBuy); case RES_SHOPBUY_COINTYPE.RES_SHOPBUY_TYPE_PVPCOIN: return(this.m_goldCoinBuy); case RES_SHOPBUY_COINTYPE.RES_SHOPBUY_TYPE_BURNINGCOIN: return(this.m_burningCoinBuy); case RES_SHOPBUY_COINTYPE.RES_SHOPBUY_TYPE_ARENACOIN: return(this.m_arenaCoinBuy); case RES_SHOPBUY_COINTYPE.RES_SHOPBUY_TYPE_SKINCOIN: return(this.m_skinCoinBuy); case RES_SHOPBUY_COINTYPE.RES_SHOPBUY_TYPE_GUILDCOIN: return(this.m_guildCoinBuy); case RES_SHOPBUY_COINTYPE.RES_SHOPBUY_TYPE_DIAMOND: case RES_SHOPBUY_COINTYPE.RES_SHOPBUY_TYPE_MIXPAY: return(this.m_diamondBuy); } return(0); }
public CMallItem(CMallFactoryShopController.ShopProduct product, CMallItem.IconType iconType = CMallItem.IconType.Small) { this.m_type = CMallItem.ItemType.Item; this.m_iconType = iconType; if (product != null) { this.m_useable = CUseableManager.CreateUseable(product.Type, 0uL, product.ID, (int)product.LimitCount, 0); this.m_product = product; this.m_firstName = this.m_useable.m_name; this.m_secondName = null; this.m_iconPath = this.m_useable.GetIconPath(); RES_SHOPBUY_COINTYPE coinType = product.CoinType; enPayType payType = CMallSystem.ResBuyTypeToPayType(coinType); uint buyPrice = this.m_useable.GetBuyPrice(coinType); uint payValue = product.ConvertWithRealDiscount(buyPrice); this.m_payInfoSet = new stPayInfoSet(1); this.m_payInfoSet.m_payInfoCount = 1; this.m_payInfoSet.m_payInfos[0].m_discountForDisplay = product.DiscountForShow; this.m_payInfoSet.m_payInfos[0].m_oriValue = buyPrice; this.m_payInfoSet.m_payInfos[0].m_payType = payType; this.m_payInfoSet.m_payInfos[0].m_payValue = payValue; } else { this.m_useable = null; this.m_firstName = null; this.m_secondName = null; this.m_useable = null; this.m_iconPath = null; this.m_payInfoSet = default(stPayInfoSet); } }
public static uint GetHeroSkinCost(uint heroId, uint skinId, RES_SHOPBUY_COINTYPE costType) { ResHeroSkinShop resHeroSkinShop = null; uint skinCfgId = CSkinInfo.GetSkinCfgId(heroId, skinId); GameDataMgr.skinShopInfoDict.TryGetValue(skinCfgId, out resHeroSkinShop); uint result = 0u; if (resHeroSkinShop == null) { return(result); } switch (costType) { case RES_SHOPBUY_COINTYPE.RES_SHOPBUY_TYPE_SKINCOIN: return(resHeroSkinShop.dwBuySkinCoin); case RES_SHOPBUY_COINTYPE.RES_SHOPBUY_TYPE_DIAMOND: return(resHeroSkinShop.dwBuyDiamond); } if (costType != RES_SHOPBUY_COINTYPE.RES_SHOPBUY_TYPE_COUPONS) { return(result); } return(resHeroSkinShop.dwBuyCoupons); }
public static uint GetHeroCost(uint heroId, RES_SHOPBUY_COINTYPE costType) { ResHeroShop shop = null; GameDataMgr.heroShopInfoDict.TryGetValue(heroId, out shop); uint num = 0; if (shop != null) { switch (costType) { case RES_SHOPBUY_COINTYPE.RES_SHOPBUY_TYPE_COUPONS: return(shop.dwBuyCoupons); case RES_SHOPBUY_COINTYPE.RES_SHOPBUY_TYPE_ENCHANTPT: case RES_SHOPBUY_COINTYPE.RES_SHOPBUY_TYPE_SKINCOIN: case RES_SHOPBUY_COINTYPE.RES_SHOPBUY_TYPE_GUILDCOIN: case RES_SHOPBUY_COINTYPE.RES_SHOPBUY_TYPE_SYMBOLCOIN: return(num); case RES_SHOPBUY_COINTYPE.RES_SHOPBUY_TYPE_PVPCOIN: return(shop.dwBuyCoin); case RES_SHOPBUY_COINTYPE.RES_SHOPBUY_TYPE_BURNINGCOIN: return(shop.dwBuyBurnCoin); case RES_SHOPBUY_COINTYPE.RES_SHOPBUY_TYPE_ARENACOIN: return(shop.dwBuyArenaCoin); case RES_SHOPBUY_COINTYPE.RES_SHOPBUY_TYPE_DIAMOND: return(shop.dwBuyDiamond); } } return(num); }
public static uint GetHeroCost(uint heroId, RES_SHOPBUY_COINTYPE costType) { ResHeroShop resHeroShop = null; GameDataMgr.heroShopInfoDict.TryGetValue(heroId, ref resHeroShop); uint result = 0u; if (resHeroShop != null) { switch (costType) { case 2: result = resHeroShop.dwBuyCoupons; break; case 4: result = resHeroShop.dwBuyCoin; break; case 5: result = resHeroShop.dwBuyBurnCoin; break; case 6: result = resHeroShop.dwBuyArenaCoin; break; case 10: result = resHeroShop.dwBuyDiamond; break; } } return(result); }
public static uint GetHeroSkinCost(uint heroId, uint skinId, RES_SHOPBUY_COINTYPE costType) { ResHeroSkinShop shop = null; uint skinCfgId = GetSkinCfgId(heroId, skinId); GameDataMgr.skinShopInfoDict.TryGetValue(skinCfgId, out shop); uint num2 = 0; if (shop == null) { return(num2); } RES_SHOPBUY_COINTYPE res_shopbuy_cointype = costType; switch (res_shopbuy_cointype) { case RES_SHOPBUY_COINTYPE.RES_SHOPBUY_TYPE_SKINCOIN: return(shop.dwBuySkinCoin); case RES_SHOPBUY_COINTYPE.RES_SHOPBUY_TYPE_DIAMOND: return(shop.dwBuyDiamond); } if (res_shopbuy_cointype != RES_SHOPBUY_COINTYPE.RES_SHOPBUY_TYPE_COUPONS) { return(num2); } return(shop.dwBuyCoupons); }
public static uint GetHeroCost(uint heroId, RES_SHOPBUY_COINTYPE costType) { ResHeroShop resHeroShop = null; GameDataMgr.heroShopInfoDict.TryGetValue(heroId, out resHeroShop); uint result = 0u; if (resHeroShop != null) { switch (costType) { case RES_SHOPBUY_COINTYPE.RES_SHOPBUY_TYPE_COUPONS: result = resHeroShop.dwBuyCoupons; break; case RES_SHOPBUY_COINTYPE.RES_SHOPBUY_TYPE_PVPCOIN: result = resHeroShop.dwBuyCoin; break; case RES_SHOPBUY_COINTYPE.RES_SHOPBUY_TYPE_BURNINGCOIN: result = resHeroShop.dwBuyBurnCoin; break; case RES_SHOPBUY_COINTYPE.RES_SHOPBUY_TYPE_ARENACOIN: result = resHeroShop.dwBuyArenaCoin; break; case RES_SHOPBUY_COINTYPE.RES_SHOPBUY_TYPE_DIAMOND: result = resHeroShop.dwBuyDiamond; break; } } return(result); }
public static void Show(COM_ITEM_TYPE type, uint id, RES_SHOPBUY_COINTYPE coinType, float discount, uint maxCount, OnConfirmBuyDelegate onClose, CMallFactoryShopController.ShopProduct callContext = null, OnConfirmBuyCommonDelegate onConfirmCommon = null, CUIEvent uieventPars = null) { if (s_theDlg == null) { if (type == COM_ITEM_TYPE.COM_OBJTYPE_ITEMPROP) { CItem item = new CItem(0L, id, 0, 0); if (item.m_itemData.bIsView != 0) { s_theDlg = new BuyPickDialog(true, type, id, coinType, discount, maxCount, onClose, callContext, onConfirmCommon, uieventPars); } else { s_theDlg = new BuyPickDialog(type, id, coinType, discount, maxCount, onClose, callContext, onConfirmCommon, uieventPars); } } else { s_theDlg = new BuyPickDialog(type, id, coinType, discount, maxCount, onClose, callContext, onConfirmCommon, uieventPars); } if (s_theDlg._root == null) { s_theDlg = null; } } }
public uint GetBuyPrice(RES_SHOPBUY_COINTYPE coinType) { switch (coinType) { case 2: return(this.m_dianQuanBuy); case 4: return(this.m_goldCoinBuy); case 5: return(this.m_burningCoinBuy); case 6: return(this.m_arenaCoinBuy); case 7: return(this.m_skinCoinBuy); case 8: return(this.m_guildCoinBuy); case 10: case 11: return(this.m_diamondBuy); } return(0u); }
public static uint GetHeroSkinCost(uint heroId, uint skinId, RES_SHOPBUY_COINTYPE costType) { ResHeroSkinShop resHeroSkinShop = null; uint skinCfgId = CSkinInfo.GetSkinCfgId(heroId, skinId); GameDataMgr.skinShopInfoDict.TryGetValue(skinCfgId, ref resHeroSkinShop); uint result = 0u; if (resHeroSkinShop != null) { switch (costType) { case 7: result = resHeroSkinShop.dwBuySkinCoin; return(result); case 8: case 9: IL_3A: if (costType != 2) { return(result); } result = resHeroSkinShop.dwBuyCoupons; return(result); case 10: result = resHeroSkinShop.dwBuyDiamond; return(result); } goto IL_3A; } return(result); }
public CMallItem(CMallFactoryShopController.ShopProduct product, IconType iconType = 1) { this.m_type = ItemType.Item; this.m_iconType = iconType; if (product != null) { this.m_useable = CUseableManager.CreateUseable(product.Type, 0L, product.ID, (int)product.LimitCount, 0); this.m_product = product; this.m_firstName = this.m_useable.m_name; this.m_secondName = null; this.m_iconPath = this.m_useable.GetIconPath(); RES_SHOPBUY_COINTYPE coinType = product.CoinType; enPayType type = CMallSystem.ResBuyTypeToPayType((int)coinType); uint discount = product.Discount; uint buyPrice = this.m_useable.GetBuyPrice(coinType); uint num3 = (buyPrice * product.Discount) / 100; this.m_payInfoSet = new stPayInfoSet(1); this.m_payInfoSet.m_payInfoCount = 1; this.m_payInfoSet.m_payInfos[0].m_discountForDisplay = product.Discount; this.m_payInfoSet.m_payInfos[0].m_oriValue = buyPrice; this.m_payInfoSet.m_payInfos[0].m_payType = type; this.m_payInfoSet.m_payInfos[0].m_payValue = num3; } else { this.m_useable = null; this.m_firstName = null; this.m_secondName = null; this.m_useable = null; this.m_iconPath = null; this.m_payInfoSet = new stPayInfoSet(); } }
public uint GetBuyPrice(RES_SHOPBUY_COINTYPE coinType) { if (coinType == 9) { return(this.m_SymbolData.dwMakeCoin); } return(base.GetBuyPrice(coinType)); }
public static void Show(ResSymbolInfo symbolInfo, RES_SHOPBUY_COINTYPE coinType, float discount, CSymbolBuyPickDialog.OnConfirmBuyDelegate onClose, CSymbolBuyPickDialog.OnConfirmBuyCommonDelegate onConfirmCommon = null, CUIEvent uieventPars = null) { if (CSymbolBuyPickDialog.s_theDlg == null) { CSymbolBuyPickDialog.s_theDlg = new CSymbolBuyPickDialog(symbolInfo, coinType, discount, onClose, onConfirmCommon, uieventPars); if (CSymbolBuyPickDialog.s_theDlg._root == null) { CSymbolBuyPickDialog.s_theDlg = null; } } }
public void GetNewPageCost(out RES_SHOPBUY_COINTYPE costType, out uint costVal) { costType = 4; costVal = 0u; ResShopInfo cfgShopInfo = CPurchaseSys.GetCfgShopInfo(7, this.m_pageBuyCnt + 1); if (cfgShopInfo != null) { costType = (int)cfgShopInfo.bCoinType; costVal = cfgShopInfo.dwCoinPrice; } }
public void GetNewPageCost(out RES_SHOPBUY_COINTYPE costType, out uint costVal) { costType = RES_SHOPBUY_COINTYPE.RES_SHOPBUY_TYPE_PVPCOIN; costVal = 0; ResShopInfo cfgShopInfo = CPurchaseSys.GetCfgShopInfo(RES_SHOPBUY_TYPE.RES_BUYTYPE_SYMBOLPAGE, this.m_pageBuyCnt + 1); if (cfgShopInfo != null) { costType = (RES_SHOPBUY_COINTYPE)cfgShopInfo.bCoinType; costVal = cfgShopInfo.dwCoinPrice; } }
public bool CheckHeroTalentHaveBuy(uint heroID) { bool flag = false; if (TalentView.IsHaveTalentBuyFunc(heroID)) { CRoleInfo masterRoleInfo = Singleton <CRoleInfoManager> .GetInstance().GetMasterRoleInfo(); if (masterRoleInfo == null) { return(flag); } CHeroInfo heroInfo = masterRoleInfo.GetHeroInfo(heroID, false); if (heroInfo == null) { return(flag); } HeroTalentViewInfo heroTalentViewInfo = TalentView.GetHeroTalentViewInfo(heroID); if (heroTalentViewInfo == null) { return(flag); } for (int i = 0; i < heroTalentViewInfo.m_heroTalentLevelInfoList.Count; i++) { int num2 = heroTalentViewInfo.m_heroTalentLevelInfoList[i].m_levelDetail.bLvl3UnlockLvl; uint targetValue = heroTalentViewInfo.m_heroTalentLevelInfoList[i].m_levelDetail.dwLvl3UnLockCostPrice; RES_SHOPBUY_COINTYPE coinType = (RES_SHOPBUY_COINTYPE)heroTalentViewInfo.m_heroTalentLevelInfoList[i].m_levelDetail.bLvl3UnLockCostType; uint num4 = heroTalentViewInfo.m_heroTalentLevelInfoList[i].m_levelDetail.dwLvl3LockCostPrice; RES_SHOPBUY_COINTYPE res_shopbuy_cointype2 = (RES_SHOPBUY_COINTYPE)heroTalentViewInfo.m_heroTalentLevelInfoList[i].m_levelDetail.bLvl3LockCostType; if (((i == 0) || TalentView.IsBuyTalent(heroID, i - 1)) && !TalentView.IsBuyTalent(heroID, i)) { if ((heroInfo.m_ProficiencyLV >= num2) && masterRoleInfo.CheckCoinEnough(coinType, targetValue)) { return(true); } if ((heroInfo.m_ProficiencyLV < num2) && masterRoleInfo.CheckCoinEnough(res_shopbuy_cointype2, num4)) { return(true); } } } } return(flag); }
public static CUseable CreateCoinUseable(RES_SHOPBUY_COINTYPE coinType, int count) { enVirtualItemType enNull = enVirtualItemType.enNull; switch (coinType) { case RES_SHOPBUY_COINTYPE.RES_SHOPBUY_TYPE_COUPONS: enNull = enVirtualItemType.enDianQuan; break; case RES_SHOPBUY_COINTYPE.RES_SHOPBUY_TYPE_PVPCOIN: enNull = enVirtualItemType.enGoldCoin; break; case RES_SHOPBUY_COINTYPE.RES_SHOPBUY_TYPE_BURNINGCOIN: enNull = enVirtualItemType.enHeart; break; case RES_SHOPBUY_COINTYPE.RES_SHOPBUY_TYPE_ARENACOIN: enNull = enVirtualItemType.enArenaCoin; break; case RES_SHOPBUY_COINTYPE.RES_SHOPBUY_TYPE_SKINCOIN: enNull = enVirtualItemType.enSkinCoin; break; case RES_SHOPBUY_COINTYPE.RES_SHOPBUY_TYPE_SYMBOLCOIN: enNull = enVirtualItemType.enSymbolCoin; break; case RES_SHOPBUY_COINTYPE.RES_SHOPBUY_TYPE_DIAMOND: case RES_SHOPBUY_COINTYPE.RES_SHOPBUY_TYPE_MIXPAY: enNull = enVirtualItemType.enDiamond; break; default: Debug.LogError("CoinType:" + coinType.ToString() + " is not supported!"); break; } return(new CVirtualItem(enNull, count)); }
public static CUseable CreateCoinUseable(RES_SHOPBUY_COINTYPE coinType, int count) { enVirtualItemType bType = enVirtualItemType.enNull; switch (coinType) { case 2: bType = enVirtualItemType.enDianQuan; goto IL_91; case 4: bType = enVirtualItemType.enGoldCoin; goto IL_91; case 5: bType = enVirtualItemType.enHeart; goto IL_91; case 6: bType = enVirtualItemType.enArenaCoin; goto IL_91; case 7: bType = enVirtualItemType.enSkinCoin; goto IL_91; case 9: bType = enVirtualItemType.enSymbolCoin; goto IL_91; case 10: case 11: bType = enVirtualItemType.enDiamond; goto IL_91; } Debug.LogError("CoinType:" + coinType.ToString() + " is not supported!"); IL_91: return(new CVirtualItem(bType, count)); }
public SymbolBuyCode CheckBuySymbolPage() { if (this.IsPageFull()) { return(SymbolBuyCode.PageFull); } RES_SHOPBUY_COINTYPE costType = RES_SHOPBUY_COINTYPE.RES_SHOPBUY_TYPE_PVPCOIN; uint costVal = 0; this.GetNewPageCost(out costType, out costVal); CRoleInfo masterRoleInfo = Singleton <CRoleInfoManager> .instance.GetMasterRoleInfo(); if ((costType == RES_SHOPBUY_COINTYPE.RES_SHOPBUY_TYPE_PVPCOIN) && (masterRoleInfo.GoldCoin < costVal)) { return(SymbolBuyCode.CoinNotEnough); } if ((costType == RES_SHOPBUY_COINTYPE.RES_SHOPBUY_TYPE_COUPONS) && (masterRoleInfo.DianQuan < costVal)) { return(SymbolBuyCode.DiamondNotEnough); } return(SymbolBuyCode.BuySuccess); }
public SymbolBuyCode CheckBuySymbolPage() { if (this.IsPageFull()) { return(3); } RES_SHOPBUY_COINTYPE rES_SHOPBUY_COINTYPE = 4; uint num = 0u; this.GetNewPageCost(out rES_SHOPBUY_COINTYPE, out num); CRoleInfo masterRoleInfo = Singleton <CRoleInfoManager> .get_instance().GetMasterRoleInfo(); if (rES_SHOPBUY_COINTYPE == 4 && masterRoleInfo.GoldCoin < num) { return(1); } if (rES_SHOPBUY_COINTYPE == 2 && masterRoleInfo.DianQuan < (ulong)num) { return(2); } return(0); }
public SymbolBuyCode CheckBuySymbolPage() { if (this.IsPageFull()) { return(SymbolBuyCode.PageFull); } RES_SHOPBUY_COINTYPE rES_SHOPBUY_COINTYPE = RES_SHOPBUY_COINTYPE.RES_SHOPBUY_TYPE_PVPCOIN; uint num = 0u; this.GetNewPageCost(out rES_SHOPBUY_COINTYPE, out num); CRoleInfo masterRoleInfo = Singleton <CRoleInfoManager> .instance.GetMasterRoleInfo(); if (rES_SHOPBUY_COINTYPE == RES_SHOPBUY_COINTYPE.RES_SHOPBUY_TYPE_PVPCOIN && masterRoleInfo.GoldCoin < num) { return(SymbolBuyCode.CoinNotEnough); } if (rES_SHOPBUY_COINTYPE == RES_SHOPBUY_COINTYPE.RES_SHOPBUY_TYPE_COUPONS && masterRoleInfo.DianQuan < (ulong)num) { return(SymbolBuyCode.DiamondNotEnough); } return(SymbolBuyCode.BuySuccess); }
public BuyPickDialog(COM_ITEM_TYPE type, uint id, RES_SHOPBUY_COINTYPE coinType, float discount, uint maxCount, OnConfirmBuyDelegate onConfirm, CMallFactoryShopController.ShopProduct callContext, OnConfirmBuyCommonDelegate onConfirmCommon = null, CUIEvent uieventPars = null) { CUIFormScript script = Singleton <CUIManager> .GetInstance().OpenForm(s_Form_Path, false, true); if (null != script) { this._root = script.gameObject; this._usb = CUseableManager.CreateUseable(type, id, 0); this._bHeroSkinGift = false; this._bDynamicCorrectPrice = false; this._heroSkinGiftCost = 0; this._count = 1; this._maxCount = maxCount; if (this._maxCount == 0) { this._maxCount = 0x3e7; } this._onConfirm = onConfirm; this._callContext = callContext; this._onConfirmdCommon = onConfirmCommon; this._uieventPars = uieventPars; this._coinType = coinType; this._realDiscount = discount; if (this._usb != null) { this._countText = Utility.GetComponetInChild <Text>(this._root, "Panel/Count"); this._costText = Utility.GetComponetInChild <Text>(this._root, "Panel/Cost"); this._descText = Utility.GetComponetInChild <Text>(this._root, "Panel/Desc/Image/Text"); if (this._descText != null) { this._descText.text = this._usb.m_description; } Utility.GetComponetInChild <Image>(this._root, "Panel/Slot/Icon").SetSprite(CUIUtility.GetSpritePrefeb(this._usb.GetIconPath(), false, false)); Utility.GetComponetInChild <Text>(this._root, "Panel/Name").text = this._usb.m_name; this._coinUsb = CUseableManager.CreateCoinUseable(coinType, 0); if (this._coinUsb != null) { Utility.GetComponetInChild <Image>(this._root, "Panel/Cost/CoinType").SetSprite(CUIUtility.GetSpritePrefeb(this._coinUsb.GetIconPath(), false, false)); Utility.GetComponetInChild <Text>(this._root, "Panel/Price").text = CMallFactoryShopController.ShopProduct.SConvertWithRealDiscount(this._usb.GetBuyPrice(coinType), this._realDiscount).ToString(); } Image componetInChild = Utility.GetComponetInChild <Image>(this._root, "Panel/Slot/imgExperienceMark"); if (componetInChild != null) { if ((this._usb.m_type == COM_ITEM_TYPE.COM_OBJTYPE_ITEMPROP) && CItem.IsHeroExperienceCard(this._usb.m_baseID)) { componetInChild.gameObject.CustomSetActive(true); componetInChild.SetSprite(CUIUtility.GetSpritePrefeb(CExperienceCardSystem.HeroExperienceCardMarkPath, false, false)); } else if ((this._usb.m_type == COM_ITEM_TYPE.COM_OBJTYPE_ITEMPROP) && CItem.IsSkinExperienceCard(this._usb.m_baseID)) { componetInChild.gameObject.CustomSetActive(true); componetInChild.SetSprite(CUIUtility.GetSpritePrefeb(CExperienceCardSystem.SkinExperienceCardMarkPath, false, false)); } else { componetInChild.gameObject.CustomSetActive(false); } } } Singleton <CUIEventManager> .GetInstance().AddUIEventListener(enUIEventID.BuyPick_Add, new CUIEventManager.OnUIEventHandler(this.OnClickAdd)); Singleton <CUIEventManager> .GetInstance().AddUIEventListener(enUIEventID.BuyPick_Dec, new CUIEventManager.OnUIEventHandler(this.OnClickDec)); Singleton <CUIEventManager> .GetInstance().AddUIEventListener(enUIEventID.BuyPick_Max, new CUIEventManager.OnUIEventHandler(this.OnClickMax)); Singleton <CUIEventManager> .GetInstance().AddUIEventListener(enUIEventID.BuyPick_Confirm, new CUIEventManager.OnUIEventHandler(this.OnClickConfirm)); Singleton <CUIEventManager> .GetInstance().AddUIEventListener(enUIEventID.BuyPick_Cancel, new CUIEventManager.OnUIEventHandler(this.OnClickCancel)); this.ValidateDynamic(); } }
public BuyPickDialog(bool isGift, COM_ITEM_TYPE type, uint id, RES_SHOPBUY_COINTYPE coinType, uint discount, uint maxCount, OnConfirmBuyDelegate onConfirm, CMallFactoryShopController.ShopProduct callContext, OnConfirmBuyCommonDelegate onConfirmCommon = null, CUIEvent uieventPars = null) { CUIFormScript formScript = Singleton <CUIManager> .GetInstance().OpenForm(s_Gift_Form_Path, false, true); if (null != formScript) { this._root = formScript.gameObject; this._usb = CUseableManager.CreateUseable(type, id, 0); this._count = 1; this._maxCount = maxCount; if (this._maxCount == 0) { this._maxCount = 0x3e7; } this._onConfirm = onConfirm; this._callContext = callContext; this._onConfirmdCommon = onConfirmCommon; this._uieventPars = uieventPars; this._coinType = coinType; this._discount = discount; if (this._usb != null) { this._countText = Utility.GetComponetInChild <Text>(this._root, "Panel/Count"); this._costText = Utility.GetComponetInChild <Text>(this._root, "Panel/Cost"); this._descText = Utility.GetComponetInChild <Text>(this._root, "Panel/lblDesc"); CItem item = new CItem(0L, id, 0, 0); uint key = (uint)item.m_itemData.EftParam[0]; ResRandomRewardStore dataByKey = GameDataMgr.randowmRewardDB.GetDataByKey(key); ListView <CUseable> view = new ListView <CUseable>(); for (int i = 0; i < dataByKey.astRewardDetail.Length; i++) { if (dataByKey.astRewardDetail[i].bItemType != 0) { CUseable useable = CUseableManager.CreateUsableByRandowReward((RES_RANDOM_REWARD_TYPE)dataByKey.astRewardDetail[i].bItemType, (int)dataByKey.astRewardDetail[i].dwLowCnt, dataByKey.astRewardDetail[i].dwItemID); if (useable != null) { view.Add(useable); } } } if (this._descText != null) { this._descText.text = item.m_description; } for (int j = 0; j < 10; j++) { GameObject gameObject = this._root.transform.Find("Panel/itemGroup/itemCell" + j).gameObject; if (j < view.Count) { gameObject.CustomSetActive(true); CUICommonSystem.SetItemCell(formScript, gameObject, view[j], true, false); Transform transform = gameObject.transform.Find("HaveItemFlag"); transform.gameObject.CustomSetActive(false); if (view[j].m_type == COM_ITEM_TYPE.COM_OBJTYPE_HERO) { CHeroItem item2 = view[j] as CHeroItem; CRoleInfo masterRoleInfo = Singleton <CRoleInfoManager> .GetInstance().GetMasterRoleInfo(); if ((masterRoleInfo != null) && masterRoleInfo.IsOwnHero(item2.m_heroData.dwCfgID)) { transform.gameObject.CustomSetActive(true); } } else if (view[j].m_type == COM_ITEM_TYPE.COM_OBJTYPE_HEROSKIN) { CHeroSkin skin = view[j] as CHeroSkin; CRoleInfo info2 = Singleton <CRoleInfoManager> .GetInstance().GetMasterRoleInfo(); if ((info2 != null) && info2.IsHaveHeroSkin(skin.m_heroId, skin.m_skinId, false)) { transform.gameObject.CustomSetActive(true); } } } else { gameObject.CustomSetActive(false); } } this._coinUsb = CUseableManager.CreateCoinUseable(coinType, 0); if (this._coinUsb != null) { Utility.GetComponetInChild <Image>(this._root, "Panel/Cost/CoinType").SetSprite(CUIUtility.GetSpritePrefeb(this._coinUsb.GetIconPath(), false, false)); } } Singleton <CUIEventManager> .GetInstance().AddUIEventListener(enUIEventID.BuyPick_Add, new CUIEventManager.OnUIEventHandler(this.OnClickAdd)); Singleton <CUIEventManager> .GetInstance().AddUIEventListener(enUIEventID.BuyPick_Dec, new CUIEventManager.OnUIEventHandler(this.OnClickDec)); Singleton <CUIEventManager> .GetInstance().AddUIEventListener(enUIEventID.BuyPick_Max, new CUIEventManager.OnUIEventHandler(this.OnClickMax)); Singleton <CUIEventManager> .GetInstance().AddUIEventListener(enUIEventID.BuyPick_Confirm, new CUIEventManager.OnUIEventHandler(this.OnClickConfirm)); Singleton <CUIEventManager> .GetInstance().AddUIEventListener(enUIEventID.BuyPick_Cancel, new CUIEventManager.OnUIEventHandler(this.OnClickCancel)); this.ValidateDynamic(); } }
public BuyPickDialog(bool isGift, COM_ITEM_TYPE type, uint id, RES_SHOPBUY_COINTYPE coinType, float discount, uint maxCount, OnConfirmBuyDelegate onConfirm, CMallFactoryShopController.ShopProduct callContext, OnConfirmBuyCommonDelegate onConfirmCommon = null, CUIEvent uieventPars = null) { CUIFormScript formScript = Singleton <CUIManager> .GetInstance().OpenForm(s_Gift_Form_Path, false, true); if (null != formScript) { this._root = formScript.gameObject; this._usb = CUseableManager.CreateUseable(type, id, 0); this._count = 1; this._bHeroSkinGift = false; this._bDynamicCorrectPrice = false; this._heroSkinGiftCost = 0; this._maxCount = maxCount; if (this._maxCount == 0) { this._maxCount = 0x3e7; } this._onConfirm = onConfirm; this._callContext = callContext; this._onConfirmdCommon = onConfirmCommon; this._uieventPars = uieventPars; this._coinType = coinType; this._realDiscount = discount; if (this._usb != null) { this._countText = Utility.GetComponetInChild <Text>(this._root, "Panel/Count"); this._costText = Utility.GetComponetInChild <Text>(this._root, "Panel/Cost"); this._descText = Utility.GetComponetInChild <Text>(this._root, "Panel/lblDesc"); CItem item = new CItem(0L, id, 0, 0); uint key = (uint)item.m_itemData.EftParam[0]; ResRandomRewardStore dataByKey = GameDataMgr.randomRewardDB.GetDataByKey(key); ListView <CUseable> view = new ListView <CUseable>(); for (int i = 0; i < dataByKey.astRewardDetail.Length; i++) { if (dataByKey.astRewardDetail[i].bItemType != 0) { CUseable useable = CUseableManager.CreateUsableByRandowReward((RES_RANDOM_REWARD_TYPE)dataByKey.astRewardDetail[i].bItemType, (int)dataByKey.astRewardDetail[i].dwLowCnt, dataByKey.astRewardDetail[i].dwItemID); if (useable != null) { view.Add(useable); } } } if (this._descText != null) { this._descText.text = item.m_description; } uint num3 = 0; int num4 = 0; if (this._usb.m_type == COM_ITEM_TYPE.COM_OBJTYPE_ITEMPROP) { CItem item2 = (CItem)this._usb; if (((item2 != null) && (item2.m_itemData != null)) && (item2.m_itemData.bType == 4)) { this._bDynamicCorrectPrice = item2.m_itemData.EftParam[3] > 0f; } } for (int j = 0; j < 10; j++) { GameObject gameObject = this._root.transform.Find("Panel/itemGroup/itemCell" + j).gameObject; if (j < view.Count) { gameObject.CustomSetActive(true); CUICommonSystem.SetItemCell(formScript, gameObject, view[j], true, false); Transform transform = gameObject.transform.Find("HaveItemFlag"); transform.gameObject.CustomSetActive(false); if (view[j].m_type == COM_ITEM_TYPE.COM_OBJTYPE_HERO) { this._bHeroSkinGift = true; CHeroItem item3 = view[j] as CHeroItem; CRoleInfo masterRoleInfo = Singleton <CRoleInfoManager> .GetInstance().GetMasterRoleInfo(); if ((masterRoleInfo != null) && masterRoleInfo.IsOwnHero(item3.m_heroData.dwCfgID)) { num3 += CHeroInfo.GetHeroCost(item3.m_heroData.dwCfgID, coinType); num4++; transform.gameObject.CustomSetActive(true); } } else if (view[j].m_type == COM_ITEM_TYPE.COM_OBJTYPE_HEROSKIN) { this._bHeroSkinGift = true; CHeroSkin skin = view[j] as CHeroSkin; CRoleInfo info2 = Singleton <CRoleInfoManager> .GetInstance().GetMasterRoleInfo(); if ((info2 != null) && info2.IsHaveHeroSkin(skin.m_heroId, skin.m_skinId, false)) { num3 += CSkinInfo.GetHeroSkinCost(skin.m_heroId, skin.m_skinId, coinType); num4++; transform.gameObject.CustomSetActive(true); } } } else { gameObject.CustomSetActive(false); } } this._coinUsb = CUseableManager.CreateCoinUseable(coinType, 0); if (this._coinUsb != null) { Utility.GetComponetInChild <Image>(this._root, "Panel/Cost/CoinType").SetSprite(CUIUtility.GetSpritePrefeb(this._coinUsb.GetIconPath(), false, false)); } Text componetInChild = Utility.GetComponetInChild <Text>(this._root, "Panel/costDescText"); componetInChild.text = string.Empty; if (this._bHeroSkinGift && this._bDynamicCorrectPrice) { uint buyPrice = this._usb.GetBuyPrice(coinType); Button btn = Utility.GetComponetInChild <Button>(this._root, "Panel/Button_Sale"); if (num4 >= view.Count) { CUICommonSystem.SetButtonEnableWithShader(btn, false, true); componetInChild.text = Singleton <CTextManager> .GetInstance().GetText("Gift_Can_Not_Buy_Tip"); this._heroSkinGiftCost = 0; } else { CUICommonSystem.SetButtonEnableWithShader(btn, true, true); componetInChild.text = Singleton <CTextManager> .GetInstance().GetText("Gift_Own_Hero_Skin_Tip"); uint num7 = CMallFactoryShopController.ShopProduct.SConvertWithRealDiscount(buyPrice - num3, this._realDiscount); if ((buyPrice >= num3) && (num7 >= (buyPrice / 10))) { this._heroSkinGiftCost = num7; } else { this._heroSkinGiftCost = buyPrice / 10; } } if (this._callContext != null) { this._callContext.m_bChangeGiftPrice = true; this._callContext.m_newGiftPrice = this._heroSkinGiftCost; } } } Singleton <CUIEventManager> .GetInstance().AddUIEventListener(enUIEventID.BuyPick_Add, new CUIEventManager.OnUIEventHandler(this.OnClickAdd)); Singleton <CUIEventManager> .GetInstance().AddUIEventListener(enUIEventID.BuyPick_Dec, new CUIEventManager.OnUIEventHandler(this.OnClickDec)); Singleton <CUIEventManager> .GetInstance().AddUIEventListener(enUIEventID.BuyPick_Max, new CUIEventManager.OnUIEventHandler(this.OnClickMax)); Singleton <CUIEventManager> .GetInstance().AddUIEventListener(enUIEventID.BuyPick_Confirm, new CUIEventManager.OnUIEventHandler(this.OnClickConfirm)); Singleton <CUIEventManager> .GetInstance().AddUIEventListener(enUIEventID.BuyPick_Cancel, new CUIEventManager.OnUIEventHandler(this.OnClickCancel)); this.ValidateDynamic(); } }
public CSymbolBuyPickDialog(ResSymbolInfo symbolInfo, RES_SHOPBUY_COINTYPE coinType, float discount, CSymbolBuyPickDialog.OnConfirmBuyDelegate onConfirm, CSymbolBuyPickDialog.OnConfirmBuyCommonDelegate onConfirmCommon = null, CUIEvent uieventPars = null) { CRoleInfo masterRoleInfo = Singleton <CRoleInfoManager> .GetInstance().GetMasterRoleInfo(); if (masterRoleInfo == null) { return; } CUseableContainer useableContainer = masterRoleInfo.GetUseableContainer(enCONTAINER_TYPE.ITEM); this._usb = (useableContainer.GetUseableByBaseID(5, symbolInfo.dwID) as CSymbolItem); if (this._usb == null) { this._usb = (CUseableManager.CreateUseable(5, symbolInfo.dwID, 0) as CSymbolItem); } if (this._usb == null) { return; } CUIFormScript cUIFormScript = Singleton <CUIManager> .GetInstance().OpenForm(CSymbolBuyPickDialog.s_Form_Path, false, true); if (null != cUIFormScript) { this._root = cUIFormScript.gameObject; this._itemCell = Utility.FindChild(this._root, "Panel/itemCell"); this._callContext = symbolInfo; this._count = 1u; if ((long)this._usb.m_stackCount >= 10L) { this._maxCount = 1u; } else { this._maxCount = (uint)(10 - this._usb.m_stackCount); } this._onConfirm = onConfirm; this._onConfirmdCommon = onConfirmCommon; this._uieventPars = uieventPars; this._coinType = coinType; this._realDiscount = discount; if (this._usb != null) { this._countText = Utility.GetComponetInChild <Text>(this._root, "Panel/Count"); this._costText = Utility.GetComponetInChild <Text>(this._root, "Panel/Cost"); CUICommonSystem.SetItemCell(cUIFormScript, this._itemCell, this._usb, true, false, false, false); this._descText = Utility.GetComponetInChild <Text>(this._root, "Panel/itemCell/SymbolDesc"); if (this._descText != null) { this._descText.text = CSymbolSystem.GetSymbolAttString(symbolInfo.dwID, true); } this._coinUsb = CUseableManager.CreateCoinUseable(coinType, 0); if (this._coinUsb != null) { Utility.GetComponetInChild <Image>(this._root, "Panel/Cost/CoinType").SetSprite(CUIUtility.GetSpritePrefeb(this._coinUsb.GetIconPath(), false, false), false); Utility.GetComponetInChild <Text>(this._root, "Panel/Price").text = this._usb.GetBuyPrice(this._coinType).ToString(); } } Singleton <CUIEventManager> .GetInstance().AddUIEventListener(enUIEventID.BuyPick_CloseForm, new CUIEventManager.OnUIEventHandler(this.OnCloseForm)); Singleton <CUIEventManager> .GetInstance().AddUIEventListener(enUIEventID.BuyPick_Add, new CUIEventManager.OnUIEventHandler(this.OnClickAdd)); Singleton <CUIEventManager> .GetInstance().AddUIEventListener(enUIEventID.BuyPick_Dec, new CUIEventManager.OnUIEventHandler(this.OnClickDec)); Singleton <CUIEventManager> .GetInstance().AddUIEventListener(enUIEventID.BuyPick_Max, new CUIEventManager.OnUIEventHandler(this.OnClickMax)); Singleton <CUIEventManager> .GetInstance().AddUIEventListener(enUIEventID.BuyPick_Confirm, new CUIEventManager.OnUIEventHandler(this.OnClickConfirm)); Singleton <CUIEventManager> .GetInstance().AddUIEventListener(enUIEventID.BuyPick_Cancel, new CUIEventManager.OnUIEventHandler(this.OnClickCancel)); Singleton <CUIEventManager> .GetInstance().AddUIEventListener(enUIEventID.BuyPick_ConfirmFactoryShopBuy, new CUIEventManager.OnUIEventHandler(this.OnConfirmFactoryShopBuy)); this.ValidateDynamic(); } }
public static bool CheckTriggerCondition(uint id, NewbieGuideTriggerConditionItem condition) { switch (condition.wType) { case 1: return(NewbieGuideCheckTriggerConditionUtil.CheckCompleteNewbieDungeonCondition(condition)); case 2: return(NewbieGuideCheckTriggerConditionUtil.CheckCompleteNormalDungeonCondition(condition)); case 3: return(NewbieGuideCheckTriggerConditionUtil.CheckOwnCompleteNewbieGuideCondition(condition)); case 4: return(NewbieGuideCheckTriggerConditionUtil.CheckUnCompleteNewbieGuideCondition(condition)); case 5: return(false); case 6: return(false); case 7: NewbieGuideCheckTriggerConditionUtil.AvailableTask = null; return(Singleton <CTaskSys> .get_instance().model.AnyTaskOfState(1, 0, out NewbieGuideCheckTriggerConditionUtil.AvailableTask)); case 8: return(false); case 9: return(false); case 10: return(false); case 11: { uint num = condition.Param[0]; uint num2 = condition.Param[1]; CRoleInfo masterRoleInfo = Singleton <CRoleInfoManager> .GetInstance().GetMasterRoleInfo(); if (masterRoleInfo != null) { uint haveHeroCount = (uint)masterRoleInfo.GetHaveHeroCount(false); bool result = false; switch (num2) { case 0u: result = (haveHeroCount == num); break; case 1u: result = (haveHeroCount > num); break; case 2u: result = (haveHeroCount < num); break; default: DebugHelper.Assert(false); break; } return(result); } return(false); } case 12: { bool flag = false; uint num3 = condition.Param[0]; RES_SHOPBUY_COINTYPE coinType = (condition.Param[1] != 0u) ? 4 : 2; CRoleInfo masterRoleInfo2 = Singleton <CRoleInfoManager> .GetInstance().GetMasterRoleInfo(); if (masterRoleInfo2 != null) { if (num3 > 0u) { flag = masterRoleInfo2.CheckHeroBuyable(num3, coinType); } else { ListView <ResHeroCfgInfo> .Enumerator enumerator = CHeroDataFactory.GetAllHeroList().GetEnumerator(); while (enumerator.MoveNext()) { num3 = enumerator.get_Current().dwCfgID; flag |= masterRoleInfo2.CheckHeroBuyable(num3, coinType); if (flag) { break; } } } } if (flag) { NewbieGuideCheckTriggerConditionUtil.AvailableHeroId = num3; } return(flag); } case 13: return(Singleton <CShopSystem> .GetInstance().IsNormalShopItemsInited()); case 14: return(Singleton <CRoleInfoManager> .GetInstance().GetMasterRoleInfo().GoldCoin >= condition.Param[0] && Singleton <CFunctionUnlockSys> .GetInstance().FucIsUnlock(12) && Singleton <CShopSystem> .GetInstance().IsNormalShopItemsInited()); case 15: return(CAdventureSys.IsChapterFullStar(Singleton <CAdventureSys> .GetInstance().currentChapter, Singleton <CAdventureSys> .GetInstance().currentDifficulty)); case 16: { uint num4 = condition.Param[0]; return(num4 > 0u && Singleton <CAdventureSys> .GetInstance().IsLevelFinished((int)num4) && CAdventureSys.IsLevelFullStar((int)num4)); } case 17: return(Singleton <CFunctionUnlockSys> .GetInstance().FucIsUnlock(10)); case 18: { CRoleInfo masterRoleInfo3 = Singleton <CRoleInfoManager> .GetInstance().GetMasterRoleInfo(); CUseableContainer useableContainer = masterRoleInfo3.GetUseableContainer(enCONTAINER_TYPE.ITEM); int useableStackCount = useableContainer.GetUseableStackCount(2, CAdventureSys.MOPUP_TICKET_ID); return((long)useableStackCount >= (long)((ulong)condition.Param[0])); } case 19: return(Singleton <CFunctionUnlockSys> .GetInstance().FucIsUnlock(3)); case 20: return(Singleton <CFunctionUnlockSys> .GetInstance().FucIsUnlock(5)); case 21: return(Singleton <CFunctionUnlockSys> .GetInstance().FucIsUnlock(4)); case 22: return(Singleton <CFunctionUnlockSys> .GetInstance().FucIsUnlock(6)); case 23: return(Singleton <CFunctionUnlockSys> .GetInstance().FucIsUnlock(13)); case 24: return(Singleton <CFunctionUnlockSys> .GetInstance().FucIsUnlock(8)); case 25: return(Singleton <CFunctionUnlockSys> .GetInstance().FucIsUnlock(11) && Singleton <CShopSystem> .GetInstance().IsMysteryShopAvailable()); case 26: return(Singleton <CFunctionUnlockSys> .GetInstance().FucIsUnlock(15)); case 27: return(Singleton <CFunctionUnlockSys> .GetInstance().FucIsUnlock(16)); case 28: return(false); case 30: return(Singleton <CRoleInfoManager> .GetInstance().GetMasterRoleInfo().IsGuidedStateSet(26)); case 31: return(Singleton <CRoleInfoManager> .GetInstance().GetMasterRoleInfo().IsGuidedStateSet(27)); case 32: return(Singleton <CRoleInfoManager> .GetInstance().GetMasterRoleInfo().IsGuidedStateSet(21)); case 33: { CRoleInfo masterRoleInfo4 = Singleton <CRoleInfoManager> .GetInstance().GetMasterRoleInfo(); return(masterRoleInfo4 != null && masterRoleInfo4.GoldCoin >= condition.Param[0]); } case 34: return(false); case 36: return(false); case 37: { bool flag2 = false; uint num5 = condition.Param[0]; CRoleInfo masterRoleInfo5 = Singleton <CRoleInfoManager> .GetInstance().GetMasterRoleInfo(); if (masterRoleInfo5 != null) { CUseableContainer useableContainer2 = masterRoleInfo5.GetUseableContainer(enCONTAINER_TYPE.ITEM); if (useableContainer2 != null) { CUseable useableByBaseID = useableContainer2.GetUseableByBaseID(2, num5); if (useableByBaseID != null) { flag2 = true; } } } NewbieGuideCheckTriggerConditionUtil.AvailableItemId = ((!flag2) ? 0u : num5); return(flag2); } case 38: return(Singleton <CRoleInfoManager> .GetInstance().GetMasterRoleInfo().IsGuidedStateSet(9)); case 39: { uint num6 = condition.Param[0]; CRoleInfo masterRoleInfo6 = Singleton <CRoleInfoManager> .GetInstance().GetMasterRoleInfo(); return(masterRoleInfo6 != null && (long)masterRoleInfo6.GetHaveHeroCount(false) >= (long)((ulong)num6)); } case 40: { CRoleInfo masterRoleInfo7 = Singleton <CRoleInfoManager> .GetInstance().GetMasterRoleInfo(); if (masterRoleInfo7 != null) { masterRoleInfo7.m_symbolInfo.CheckAnyWearSymbol(out NewbieGuideCheckTriggerConditionUtil.AvailableSymbolPos, out NewbieGuideCheckTriggerConditionUtil.AvailableSymbolId, 2); return((long)NewbieGuideCheckTriggerConditionUtil.AvailableSymbolPos == (long)((ulong)condition.Param[0])); } return(false); } case 41: return(Singleton <CFunctionUnlockSys> .GetInstance().FucIsUnlock(9)); case 42: return(Singleton <CRoleInfoManager> .GetInstance().GetMasterRoleInfo().IsGuidedStateSet(44)); case 43: { uint num7 = condition.Param[0]; CRoleInfo masterRoleInfo8 = Singleton <CRoleInfoManager> .GetInstance().GetMasterRoleInfo(); return(masterRoleInfo8 != null && masterRoleInfo8.SymbolCoin >= num7); } case 44: return(Singleton <CFunctionUnlockSys> .GetInstance().FucIsUnlock(22)); case 45: return(CAddSkillSys.IsSelSkillAvailable()); case 46: return(NewbieGuideCheckTriggerConditionUtil.CheckOwnCompleteNewWeakGuideCondition(condition)); case 47: return(NewbieGuideCheckTriggerConditionUtil.CheckOwnCompleteNewWeakGuideCondition(condition)); case 48: { CRoleInfo masterRoleInfo9 = Singleton <CRoleInfoManager> .GetInstance().GetMasterRoleInfo(); return(masterRoleInfo9.m_symbolInfo.m_pageCount > 1); } case 49: { LevelRewardData levelRewardData = Singleton <CTaskSys> .get_instance().model.GetLevelRewardData((int)condition.Param[0]); return(levelRewardData != null && !levelRewardData.m_bHasGetReward); } case 50: { CRoleInfo masterRoleInfo10 = Singleton <CRoleInfoManager> .GetInstance().GetMasterRoleInfo(); return(masterRoleInfo10.m_freeDrawInfo[4].dwLeftFreeDrawCnt > 0); } case 51: return(Singleton <CFunctionUnlockSys> .get_instance().FucIsUnlock(condition.Param[0])); case 52: { CRoleInfo masterRoleInfo11 = Singleton <CRoleInfoManager> .GetInstance().GetMasterRoleInfo(); return(masterRoleInfo11 != null && masterRoleInfo11.IsOldPlayer() && !masterRoleInfo11.IsOldPlayerGuided()); } case 53: { SLevelContext curLvelContext = Singleton <BattleLogic> .GetInstance().GetCurLvelContext(); return(curLvelContext != null && curLvelContext.IsMultilModeWithWarmBattle()); } case 54: { bool result2 = false; CRoleInfo masterRoleInfo12 = Singleton <CRoleInfoManager> .GetInstance().GetMasterRoleInfo(); if (masterRoleInfo12 != null) { result2 = masterRoleInfo12.IsGuidedStateSet(98); } return(result2); } case 55: return(CBattleGuideManager.EnableHeroVictoryTips()); case 56: return(Singleton <GameReplayModule> .GetInstance().HasRecord); case 57: { SLevelContext curLvelContext2 = Singleton <BattleLogic> .GetInstance().GetCurLvelContext(); return(curLvelContext2 != null && (long)curLvelContext2.m_mapID == (long)((ulong)condition.Param[0])); } } return(false); }
public BuyPickDialog(bool isGift, COM_ITEM_TYPE type, uint id, RES_SHOPBUY_COINTYPE coinType, float discount, uint maxCount, BuyPickDialog.OnConfirmBuyDelegate onConfirm, CMallFactoryShopController.ShopProduct callContext, BuyPickDialog.OnConfirmBuyCommonDelegate onConfirmCommon = null, CUIEvent uieventPars = null, bool bfromFactoyShop = false) { this.m_bShowBigIcon = (callContext != null && callContext.GetSpecialIconPath() != null); CUIFormScript cUIFormScript; if (this.m_bShowBigIcon) { cUIFormScript = Singleton <CUIManager> .GetInstance().OpenForm(BuyPickDialog.s_Gift_Big_Icon_Form_Path, false, true); } else { cUIFormScript = Singleton <CUIManager> .GetInstance().OpenForm(BuyPickDialog.s_Gift_Form_Path, false, true); } if (null != cUIFormScript) { this._root = cUIFormScript.gameObject; this._usb = CUseableManager.CreateUseable(type, id, 0); this._count = 1u; this._bHeroSkinGift = false; this._bDynamicCorrectPrice = false; this._heroSkinGiftCost = 0u; this._maxCount = maxCount; if (this._maxCount == 0u) { this._maxCount = 999u; } this._onConfirm = onConfirm; this._callContext = callContext; this._onConfirmdCommon = onConfirmCommon; this._uieventPars = uieventPars; this._coinType = coinType; this._realDiscount = discount; if (this._usb != null) { this._countText = Utility.GetComponetInChild <Text>(this._root, "Panel/Count"); this._costText = Utility.GetComponetInChild <Text>(this._root, "Panel/Cost"); this._descText = Utility.GetComponetInChild <Text>(this._root, "Panel/lblDesc"); CItem cItem = new CItem(0uL, id, 0, 0); uint key = (uint)cItem.m_itemData.EftParam[0]; ResRandomRewardStore dataByKey = GameDataMgr.randomRewardDB.GetDataByKey(key); ListView <CUseable> listView = new ListView <CUseable>(); for (int i = 0; i < dataByKey.astRewardDetail.Length; i++) { if (dataByKey.astRewardDetail[i].bItemType != 0) { CUseable cUseable = CUseableManager.CreateUsableByRandowReward((RES_RANDOM_REWARD_TYPE)dataByKey.astRewardDetail[i].bItemType, (int)dataByKey.astRewardDetail[i].dwLowCnt, dataByKey.astRewardDetail[i].dwItemID); if (cUseable != null) { listView.Add(cUseable); } } } if (this._descText != null) { this._descText.set_text(string.IsNullOrEmpty(cItem.m_mallDescription) ? cItem.m_description : cItem.m_mallDescription); } uint num = 0u; int num2 = 0; if (this._usb.m_type == COM_ITEM_TYPE.COM_OBJTYPE_ITEMPROP) { CItem cItem2 = (CItem)this._usb; if (cItem2 != null && cItem2.m_itemData != null && cItem2.m_itemData.bType == 4) { this._bDynamicCorrectPrice = (cItem2.m_itemData.EftParam[3] > 0f); } } CUIListScript componetInChild = Utility.GetComponetInChild <CUIListScript>(cUIFormScript.gameObject, "Panel/itemGroup"); componetInChild.SetElementAmount(listView.Count); for (int j = 0; j < listView.Count; j++) { CUIListElementScript elemenet = componetInChild.GetElemenet(j); this.UpdateElement(elemenet, listView[j], this.m_bShowBigIcon); if (listView[j].m_type == COM_ITEM_TYPE.COM_OBJTYPE_HERO) { this._bHeroSkinGift = true; CHeroItem cHeroItem = listView[j] as CHeroItem; CRoleInfo masterRoleInfo = Singleton <CRoleInfoManager> .GetInstance().GetMasterRoleInfo(); if (masterRoleInfo != null && masterRoleInfo.IsOwnHero(cHeroItem.m_heroData.dwCfgID)) { num += CHeroInfo.GetHeroCost(cHeroItem.m_heroData.dwCfgID, coinType); num2++; } } else if (listView[j].m_type == COM_ITEM_TYPE.COM_OBJTYPE_HEROSKIN) { this._bHeroSkinGift = true; CHeroSkin cHeroSkin = listView[j] as CHeroSkin; CRoleInfo masterRoleInfo2 = Singleton <CRoleInfoManager> .GetInstance().GetMasterRoleInfo(); if (masterRoleInfo2 != null && masterRoleInfo2.IsHaveHeroSkin(cHeroSkin.m_heroId, cHeroSkin.m_skinId, false)) { num += CSkinInfo.GetHeroSkinCost(cHeroSkin.m_heroId, cHeroSkin.m_skinId, coinType); num2++; } } } this._coinUsb = CUseableManager.CreateCoinUseable(coinType, 0); if (this._coinUsb != null) { Utility.GetComponetInChild <Image>(this._root, "Panel/Cost/CoinType").SetSprite(CUIUtility.GetSpritePrefeb(this._coinUsb.GetIconPath(), false, false), false); } Text componetInChild2 = Utility.GetComponetInChild <Text>(this._root, "Panel/costDescText"); componetInChild2.set_text(string.Empty); if (this._bHeroSkinGift && this._bDynamicCorrectPrice) { uint buyPrice = this._usb.GetBuyPrice(coinType); Button componetInChild3 = Utility.GetComponetInChild <Button>(this._root, "Panel/Button_Sale"); if (num2 >= listView.Count) { CUICommonSystem.SetButtonEnableWithShader(componetInChild3, false, true); componetInChild2.set_text(Singleton <CTextManager> .GetInstance().GetText("Gift_Can_Not_Buy_Tip")); this._heroSkinGiftCost = 0u; } else { CUICommonSystem.SetButtonEnableWithShader(componetInChild3, true, true); componetInChild2.set_text(Singleton <CTextManager> .GetInstance().GetText("Gift_Own_Hero_Skin_Tip")); uint num3 = CMallFactoryShopController.ShopProduct.SConvertWithRealDiscount(buyPrice - num, this._realDiscount); if (buyPrice >= num && num3 >= buyPrice / 10u) { this._heroSkinGiftCost = num3; } else { this._heroSkinGiftCost = buyPrice / 10u; } } if (this._callContext != null) { this._callContext.m_bChangeGiftPrice = true; this._callContext.m_newGiftPrice = this._heroSkinGiftCost; } } } Singleton <CUIEventManager> .GetInstance().AddUIEventListener(enUIEventID.BuyPick_CloseForm, new CUIEventManager.OnUIEventHandler(this.OnCloseForm)); Singleton <CUIEventManager> .GetInstance().AddUIEventListener(enUIEventID.BuyPick_Add, new CUIEventManager.OnUIEventHandler(this.OnClickAdd)); Singleton <CUIEventManager> .GetInstance().AddUIEventListener(enUIEventID.BuyPick_Dec, new CUIEventManager.OnUIEventHandler(this.OnClickDec)); Singleton <CUIEventManager> .GetInstance().AddUIEventListener(enUIEventID.BuyPick_Max, new CUIEventManager.OnUIEventHandler(this.OnClickMax)); Singleton <CUIEventManager> .GetInstance().AddUIEventListener(enUIEventID.BuyPick_Confirm, new CUIEventManager.OnUIEventHandler(this.OnClickConfirm)); Singleton <CUIEventManager> .GetInstance().AddUIEventListener(enUIEventID.BuyPick_Cancel, new CUIEventManager.OnUIEventHandler(this.OnClickCancel)); Singleton <CUIEventManager> .GetInstance().AddUIEventListener(enUIEventID.BuyPick_ConfirmFactoryShopBuy, new CUIEventManager.OnUIEventHandler(this.OnConfirmFactoryShopBuy)); this.ValidateDynamic(); } }
public static bool CheckTriggerCondition(uint id, NewbieGuideTriggerConditionItem condition) { switch (condition.wType) { case 1: return(NewbieGuideCheckTriggerConditionUtil.CheckCompleteNewbieDungeonCondition(condition)); case 2: return(NewbieGuideCheckTriggerConditionUtil.CheckCompleteNormalDungeonCondition(condition)); case 3: return(NewbieGuideCheckTriggerConditionUtil.CheckOwnCompleteNewbieGuideCondition(condition)); case 4: return(NewbieGuideCheckTriggerConditionUtil.CheckUnCompleteNewbieGuideCondition(condition)); case 5: return(false); case 6: return(false); case 7: NewbieGuideCheckTriggerConditionUtil.AvailableTask = null; return(Singleton <CTaskSys> .instance.model.AnyTaskOfState(COM_TASK_STATE.COM_TASK_HAVEDONE, RES_TASK_TYPE.RES_TASKTYPE_MAIN, out NewbieGuideCheckTriggerConditionUtil.AvailableTask)); case 8: return(false); case 9: return(false); case 10: return(false); case 11: { uint num = condition.Param[0]; uint num2 = condition.Param[1]; CRoleInfo masterRoleInfo = Singleton <CRoleInfoManager> .GetInstance().GetMasterRoleInfo(); if (masterRoleInfo != null) { uint haveHeroCount = (uint)masterRoleInfo.GetHaveHeroCount(false); bool result = false; switch (num2) { case 0u: result = (haveHeroCount == num); break; case 1u: result = (haveHeroCount > num); break; case 2u: result = (haveHeroCount < num); break; default: DebugHelper.Assert(false); break; } return(result); } return(false); } case 12: { bool flag = false; uint num3 = condition.Param[0]; RES_SHOPBUY_COINTYPE coinType = (condition.Param[1] == 0u) ? RES_SHOPBUY_COINTYPE.RES_SHOPBUY_TYPE_COUPONS : RES_SHOPBUY_COINTYPE.RES_SHOPBUY_TYPE_PVPCOIN; CRoleInfo masterRoleInfo2 = Singleton <CRoleInfoManager> .GetInstance().GetMasterRoleInfo(); if (masterRoleInfo2 != null) { if (num3 > 0u) { flag = masterRoleInfo2.CheckHeroBuyable(num3, coinType); } else { ListView <ResHeroCfgInfo> .Enumerator enumerator = CHeroDataFactory.GetAllHeroList().GetEnumerator(); while (enumerator.MoveNext()) { num3 = enumerator.Current.dwCfgID; flag |= masterRoleInfo2.CheckHeroBuyable(num3, coinType); if (flag) { break; } } } } if (flag) { NewbieGuideCheckTriggerConditionUtil.AvailableHeroId = num3; } return(flag); } case 13: return(Singleton <CShopSystem> .GetInstance().IsNormalShopItemsInited()); case 14: return(Singleton <CRoleInfoManager> .GetInstance().GetMasterRoleInfo().GoldCoin >= condition.Param[0] && Singleton <CFunctionUnlockSys> .GetInstance().FucIsUnlock(RES_SPECIALFUNCUNLOCK_TYPE.RES_SPECIALFUNCUNLOCKTYPE_SHOP) && Singleton <CShopSystem> .GetInstance().IsNormalShopItemsInited()); case 15: return(CAdventureSys.IsChapterFullStar(Singleton <CAdventureSys> .GetInstance().currentChapter, Singleton <CAdventureSys> .GetInstance().currentDifficulty)); case 16: { uint num4 = condition.Param[0]; return(num4 > 0u && Singleton <CAdventureSys> .GetInstance().IsLevelFinished((int)num4) && CAdventureSys.IsLevelFullStar((int)num4)); } case 17: return(Singleton <CFunctionUnlockSys> .GetInstance().FucIsUnlock(RES_SPECIALFUNCUNLOCK_TYPE.RES_SPECIALFUNCUNLOCKTYPE_PVPMODE)); case 18: { CRoleInfo masterRoleInfo3 = Singleton <CRoleInfoManager> .GetInstance().GetMasterRoleInfo(); CUseableContainer useableContainer = masterRoleInfo3.GetUseableContainer(enCONTAINER_TYPE.ITEM); int useableStackCount = useableContainer.GetUseableStackCount(COM_ITEM_TYPE.COM_OBJTYPE_ITEMPROP, CAdventureSys.MOPUP_TICKET_ID); return((long)useableStackCount >= (long)((ulong)condition.Param[0])); } case 19: return(Singleton <CFunctionUnlockSys> .GetInstance().FucIsUnlock(RES_SPECIALFUNCUNLOCK_TYPE.RES_SPECIALFUNCUNLOCKTYPE_ZONGSHILIAN)); case 20: return(Singleton <CFunctionUnlockSys> .GetInstance().FucIsUnlock(RES_SPECIALFUNCUNLOCK_TYPE.RES_SPECIALFUNCUNLOCKTYPE_ZHUANGZIHUANMENG)); case 21: return(Singleton <CFunctionUnlockSys> .GetInstance().FucIsUnlock(RES_SPECIALFUNCUNLOCK_TYPE.RES_SPECIALFUNCUNLOCKTYPE_LIUGUOYUANZHENG)); case 22: return(Singleton <CFunctionUnlockSys> .GetInstance().FucIsUnlock(RES_SPECIALFUNCUNLOCK_TYPE.RES_SPECIALFUNCUNLOCKTYPE_ELITELEVEL)); case 23: return(Singleton <CFunctionUnlockSys> .GetInstance().FucIsUnlock(RES_SPECIALFUNCUNLOCK_TYPE.RES_SPECIALFUNCUNLOCKTYPE_UNION)); case 24: return(Singleton <CFunctionUnlockSys> .GetInstance().FucIsUnlock(RES_SPECIALFUNCUNLOCK_TYPE.RES_SPECIALFUNCUNLOCKTYPE_SYMBOL)); case 25: return(Singleton <CFunctionUnlockSys> .GetInstance().FucIsUnlock(RES_SPECIALFUNCUNLOCK_TYPE.RES_SPECIALFUNCUNLOCKTYPE_BLACKSHOP) && Singleton <CShopSystem> .GetInstance().IsMysteryShopAvailable()); case 26: return(Singleton <CFunctionUnlockSys> .GetInstance().FucIsUnlock(RES_SPECIALFUNCUNLOCK_TYPE.RES_SPECIALFUNCUNLOCKTYPE_PVPCOINSHOP)); case 27: return(Singleton <CFunctionUnlockSys> .GetInstance().FucIsUnlock(RES_SPECIALFUNCUNLOCK_TYPE.RES_SPECIALFUNCUNLOCKTYPE_TASK)); case 28: return(false); case 30: return(Singleton <CRoleInfoManager> .GetInstance().GetMasterRoleInfo().IsGuidedStateSet(26)); case 31: return(Singleton <CRoleInfoManager> .GetInstance().GetMasterRoleInfo().IsGuidedStateSet(27)); case 32: return(Singleton <CRoleInfoManager> .GetInstance().GetMasterRoleInfo().IsGuidedStateSet(21)); case 33: { CRoleInfo masterRoleInfo4 = Singleton <CRoleInfoManager> .GetInstance().GetMasterRoleInfo(); return(masterRoleInfo4 != null && masterRoleInfo4.GoldCoin >= condition.Param[0]); } case 34: return(false); case 36: return(false); case 37: { bool flag2 = false; uint num5 = condition.Param[0]; CRoleInfo masterRoleInfo5 = Singleton <CRoleInfoManager> .GetInstance().GetMasterRoleInfo(); if (masterRoleInfo5 != null) { CUseableContainer useableContainer2 = masterRoleInfo5.GetUseableContainer(enCONTAINER_TYPE.ITEM); if (useableContainer2 != null) { CUseable useableByBaseID = useableContainer2.GetUseableByBaseID(COM_ITEM_TYPE.COM_OBJTYPE_ITEMPROP, num5); if (useableByBaseID != null) { flag2 = true; } } } NewbieGuideCheckTriggerConditionUtil.AvailableItemId = (flag2 ? num5 : 0u); return(flag2); } case 38: return(Singleton <CRoleInfoManager> .GetInstance().GetMasterRoleInfo().IsGuidedStateSet(9)); case 39: { uint num6 = condition.Param[0]; CRoleInfo masterRoleInfo6 = Singleton <CRoleInfoManager> .GetInstance().GetMasterRoleInfo(); return(masterRoleInfo6 != null && (long)masterRoleInfo6.GetHaveHeroCount(false) >= (long)((ulong)num6)); } case 40: { CRoleInfo masterRoleInfo7 = Singleton <CRoleInfoManager> .GetInstance().GetMasterRoleInfo(); if (masterRoleInfo7 != null) { masterRoleInfo7.m_symbolInfo.CheckAnyWearSymbol(out NewbieGuideCheckTriggerConditionUtil.AvailableSymbolPos, out NewbieGuideCheckTriggerConditionUtil.AvailableSymbolId, 2); return((long)NewbieGuideCheckTriggerConditionUtil.AvailableSymbolPos == (long)((ulong)condition.Param[0])); } return(false); } case 41: return(Singleton <CFunctionUnlockSys> .GetInstance().FucIsUnlock(RES_SPECIALFUNCUNLOCK_TYPE.RES_SPECIALFUNCUNLOCKTYPE_ARENA)); case 42: return(Singleton <CRoleInfoManager> .GetInstance().GetMasterRoleInfo().IsGuidedStateSet(44)); case 43: { uint num7 = condition.Param[0]; CRoleInfo masterRoleInfo8 = Singleton <CRoleInfoManager> .GetInstance().GetMasterRoleInfo(); return(masterRoleInfo8 != null && masterRoleInfo8.SymbolCoin >= num7); } case 44: return(Singleton <CFunctionUnlockSys> .GetInstance().FucIsUnlock(RES_SPECIALFUNCUNLOCK_TYPE.RES_SPECIALFUNCUNLOCKTYPE_ADDEDSKILL)); case 45: return(CAddSkillSys.IsSelSkillAvailable()); case 46: return(NewbieGuideCheckTriggerConditionUtil.CheckOwnCompleteNewWeakGuideCondition(condition)); case 47: return(NewbieGuideCheckTriggerConditionUtil.CheckOwnCompleteNewWeakGuideCondition(condition)); case 48: { CRoleInfo masterRoleInfo9 = Singleton <CRoleInfoManager> .GetInstance().GetMasterRoleInfo(); return(masterRoleInfo9.m_symbolInfo.m_pageCount > 1); } case 49: { LevelRewardData levelRewardData = Singleton <CTaskSys> .instance.model.GetLevelRewardData((int)condition.Param[0]); return(levelRewardData != null && !levelRewardData.m_bHasGetReward); } case 50: { CRoleInfo masterRoleInfo10 = Singleton <CRoleInfoManager> .GetInstance().GetMasterRoleInfo(); return(masterRoleInfo10.m_freeDrawInfo[4].dwLeftFreeDrawCnt > 0); } case 51: return(Singleton <CFunctionUnlockSys> .instance.FucIsUnlock((RES_SPECIALFUNCUNLOCK_TYPE)condition.Param[0])); case 52: { CRoleInfo masterRoleInfo11 = Singleton <CRoleInfoManager> .GetInstance().GetMasterRoleInfo(); return(masterRoleInfo11 != null && masterRoleInfo11.IsOldPlayer() && !masterRoleInfo11.IsOldPlayerGuided()); } case 53: { SLevelContext curLvelContext = Singleton <BattleLogic> .GetInstance().GetCurLvelContext(); return(curLvelContext != null && curLvelContext.IsMultilModeWithWarmBattle()); } case 54: { bool result2 = false; CRoleInfo masterRoleInfo12 = Singleton <CRoleInfoManager> .GetInstance().GetMasterRoleInfo(); if (masterRoleInfo12 != null) { result2 = masterRoleInfo12.IsGuidedStateSet(98); } return(result2); } case 55: return(CBattleGuideManager.EnableHeroVictoryTips()); case 56: return(Singleton <GameReplayModule> .GetInstance().HasRecord&& Singleton <WatchController> .GetInstance().FightOverJust); case 57: { SLevelContext curLvelContext2 = Singleton <BattleLogic> .GetInstance().GetCurLvelContext(); return(curLvelContext2 != null && (long)curLvelContext2.m_mapID == (long)((ulong)condition.Param[0])); } case 58: { CSkillButtonManager cSkillButtonManager = (Singleton <CBattleSystem> .GetInstance().FightForm == null) ? null : Singleton <CBattleSystem> .GetInstance().FightForm.m_skillButtonManager; SkillSlotType skillSlotType; return(cSkillButtonManager != null && cSkillButtonManager.HasMapSlectTargetSkill(out skillSlotType) && skillSlotType == SkillSlotType.SLOT_SKILL_5); } } return(false); }
public static bool CheckTriggerCondition(uint id, NewbieGuideTriggerConditionItem condition) { bool flag6; uint dwCfgID; switch (condition.wType) { case 1: return(CheckCompleteNewbieDungeonCondition(condition)); case 2: return(CheckCompleteNormalDungeonCondition(condition)); case 3: return(CheckOwnCompleteNewbieGuideCondition(condition)); case 4: return(CheckUnCompleteNewbieGuideCondition(condition)); case 5: return(false); case 6: return(false); case 7: AvailableTask = null; return(Singleton <CTaskSys> .instance.model.AnyTaskOfState(COM_TASK_STATE.COM_TASK_HAVEDONE, RES_TASK_TYPE.RES_TASKTYPE_MAIN, out AvailableTask)); case 8: return(false); case 9: return(false); case 10: return(false); case 11: { uint num3 = condition.Param[0]; uint num4 = condition.Param[1]; CRoleInfo masterRoleInfo = Singleton <CRoleInfoManager> .GetInstance().GetMasterRoleInfo(); if (masterRoleInfo == null) { return(false); } uint haveHeroCount = (uint)masterRoleInfo.GetHaveHeroCount(false); switch (num4) { case 0: return(haveHeroCount == num3); case 1: return(haveHeroCount > num3); case 2: return(haveHeroCount < num3); } DebugHelper.Assert(false); return(false); } case 12: { flag6 = false; dwCfgID = condition.Param[0]; RES_SHOPBUY_COINTYPE coinType = (condition.Param[1] != 0) ? RES_SHOPBUY_COINTYPE.RES_SHOPBUY_TYPE_PVPCOIN : RES_SHOPBUY_COINTYPE.RES_SHOPBUY_TYPE_COUPONS; CRoleInfo info5 = Singleton <CRoleInfoManager> .GetInstance().GetMasterRoleInfo(); if (info5 != null) { if (dwCfgID <= 0) { ListView <ResHeroCfgInfo> .Enumerator enumerator = CHeroDataFactory.GetAllHeroList().GetEnumerator(); while (enumerator.MoveNext()) { dwCfgID = enumerator.Current.dwCfgID; flag6 |= info5.CheckHeroBuyable(dwCfgID, coinType); if (flag6) { break; } } break; } flag6 = info5.CheckHeroBuyable(dwCfgID, coinType); } break; } case 13: return(Singleton <CShopSystem> .GetInstance().IsNormalShopItemsInited()); case 14: return(((Singleton <CRoleInfoManager> .GetInstance().GetMasterRoleInfo().GoldCoin >= condition.Param[0]) && Singleton <CFunctionUnlockSys> .GetInstance().FucIsUnlock(RES_SPECIALFUNCUNLOCK_TYPE.RES_SPECIALFUNCUNLOCKTYPE_SHOP)) && Singleton <CShopSystem> .GetInstance().IsNormalShopItemsInited()); case 15: return(CAdventureSys.IsChapterFullStar(Singleton <CAdventureSys> .GetInstance().currentChapter, Singleton <CAdventureSys> .GetInstance().currentDifficulty)); case 0x10: { uint num7 = condition.Param[0]; if (num7 <= 0) { return(false); } if (!Singleton <CAdventureSys> .GetInstance().IsLevelFinished((int)num7)) { return(false); } return(CAdventureSys.IsLevelFullStar((int)num7)); } case 0x11: return(Singleton <CFunctionUnlockSys> .GetInstance().FucIsUnlock(RES_SPECIALFUNCUNLOCK_TYPE.RES_SPECIALFUNCUNLOCKTYPE_PVPMODE)); case 0x12: return(Singleton <CRoleInfoManager> .GetInstance().GetMasterRoleInfo().GetUseableContainer(enCONTAINER_TYPE.ITEM).GetUseableStackCount(COM_ITEM_TYPE.COM_OBJTYPE_ITEMPROP, CAdventureSys.MOPUP_TICKET_ID) >= condition.Param[0]); case 0x13: return(Singleton <CFunctionUnlockSys> .GetInstance().FucIsUnlock(RES_SPECIALFUNCUNLOCK_TYPE.RES_SPECIALFUNCUNLOCKTYPE_ZONGSHILIAN)); case 20: return(Singleton <CFunctionUnlockSys> .GetInstance().FucIsUnlock(RES_SPECIALFUNCUNLOCK_TYPE.RES_SPECIALFUNCUNLOCKTYPE_ZHUANGZIHUANMENG)); case 0x15: return(Singleton <CFunctionUnlockSys> .GetInstance().FucIsUnlock(RES_SPECIALFUNCUNLOCK_TYPE.RES_SPECIALFUNCUNLOCKTYPE_LIUGUOYUANZHENG)); case 0x16: return(Singleton <CFunctionUnlockSys> .GetInstance().FucIsUnlock(RES_SPECIALFUNCUNLOCK_TYPE.RES_SPECIALFUNCUNLOCKTYPE_ELITELEVEL)); case 0x17: return(Singleton <CFunctionUnlockSys> .GetInstance().FucIsUnlock(RES_SPECIALFUNCUNLOCK_TYPE.RES_SPECIALFUNCUNLOCKTYPE_UNION)); case 0x18: return(Singleton <CFunctionUnlockSys> .GetInstance().FucIsUnlock(RES_SPECIALFUNCUNLOCK_TYPE.RES_SPECIALFUNCUNLOCKTYPE_SYMBOL)); case 0x19: return(Singleton <CFunctionUnlockSys> .GetInstance().FucIsUnlock(RES_SPECIALFUNCUNLOCK_TYPE.RES_SPECIALFUNCUNLOCKTYPE_BLACKSHOP) && Singleton <CShopSystem> .GetInstance().IsMysteryShopAvailable()); case 0x1a: return(Singleton <CFunctionUnlockSys> .GetInstance().FucIsUnlock(RES_SPECIALFUNCUNLOCK_TYPE.RES_SPECIALFUNCUNLOCKTYPE_PVPCOINSHOP)); case 0x1b: return(Singleton <CFunctionUnlockSys> .GetInstance().FucIsUnlock(RES_SPECIALFUNCUNLOCK_TYPE.RES_SPECIALFUNCUNLOCKTYPE_TASK)); case 0x1c: return(false); case 30: return(Singleton <CRoleInfoManager> .GetInstance().GetMasterRoleInfo().IsGuidedStateSet(0x1a)); case 0x1f: return(Singleton <CRoleInfoManager> .GetInstance().GetMasterRoleInfo().IsGuidedStateSet(0x1b)); case 0x20: return(Singleton <CRoleInfoManager> .GetInstance().GetMasterRoleInfo().IsGuidedStateSet(0x15)); case 0x21: { CRoleInfo info7 = Singleton <CRoleInfoManager> .GetInstance().GetMasterRoleInfo(); return((info7 != null) && (info7.GoldCoin >= condition.Param[0])); } case 0x22: return(false); case 0x24: return(false); case 0x25: { bool flag = false; uint baseID = condition.Param[0]; CRoleInfo info = Singleton <CRoleInfoManager> .GetInstance().GetMasterRoleInfo(); if (info != null) { CUseableContainer useableContainer = info.GetUseableContainer(enCONTAINER_TYPE.ITEM); if ((useableContainer != null) && (useableContainer.GetUseableByBaseID(COM_ITEM_TYPE.COM_OBJTYPE_ITEMPROP, baseID) != null)) { flag = true; } } AvailableItemId = !flag ? 0 : baseID; return(flag); } case 0x26: return(Singleton <CRoleInfoManager> .GetInstance().GetMasterRoleInfo().IsGuidedStateSet(9)); case 0x27: { uint num2 = condition.Param[0]; CRoleInfo info3 = Singleton <CRoleInfoManager> .GetInstance().GetMasterRoleInfo(); return((info3 != null) && (info3.GetHaveHeroCount(false) >= num2)); } case 40: { CRoleInfo info2 = Singleton <CRoleInfoManager> .GetInstance().GetMasterRoleInfo(); if (info2 == null) { return(false); } return(info2.m_symbolInfo.CheckAnyWearSymbol(out AvailableSymbolPos, out AvailableSymbolId)); } case 0x29: return(Singleton <CFunctionUnlockSys> .GetInstance().FucIsUnlock(RES_SPECIALFUNCUNLOCK_TYPE.RES_SPECIALFUNCUNLOCKTYPE_ARENA)); case 0x2a: return(Singleton <CRoleInfoManager> .GetInstance().GetMasterRoleInfo().IsGuidedStateSet(0x2c)); case 0x2b: { uint key = condition.Param[0]; ResSymbolInfo dataByKey = GameDataMgr.symbolInfoDatabin.GetDataByKey(key); if (dataByKey == null) { goto Label_057D; } CRoleInfo info9 = Singleton <CRoleInfoManager> .GetInstance().GetMasterRoleInfo(); if (info9 == null) { goto Label_057D; } return(info9.SymbolCoin >= dataByKey.dwMakeCoin); } case 0x2c: return(Singleton <CFunctionUnlockSys> .GetInstance().FucIsUnlock(RES_SPECIALFUNCUNLOCK_TYPE.RES_SPECIALFUNCUNLOCKTYPE_ADDEDSKILL)); case 0x2d: return(CAddSkillSys.IsSelSkillAvailable()); case 0x2e: return(CheckOwnCompleteNewWeakGuideCondition(condition)); case 0x2f: return(CheckOwnCompleteNewWeakGuideCondition(condition)); case 0x30: if (Singleton <CRoleInfoManager> .GetInstance().GetMasterRoleInfo().m_symbolInfo.m_pageCount <= 1) { return(false); } return(true); case 0x31: { LevelRewardData levelRewardData = Singleton <CTaskSys> .instance.model.GetLevelRewardData((int)condition.Param[0]); if (levelRewardData == null) { return(false); } return(!levelRewardData.m_bHasGetReward); } case 50: if (Singleton <CRoleInfoManager> .GetInstance().GetMasterRoleInfo().m_freeDrawInfo[4].dwLeftFreeDrawCnt <= 0) { return(false); } return(true); case 0x33: return(Singleton <CFunctionUnlockSys> .instance.FucIsUnlock((RES_SPECIALFUNCUNLOCK_TYPE)condition.Param[0])); case 0x34: { CRoleInfo info12 = Singleton <CRoleInfoManager> .GetInstance().GetMasterRoleInfo(); if (((info12 == null) || !info12.IsOldPlayer()) || info12.IsOldPlayerGuided()) { return(false); } return(true); } case 0x35: { SLevelContext curLvelContext = Singleton <BattleLogic> .GetInstance().GetCurLvelContext(); if (curLvelContext == null) { return(false); } return(curLvelContext.IsMultilModeWithWarmBattle()); } case 0x36: { bool flag12 = false; CRoleInfo info13 = Singleton <CRoleInfoManager> .GetInstance().GetMasterRoleInfo(); if (info13 != null) { flag12 = info13.IsGuidedStateSet(0x62); } return(flag12); } case 0x37: return(CBattleGuideManager.EnableHeroVictoryTips()); case 0x38: return(Singleton <GameReplayModule> .GetInstance().HasRecord); default: return(false); } if (flag6) { AvailableHeroId = dwCfgID; } return(flag6); Label_057D: return(false); }