fix work shop

back_recharge
wangyuan 2019-06-27 20:50:42 +08:00
parent 0204a27a38
commit a13cd2de02
2 changed files with 7 additions and 3 deletions

View File

@ -18,9 +18,7 @@ public class FourtyBehavior extends BaseBehavior {
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);
}
BehaviorUtil.destoryPoints(user, behaviorTypeValues[1]);
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]);
}

View File

@ -53,6 +53,12 @@ public class WorkShopLogic {
MessageUtil.sendErrorResponse(iSession,0,msgId,"maxLevel");
return;
}
int limits = sWorkShopTechnology.getLimits();
int workShopLevel = workShopController.getWorkShopLevel();
if(workShopLevel<limits){
MessageUtil.sendErrorResponse(iSession,0,msgId,"level not");
return;
}
int[] openRules = sWorkShopTechnology.getOpenRules();
if(openRules!=null&&openRules.length>0){
int preTechId = openRules[0];