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 50ec4c9da..2bfe3c23c 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 @@ -97,6 +97,8 @@ public class EventType { public static final int thirtyFive = 35; public static final int thirtySix = 36; + public static final int thirtyEight = 38; + public static final int updatePonintEvent = 1; public static final int fightEvent = 2; public static final int shopEvent = 3; diff --git a/serverlogic/src/main/java/com/ljsd/jieling/handler/map/behavior/ThirtyEightBehavior.java b/serverlogic/src/main/java/com/ljsd/jieling/handler/map/behavior/ThirtyEightBehavior.java new file mode 100644 index 000000000..34dbadf1b --- /dev/null +++ b/serverlogic/src/main/java/com/ljsd/jieling/handler/map/behavior/ThirtyEightBehavior.java @@ -0,0 +1,32 @@ +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 ThirtyEightBehavior extends BaseBehavior { + @Override + public int getBehaviorType() { + return EventType.thirtyEight; + } + + @Override + public boolean process(int optionId, User user, int[][] behaviorTypeValues, MapInfoProto.EventUpdateResponse.Builder eventUpdateResponse) throws Exception { + + BehaviorUtil.fightReady(user.getId(), behaviorTypeValues[0][0] + "#" + Integer.toString(optionId)); + Map mapInfos = user.getMapManager().getMapInfo(); + for (Cell cell : mapInfos.values()) { + for(int i=1;i mapInfos = user.getMapManager().getMapInfo(); for (Cell cell : mapInfos.values()) { - if (cell.getPointId() == behaviorTypeValues[0][0]) { - cell.setEventId(behaviorTypeValues[0][1]); + for(int i=0;i