Merge branches 'master' and 'master' of 60.1.1.230:backend/jieling_server

back_recharge
wangyuan 2019-07-02 19:54:02 +08:00
commit 4622b3ff8e
2 changed files with 10 additions and 7 deletions

View File

@ -2023,7 +2023,7 @@ public class MapLogic {
int x = scMap1.getGroups()[randomIndex][0];
int y = scMap1.getGroups()[randomIndex][1];
int xy = CellUtil.xy2Pos(x, y);
MapPointConfig mapPointConfig = MapPointConfig.scMapEventMap.get(sTrialConfig.getRandomMonsterType()[0][1]);
MapPointConfig mapPointConfig = MapPointConfig.scMapEventMap.get(sTrialConfig.getRandomMonsterType()[1][1]);
if (mapPointConfig == null) {
LOGGER.info("====initTrialMap()====mapPointConfig == null======>{}", scMap1.getEvent());
continue;

View File

@ -84,14 +84,16 @@ public class SweepLogic {
boolean change = false;
List<CommonProto.Drop> dropList = new CopyOnWriteArrayList<>();
for (int i = 0 ; i < sweepTimes ;i++){
if (targetItem!= 0){
Item item = user.getItemManager().getItem(targetItem);
if(item!=null && item.getItemNum()>=targetNum){
sweepTimes=i;
change = true;
break;
}
}
CommonProto.Drop.Builder drop = ItemUtil.drop(user, sLevelDifficultyConfig.getRandomReward(), 1, 0, BIReason.LEVELDIFFICULTY_SWEEP_REWARD);
dropList.add(drop.build());
Item item = user.getItemManager().getItem(targetItem);
if(item!=null && item.getItemNum()>=targetNum){
sweepTimes=i;
change = true;
break;
}
}
if(change){
cost = MapLogic.getInstance().getCost(sLevelDifficultyConfig, sweepTimes);
@ -99,6 +101,7 @@ public class SweepLogic {
//扣除道具
ItemUtil.itemCost(user, cost,BIReason.SWEEP_FIGHT_CONSUME,fightId);
MapLogic.getInstance().userLevelUp(user,sLevelDifficultyConfig.getExp() * sweepTimes);
LOGGER.info("sweepFight=>uid={},sweepTimes={},exp={}",uid,sweepTimes,sLevelDifficultyConfig.getExp());
FightInfoProto.SweepRightResponse.Builder builder = FightInfoProto.SweepRightResponse.newBuilder();
builder.addAllDrop(dropList);
levelDifficulty.setChallengeTimes(levelDifficulty.getChallengeTimes() +sweepTimes);