added equip dropping on mobs to LootManager

This commit is contained in:
2023-04-15 11:52:19 -05:00
parent ca9a72e338
commit c8c275bcd5
2 changed files with 22 additions and 28 deletions
+3 -18
View File
@@ -1253,23 +1253,8 @@ public class Mob extends AbstractIntelligenceAgent {
playerAgroMap.clear();
if (!this.isPlayerGuard) {
if (this.equip != null) {
for (MobEquipment me : equip.values()) {
if (me.getDropChance() == 0)
continue;
float chance = ThreadLocalRandom.current().nextFloat();
if (chance <= me.getDropChance()) {
MobLoot ml = new MobLoot(this, me.getItemBase(), false);
this.charItemManager.addItemToInventory(ml);
}
}
}
if (!this.isPlayerGuard && this.equip != null) {
LootManager.GenerateMobLoot(this, true);
}
}
@@ -1378,7 +1363,7 @@ public class Mob extends AbstractIntelligenceAgent {
if (isPlayerGuard)
return;
LootManager.GenerateMobLoot(this);
LootManager.GenerateMobLoot(this, false);
}
private int getLootTable() {