back_recharge
parent
a1db43c4e3
commit
bf01f7443e
|
|
@ -101,10 +101,13 @@ public class MapLogic {
|
||||||
initMap(mapManager, user);
|
initMap(mapManager, user);
|
||||||
user.setMapManager(mapManager);
|
user.setMapManager(mapManager);
|
||||||
}*/
|
}*/
|
||||||
|
MapInfoProto.MapEnterResponse.Builder mapEnterResponse = MapInfoProto.MapEnterResponse.newBuilder();
|
||||||
|
SChallengeMapConfig sChallengeMapConfig = SChallengeMapConfig.integerSChallengeMapConfigMap.get(mapManager.getCurMapId());
|
||||||
// 进入新地图
|
// 进入新地图
|
||||||
SChallengeConfig sChallengeConfig = SChallengeConfig.sChallengeConfigs.get(mapId);
|
SChallengeConfig sChallengeConfig = SChallengeConfig.sChallengeConfigs.get(mapId);
|
||||||
int type = sChallengeConfig.getType();
|
int type = sChallengeConfig.getType();
|
||||||
if (mapManager.getCurMapId() == 0) {
|
if (mapManager.getCurMapId() == 0) {
|
||||||
|
mapEnterResponse.setCurXY(CellUtil.xy2Pos(sChallengeMapConfig.getPosition()[0],sChallengeMapConfig.getPosition()[1]));
|
||||||
Map<Integer, SCMap> scMap = SCMap.sCMap.get(mapId);
|
Map<Integer, SCMap> scMap = SCMap.sCMap.get(mapId);
|
||||||
if (scMap == null) {
|
if (scMap == null) {
|
||||||
LOGGER.info("enterMap() uid=>{} scMap == null =>{} ", uid, mapId);
|
LOGGER.info("enterMap() uid=>{} scMap == null =>{} ", uid, mapId);
|
||||||
|
|
@ -188,9 +191,7 @@ public class MapLogic {
|
||||||
MessageUtil.sendErrorResponse(iSession, 0, messageType.getNumber(), "地图错误,应进入" + mapManager.getCurMapId());
|
MessageUtil.sendErrorResponse(iSession, 0, messageType.getNumber(), "地图错误,应进入" + mapManager.getCurMapId());
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
MapInfoProto.MapEnterResponse.Builder mapEnterResponse = MapInfoProto.MapEnterResponse.newBuilder();
|
|
||||||
SChallengeMapConfig sChallengeMapConfig = SChallengeMapConfig.integerSChallengeMapConfigMap.get(mapManager.getCurMapId());
|
|
||||||
mapEnterResponse.setCurXY(CellUtil.xy2Pos(sChallengeMapConfig.getPosition()[0],sChallengeMapConfig.getPosition()[1]));
|
|
||||||
|
|
||||||
if(type ==4){
|
if(type ==4){
|
||||||
List<TeamPosHeroInfo> teamPosForHero = user.getTeamPosManager().getTeamPosForHero().get(teamId);
|
List<TeamPosHeroInfo> teamPosForHero = user.getTeamPosManager().getTeamPosForHero().get(teamId);
|
||||||
|
|
|
||||||
|
|
@ -370,12 +370,15 @@ public class PlayerLogic {
|
||||||
CommonProto.TeamOneInfo.Builder oneInfo = CommonProto.TeamOneInfo.newBuilder()
|
CommonProto.TeamOneInfo.Builder oneInfo = CommonProto.TeamOneInfo.newBuilder()
|
||||||
.setHead(1)
|
.setHead(1)
|
||||||
.setHeadFrame(playerManager.getHeadFrame())
|
.setHeadFrame(playerManager.getHeadFrame())
|
||||||
.setName(playerManager.getNickName()).setUid(session.getUid()).setTeam(team);
|
.setName(playerManager.getNickName()).setUid(session.getUid());
|
||||||
|
CommonProto.TeamOneTeamInfo.Builder teamInfo = CommonProto.TeamOneTeamInfo.newBuilder();
|
||||||
|
teamInfo.setTeam(team);
|
||||||
if(teamPosManager.getTeamPosForPoken().get(1)!=null&&teamPosManager.getTeamPosForPoken().get(1).size()>0){
|
if(teamPosManager.getTeamPosForPoken().get(1)!=null&&teamPosManager.getTeamPosForPoken().get(1).size()>0){
|
||||||
for(TeamPosForPokenInfo posForPokenInfo:teamPosManager.getTeamPosForPoken().get(1)){
|
for(TeamPosForPokenInfo posForPokenInfo:teamPosManager.getTeamPosForPoken().get(1)){
|
||||||
oneInfo.addPokemonInfos(posForPokenInfo.getPokenId());
|
teamInfo.addPokemonInfos(posForPokenInfo.getPokenId());
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
oneInfo.setTeam(teamInfo);
|
||||||
PlayerInfoProto.GetPlayerOneTeamInfoResponse.Builder playerTeamInfo = PlayerInfoProto.GetPlayerOneTeamInfoResponse.newBuilder().setTeamInfo(oneInfo);
|
PlayerInfoProto.GetPlayerOneTeamInfoResponse.Builder playerTeamInfo = PlayerInfoProto.GetPlayerOneTeamInfoResponse.newBuilder().setTeamInfo(oneInfo);
|
||||||
|
|
||||||
MessageUtil.sendMessage(session,1,messageType.getNumber(),playerTeamInfo.build(),true);
|
MessageUtil.sendMessage(session,1,messageType.getNumber(),playerTeamInfo.build(),true);
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue