Browse Source

Refactor out itembase

combat-2
MagicBot 9 months ago
parent
commit
29c68110cf
  1. 4
      src/engine/devcmd/cmds/AuditFailedItemsCmd.java
  2. 8
      src/engine/devcmd/cmds/SimulateBootyCmd.java

4
src/engine/devcmd/cmds/AuditFailedItemsCmd.java

@ -64,12 +64,10 @@ public class AuditFailedItemsCmd extends AbstractDevCmd {
else else
playerName = roller.getName(); playerName = roller.getName();
ItemBase ib = ItemBase.getItemBase(failedItem.getItemBaseID());
ItemTemplate template = ItemTemplate.itemTemplates.get(failedItem.getItemBaseID()); ItemTemplate template = ItemTemplate.itemTemplates.get(failedItem.getItemBaseID());
if (ib != null) { if (template != null)
itemName = template.item_base_name; itemName = template.item_base_name;
}
if (failedItem.isRandom() == false) { if (failedItem.isRandom() == false) {
if (failedItem.getPrefix().isEmpty() == false) { if (failedItem.getPrefix().isEmpty() == false) {

8
src/engine/devcmd/cmds/SimulateBootyCmd.java

@ -33,11 +33,11 @@ public class SimulateBootyCmd extends AbstractDevCmd {
if (mob.bootySet != 0) { if (mob.bootySet != 0) {
for (BootySetEntry entry : LootManager._bootySetMap.get(mob.bootySet)) { for (BootySetEntry entry : LootManager._bootySetMap.get(mob.bootySet)) {
ItemBase item = ItemBase.getItemBase(entry.itemBase);
if (item != null) { ItemTemplate template = ItemTemplate.itemTemplates.get(entry.itemBase);
ItemTemplate template = ItemTemplate.itemTemplates.get(entry.itemBase);
if (template != null)
output += "[" + entry.bootyType + "] " + template.item_base_name + " [Chance] " + entry.dropChance + newline; output += "[" + entry.bootyType + "] " + template.item_base_name + " [Chance] " + entry.dropChance + newline;
}
} }
} }

Loading…
Cancel
Save