diff --git a/src/engine/gameManager/LootManager.java b/src/engine/gameManager/LootManager.java index 35cf7fa3..2d40858f 100644 --- a/src/engine/gameManager/LootManager.java +++ b/src/engine/gameManager/LootManager.java @@ -14,6 +14,7 @@ import engine.net.DispatchMessage; import engine.net.client.msg.ErrorPopupMsg; import engine.net.client.msg.chat.ChatSystemMsg; import engine.objects.*; +import engine.server.MBServerStatics; import org.pmw.tinylog.Logger; import java.util.ArrayList; @@ -99,8 +100,8 @@ public enum LootManager { } private static void RunBootySet(ArrayList entries, Mob mob) { -mob.runeCounter++; -mob.contractCounter++; + mob.runeCounter++; + mob.contractCounter++; float dropRate = NORMAL_DROP_RATE; //roll the geenric world drop table if(mob.parentZone.getSafeZone() == 0) { @@ -123,12 +124,12 @@ mob.contractCounter++; case "LOOT": if (ThreadLocalRandom.current().nextInt(1, 100 + 1) < (bse.dropChance * dropRate)) GenerateLootDrop(mob, bse.genTable); //generate normal loot drop - if(mob.contractCounter >= 250){ + if(mob.contractCounter * dropRate >= 250){ MobLoot extraLoot = rollForContract(bse.genTable, mob); if (extraLoot != null) mob.getCharItemManager().addItemToInventory(extraLoot); } - if(mob.runeCounter >= 250){ + if(mob.runeCounter * dropRate >= 250){ MobLoot extraLoot = rollForRune(bse.genTable, mob); if (extraLoot != null) mob.getCharItemManager().addItemToInventory(extraLoot); @@ -575,6 +576,10 @@ mob.contractCounter++; MobLoot outItem = new MobLoot(mob, ItemBase.getItemBase(itemUUID), false); if(outItem != null) { mob.contractCounter = 0; + ChatSystemMsg chatMsg = new ChatSystemMsg(null, mob.getName() + " looks like he found something special"); + chatMsg.setMessageType(10); + chatMsg.setChannel(Enum.ChatChannelType.SYSTEM.getChannelID()); + DispatchMessage.dispatchMsgToInterestArea(mob,chatMsg, Enum.DispatchChannel.PRIMARY, MBServerStatics.CHARACTER_LOAD_RANGE,false,false); return outItem; } return null; @@ -604,6 +609,10 @@ mob.contractCounter++; MobLoot outItem = new MobLoot(mob, ItemBase.getItemBase(itemUUID), false); if(outItem != null) { mob.runeCounter = 0; + ChatSystemMsg chatMsg = new ChatSystemMsg(null, mob.getName() + " looks like he found something special"); + chatMsg.setMessageType(10); + chatMsg.setChannel(Enum.ChatChannelType.SYSTEM.getChannelID()); + DispatchMessage.dispatchMsgToInterestArea(mob,chatMsg, Enum.DispatchChannel.PRIMARY, MBServerStatics.CHARACTER_LOAD_RANGE,false,false); return outItem; } return null;