Esempio n. 1
0
 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]);
 }
Esempio n. 2
0
        public void AddTeamData(TeamProtoData data)
        {
            SortedDictionary <FormationPosition, uint> teamDic = new SortedDictionary <FormationPosition, uint>();

            for (int j = 0, count2 = data.posList.Count; j < count2; j++)
            {
                teamDic.Add((FormationPosition)data.posList[j].posIndex, (uint)data.posList[j].heroId);
            }
            FormationTeamInfo info = new FormationTeamInfo((FormationTeamType)data.teamNo, data.lineupNo, teamDic);

            _formationTeamDictionary[(FormationTeamType)data.teamNo] = info;
        }
Esempio n. 3
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;
        }