From 9879c1b18f0334cd179f27e2bbc5583969bcb3d6 Mon Sep 17 00:00:00 2001 From: fatboy Date: Tue, 23 Apr 2024 05:44:32 -0500 Subject: [PATCH] various cleanups --- src/engine/gameManager/LootManager.java | 26 ++++++++++-------------- src/engine/mobileAI/MobAI.java | 4 ++-- src/engine/server/world/WorldServer.java | 7 +------ 3 files changed, 14 insertions(+), 23 deletions(-) diff --git a/src/engine/gameManager/LootManager.java b/src/engine/gameManager/LootManager.java index 6ee12fbb..0c276f8a 100644 --- a/src/engine/gameManager/LootManager.java +++ b/src/engine/gameManager/LootManager.java @@ -101,18 +101,6 @@ public enum LootManager { chatMsg.setChannel(Enum.ChatChannelType.SYSTEM.getChannelID()); DispatchMessage.dispatchMsgToAll(chatMsg); } - if (ib.isDiscRune() && mob.level < 80){ - if(Mob.disciplineDroppers.contains(mob) == false){ - 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 " + ib.getName() + ". Are you tough enough to take it?"); - chatMsg.setMessageType(10); - chatMsg.setChannel(Enum.ChatChannelType.SYSTEM.getChannelID()); - DispatchMessage.dispatchMsgToAll(chatMsg); - } } } @@ -458,14 +446,22 @@ public enum LootManager { if(bse.itemBase == 3049)//disable clanwarden return; - int chance = 25; + int chance; - if(ItemBase.getItemBase(bse.itemBase).isDiscRune() == false) { + if(!ItemBase.getItemBase(bse.itemBase).isDiscRune()) { chance = (int) bse.dropChance; }else { chance = 25; - if(Mob.disciplineDroppers.contains(mob) == false) + 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?"); + chatMsg.setMessageType(10); + chatMsg.setChannel(Enum.ChatChannelType.SYSTEM.getChannelID()); + DispatchMessage.dispatchMsgToAll(chatMsg); } //if((bse.itemBase == 3040 || bse.itemBase == 3021) && mob.level < 80){ diff --git a/src/engine/mobileAI/MobAI.java b/src/engine/mobileAI/MobAI.java index 6417eb63..a0426213 100644 --- a/src/engine/mobileAI/MobAI.java +++ b/src/engine/mobileAI/MobAI.java @@ -907,9 +907,9 @@ public class MobAI { } } } - } else if (System.currentTimeMillis() > (aiAgent.deathTime + (aiAgent.spawnTime * 1000))) { + } else if (System.currentTimeMillis() > (aiAgent.deathTime + (aiAgent.spawnTime * 1000L))) { - if (Zone.respawnQue.contains(aiAgent) == false && Mob.disciplineDroppers.contains(aiAgent) == false){ + if (!Zone.respawnQue.contains(aiAgent) && !Mob.disciplineDroppers.contains(aiAgent)){ Zone.respawnQue.add(aiAgent); } } diff --git a/src/engine/server/world/WorldServer.java b/src/engine/server/world/WorldServer.java index e4ce05e0..c946e0d4 100644 --- a/src/engine/server/world/WorldServer.java +++ b/src/engine/server/world/WorldServer.java @@ -240,12 +240,7 @@ public class WorldServer { Thread hourlyJobThread = new Thread(new HourlyJobThread()); hourlyJobThread.setName("hourlyJob"); hourlyJobThread.start(); - //if(LocalDateTime.now().isAfter(LocalDateTime.now().withMinute(30).withSecond(0))) { - // nextHourlyJobTime = LocalDateTime.now().withMinute(0).withSecond(0).plusHours(1); - //}else{ - // nextHourlyJobTime = LocalDateTime.now().withMinute(30).withSecond(0); - //} - nextHourlyJobTime = nextHourlyJobTime.plusMinutes(30); + nextHourlyJobTime = nextHourlyJobTime.plusMinutes(60); } if (LocalDateTime.now().isAfter(nextWareHousePushTime)) {