|  |  |  | 
|---|
|  |  |  | //排行榜活动的商店 | 
|---|
|  |  |  | public int rankActStore_MoneyType; | 
|---|
|  |  |  | public int rankActStore_StoreType; | 
|---|
|  |  |  | public Operation rankActStore_ActType; | 
|---|
|  |  |  | public OperationType rankActStore_ActType; | 
|---|
|  |  |  |  | 
|---|
|  |  |  | public override void Init() | 
|---|
|  |  |  | { | 
|---|
|  |  |  | 
|---|
|  |  |  |  | 
|---|
|  |  |  | #endregion | 
|---|
|  |  |  |  | 
|---|
|  |  |  | private ulong _price; | 
|---|
|  |  |  | private long _price; | 
|---|
|  |  |  | public void SendBuyShopItem(StoreConfig model, int count) | 
|---|
|  |  |  | { | 
|---|
|  |  |  |  | 
|---|
|  |  |  | _price = (ulong)(model.MoneyNumber * count); | 
|---|
|  |  |  | _price = model.MoneyNumber * count; | 
|---|
|  |  |  |  | 
|---|
|  |  |  | if (MoneyIsEnough(model.MoneyType, _price)) | 
|---|
|  |  |  | { | 
|---|
|  |  |  | 
|---|
|  |  |  | } | 
|---|
|  |  |  |  | 
|---|
|  |  |  | //仙玉购买物品的二次确认框,一级货币只有仙玉 默认为仙玉即可 | 
|---|
|  |  |  | Dictionary<int, bool> buyItemCheckDict = new Dictionary<int, bool>(); | 
|---|
|  |  |  | //type 对应枚举 BuyStoreItemCheckType 方便记忆 | 
|---|
|  |  |  | public void SendBuyShopItemWithPopCheck(StoreConfig model, int count, int type = 0) | 
|---|
|  |  |  | Dictionary<int, bool> buyItemCheckDict = new Dictionary<int, bool>();   //记录勾选信息 | 
|---|
|  |  |  | //eventType 二次确认框类型,对应枚举 BuyStoreItemCheckType | 
|---|
|  |  |  | public void SendBuyShopItemWithPopCheck(StoreConfig model, int count, int eventType = 0) | 
|---|
|  |  |  | { | 
|---|
|  |  |  | if (model.MoneyNumber == 0) | 
|---|
|  |  |  | { | 
|---|
|  |  |  | 
|---|
|  |  |  | return; | 
|---|
|  |  |  | } | 
|---|
|  |  |  |  | 
|---|
|  |  |  | if (buyItemCheckDict.ContainsKey(type) && buyItemCheckDict[type]) | 
|---|
|  |  |  | if (buyItemCheckDict.ContainsKey(eventType) && buyItemCheckDict[eventType]) | 
|---|
|  |  |  | { | 
|---|
|  |  |  | SendBuyShopItem(model, count); | 
|---|
|  |  |  | return; | 
|---|
|  |  |  | 
|---|
|  |  |  | if (isOk) | 
|---|
|  |  |  | { | 
|---|
|  |  |  | SendBuyShopItem(model, count); | 
|---|
|  |  |  | buyItemCheckDict[type] = isToggle; | 
|---|
|  |  |  | buyItemCheckDict[eventType] = isToggle; | 
|---|
|  |  |  | } | 
|---|
|  |  |  |  | 
|---|
|  |  |  | })); | 
|---|
|  |  |  | } | 
|---|
|  |  |  |  | 
|---|
|  |  |  | //花仙玉购买的二次确认框(本次登录) 默认提示 MysticalQG104   是否花费<color=#109d06>{0}</color>仙玉进行购买? | 
|---|
|  |  |  | //type 对应枚举 BuyStoreItemCheckType 方便记忆 | 
|---|
|  |  |  | public void UseMoneyCheck(int money, Action func, int type = 0, string tip = "MysticalQG104", string fullTip = "") | 
|---|
|  |  |  | //花仙玉购买的二次确认框(本次登录) | 
|---|
|  |  |  | //eventType 二次确认框类型,对应枚举 BuyStoreItemCheckType | 
|---|
|  |  |  | public void UseMoneyCheck(int money, int moneyType, Action func, int eventType = 0, string tip = "CostMoney", string fullTip = "") | 
|---|
|  |  |  | { | 
|---|
|  |  |  | if (money == 0) | 
|---|
|  |  |  | { | 
|---|
|  |  |  | 
|---|
|  |  |  | return; | 
|---|
|  |  |  | } | 
|---|
|  |  |  |  | 
|---|
|  |  |  | if (buyItemCheckDict.ContainsKey(type) && buyItemCheckDict[type]) | 
|---|
|  |  |  | if (buyItemCheckDict.ContainsKey(eventType) && buyItemCheckDict[eventType]) | 
|---|
|  |  |  | { | 
|---|
|  |  |  | func?.Invoke(); | 
|---|
|  |  |  | return; | 
|---|
|  |  |  | } | 
|---|
|  |  |  |  | 
|---|
|  |  |  | ConfirmCancel.ToggleConfirmCancel(Language.Get("Mail101"), fullTip == "" ? Language.Get(tip, money) : fullTip, | 
|---|
|  |  |  | ConfirmCancel.ToggleConfirmCancel(Language.Get("Mail101"), fullTip == "" ? Language.Get(tip, money, moneyType) : fullTip, | 
|---|
|  |  |  | Language.Get("ConfirmCancel102"), (bool isOk, bool isToggle) => | 
|---|
|  |  |  | { | 
|---|
|  |  |  | if (isOk) | 
|---|
|  |  |  | { | 
|---|
|  |  |  | func?.Invoke(); | 
|---|
|  |  |  | buyItemCheckDict[type] = isToggle; | 
|---|
|  |  |  | buyItemCheckDict[eventType] = isToggle; | 
|---|
|  |  |  | } | 
|---|
|  |  |  |  | 
|---|
|  |  |  | }); | 
|---|
|  |  |  | 
|---|
|  |  |  | } | 
|---|
|  |  |  |  | 
|---|
|  |  |  |  | 
|---|
|  |  |  | public bool MoneyIsEnough(int moneyType, ulong money) | 
|---|
|  |  |  | public bool MoneyIsEnough(int moneyType, long money) | 
|---|
|  |  |  | { | 
|---|
|  |  |  | if (UIHelper.GetMoneyCnt(moneyType) < money) | 
|---|
|  |  |  | { | 
|---|
|  |  |  | 
|---|
|  |  |  | UpdateMustBuyRedpoint(); | 
|---|
|  |  |  | UpdateDailyRedpoinit(); | 
|---|
|  |  |  | break; | 
|---|
|  |  |  | case FuncOpenEnum.BlastFurnace: | 
|---|
|  |  |  | ControllerRedPoint(); | 
|---|
|  |  |  | break; | 
|---|
|  |  |  | // case FuncOpenEnum.BlastFurnace: | 
|---|
|  |  |  | //     ControllerRedPoint(); | 
|---|
|  |  |  | //     break; | 
|---|
|  |  |  | } | 
|---|
|  |  |  | } | 
|---|
|  |  |  |  | 
|---|
|  |  |  | 
|---|
|  |  |  | public void ControllerRedPoint(bool isLook = false) | 
|---|
|  |  |  | { | 
|---|
|  |  |  | fairyStoreRemindRedpoint.state = RedPointState.None; | 
|---|
|  |  |  | if (!FairyModel.Instance.fairyStoreOpen | 
|---|
|  |  |  | || !FuncOpen.Instance.IsFuncOpen((int)FuncOpenEnum.BlastFurnace)) | 
|---|
|  |  |  | { | 
|---|
|  |  |  | return; | 
|---|
|  |  |  | } | 
|---|
|  |  |  | // if (!FairyModel.Instance.fairyStoreOpen | 
|---|
|  |  |  | //     || !FuncOpen.Instance.IsFuncOpen((int)FuncOpenEnum.BlastFurnace)) | 
|---|
|  |  |  | // { | 
|---|
|  |  |  | //     return; | 
|---|
|  |  |  | // } | 
|---|
|  |  |  |  | 
|---|
|  |  |  | int familyLv = PlayerDatas.Instance.fairyData.fairy.FamilyLV; | 
|---|
|  |  |  | if (!isLook) | 
|---|
|  |  |  | 
|---|
|  |  |  | { | 
|---|
|  |  |  | if (!TryGetIsSellOut(storeConfig, out remainNum)) | 
|---|
|  |  |  | { | 
|---|
|  |  |  | if (UIHelper.GetMoneyCnt(storeConfig.MoneyType) >= (ulong)storeConfig.MoneyNumber) | 
|---|
|  |  |  | if (UIHelper.GetMoneyCnt(storeConfig.MoneyType) >= storeConfig.MoneyNumber) | 
|---|
|  |  |  | { | 
|---|
|  |  |  | shopRedDict[storeConfig.ID].state = RedPointState.Simple; | 
|---|
|  |  |  | } | 
|---|
|  |  |  | 
|---|
|  |  |  | { | 
|---|
|  |  |  | break; | 
|---|
|  |  |  | } | 
|---|
|  |  |  | if (!MoneyIsEnough(config.MoneyType, (ulong)config.MoneyNumber)) | 
|---|
|  |  |  | if (!MoneyIsEnough(config.MoneyType, config.MoneyNumber)) | 
|---|
|  |  |  | { | 
|---|
|  |  |  | break; | 
|---|
|  |  |  | } | 
|---|