diff --git a/src/engine/gameManager/LootManager.java b/src/engine/gameManager/LootManager.java index 538e69ff..3367b28d 100644 --- a/src/engine/gameManager/LootManager.java +++ b/src/engine/gameManager/LootManager.java @@ -130,6 +130,15 @@ public enum LootManager { mob.getCharItemManager().addItemToInventory(extraLoot); } hasExtraRolled = true; + + if(mob.parentZone.lastContractDrop + 3600000 > System.currentTimeMillis()){ + //no contract in last hour, force roll for one + rollForContract(bse.genTable, mob); + } + if(mob.parentZone.lastRuneDrop + 3600000 > System.currentTimeMillis()){ + //no rune in last hour, force roll for one + rollForRune(bse.genTable, mob); + } } break; case "ITEM": @@ -532,6 +541,7 @@ public enum LootManager { } public static MobLoot rollForContract(int table, Mob mob) { + mob.parentZone.lastContractDrop = System.currentTimeMillis(); int roll = (table == 1900 || table == 1500) ? 73 : 99; GenTableEntry selectedRow = GenTableEntry.rollTable(table, roll, 1.0f); if (selectedRow == null) { @@ -552,6 +562,7 @@ public enum LootManager { } public static MobLoot rollForRune(int table, Mob mob) { + mob.parentZone.lastRuneDrop = System.currentTimeMillis(); int roll = (table == 1900 || table == 1500) ? 77 : 97; GenTableEntry selectedRow = GenTableEntry.rollTable(table, roll, 1.0f); if (selectedRow == null) { diff --git a/src/engine/objects/Zone.java b/src/engine/objects/Zone.java index f95f8f49..e69dffa9 100644 --- a/src/engine/objects/Zone.java +++ b/src/engine/objects/Zone.java @@ -61,6 +61,8 @@ public class Zone extends AbstractGameObject { //public static ArrayList respawnQue = new ArrayList<>(); public static final Set respawnQue = Collections.newSetFromMap(new ConcurrentHashMap<>()); public static long lastRespawn = 0; + public long lastRuneDrop = 0; + public long lastContractDrop = 0; /** * ResultSet Constructor */