// 分配SeasonTable任务 public void SeasonTableAssignTask(BRBaseParam param, Dictionary <string, List <string> > taskDic) { foreach (var kv in taskDic) { if (kv.Key == "add") { kv.Value.ForEach(o => { SeasonTableParam st = param.CopyCreateParam <SeasonTableParam>(); st.SeasonTypeId = "21"; st.TableId = o; LeagueManager.AddOrUpdateParam(st); }); } else { kv.Value.ForEach(o => { SeasonTableParam st = param.CopyCreateParam <SeasonTableParam>(); st.SeasonTypeId = "21"; st.TableId = o; LeagueManager.RemoveParam(st); }); } } }
// 分配SeasonType任务 public void SeasonTypeAssignTask(BRBaseParam param, Dictionary <string, List <string> > taskDic) { // 更新SeasonType任务,除了21类型,将在后面添加,因为需要tableId参数 foreach (var kv in taskDic) { if (kv.Key == "add") { kv.Value.ForEach(o => { SeasonTypeParam st = param.CopyCreateParam <SeasonTypeParam>(); st.SeasonTypeId = o; if (o != "21") { LeagueManager.AddOrUpdateParam(st); } }); } else { kv.Value.ForEach(o => { SeasonTypeParam st = param.CopyCreateParam <SeasonTypeParam>(); st.SeasonTypeId = o; LeagueManager.RemoveParam(st); }); } } }
// 分配Team任务 private void TeamAssignTask(BRBaseParam param, Dictionary <string, List <string> > taskDic) { foreach (var kv in taskDic) { if (kv.Key == "add") { kv.Value.ForEach(o => { TeamParam tp = param.CopyCreateParam <TeamParam>(); tp.TeamId = o; TeamManager.AddOrUpdateParam(tp); }); } else { kv.Value.ForEach(o => { TeamParam tp = param.CopyCreateParam <TeamParam>(); tp.TeamId = o; TeamManager.RemoveParam(tp); }); } } }