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. 13
      src/engine/server/world/WorldServer.java

11
src/engine/gameManager/LootManager.java

@ -446,19 +446,14 @@ public enum LootManager {
if(bse.itemBase == 3049)//disable clanwarden if(bse.itemBase == 3049)//disable clanwarden
return; return;
int chance; if(ItemBase.getItemBase(bse.itemBase).isDiscRune()) {
if(!ItemBase.getItemBase(bse.itemBase).isDiscRune()) {
chance = (int) bse.dropChance;
}else {
chance = 25;
if(!Mob.disciplineDroppers.contains(mob)) if(!Mob.disciplineDroppers.contains(mob))
Mob.disciplineDroppers.add(mob); Mob.disciplineDroppers.add(mob);
mob.level = 60; mob.level = 60;
mob.healthMax = 7500; mob.healthMax = 7500;
mob.setHealth(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.setMessageType(10);
chatMsg.setChannel(Enum.ChatChannelType.SYSTEM.getChannelID()); chatMsg.setChannel(Enum.ChatChannelType.SYSTEM.getChannelID());
DispatchMessage.dispatchMsgToAll(chatMsg); DispatchMessage.dispatchMsgToAll(chatMsg);
@ -476,7 +471,7 @@ public enum LootManager {
//early exit, failed to hit minimum chance roll //early exit, failed to hit minimum chance roll
if (chanceRoll > chance) if (chanceRoll > bse.dropChance)
return; return;
MobLoot lootItem = new MobLoot(mob, ItemBase.getItemBase(bse.itemBase), true); MobLoot lootItem = new MobLoot(mob, ItemBase.getItemBase(bse.itemBase), true);

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

@ -247,13 +247,20 @@ public class WorldServer {
nextWareHousePushTime = LocalDateTime.now().plusMinutes(15); 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) { for(Mob dropper : Mob.disciplineDroppers) {
if(!dropper.isAlive()) { if (!dropper.isAlive()) {
Zone.respawnQue.add(dropper); Zone.respawnQue.add(dropper);
} }
} }
nextDiscSpawn = LocalDateTime.now().plusHours(1).withMinute(0).withSecond(0); break;
} }
ThreadUtils.sleep(50); ThreadUtils.sleep(50);
} }

Loading…
Cancel
Save