Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 5 additions & 4 deletions src/main/java/server/life/MonsterInformationProvider.java
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,7 @@
import java.util.List;
import java.util.Map;
import java.util.Set;
import java.util.concurrent.ConcurrentHashMap;

public class MonsterInformationProvider {
private static final Logger log = LoggerFactory.getLogger(MonsterInformationProvider.class);
Expand All @@ -58,7 +59,7 @@ public static MonsterInformationProvider getInstance() {

private final Map<Integer, List<MonsterDropEntry>> drops = new HashMap<>();
private final List<MonsterGlobalDropEntry> globaldrops = new ArrayList<>();
private final Map<Integer, List<MonsterGlobalDropEntry>> continentDrops = new HashMap<>();
private final Map<Integer, List<MonsterGlobalDropEntry>> continentDrops = new ConcurrentHashMap<>(); // hit concurrently from channel threads on monster death

private final Map<Integer, List<Integer>> dropsChancePool = new HashMap<>(); // thanks to ronan
private final Set<Integer> hasNoMultiEquipDrops = new HashSet<>();
Expand All @@ -67,10 +68,10 @@ public static MonsterInformationProvider getInstance() {
private final Map<Pair<Integer, Integer>, Integer> mobAttackAnimationTime = new HashMap<>();
private final Map<MobSkill, Integer> mobSkillAnimationTime = new HashMap<>();

private final Map<Integer, Pair<Integer, Integer>> mobAttackInfo = new HashMap<>();
private final Map<Integer, Pair<Integer, Integer>> mobAttackInfo = new ConcurrentHashMap<>(); // same exposure as continentDrops

private final Map<Integer, Boolean> mobBossCache = new HashMap<>();
private final Map<Integer, String> mobNameCache = new HashMap<>();
private final Map<Integer, Boolean> mobBossCache = new ConcurrentHashMap<>();
private final Map<Integer, String> mobNameCache = new ConcurrentHashMap<>();

protected MonsterInformationProvider() {
retrieveGlobal();
Expand Down