| | |
| | | { |
| | | //古宝ID:[星级,等级, 特殊层] |
| | | Dictionary<int, GubaoInfo> gubaoDict = new Dictionary<int, GubaoInfo>(); |
| | | public Dictionary<int, long> gubaoAllAttrDict = new Dictionary<int, long>(); |
| | | |
| | | public Dictionary<int, long> gubaoAllAttrDict = new Dictionary<int, long>(); |
| | | |
| | | public event Action UpdateGubaoEvent; |
| | | public int waitActiveGubao; |
| | | public int selectGubao; //从藏宝阁选中 |
| | |
| | | } |
| | | UpdateRedpoint(); |
| | | RefreshAllAttr(); |
| | | GubaoCallRedPoint(); |
| | | } |
| | | |
| | | |
| | |
| | | { |
| | | if (GetGubaoCntByStar(config.GubaoQuality, starConfig.Condition[1]) < starConfig.Condition[0]) |
| | | { |
| | | return false; |
| | | } |
| | | return false; |
| | | } |
| | | } |
| | | |
| | | if (starConfig.StarUPNeedSelfCnt > 0 && |
| | |
| | | { |
| | | continue; |
| | | } |
| | | |
| | | |
| | | if (gubaoAllAttrDict.ContainsKey(attrCfg.ResonanceAttrIDList[0])) |
| | | { |
| | | gubaoAllAttrDict[attrCfg.ResonanceAttrIDList[0]] += attrCfg.ResonanceAttrValueList[0]; |
| | |
| | | } |
| | | } |
| | | } |
| | | |
| | | |
| | | public long GetAttrValue(int attrID) |
| | | { |
| | | gubaoAllAttrDict.TryGetValue(attrID, out long value); |
| | |
| | | Redpoint gubaoLVRP = new Redpoint(MainRedDot.RedPoint_GuaBao * 10 + 1, MainRedDot.RedPoint_GuaBao * 100 + 1); //升级 |
| | | Redpoint gubaoStarRP = new Redpoint(MainRedDot.RedPoint_GuaBao * 10 + 1, MainRedDot.RedPoint_GuaBao * 100 + 2); //升星 |
| | | |
| | | Redpoint gbCall1RP = new Redpoint(MainRedDot.RedPoint_GuaBao * 10 + 2, (MainRedDot.RedPoint_GuaBao * 10 + 2) * 10 + 1); //1抽 |
| | | Redpoint gbCallFreeRP = new Redpoint(MainRedDot.RedPoint_GuaBao * 10 + 2, (MainRedDot.RedPoint_GuaBao * 10 + 2) * 10 + 1); //免费抽 |
| | | Redpoint gbCall10RP = new Redpoint(MainRedDot.RedPoint_GuaBao * 10 + 2, (MainRedDot.RedPoint_GuaBao * 10 + 2) * 10 + 2); //10抽 |
| | | public void UpdateRedpoint() |
| | | { |
| | |
| | | gubaoStarRP.state = RedPointState.None; |
| | | if (!FuncOpen.Instance.IsFuncOpen((int)FuncOpenEnum.GuaBao)) |
| | | return; |
| | | |
| | | |
| | | var keys = GubaoConfig.GetKeys(); |
| | | for (int i = 0; i < keys.Count; i++) |
| | | { |
| | |
| | | gubaoStarRP.state = RedPointState.Simple; |
| | | } |
| | | } |
| | | |
| | | |
| | | } |
| | | |
| | | |
| | | public void GubaoCallRedPoint() |
| | | { |
| | | if (!FuncOpen.Instance.IsFuncOpen((int)FuncOpenEnum.HappyFindTreasure)) |
| | | return; |
| | | if (!FuncOpen.Instance.IsFuncOpen((int)FuncOpenEnum.Hero)) |
| | | return; |
| | | |
| | | |
| | | // 免费 10连 |
| | | gbCallFreeRP.state = RedPointState.None; |
| | | gbCall10RP.state = RedPointState.None; |
| | | |
| | | |
| | | if (HappyXBModel.Instance.IsHaveFreeXB((int)HappXBTitle.Gubao)) |
| | | { |
| | | gbCallFreeRP.state = PlayerDatas.Instance.baseData.realmLevel >= 1 ?RedPointState.GetReward : RedPointState.Simple; |
| | | } |
| | | |
| | | if (HappyXBModel.Instance.IsHaveManyXBToolEx((int)HappXBTitle.Gubao, out int xbtoolCnt, out int needtoolCnt, out int needMoney)) |
| | | { |
| | | gbCall10RP.state = PlayerDatas.Instance.baseData.realmLevel >= 1 ?RedPointState.GetReward : RedPointState.Simple; |
| | | return; |
| | | } |
| | | } |
| | | #endregion |
| | | } |
| | | |