Browse Source

Merge remote-tracking branch 'origin/magicbox1.5' into char-init-cleanup

master
MagicBot 2 years ago
parent
commit
16adeb88ca
  1. 4
      src/engine/loot/LootManager.java

4
src/engine/loot/LootManager.java

@ -60,6 +60,7 @@ public class LootManager {
RunBootySet(NPCManager._bootySetMap.get(mob.bootySet), mob, multiplier, inHotzone, fromDeath); RunBootySet(NPCManager._bootySetMap.get(mob.bootySet), mob, multiplier, inHotzone, fromDeath);
} }
//lastly, check mobs inventory for godly or disc runes to send a server announcement //lastly, check mobs inventory for godly or disc runes to send a server announcement
if(!fromDeath) {
for (Item it : mob.getInventory()) { for (Item it : mob.getInventory()) {
ItemBase ib = it.getItemBase(); ItemBase ib = it.getItemBase();
if (ib.isDiscRune() || ib.getName().toLowerCase().contains("of the gods")) { if (ib.isDiscRune() || ib.getName().toLowerCase().contains("of the gods")) {
@ -70,6 +71,7 @@ public class LootManager {
} }
} }
} }
}
private static void RunBootySet(ArrayList<BootySetEntry> entries, Mob mob, float multiplier, boolean inHotzone, boolean fromDeath) { private static void RunBootySet(ArrayList<BootySetEntry> entries, Mob mob, float multiplier, boolean inHotzone, boolean fromDeath) {
if(fromDeath){ if(fromDeath){
//do equipment here //do equipment here
@ -79,7 +81,7 @@ public class LootManager {
continue; continue;
float equipmentRoll = ThreadLocalRandom.current().nextFloat(); float equipmentRoll = ThreadLocalRandom.current().nextFloat();
float dropChance = me.getDropChance(); float dropChance = me.getDropChance();
if (equipmentRoll < dropChance){ if (equipmentRoll < dropChance * multiplier){
MobLoot ml = new MobLoot(mob, me.getItemBase(), false); MobLoot ml = new MobLoot(mob, me.getItemBase(), false);
mob.getCharItemManager().addItemToInventory(ml); mob.getCharItemManager().addItemToInventory(ml);
} }

Loading…
Cancel
Save