| | |
| | | // 所在阵容信息列表 [阵容类型*10000+阵型类型*100+位置编号, ...] |
| | | int teamType = teamMsg / 10000; |
| | | int shapeType = (teamMsg % 10000) / 100; |
| | | int positionIndex = teamMsg % 100; |
| | | int positionIndex = teamMsg % 100 - 1; //布阵位置:服务端为 1 客户端为0 |
| | | |
| | | if (teamTypeShapeTypePositionDict.ContainsKey((TeamType)teamType)) |
| | | { |
| | |
| | | else |
| | | { |
| | | // 队伍里有这个英雄,但是在队伍信息里没有了 置空 (被移出队伍) |
| | | team.SetTeamHero(teamHero.positionNum, null); |
| | | team.RemoveHero(teamHero.positionNum); |
| | | } |
| | | } |
| | | // 原来队伍里没这个英雄 |
| | |
| | | if (teamTypeShapeTypePositionDict.ContainsKey(team.teamType)) |
| | | { |
| | | KeyValuePair<int, int> shapeTypePosition = teamTypeShapeTypePositionDict[team.teamType]; |
| | | team.RefreshServerData(shapeTypePosition.Key, shapeTypePosition.Value, null); |
| | | team.RefreshServerData(shapeTypePosition.Key, shapeTypePosition.Value, heroInfo); |
| | | } |
| | | } |
| | | } |
| | |
| | | // 所在阵容信息列表 [阵容类型*10000+阵型类型*100+位置编号, ...] |
| | | int teamType = teamMsg / 10000; |
| | | int shapeType = (teamMsg % 10000) / 100; |
| | | int positionIndex = teamMsg % 100; |
| | | int positionIndex = teamMsg % 100 - 1; //布阵位置:服务端为 1 客户端为0 |
| | | |
| | | TeamBase team = GetTeam((TeamType)teamType); |
| | | |
| | |
| | | { |
| | | team = new TeamBase(teamType); |
| | | // team.CreateDefault(HeroManager.Instance.GetPowerfulHeroList()); |
| | | // teamDict.Add(teamType, team); |
| | | teamDict.Add(teamType, team); |
| | | } |
| | | |
| | | return team; |