public void InitConfigs(GM.DataCache.ConditionEvent data) { _groupDatas.Clear(); for (int i = 0; i < data.BuddyRunLength; i++) { //存入缓存 var cd = data.GetBuddyRun(i); //准备快捷数据 string[] ss = cd.BetAmount.Split(','); if (ss.Length != 3) { throw new System.Exception("表的BetAmount参数与约定的不同,请校验!"); } if (int.TryParse(ss[1], out int amt)) { var qd = new RacingGroupData(i + 1, cd.Player1, cd.Player2, cd.Player3, ss[0], amt); _groupDatas.Add(qd); qd.PrizePercent = cd.PrizePercent; qd.BetMaxTime = cd.BetMaxTime; //读取during qd.GuessStartTime = GetTimeFromDuring($"buddyrunsupport{i + 1}"); qd.RunStartTime = GetTimeFromDuring($"buddyruncalcresult{i + 1}"); qd.RunEndTime = GetTimeFromDuring($"buddyrunsendreward{i + 1}"); } else { throw new System.Exception("表的BetAmount参数与约定的不同,请校验!"); } } }
//处理人气值读取 private void HandleReadSupport(RacingGroupData gd, Hashtable data) { var supportResult = EB.Dot.Object("supportResult", data, null); if (supportResult != null) { foreach (DictionaryEntry it in supportResult) { int pid = int.Parse(it.Key as string); var pd = gd.GetPlayerData(pid); pd.Support = EB.Dot.Integer("times", it.Value, 0); } } }