FIX
parent
38950f5f46
commit
1c7be8d183
|
|
@ -41,7 +41,7 @@ public class SGameSetting implements BaseConfig {
|
||||||
|
|
||||||
private int invasionBossPrivilege;
|
private int invasionBossPrivilege;
|
||||||
|
|
||||||
private int invasionBossTimesAdd;
|
private int invasionBossItem;
|
||||||
|
|
||||||
private int adventureFastBattle;
|
private int adventureFastBattle;
|
||||||
|
|
||||||
|
|
@ -61,7 +61,7 @@ public class SGameSetting implements BaseConfig {
|
||||||
|
|
||||||
private int equipCompoundLimit;
|
private int equipCompoundLimit;
|
||||||
|
|
||||||
private int[] dailyGift;
|
private int[][] dailyGift;
|
||||||
|
|
||||||
private int recoveryTime;
|
private int recoveryTime;
|
||||||
|
|
||||||
|
|
@ -163,8 +163,8 @@ public class SGameSetting implements BaseConfig {
|
||||||
return invasionBossPrivilege;
|
return invasionBossPrivilege;
|
||||||
}
|
}
|
||||||
|
|
||||||
public int getInvasionBossTimesAdd() {
|
public int getInvasionBossItem() {
|
||||||
return invasionBossTimesAdd;
|
return invasionBossItem;
|
||||||
}
|
}
|
||||||
|
|
||||||
public int getAdventureFastBattle() {
|
public int getAdventureFastBattle() {
|
||||||
|
|
@ -175,7 +175,7 @@ public class SGameSetting implements BaseConfig {
|
||||||
return adventureOffline;
|
return adventureOffline;
|
||||||
}
|
}
|
||||||
|
|
||||||
public int[] getDailyGift() {
|
public int[][] getDailyGift() {
|
||||||
return dailyGift;
|
return dailyGift;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -88,4 +88,6 @@ public interface BIReason {
|
||||||
|
|
||||||
int BOMB_CONSUME = 1023;
|
int BOMB_CONSUME = 1023;
|
||||||
|
|
||||||
|
int CHALLENGE_INVASIONBOSS_CONSUME = 1024;
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
@ -1,7 +1,5 @@
|
||||||
package com.ljsd.jieling.logic.fight;
|
package com.ljsd.jieling.logic.fight;
|
||||||
|
|
||||||
|
|
||||||
import com.google.common.collect.Sets;
|
|
||||||
import com.ljsd.jieling.config.*;
|
import com.ljsd.jieling.config.*;
|
||||||
import com.ljsd.jieling.core.GlobalsDef;
|
import com.ljsd.jieling.core.GlobalsDef;
|
||||||
import com.ljsd.jieling.core.VipPrivilegeType;
|
import com.ljsd.jieling.core.VipPrivilegeType;
|
||||||
|
|
@ -606,9 +604,13 @@ public class CombatLogic {
|
||||||
MessageUtil.sendErrorResponse(session,0, MessageTypeProto.MessageType.ADVENTURE_BOSS_CHALLENGE_RESPONSE_VALUE,"");
|
MessageUtil.sendErrorResponse(session,0, MessageTypeProto.MessageType.ADVENTURE_BOSS_CHALLENGE_RESPONSE_VALUE,"");
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
int [] a= new int[]{1,1};
|
||||||
PlayerManager playerInfoManager = user.getPlayerInfoManager();
|
PlayerManager playerInfoManager = user.getPlayerInfoManager();
|
||||||
if(!playerInfoManager.check(invasionBossPrivilege,fightTimes)){
|
int[][] costs = new int[1][];
|
||||||
MessageUtil.sendErrorResponse(session,0, MessageTypeProto.MessageType.ADVENTURE_BOSS_CHALLENGE_RESPONSE_VALUE,"over fight");
|
costs[0] =new int[]{SGameSetting.getGameSetting().getInvasionBossItem(),fightTimes};
|
||||||
|
boolean enough = ItemUtil.itemCost(user, costs, BIReason.CHALLENGE_INVASIONBOSS_CONSUME, fightTimes);
|
||||||
|
if(!enough){
|
||||||
|
MessageUtil.sendErrorResponse(session,0, MessageTypeProto.MessageType.ADVENTURE_BOSS_CHALLENGE_RESPONSE_VALUE,"道具不足");
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
if(fightTimes==1 && skipFight==0){
|
if(fightTimes==1 && skipFight==0){
|
||||||
|
|
|
||||||
|
|
@ -229,19 +229,20 @@ public class PlayerLogic {
|
||||||
int vipLevel = user.getPlayerInfoManager().getVipLevel();
|
int vipLevel = user.getPlayerInfoManager().getVipLevel();
|
||||||
SVipLevelConfig sVipLevelConfig = SVipLevelConfig.getsVipLevelConfigMap().get(vipLevel);
|
SVipLevelConfig sVipLevelConfig = SVipLevelConfig.getsVipLevelConfigMap().get(vipLevel);
|
||||||
Map<Integer, Integer> privilegeMap = sVipLevelConfig.getPrivilegeMap();
|
Map<Integer, Integer> privilegeMap = sVipLevelConfig.getPrivilegeMap();
|
||||||
int[] dailyGift = SGameSetting.getGameSetting().getDailyGift();
|
int[][] dailyGifts = SGameSetting.getGameSetting().getDailyGift();
|
||||||
|
for(int[] dailyGift : dailyGifts){
|
||||||
if(privilegeMap!=null&&privilegeMap.containsKey(dailyGift[1])){
|
if(privilegeMap!=null&&privilegeMap.containsKey(dailyGift[1])){
|
||||||
Item item = user.getItemManager().getItem(dailyGift[0]);
|
Item item = user.getItemManager().getItem(dailyGift[0]);
|
||||||
Integer num = privilegeMap.get(dailyGift[1]);
|
Integer num = privilegeMap.get(dailyGift[1]);
|
||||||
int hadNum=0;
|
int hadNum=0;
|
||||||
if(item!=null){
|
if(item!=null){
|
||||||
hadNum=item.getItemNum();
|
hadNum=item.getItemNum();
|
||||||
}
|
}
|
||||||
if(hadNum<num){
|
if(hadNum<num){
|
||||||
Map<Integer,Integer> itemMap = new HashMap<>(1);
|
Map<Integer,Integer> itemMap = new HashMap<>(1);
|
||||||
itemMap.put(dailyGift[0],num-hadNum);
|
itemMap.put(dailyGift[0],num-hadNum);
|
||||||
ItemUtil.addItem(user,itemMap,null,BIReason.VIP_DAY_REWARD);
|
ItemUtil.addItem(user,itemMap,null,BIReason.VIP_DAY_REWARD);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if(fBuilder!=null){
|
if(fBuilder!=null){
|
||||||
|
|
@ -253,7 +254,6 @@ public class PlayerLogic {
|
||||||
. setUsedTimes(vipInfoItem.getValue())
|
. setUsedTimes(vipInfoItem.getValue())
|
||||||
.build());
|
.build());
|
||||||
}
|
}
|
||||||
|
|
||||||
fBuilder.setHadTakeDailyBox(playerInfoManager.getHadTakeDailyBoxVip()).addAllPrivilege(privilegeList);
|
fBuilder.setHadTakeDailyBox(playerInfoManager.getHadTakeDailyBoxVip()).addAllPrivilege(privilegeList);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue