购买buff修改,魂印基础战力

back_recharge
lvxinran 2020-09-07 15:51:44 +08:00
parent 748f792faa
commit 51ca7053a1
2 changed files with 18 additions and 8 deletions

View File

@ -356,14 +356,7 @@ public class GuildChallengeLogic {
SGuildCheckpointConfig config = STableManager.getConfig(SGuildCheckpointConfig.class).get(guildInfo.getCurrBossId());
int[] attributePromote = config.getAttributePromote();
int maxCount = attributePromote.length;
if(guildInfo.getBuffIndex()>=maxCount){
throw new ErrorCodeException(ErrorCode.SERVER_SELF_DEFINE);
}
int[][] attributePromotePrice = config.getAttributePromotePrice();
boolean itemCost = ItemUtil.itemCost(user, new int[][]{{attributePromotePrice[0][0], attributePromotePrice[1][guildInfo.getBuffIndex()]}}, BIReason.GUILD_CHALLENGE_BUFF_BUY_CONSUME, 1);
if(!itemCost){
throw new ErrorCodeException(ErrorCode.SERVER_SELF_DEFINE);
}
synchronized (lockMap.get(guildId)){
int time;
@ -376,6 +369,14 @@ public class GuildChallengeLogic {
}
time = TimeUtils.nowInt() + 3600;
}
if(guildInfo.getBuffIndex()>=maxCount){
throw new ErrorCodeException(ErrorCode.SERVER_SELF_DEFINE);
}
int[][] attributePromotePrice = config.getAttributePromotePrice();
boolean itemCost = ItemUtil.itemCost(user, new int[][]{{attributePromotePrice[0][0], attributePromotePrice[1][guildInfo.getBuffIndex()]}}, BIReason.GUILD_CHALLENGE_BUFF_BUY_CONSUME, 1);
if(!itemCost){
throw new ErrorCodeException(ErrorCode.SERVER_SELF_DEFINE);
}
guildInfo.setBuffIndex(guildInfo.getBuffIndex()+1);
int fiveTime = (int)(TimeUtils.getLastOrUnderHour(TimeUtils.now(), 5, 0, false)/1000);
guildInfo.setBuffOverTime(Math.min(time,fiveTime));

View File

@ -1544,6 +1544,15 @@ public class HeroLogic{
combinedAttribute(config.get(buildLevelProperty).getProperty(),heroAllAttribute);
}
}
//魂印
Map<Integer, Integer> soulEquipByPositionMap = hero.getSoulEquipByPositionMap();
soulEquipByPositionMap.forEach((k,v)->{
SEquipConfig sEquipConfig = STableManager.getConfig(SEquipConfig.class).get(v);
int[][] property = sEquipConfig.getProperty();
if(property!=null&&property.length>0){
combinedAttribute(property,heroAllAttribute);
}
});
//皮肤、称号加成