少加个注解

back_recharge
jiahuiwen 2019-04-29 18:38:52 +08:00
parent 6e8b4b0b5d
commit 7637c763ad
3 changed files with 25 additions and 8 deletions

View File

@ -197,6 +197,7 @@ public class MapLogic {
.build(); .build();
mapEnterResponse.addHeroInfos(heroInfo); mapEnterResponse.addHeroInfos(heroInfo);
} }
LOGGER.info("enterMap() uid=>{} mapId =>{}", uid, mapManager.getCurMapId());
MessageUtil.sendMessage(iSession, 1, messageType.getNumber(), mapEnterResponse.build(), true); MessageUtil.sendMessage(iSession, 1, messageType.getNumber(), mapEnterResponse.build(), true);
} }
@ -363,7 +364,7 @@ public class MapLogic {
.setEventId(cell.getEventId()) .setEventId(cell.getEventId())
.setLeftTime(getLeftTime(user)) .setLeftTime(getLeftTime(user))
.build(); .build();
LOGGER.info("enterMap() uid=>{} mapId =>{} ", uid, mapManager.getCurMapId()); LOGGER.info("updateMap() uid=>{} mapId =>{} eventId=>{}", uid, mapManager.getCurMapId(), cell.getEventId());
mapManager.updateFoodBufferByStep(cells.size()); mapManager.updateFoodBufferByStep(cells.size());
MessageUtil.sendMessage(session, 1, messageType.getNumber(), mapUpdateResponse, true); MessageUtil.sendMessage(session, 1, messageType.getNumber(), mapUpdateResponse, true);
} }
@ -471,10 +472,12 @@ public class MapLogic {
// 战斗事件需要放到战斗胜利 // 战斗事件需要放到战斗胜利
if (baseBehavior == null || !baseBehavior.isFightBehavior()) { if (baseBehavior == null || !baseBehavior.isFightBehavior()) {
// 检测该事件点是否已被销毁 // 检测该事件点是否已被销毁
if (cell != null && nextEventId != 0) { if (cell != null) {
nextEventId = getNextEventId(user, cell, sOptionConfig); nextEventId = getNextEventId(user, cell, sOptionConfig);
cell.setEventId(nextEventId); if (nextEventId != 0) {
mapManager.addOrUpdateCell(cell.getCellId(), cell); cell.setEventId(nextEventId);
mapManager.addOrUpdateCell(cell.getCellId(), cell);
}
} }
} }
updateMapMission(mapManager,EventType.updateOptionalEvent, optionId,0); updateMapMission(mapManager,EventType.updateOptionalEvent, optionId,0);

View File

@ -47,7 +47,15 @@ public class BehaviorUtil {
mapManager.setMapInfo(mapInfo); mapManager.setMapInfo(mapInfo);
} }
/**
*
* @param needDistoryPointId
* @param mapManager
* @param mapId
* @param x
* @param y
* @throws Exception
*/
public static void addBehaviorInfo(int needDistoryPointId, MapManager mapManager, int mapId, int x, int y) throws Exception { public static void addBehaviorInfo(int needDistoryPointId, MapManager mapManager, int mapId, int x, int y) throws Exception {
int xy = CellUtil.xy2Pos(x, y); int xy = CellUtil.xy2Pos(x, y);
MapPointConfig mapPointConfig = MapPointConfig.scMapEventMap.get(needDistoryPointId); MapPointConfig mapPointConfig = MapPointConfig.scMapEventMap.get(needDistoryPointId);
@ -71,7 +79,11 @@ public class BehaviorUtil {
} }
} }
/**
* groupId#pointId
* @param uid
* @param readyInfo
*/
public static void fightReady(String uid, String readyInfo) { public static void fightReady(String uid, String readyInfo) {
String key = RedisKey.getKey(RedisKey.FIGHT_READY, uid, false); String key = RedisKey.getKey(RedisKey.FIGHT_READY, uid, false);
RedisUtil.getInstence().set(key, readyInfo, RedisKey.EXPIRE_TIME); RedisUtil.getInstence().set(key, readyInfo, RedisKey.EXPIRE_TIME);
@ -160,7 +172,7 @@ public class BehaviorUtil {
} }
/** /**
* *
*/ */
public static boolean updateMission(User user, MapInfoProto.EventUpdateResponse.Builder eventUpdateResponse) throws Exception { public static boolean updateMission(User user, MapInfoProto.EventUpdateResponse.Builder eventUpdateResponse) throws Exception {
Mission mission = user.getMapManager().getMission(); Mission mission = user.getMapManager().getMission();
@ -179,7 +191,7 @@ public class BehaviorUtil {
} }
/** /**
* *
*/ */
public static boolean updateMissionEndFight(User user, FightInfoProto.FightEndResponse.Builder fightEndResponseBuilder) throws Exception { public static boolean updateMissionEndFight(User user, FightInfoProto.FightEndResponse.Builder fightEndResponseBuilder) throws Exception {
Mission mission = user.getMapManager().getMission(); Mission mission = user.getMapManager().getMission();

View File

@ -4,7 +4,9 @@ import com.ljsd.jieling.handler.map.EventType;
import com.ljsd.jieling.logic.dao.root.User; import com.ljsd.jieling.logic.dao.root.User;
import com.ljsd.jieling.protocols.FightInfoProto; import com.ljsd.jieling.protocols.FightInfoProto;
import com.ljsd.jieling.protocols.MapInfoProto; import com.ljsd.jieling.protocols.MapInfoProto;
import org.springframework.stereotype.Component;
@Component
public class ThirtyThreeBehavior extends BaseBehavior { public class ThirtyThreeBehavior extends BaseBehavior {
@Override @Override
public int getBehaviorType() { public int getBehaviorType() {