top of the hour disc spawns

This commit is contained in:
2024-04-22 19:23:08 -05:00
parent 2067bbc6e1
commit 1567b22fe4
2 changed files with 19 additions and 23 deletions
+17 -6
View File
@@ -95,7 +95,7 @@ public enum LootManager {
ItemBase ib = it.getItemBase();
if(ib == null)
break;
if (ib.isDiscRune() || ib.getName().toLowerCase().contains("of the gods")) {
if (ib.getName().toLowerCase().contains("of the gods")) {
ChatSystemMsg chatMsg = new ChatSystemMsg(null, mob.getName() + " in " + mob.getParentZone().getName() + " has found the " + ib.getName() + ". Are you tough enough to take it?");
chatMsg.setMessageType(10);
chatMsg.setChannel(Enum.ChatChannelType.SYSTEM.getChannelID());
@@ -113,6 +113,10 @@ public enum LootManager {
mob.firstSpawn = false;
mob.despawn();
}
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);
}
}
@@ -459,19 +463,26 @@ public enum LootManager {
if(bse.itemBase == 3049)//disable clanwarden
return;
if((bse.itemBase == 3040 || bse.itemBase == 3021) && mob.level < 80){
mob.discDelay = 1;
}
int chance = 25;
if(ItemBase.getItemBase(bse.itemBase).isDiscRune() == false)
chance = (int)bse.dropChance;
else
chance = 25;
//if((bse.itemBase == 3040 || bse.itemBase == 3021) && mob.level < 80){
// chance = 100;
//}
if(mob.parentZone.getSafeZone() == 1) {
return;
}
int chanceRoll = ThreadLocalRandom.current().nextInt(1, 100 + 1);
int chanceRoll = ThreadLocalRandom.current().nextInt(1, 99);
//early exit, failed to hit minimum chance roll
if (chanceRoll > bse.dropChance)
if (chanceRoll > chance)
return;
MobLoot lootItem = new MobLoot(mob, ItemBase.getItemBase(bse.itemBase), true);