Merge branch 'master' of http://60.1.1.230/backend/jieling_server
commit
d23e966a9f
|
|
@ -26,6 +26,22 @@ public class SGuildSetting implements BaseConfig {
|
||||||
|
|
||||||
private int beApplyLimit;
|
private int beApplyLimit;
|
||||||
|
|
||||||
|
private int[] totemCost;
|
||||||
|
|
||||||
|
private int[] guildWarOpenTime;
|
||||||
|
|
||||||
|
private int[] prepareTime;
|
||||||
|
|
||||||
|
private int[] starNum;
|
||||||
|
|
||||||
|
private int defendNum;
|
||||||
|
|
||||||
|
private int attackNum;
|
||||||
|
|
||||||
|
private int[] buildingStar;
|
||||||
|
|
||||||
|
private int[][] buildingBuff;
|
||||||
|
|
||||||
public static SGuildSetting sGuildSetting;
|
public static SGuildSetting sGuildSetting;
|
||||||
|
|
||||||
|
|
||||||
|
|
@ -71,4 +87,36 @@ public class SGuildSetting implements BaseConfig {
|
||||||
public int getBeApplyLimit() {
|
public int getBeApplyLimit() {
|
||||||
return beApplyLimit;
|
return beApplyLimit;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public int[] getTotemCost() {
|
||||||
|
return totemCost;
|
||||||
|
}
|
||||||
|
|
||||||
|
public int[] getGuildWarOpenTime() {
|
||||||
|
return guildWarOpenTime;
|
||||||
|
}
|
||||||
|
|
||||||
|
public int[] getPrepareTime() {
|
||||||
|
return prepareTime;
|
||||||
|
}
|
||||||
|
|
||||||
|
public int[] getStarNum() {
|
||||||
|
return starNum;
|
||||||
|
}
|
||||||
|
|
||||||
|
public int getDefendNum() {
|
||||||
|
return defendNum;
|
||||||
|
}
|
||||||
|
|
||||||
|
public int getAttackNum() {
|
||||||
|
return attackNum;
|
||||||
|
}
|
||||||
|
|
||||||
|
public int[] getBuildingStar() {
|
||||||
|
return buildingStar;
|
||||||
|
}
|
||||||
|
|
||||||
|
public int[][] getBuildingBuff() {
|
||||||
|
return buildingBuff;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
@ -1,6 +1,8 @@
|
||||||
package com.ljsd.jieling.core;
|
package com.ljsd.jieling.core;
|
||||||
|
|
||||||
import com.ljsd.GameApplication;
|
import com.ljsd.GameApplication;
|
||||||
|
import com.ljsd.jieling.config.SChallengeConfig;
|
||||||
|
import com.ljsd.jieling.config.SChallengeMapConfig;
|
||||||
import com.ljsd.jieling.config.SGlobalSystemConfig;
|
import com.ljsd.jieling.config.SGlobalSystemConfig;
|
||||||
import com.ljsd.jieling.db.mongo.MongoUtil;
|
import com.ljsd.jieling.db.mongo.MongoUtil;
|
||||||
import com.ljsd.jieling.globals.Global;
|
import com.ljsd.jieling.globals.Global;
|
||||||
|
|
@ -38,6 +40,15 @@ public class HandlerLogicThread extends Thread{
|
||||||
whiteMsg.add(MessageTypeProto.MessageType.FIGHT_END_REQUEST_VALUE);
|
whiteMsg.add(MessageTypeProto.MessageType.FIGHT_END_REQUEST_VALUE);
|
||||||
whiteMsg.add(MessageTypeProto.MessageType.MAP_OUT_REQUEST_VALUE);
|
whiteMsg.add(MessageTypeProto.MessageType.MAP_OUT_REQUEST_VALUE);
|
||||||
|
|
||||||
|
whiteMsg.add(MessageTypeProto.MessageType.MAP_TOWER_CALL_CHIEF_REQUEST_VALUE);
|
||||||
|
whiteMsg.add(MessageTypeProto.MessageType.MAP_TOWER_USEBOMB_REQUEST_VALUE);
|
||||||
|
whiteMsg.add(MessageTypeProto.MessageType.MAP_TOWER_USEBUFF_REQUEST_VALUE);
|
||||||
|
whiteMsg.add(MessageTypeProto.MessageType.ENDLESS_MAP_RESET_REQUEST_VALUE);
|
||||||
|
whiteMsg.add(MessageTypeProto.MessageType.ENDLESS_MAP_SIGN_REQUEST_VALUE);
|
||||||
|
whiteMsg.add(MessageTypeProto.MessageType.ENDLESS_EXECUTION_REFRESH_REQUEST_VALUE);
|
||||||
|
whiteMsg.add(MessageTypeProto.MessageType.ENDLESS_OUT_CONSUME_REQUEST_VALUE);
|
||||||
|
whiteMsg.add(MessageTypeProto.MessageType.ENDLESS_MAP_HERO_INFO_REQUEST_VALUE);
|
||||||
|
|
||||||
whiteMsg.add(MessageTypeProto.MessageType.LOGIN_REQUEST_VALUE);
|
whiteMsg.add(MessageTypeProto.MessageType.LOGIN_REQUEST_VALUE);
|
||||||
whiteMsg.add(MessageTypeProto.MessageType.GET_PLAYERINFO_REQUEST_VALUE);
|
whiteMsg.add(MessageTypeProto.MessageType.GET_PLAYERINFO_REQUEST_VALUE);
|
||||||
whiteMsg.add(MessageTypeProto.MessageType.GET_ITEMINFO_REQUEST_VALUE);
|
whiteMsg.add(MessageTypeProto.MessageType.GET_ITEMINFO_REQUEST_VALUE);
|
||||||
|
|
@ -58,6 +69,9 @@ public class HandlerLogicThread extends Thread{
|
||||||
whiteMsg.add(MessageTypeProto.MessageType.GET_RINGFIRE_INFO_REQUEST_VALUE);
|
whiteMsg.add(MessageTypeProto.MessageType.GET_RINGFIRE_INFO_REQUEST_VALUE);
|
||||||
|
|
||||||
whiteMsg.add(MessageTypeProto.MessageType.BUY_STORE_ITEM_REQUEST_VALUE);
|
whiteMsg.add(MessageTypeProto.MessageType.BUY_STORE_ITEM_REQUEST_VALUE);
|
||||||
|
|
||||||
|
whiteMsg.add(MessageTypeProto.MessageType.GET_MISSION_REQUEST_VALUE);
|
||||||
|
whiteMsg.add(MessageTypeProto.MessageType.REFRESH_ITEM_NUM_REQUEST_VALUE);
|
||||||
//日后删除
|
//日后删除
|
||||||
whiteMsg.add(MessageTypeProto.MessageType.GET_CHAT_MESSAGE_REQUEST_VALUE);
|
whiteMsg.add(MessageTypeProto.MessageType.GET_CHAT_MESSAGE_REQUEST_VALUE);
|
||||||
|
|
||||||
|
|
@ -65,6 +79,7 @@ public class HandlerLogicThread extends Thread{
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
public ConcurrentLinkedQueue<PacketNetData> handlerLinkedQueue = new ConcurrentLinkedQueue();
|
public ConcurrentLinkedQueue<PacketNetData> handlerLinkedQueue = new ConcurrentLinkedQueue();
|
||||||
|
|
||||||
|
|
@ -101,11 +116,11 @@ public class HandlerLogicThread extends Thread{
|
||||||
MessageUtil.sendErrorResponse(session,0,msgId+1,"funciton not");
|
MessageUtil.sendErrorResponse(session,0,msgId+1,"funciton not");
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
/* b = checkIsPermit(msgId, session);
|
b = checkIsPermit(msgId, session);
|
||||||
if(!b){
|
if(!b){
|
||||||
MessageUtil.sendErrorResponse(session,0,msgId+1,"在地图探索中,不可以操作");
|
MessageUtil.sendErrorResponse(session,0,msgId+1,"在地图探索中,不可以操作");
|
||||||
return;
|
return;
|
||||||
}*/
|
}
|
||||||
}
|
}
|
||||||
long curTimeMillis = System.currentTimeMillis();
|
long curTimeMillis = System.currentTimeMillis();
|
||||||
if(msgId != MessageTypeProto.MessageType.GET_CHAT_MESSAGE_REQUEST_VALUE){
|
if(msgId != MessageTypeProto.MessageType.GET_CHAT_MESSAGE_REQUEST_VALUE){
|
||||||
|
|
@ -133,6 +148,13 @@ public class HandlerLogicThread extends Thread{
|
||||||
int uid = session.getUid();
|
int uid = session.getUid();
|
||||||
User user = UserManager.getUser(uid);
|
User user = UserManager.getUser(uid);
|
||||||
int curMapId = user.getMapManager().getCurMapId();
|
int curMapId = user.getMapManager().getCurMapId();
|
||||||
|
|
||||||
|
if(curMapId!=0 && msgId == MessageTypeProto.MessageType.TEAM_POS_SAVE_REQUEST_VALUE){
|
||||||
|
SChallengeConfig sChallengeConfig = SChallengeConfig.sChallengeConfigs.get(curMapId);
|
||||||
|
if(sChallengeConfig.getType()==4){
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
}
|
||||||
if(curMapId!=0 && !whiteMsg.contains(msgId)){
|
if(curMapId!=0 && !whiteMsg.contains(msgId)){
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -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