public FormationTeamInfo GetFormationTeam(FormationTeamType type) { if (_formationTeamDictionary.ContainsKey(type)) { return(_formationTeamDictionary[type]); } _formationTeamDictionary[type] = new FormationTeamInfo(type, 0, new SortedDictionary <FormationPosition, uint>()); return(_formationTeamDictionary[type]); }
public bool IsTeamUnlocked(int teamIndex) { FormationTeamType type = (FormationTeamType)(teamIndex - 1 + (int)FormationTeamType.pveFirstTeam); if (!formationTeamDictionary.ContainsKey(type)) { return(false); } FormationTeamInfo info = formationTeamDictionary[type]; return(info.teamPosDictionary.Count != 0); }
public void AddTeamData(FormationTeamType type, LuaTable data) { SortedDictionary <FormationPosition, uint> teamDic = new SortedDictionary <FormationPosition, uint>(); LuaTable teamPosTable = (LuaTable)data["teamPosTable"]; foreach (DictionaryEntry value in teamPosTable.ToDictTable()) { teamDic.Add((FormationPosition)value.Key.ToString().ToInt32(), (uint)value.Value.ToString().ToInt32()); } FormationTeamInfo info = new FormationTeamInfo(type, data["formationId"].ToString().ToInt32(), teamDic); _formationTeamDictionary[type] = info; }
public FormationTeamInfo(FormationTeamType type, int formationId, SortedDictionary <FormationPosition, uint> teamPosDictionary) { this.formationId = formationId; this.type = type; this.teamPosDictionary = teamPosDictionary; }