Merge branch 'master' of http://60.1.1.230/backend/jieling_server
commit
57d77bea09
|
@ -91,4 +91,7 @@ public interface BIReason {
|
|||
|
||||
int CHALLENGE_INVASIONBOSS_CONSUME = 1024;
|
||||
|
||||
|
||||
int MAP_CONSUME = 1025;
|
||||
|
||||
}
|
|
@ -97,6 +97,7 @@ public class EventType {
|
|||
public static final int thirtyFour = 34;
|
||||
public static final int thirtyFive = 35;
|
||||
public static final int thirtySix = 36;
|
||||
public static final int thirtySeven = 37;
|
||||
|
||||
public static final int thirtyEight = 38;
|
||||
public static final int thirtyNine = 39;
|
||||
|
|
|
@ -179,7 +179,7 @@ public class MapLogic {
|
|||
MapInfoProto.MapEnterResponse.Builder mapEnterResponse = MapInfoProto.MapEnterResponse.newBuilder();
|
||||
mapEnterResponse.setLeftTime(getLeftTime(user, true));
|
||||
for (Map.Entry<Integer, Integer> buffEntry : mapManager.getFoodBufferMap().entrySet()) {
|
||||
if (buffEntry.getValue() <= 0) {
|
||||
if (buffEntry.getValue()!=-1 && buffEntry.getValue() <= 0) {
|
||||
continue;
|
||||
}
|
||||
CommonProto.FoodBuffer foodBuffer = CBean2Proto.getFoodBuffer(buffEntry.getKey(), buffEntry.getValue());
|
||||
|
@ -2115,8 +2115,6 @@ public class MapLogic {
|
|||
// }else if(mapManager.getTower()==2){
|
||||
// type = 3;
|
||||
|
||||
|
||||
type = 3;
|
||||
int[][][] pointId = config.getRandomMapPointId();
|
||||
int mapId = config.getMapId();
|
||||
SChallengeMapConfig challengeMapConfig = SChallengeMapConfig.integerSChallengeMapConfigMap.get(mapId);
|
||||
|
|
|
@ -0,0 +1,28 @@
|
|||
package com.ljsd.jieling.handler.map.behavior;
|
||||
|
||||
import com.ljsd.jieling.globals.BIReason;
|
||||
import com.ljsd.jieling.handler.map.EventType;
|
||||
import com.ljsd.jieling.logic.dao.root.User;
|
||||
import com.ljsd.jieling.logic.fight.CombatLogic;
|
||||
import com.ljsd.jieling.protocols.MapInfoProto;
|
||||
import com.ljsd.jieling.util.ItemUtil;
|
||||
import org.springframework.stereotype.Component;
|
||||
|
||||
@Component
|
||||
public class ThirtySevenBehavior extends BaseBehavior{
|
||||
@Override
|
||||
public int getBehaviorType() {
|
||||
return EventType.thirtySeven;
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean process(int optionId, User user, int[][] behaviorTypeValues, MapInfoProto.EventUpdateResponse.Builder eventUpdateResponse) throws Exception {
|
||||
int[][] cost = new int[1][2];
|
||||
cost[0][0] = behaviorTypeValues[0][0];
|
||||
cost[0][1] = behaviorTypeValues[0][1];
|
||||
ItemUtil.itemCost(user,cost, BIReason.MAP_CONSUME,user.getMapManager().getCurMapId());
|
||||
CombatLogic.getInstance().bufferAddByEatFoodOrEventTrigger(user.getMapManager(), behaviorTypeValues[0][2]);
|
||||
return true;
|
||||
}
|
||||
|
||||
}
|
Loading…
Reference in New Issue