购买buff修改,魂印基础战力
parent
748f792faa
commit
51ca7053a1
|
@ -356,14 +356,7 @@ public class GuildChallengeLogic {
|
||||||
SGuildCheckpointConfig config = STableManager.getConfig(SGuildCheckpointConfig.class).get(guildInfo.getCurrBossId());
|
SGuildCheckpointConfig config = STableManager.getConfig(SGuildCheckpointConfig.class).get(guildInfo.getCurrBossId());
|
||||||
int[] attributePromote = config.getAttributePromote();
|
int[] attributePromote = config.getAttributePromote();
|
||||||
int maxCount = attributePromote.length;
|
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)){
|
synchronized (lockMap.get(guildId)){
|
||||||
int time;
|
int time;
|
||||||
|
@ -376,6 +369,14 @@ public class GuildChallengeLogic {
|
||||||
}
|
}
|
||||||
time = TimeUtils.nowInt() + 3600;
|
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);
|
guildInfo.setBuffIndex(guildInfo.getBuffIndex()+1);
|
||||||
int fiveTime = (int)(TimeUtils.getLastOrUnderHour(TimeUtils.now(), 5, 0, false)/1000);
|
int fiveTime = (int)(TimeUtils.getLastOrUnderHour(TimeUtils.now(), 5, 0, false)/1000);
|
||||||
guildInfo.setBuffOverTime(Math.min(time,fiveTime));
|
guildInfo.setBuffOverTime(Math.min(time,fiveTime));
|
||||||
|
|
|
@ -1544,6 +1544,15 @@ public class HeroLogic{
|
||||||
combinedAttribute(config.get(buildLevelProperty).getProperty(),heroAllAttribute);
|
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);
|
||||||
|
}
|
||||||
|
});
|
||||||
|
|
||||||
|
|
||||||
//皮肤、称号加成
|
//皮肤、称号加成
|
||||||
|
|
Loading…
Reference in New Issue