forced hourly rune and contract drops
This commit is contained in:
@@ -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) {
|
||||
|
||||
@@ -61,6 +61,8 @@ public class Zone extends AbstractGameObject {
|
||||
//public static ArrayList<Mob> respawnQue = new ArrayList<>();
|
||||
public static final Set<Mob> respawnQue = Collections.newSetFromMap(new ConcurrentHashMap<>());
|
||||
public static long lastRespawn = 0;
|
||||
public long lastRuneDrop = 0;
|
||||
public long lastContractDrop = 0;
|
||||
/**
|
||||
* ResultSet Constructor
|
||||
*/
|
||||
|
||||
Reference in New Issue
Block a user