| | |
| | | return SatisfyCondition(config.EffectValueA1, config.EffectValueB1, out _place, out _hole);
|
| | | }
|
| | |
|
| | | /*旧版红点规则
|
| | | public void OnUpdateRedPoint()
|
| | | {
|
| | | if (!FuncOpen.Instance.IsFuncOpen((int)FuncOpenEnum.Gem))
|
| | | {
|
| | | return;
|
| | | }
|
| | | UpdateHoleRedpoint(presentGemEquip);
|
| | | for (int i = 1; i <= 10; i++)
|
| | | {
|
| | | ItemModel item = playerPack.GetItemModelByIndex(PackType.rptEquip, i);
|
| | | redpointList[i - 1].state = RedPointState.None;
|
| | | if (item != null)
|
| | | {
|
| | | ItemConfig itemCfg = Config.Instance.Get<ItemConfig>((int)item.itemInfo.ItemID);
|
| | | List<ItemModel> list = IsBagHaveGem(FuncConfigConfig.GetGemTypeByEquipPos(item.itemInfo.ItemPlace));
|
| | | if (list == null || list.Count == 0) continue;
|
| | | uint[] stones = PlayerStoneData.Instance.GetStoneInfo(i);
|
| | | for (int j = 0; j < 4; j++)
|
| | | {
|
| | | if (j == 3)
|
| | | {
|
| | | if (PlayerDatas.Instance.baseData.VIPLv < gemVipHoleLv || itemCfg.LV < gemOpenArray[0])
|
| | | {
|
| | | continue;
|
| | | }
|
| | | }
|
| | | else
|
| | | {
|
| | | if (itemCfg.LV < gemOpenArray[j])
|
| | | {
|
| | | continue;
|
| | | }
|
| | | }
|
| | | if ((stones == null || stones[j] == 0) && list.Count > 0)
|
| | | {
|
| | | redpointList[i - 1].state = RedPointState.Simple;
|
| | | break;
|
| | | }
|
| | | else
|
| | | {
|
| | | bool _replace = false;
|
| | | foreach (var gemItem in list)
|
| | | {
|
| | | if (gemItem.itemInfo.ItemID > stones[j])
|
| | | {
|
| | | redpointList[i - 1].state = RedPointState.Simple;
|
| | | _replace = true;
|
| | | break;
|
| | | }
|
| | | }
|
| | | if (!_replace && IsSatisfyGemCompose(i, j, (int)stones[j]))
|
| | | {
|
| | | redpointList[i - 1].state = RedPointState.Simple;
|
| | | continue;
|
| | | }
|
| | | }
|
| | | }
|
| | | }
|
| | | }
|
| | | }
|
| | |
|
| | | public void UpdateHoleRedpoint(int _index)
|
| | | {
|
| | | for (int i = 0; i < gemHoleReds.Count; i++)
|
| | | {
|
| | | gemHoleReds[i].state = RedPointState.None;
|
| | | gemComposeReds[i].state = RedPointState.None;
|
| | | }
|
| | | if (!FuncOpen.Instance.IsFuncOpen((int)FuncOpenEnum.Gem))
|
| | | {
|
| | | return;
|
| | | }
|
| | | ItemModel item = playerPack.GetItemModelByIndex(PackType.rptEquip, _index);
|
| | | if (item != null)
|
| | | {
|
| | | ItemConfig itemCfg = Config.Instance.Get<ItemConfig>((int)item.itemInfo.ItemID);
|
| | | List<ItemModel> list = IsBagHaveGem(FuncConfigConfig.GetGemTypeByEquipPos(item.itemInfo.ItemPlace));
|
| | | if (list == null || list.Count == 0)
|
| | | {
|
| | | return;
|
| | | }
|
| | | uint[] stones = PlayerStoneData.Instance.GetStoneInfo(_index);
|
| | | for (int j = 0; j < 4; j++)
|
| | | {
|
| | | if (j == 3)
|
| | | {
|
| | | if (PlayerDatas.Instance.baseData.VIPLv < gemVipHoleLv || itemCfg.LV < gemOpenArray[0])
|
| | | {
|
| | | continue;
|
| | | }
|
| | | }
|
| | | else
|
| | | {
|
| | | if (itemCfg.LV < gemOpenArray[j])
|
| | | {
|
| | | continue;
|
| | | }
|
| | | }
|
| | | if ((stones == null || stones[j] == 0) && list.Count > 0)
|
| | | {
|
| | | gemHoleReds[j].state = RedPointState.Simple;
|
| | | continue;
|
| | | }
|
| | | else
|
| | | {
|
| | | bool _replace = false;
|
| | | foreach (var gemItem in list)
|
| | | {
|
| | | if (gemItem.itemInfo.ItemID > stones[j])
|
| | | {
|
| | | gemHoleReds[j].state = RedPointState.Simple;
|
| | | _replace = true;
|
| | | break;
|
| | | }
|
| | | }
|
| | | if (!_replace && IsSatisfyGemCompose(_index, j, (int)stones[j]))
|
| | | {
|
| | | gemComposeReds[j].state = RedPointState.Simple;
|
| | | gemHoleReds[j].state = RedPointState.Simple;
|
| | | continue;
|
| | | }
|
| | | }
|
| | | }
|
| | | }
|
| | | }*/
|
| | |
|
| | | private Dictionary<int, Dictionary<int, bool>> gemHoleRedpoints = new Dictionary<int, Dictionary<int, bool>>();
|
| | |
|
| | | public void OnUpdateRedPoint()
|