| | |
| | | }
|
| | | private Dictionary<int, XBTypeInfo> xbTypeInfoDict = new Dictionary<int, XBTypeInfo>(); //抽奖状态相关的 服务器记录
|
| | |
|
| | | public int lhQuality;
|
| | |
|
| | | public override void Init()
|
| | | {
|
| | | DTC0102_tagCDBPlayer.beforePlayerDataInitializeEvent += OnBeforePlayerDataInitialize;
|
| | |
| | |
|
| | | xbTypeItemDict[list[i].TreasureType].Add(list[i]);
|
| | | }
|
| | |
|
| | | var config = FuncConfigConfig.Get("HeroCall");
|
| | | lhQuality = int.Parse(config.Numerical1);
|
| | | }
|
| | |
|
| | | public override void Release()
|
| | |
| | | }
|
| | |
|
| | |
|
| | | public int GetFreeCountToday(int type)
|
| | | {
|
| | | XBTypeInfo typeInfo = GetXBInfoByType(type);
|
| | | if (typeInfo != null)
|
| | | {
|
| | | return typeInfo.freeCountToday;
|
| | | }
|
| | | |
| | | return 0;
|
| | | }
|
| | |
|
| | | public int GetDailyFreeCount(int type)
|
| | | {
|
| | | return TreasureSetConfig.Get(type).DailyFreeCount;
|
| | | }
|
| | |
|
| | | //获取还需多少次可得幸运奖励
|
| | | public int GetNextXBCountForBigAward(int type, out List<int> qualityList)
|
| | | {
|
| | | qualityList = new List<int>();
|
| | | XBTypeInfo typeInfo = GetXBInfoByType(type);
|
| | | if (typeInfo == null)
|
| | | {
|
| | | return 0;
|
| | | }
|
| | |
|
| | | var xbConfig = GetXBItemConfigByType(type);
|
| | | var luckList = xbConfig.LuckyItemRateInfo.Keys.ToList();
|
| | | luckList.Sort();
|
| | | //按阶梯显示
|
| | | for (int i = 0; i < luckList.Count; i++)
|
| | | {
|
| | | if (typeInfo.luckValue < luckList[i])
|
| | | {
|
| | | //把二维数组里的所有第二个元素组成新列表
|
| | | qualityList = xbConfig.LuckyItemRateInfo[luckList[i]].Select(x => x[1]).ToList();
|
| | | qualityList.Sort();
|
| | | return luckList[i] - typeInfo.luckValue;
|
| | | }
|
| | | }
|
| | | return 0;
|
| | | }
|
| | |
|
| | |
|
| | | public bool CheckIsXBTool(int itemId, int type)
|
| | | {
|
| | | var funcSet = TreasureSetConfig.Get(type);
|
| | |
| | | //英雄招募
|
| | | public void HeroCallRedPoint()
|
| | | {
|
| | | if (!FuncOpen.Instance.IsFuncOpen((int)FuncOpenEnum.HappyFindTreasure)) return;
|
| | | if (!FuncOpen.Instance.IsFuncOpen((int)FuncOpenEnum.HappyFindTreasure))
|
| | | return;
|
| | | if (!FuncOpen.Instance.IsFuncOpen((int)FuncOpenEnum.Hero))
|
| | | return;
|
| | |
|
| | | // 免费 10连 积分
|
| | | bestXB10Red.state = RedPointState.None;
|
| | | bestXBFreeRed.state = RedPointState.None;
|