增加行为类型24
parent
bb6c70c8f5
commit
96379e36f5
|
@ -76,6 +76,7 @@ public class EventType {
|
|||
public static final int monitorMissionAndMove = 19;
|
||||
public static final int destroyPointAnd = 20;
|
||||
|
||||
public static final int twentyFour = 24;
|
||||
public static final int twentyFive = 25;
|
||||
public static final int openAppointMission = 26;
|
||||
public static final int openNotDoMission = 27;
|
||||
|
|
|
@ -104,9 +104,9 @@ public class MapLogic {
|
|||
if (scMap == null) {
|
||||
return;
|
||||
}
|
||||
if (mapId > mapManager.getCurMapId()) {
|
||||
return;
|
||||
}
|
||||
// if (mapId > mapManager.getMaxMapId()) {
|
||||
// return;
|
||||
// }
|
||||
// SCMapConfig scMapConfig = SCMapConfig.getsCMapSize().get(mapId);
|
||||
// if (energy < scMapConfig.getEnergyConfused()) {
|
||||
// LOGGER.info("enterMap() uid=>{} energy=>{} need=>{} energy not enough ", uid, energy, scMapConfig.getEnergyConfused());
|
||||
|
|
|
@ -0,0 +1,28 @@
|
|||
package com.ljsd.jieling.handler.map.behavior;
|
||||
|
||||
import com.ljsd.jieling.handler.map.Cell;
|
||||
import com.ljsd.jieling.handler.map.EventType;
|
||||
import com.ljsd.jieling.logic.dao.root.User;
|
||||
import com.ljsd.jieling.protocols.MapInfoProto;
|
||||
import org.springframework.stereotype.Component;
|
||||
|
||||
import java.util.Map;
|
||||
|
||||
@Component
|
||||
public class TwentyFourBehavior extends BaseBehavior {
|
||||
@Override
|
||||
public int getBehaviorType() {
|
||||
return EventType.twentyFour;
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean process(User user, int[][] behaviorTypeValues, MapInfoProto.EventUpdateResponse.Builder eventUpdateResponse) throws Exception {
|
||||
Map<Integer, Cell> mapInfos = user.getMapManager().getMapInfo();
|
||||
for (Cell cell : mapInfos.values()) {
|
||||
if (cell.getPointId() == behaviorTypeValues[0][0]) {
|
||||
cell.setEventId(behaviorTypeValues[0][1]);
|
||||
}
|
||||
}
|
||||
return true;
|
||||
}
|
||||
}
|
Loading…
Reference in New Issue