forked from MagicBane/Server
4 hour disc spawns 100%
This commit is contained in:
@@ -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 {
|
||||
|
||||
//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);
|
||||
|
||||
@@ -247,13 +247,20 @@ public class WorldServer {
|
||||
nextWareHousePushTime = LocalDateTime.now().plusMinutes(15);
|
||||
}
|
||||
|
||||
if (LocalDateTime.now().isAfter(nextDiscSpawn)) {
|
||||
for(Mob dropper : Mob.disciplineDroppers) {
|
||||
if(!dropper.isAlive()) {
|
||||
Zone.respawnQue.add(dropper);
|
||||
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);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user