兽潮来袭删除消耗道具

back_recharge
lvxinran 2020-05-18 20:39:48 +08:00
parent e4bca61851
commit 41b67cfefb
3 changed files with 0 additions and 25 deletions

View File

@ -3,7 +3,6 @@ package com.ljsd.jieling.globals;
public interface Global {
int EXECUTION = 1;//行动力id
int STAMINA = 2; // 体力id
int DROP = 53;//水滴
int HEROSTORY_TICKET = 28; //精英入场券
int GENERALSTORY_TICKET = 27; //普通入场券
int INVASIONBOSS_TICKET = 44; //外敌挑战券

View File

@ -2262,22 +2262,12 @@ public class MapLogic {
LOGGER.info("endFight() uid=>{} fightId=>{} SLevelDifficultyConfig == null", uid, fightId);
throw new ErrorCodeException(ErrorCode.SERVER_SELF_DEFINE);
}
int[][] cost = new int[1][];
int[] temp = new int[2];
temp[0] = Global.DROP;
temp[1] = 1;
cost[0] = temp;
boolean flag = ItemUtil.fightItemCost(user, cost);
if (!flag) {
throw new ErrorCodeException(ErrorCode.ITEM_NOT_ENOUGH);
}
List<TeamPosHeroInfo> teamPosHeroInfos = user.getTeamPosManager().getTeamPosForHero().get(teamId);
if (teamPosHeroInfos == null || teamPosHeroInfos.size() == 0) {
LOGGER.info("startLevelDifficultyFight==> uid={},fightId={},teamId={}", uid, fightId, teamId);
throw new ErrorCodeException(ErrorCode.newDefineCode("阵容有误!!"));
}
ItemUtil.itemCost(user,cost, BIReason.MONSTERATTACK_CONSUME, fightId);
KtEventUtils.onKtEvent(user, ParamEventBean.UserGameType, KTGameType.CHALLENGE_MONSTERATTACK.getIndex(), fightId);
user.getTeamPosManager().setCurTeamPosId(teamId);
String fightInfo = fightId + "#" + teamId;
@ -2334,10 +2324,6 @@ public class MapLogic {
// String rankKey = RedisKey.getKey(RedisKey.MONSTER_ATTACK_RANK,"", false);
// RedisUtil.getInstence().zsetAddOneOffsetByTime(rankKey, String.valueOf(user.getId()), checkFightId);
RankContext.getRankEnum(RankEnum.MONSTER_ATTACK_RANK.getType()).addRank(uid,"",checkFightId);
//归还水滴
Map<Integer,Integer> itemMap = new HashMap<>(1);
itemMap.put( Global.DROP,1);
ItemUtil.addItem(user,itemMap,null,BIReason.MONSTERATTACK_BACK);
CommonProto.Drop.Builder drop = ItemUtil.drop(user, sFloodConfig.getReward(), BIReason.MONSTERATTACK_REWARD);
FightInfoProto.FightEndResponse.Builder fightEndResponse = FightInfoProto.FightEndResponse.newBuilder();
fightEndResponse.setEnventDrop(drop);

View File

@ -72,15 +72,6 @@ public class QuickStartMonsterFighter extends BaseHandler<FightInfoProto.QuickSt
LOGGER.info("endFight() uid=>{} fightId=>{} SLevelDifficultyConfig == null", uid, fightId);
throw new ErrorCodeException(ErrorCode.CFG_NULL);
}
int[][] cost = new int[1][];
int[] temp = new int[2];
temp[0] = Global.DROP;
temp[1] = 1;
cost[0] = temp;
boolean flag = ItemUtil.fightItemCost(user, cost);
if (!flag) {
throw new ErrorCodeException(ErrorCode.ITEM_NOT_ENOUGH);
}
List<TeamPosHeroInfo> teamPosHeroInfos = user.getTeamPosManager().getTeamPosForHero().get(teamId);
if (teamPosHeroInfos == null || teamPosHeroInfos.size() == 0) {
LOGGER.info("startLevelDifficultyFight==> uid={},fightId={},teamId={}", uid, fightId, teamId);
@ -108,7 +99,6 @@ public class QuickStartMonsterFighter extends BaseHandler<FightInfoProto.QuickSt
.build();
if (resultCode == 0) {
ItemUtil.itemCost(user,cost, BIReason.MONSTERATTACK_CONSUME, fightId);
CommonProto.Drop.Builder dropBuilder = CommonProto.Drop.newBuilder();
FightInfoProto.QuickStartMonsterFightResponse builder = FightInfoProto.QuickStartMonsterFightResponse.newBuilder()
.setResult(resultCode)