Browse Source

4 hour disc spawns 100%

lakebane-master
FatBoy-DOTC 7 months ago
parent
commit
4a2ef92d33
  1. 11
      src/engine/gameManager/LootManager.java
  2. 11
      src/engine/server/world/WorldServer.java

11
src/engine/gameManager/LootManager.java

@ -446,19 +446,14 @@ public enum LootManager { @@ -446,19 +446,14 @@ public enum LootManager {
if(bse.itemBase == 3049)//disable clanwarden
return;
int chance;
if(!ItemBase.getItemBase(bse.itemBase).isDiscRune()) {
chance = (int) bse.dropChance;
}else {
chance = 25;
if(ItemBase.getItemBase(bse.itemBase).isDiscRune()) {
if(!Mob.disciplineDroppers.contains(mob))
Mob.disciplineDroppers.add(mob);
mob.level = 60;
mob.healthMax = 7500;
mob.setHealth(7500);
ChatSystemMsg chatMsg = new ChatSystemMsg(null, mob.getName() + " in " + mob.getParentZone().getName() + " may have found the " + ItemBase.getItemBase(bse.itemBase).getName() + ". Are you tough enough to take it?");
ChatSystemMsg chatMsg = new ChatSystemMsg(null, mob.getName() + " in " + mob.getParentZone().getName() + " has found the " + ItemBase.getItemBase(bse.itemBase).getName() + ". Are you tough enough to take it?");
chatMsg.setMessageType(10);
chatMsg.setChannel(Enum.ChatChannelType.SYSTEM.getChannelID());
DispatchMessage.dispatchMsgToAll(chatMsg);
@ -476,7 +471,7 @@ public enum LootManager { @@ -476,7 +471,7 @@ public enum LootManager {
//early exit, failed to hit minimum chance roll
if (chanceRoll > chance)
if (chanceRoll > bse.dropChance)
return;
MobLoot lootItem = new MobLoot(mob, ItemBase.getItemBase(bse.itemBase), true);

11
src/engine/server/world/WorldServer.java

@ -247,13 +247,20 @@ public class WorldServer { @@ -247,13 +247,20 @@ public class WorldServer {
nextWareHousePushTime = LocalDateTime.now().plusMinutes(15);
}
if (LocalDateTime.now().isAfter(nextDiscSpawn)) {
switch(LocalDateTime.now().getHour()){
case 0:
case 4:
case 8:
case 12:
case 16:
case 20:
for(Mob dropper : Mob.disciplineDroppers) {
if (!dropper.isAlive()) {
Zone.respawnQue.add(dropper);
}
}
nextDiscSpawn = LocalDateTime.now().plusHours(1).withMinute(0).withSecond(0);
break;
}
ThreadUtils.sleep(50);
}

Loading…
Cancel
Save