From 0132a2ff2c1cd653cc93902d878e11ce05a8a170 Mon Sep 17 00:00:00 2001 From: wangyuan Date: Fri, 26 Apr 2019 16:31:09 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E5=A4=8D=E6=8C=82=E6=9C=BA=E5=A5=96?= =?UTF-8?q?=E5=8A=B1=E5=92=8C=E5=9C=B0=E5=9B=BE=E6=8E=A2=E7=B4=A2optionId?= =?UTF-8?q?=E9=97=AE=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../jieling/handler/GetPlayerInfoHandler.java | 1 + .../ljsd/jieling/handler/map/EventType.java | 3 +- .../ljsd/jieling/handler/map/MapLogic.java | 28 ++++++------------- .../jieling/logic/activity/ActivityLogic.java | 4 +++ .../ljsd/jieling/logic/fight/CombatLogic.java | 8 ++++-- 5 files changed, 20 insertions(+), 24 deletions(-) diff --git a/serverlogic/src/main/java/com/ljsd/jieling/handler/GetPlayerInfoHandler.java b/serverlogic/src/main/java/com/ljsd/jieling/handler/GetPlayerInfoHandler.java index 792be9f4f..b227b7225 100644 --- a/serverlogic/src/main/java/com/ljsd/jieling/handler/GetPlayerInfoHandler.java +++ b/serverlogic/src/main/java/com/ljsd/jieling/handler/GetPlayerInfoHandler.java @@ -69,6 +69,7 @@ public class GetPlayerInfoHandler extends BaseHandler{ .build(); try { MessageUtil.sendMessage(iSession, 1, MessageTypeProto.MessageType.GET_PLAYERINFO_RESPONSE_VALUE, getPlayerInfoResponse, true); + ActivityLogic.getInstance().flushForLogin(user); LOGGER.info("back to client!"); } catch (Exception e) { e.printStackTrace(); diff --git a/serverlogic/src/main/java/com/ljsd/jieling/handler/map/EventType.java b/serverlogic/src/main/java/com/ljsd/jieling/handler/map/EventType.java index 1209b8a2f..431f1c75a 100644 --- a/serverlogic/src/main/java/com/ljsd/jieling/handler/map/EventType.java +++ b/serverlogic/src/main/java/com/ljsd/jieling/handler/map/EventType.java @@ -87,8 +87,9 @@ public class EventType { public static final int twentyNine = 29; public static final int thirty = 30; - public static final int updateEvent = 1; + public static final int updatePonintEvent = 1; public static final int fightEvent = 2; public static final int shopEvent = 3; + public static final int updateOptionalEvent = 4; } diff --git a/serverlogic/src/main/java/com/ljsd/jieling/handler/map/MapLogic.java b/serverlogic/src/main/java/com/ljsd/jieling/handler/map/MapLogic.java index b3945512c..5fba409f9 100644 --- a/serverlogic/src/main/java/com/ljsd/jieling/handler/map/MapLogic.java +++ b/serverlogic/src/main/java/com/ljsd/jieling/handler/map/MapLogic.java @@ -457,7 +457,7 @@ public class MapLogic { if (baseBehavior != null) { boolean isSuccess = baseBehavior.process(user, behaviorTypeValues, eventUpdateResponse); if (!isSuccess) { - LOGGER.info("updateEvent() baseBehavior process fail! behaviorType=>{}", behaviorType); + LOGGER.info("updatePonintEvent() baseBehavior process fail! behaviorType=>{}", behaviorType); MessageUtil.sendErrorResponse(session,0, messageType.getNumber(), ""); return; } @@ -524,8 +524,8 @@ public class MapLogic { mapManager.addOrUpdateCell(cell.getCellId(), cell); } - updateMapMission(mapManager,EventType.updateEvent, optionId,0); - int totalWeight = updateMapMission(mapManager,EventType.updateEvent, pointId,0); + updateMapMission(mapManager,EventType.updateOptionalEvent, optionId,0); + int totalWeight = updateMapMission(mapManager,EventType.updatePonintEvent, pointId,0); if (totalWeight >= 100) { CrossInfo crossInfo = mapManager.getCrossInfoMap().get(mapManager.getCurMapId()); if (crossInfo == null) { @@ -558,7 +558,7 @@ public class MapLogic { if (dropBuilder != null) { eventUpdateResponse.setDrop(dropBuilder); } -// LOGGER.info("updateEvent =====>success<====== xy=>{}, getPointId=>{} eventId={}, mission=>{}, nextEventId=>{}, eventBehaviorCommon=>{} {} sOptionConfig.getReward()=>{}", mapManager.getCurXY(), cell == null ? 0 : cell.getPointId(), +// LOGGER.info("updatePonintEvent =====>success<====== xy=>{}, getPointId=>{} eventId={}, mission=>{}, nextEventId=>{}, eventBehaviorCommon=>{} {} sOptionConfig.getReward()=>{}", mapManager.getCurXY(), cell == null ? 0 : cell.getPointId(), // cell == null ? 0 : cell.getEventId(), eventUpdateResponse.getMissionList(), nextEventId, eventBehaviorCommon,eventUpdateResponse.getDrop(), sOptionConfig.getReward()); // LOGGER.info("updatEvent() uid=>{},nextEventId={},eventId={},mission=>{}", uid, nextEventId, cell == null ? 0 : cell.getEventId(), eventUpdateResponse.getMission()); MessageUtil.sendMessage(session, 1, messageType.getNumber(), eventUpdateResponse.build(), true); @@ -909,7 +909,7 @@ public class MapLogic { } } // LOGGER.info("endFight() uid=>{},nextEventId=>{}", uid, nextEventId); - updateMapMission(mapManager,EventType.fightEvent,0, 1); + updateMapMission(mapManager,EventType.fightEvent,0, groupId); // LOGGER.info("endFight() uid=>{} sMonsterGroup.getRewardgroup()=>{} misson=>{} eventDrop=>{}, missionDrop=>{}", uid, sMonsterGroup.getRewardgroup(), fastFightResponse.getMission(), fastFightResponse.getEnventDrop(), fastFightResponse.getMissionDrop()); MessageUtil.sendMessage(session, 1, messageType.getNumber(), fastFightResponse.build(), true); } @@ -1170,7 +1170,7 @@ public class MapLogic { int[][] values = sAccomplishmentConfig.getValues(); int targetEventId = values[0][0]; int targetEventValue = values[1][0]; - if(logic == MapMissionType.FINISH_EVEVNT.getMissionTypeValue()){ + if(eventType == EventType.updateOptionalEvent && logic == MapMissionType.FINISH_EVEVNT.getMissionTypeValue()){ for(int targetEventIdTmp : values[0]){ if(targetEventIdTmp == eventId){ if(missionValue