地图类型40

back_recharge
wangyuan 2019-06-27 14:08:10 +08:00
parent f7ee8b388e
commit e5cf962cee
2 changed files with 30 additions and 0 deletions

View File

@ -100,6 +100,7 @@ public class EventType {
public static final int thirtyEight = 38;
public static final int thirtyNine = 39;
public static final int fourty = 40;
public static final int updatePonintEvent = 1;
public static final int fightEvent = 2;

View File

@ -0,0 +1,29 @@
package com.ljsd.jieling.handler.map.behavior;
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 org.springframework.stereotype.Component;
@Component
public class FourtyBehavior extends BaseBehavior {
@Override
public int getBehaviorType() {
return EventType.fourty;
}
@Override
public boolean process(int optionId, User user, int[][] behaviorTypeValues, MapInfoProto.EventUpdateResponse.Builder eventUpdateResponse) throws Exception {
BehaviorUtil.updateMission(user, eventUpdateResponse);
CombatLogic.getInstance().bufferAddByEatFoodOrEventTrigger(user.getMapManager(), behaviorTypeValues[0][0]);
for(int destoryPoint : behaviorTypeValues[1]){
BehaviorUtil.destoryPoint(user, destoryPoint);
}
for (int i = 2; i < behaviorTypeValues.length; i++) {
BehaviorUtil.addBehaviorInfo(user,behaviorTypeValues[i][3], user.getMapManager(), behaviorTypeValues[i][0], behaviorTypeValues[i][1], behaviorTypeValues[i][2]);
}
return false;
}
}