More refactor out itembase

This commit is contained in:
2024-03-15 10:55:49 -04:00
parent 57122e5b74
commit e323c80fba
4 changed files with 6 additions and 6 deletions
+2 -2
View File
@@ -34,7 +34,7 @@ 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)) {
ItemTemplate template = ItemTemplate.itemTemplates.get(entry.itemBase); ItemTemplate template = ItemTemplate.itemTemplates.get(entry.templateID);
if (template != null) 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;
@@ -71,7 +71,7 @@ public class SimulateBootyCmd extends AbstractDevCmd {
Runes.add(lootItem); Runes.add(lootItem);
break; break;
case WEAPON: //WEAPON case WEAPON: //WEAPON
if (lootItem.getItemBase().isGlass()) if (lootItem.getName().toUpperCase().contains("GLASS"))
GlassItems.add(lootItem); GlassItems.add(lootItem);
else else
OtherDrops.add(lootItem); OtherDrops.add(lootItem);
+1 -1
View File
@@ -369,7 +369,7 @@ public enum LootManager {
if (chanceRoll > bse.dropChance) if (chanceRoll > bse.dropChance)
return; return;
MobLoot lootItem = new MobLoot(mob, ItemTemplate.itemTemplates.get(bse.itemBase), true); MobLoot lootItem = new MobLoot(mob, ItemTemplate.itemTemplates.get(bse.templateID), true);
if (lootItem != null) if (lootItem != null)
mob.getCharItemManager().addItemToInventory(lootItem); mob.getCharItemManager().addItemToInventory(lootItem);
+2 -2
View File
@@ -17,7 +17,7 @@ public class BootySetEntry {
public String bootyType; public String bootyType;
public int lowGold; public int lowGold;
public int highGold; public int highGold;
public int itemBase; public int templateID;
public int genTable; public int genTable;
public float dropChance; public float dropChance;
@@ -29,7 +29,7 @@ public class BootySetEntry {
this.bootyType = (rs.getString("bootyType")); this.bootyType = (rs.getString("bootyType"));
this.lowGold = (rs.getInt("lowGold")); this.lowGold = (rs.getInt("lowGold"));
this.highGold = (rs.getInt("highGold")); this.highGold = (rs.getInt("highGold"));
this.itemBase = (rs.getInt("itemBase")); this.templateID = (rs.getInt("itemBase"));
this.genTable = (rs.getInt("genTable")); this.genTable = (rs.getInt("genTable"));
this.dropChance = (rs.getFloat("dropChance")); this.dropChance = (rs.getFloat("dropChance"));
} }
+1 -1
View File
@@ -125,7 +125,7 @@ public class MobBase extends AbstractGameObject {
for (BootySetEntry equipmentSetEntry : equipList) { for (BootySetEntry equipmentSetEntry : equipList) {
MobEquipment mobEquipment = new MobEquipment(equipmentSetEntry.itemBase, equipmentSetEntry.dropChance); MobEquipment mobEquipment = new MobEquipment(equipmentSetEntry.templateID, equipmentSetEntry.dropChance);
ItemBase itemBase = mobEquipment.getItemBase(); ItemBase itemBase = mobEquipment.getItemBase();
// if (itemBase.getType().equals(Enum.ItemType.WEAPON)) // if (itemBase.getType().equals(Enum.ItemType.WEAPON))