private int maxMob(final int mobid) { for (final Map.Entry<Integer, Integer> qs : quest.getRelevantMobs().entrySet()) { if (qs.getKey() == mobid) { return qs.getValue(); } } return 0; }
/** * Creates a new instance of MapleQuestStatus * * @param quest * @param status */ public MapleQuestStatus(final MapleQuest quest, final int status) { this.quest = quest; this.setStatus((byte) status); this.completionTime = System.currentTimeMillis(); if (status == 1) { // Started if (!quest.getRelevantMobs().isEmpty()) { registerMobs(); } } }
private void registerMobs() { killedMobs = new LinkedHashMap<>(); for (final int i : quest.getRelevantMobs().keySet()) { killedMobs.put(i, 0); } }