挂机修改提交
parent
3e3b82ffb7
commit
29d97d6793
|
@ -45,6 +45,7 @@ import util.StringUtil;
|
|||
import util.TimeUtils;
|
||||
|
||||
import java.util.*;
|
||||
import java.util.concurrent.ConcurrentHashMap;
|
||||
|
||||
public class CombatLogic {
|
||||
private static final Logger LOGGER = LoggerFactory.getLogger(CombatLogic.class);
|
||||
|
@ -989,7 +990,7 @@ public class CombatLogic {
|
|||
if(equipMap.isEmpty())
|
||||
return equipMap;
|
||||
Map<Integer, SEquipConfig> config = STableManager.getConfig(SEquipConfig.class);
|
||||
Map<Integer,Integer> tempMap = new HashMap<>();
|
||||
Map<Integer,Integer> tempMap = new ConcurrentHashMap<>();
|
||||
for(Map.Entry<Integer,Integer> entry:equipMap.entrySet()) {
|
||||
tempMap.put(entry.getKey(),entry.getValue());
|
||||
}
|
||||
|
@ -997,10 +998,10 @@ public class CombatLogic {
|
|||
int count = 0;
|
||||
do {
|
||||
isOver = true;
|
||||
Iterator<Integer> it = equipMap.keySet().iterator();
|
||||
Iterator<Integer> it = tempMap.keySet().iterator();
|
||||
while(it.hasNext()){
|
||||
int key = it.next();
|
||||
int value = equipMap.get(key);
|
||||
int value = tempMap.get(key);
|
||||
SEquipConfig sEquipConfig = config.get(key);
|
||||
if(sEquipConfig==null)
|
||||
continue;
|
||||
|
@ -1022,9 +1023,9 @@ public class CombatLogic {
|
|||
tempMap.put(createId,tempMap.getOrDefault(createId,0)+createCount);
|
||||
isOver = false;
|
||||
}
|
||||
equipMap = tempMap;
|
||||
count++;
|
||||
}while(!isOver&&count<5);
|
||||
equipMap = tempMap;
|
||||
return equipMap;
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue