diff --git a/serverlogic/src/main/java/com/ljsd/jieling/logic/hero/HeroLogic.java b/serverlogic/src/main/java/com/ljsd/jieling/logic/hero/HeroLogic.java index aba13d97e..17393aef0 100644 --- a/serverlogic/src/main/java/com/ljsd/jieling/logic/hero/HeroLogic.java +++ b/serverlogic/src/main/java/com/ljsd/jieling/logic/hero/HeroLogic.java @@ -6344,7 +6344,7 @@ public class HeroLogic { /** * 合成神印 * @param iSession - * @param ItemId + * @param ItemId 准备升级的神印id * @param heroId * @return * @throws Exception @@ -6369,15 +6369,15 @@ public class HeroLogic { // hero信息 hero = user.getHeroManager().getHero(heroId); // hero godseal 信息 - Map godSealByPositionMap = hero.getGodSealByPositionMap(); - for (Map.Entry entry : godSealByPositionMap.entrySet()) { - if (entry.getValue() == ItemId){ + HashMap map = new HashMap<>(hero.getGodSealByPositionMap()); + for (Map.Entry next : map.entrySet()) { + if (next.getValue() == ItemId){ // 删除英雄身上的神印信息 - hero.removeGodSeal(entry.getKey()); + hero.removeGodSeal(next.getKey()); // 入背包 - list.add(new int[][]{{entry.getValue(),1}}); + list.add(new int[][]{{next.getValue(),1}}); // 记录神印位置 - position = entry.getKey(); + position = next.getKey(); } } // 卸下的神印需要放回物品背包