Browse Source

simulatebooty command added data output

master
FatBoy-DOTC 2 years ago
parent
commit
fe953aa8c4
  1. 16
      src/engine/devcmd/cmds/simulateBootyCmd.java
  2. 36
      src/engine/loot/LootManager.java

16
src/engine/devcmd/cmds/simulateBootyCmd.java

@ -83,8 +83,6 @@ public class simulateBootyCmd extends AbstractDevCmd { @@ -83,8 +83,6 @@ public class simulateBootyCmd extends AbstractDevCmd {
try {
mob.loadInventory();
for (Item lootItem : mob.getCharItemManager().getInventory()) {
ItemBase ib = lootItem.getItemBase();
int ordinal = ib.getType().ordinal();
switch (lootItem.getItemBase().getType()) {
case CONTRACT: //CONTRACT
Contracts.add(lootItem);
@ -121,25 +119,13 @@ public class simulateBootyCmd extends AbstractDevCmd { @@ -121,25 +119,13 @@ public class simulateBootyCmd extends AbstractDevCmd {
output += "BootySet: " + mob.getMobBase().bootySet + newline;
output += "Tables Rolled On: " + newline;
for(BootySetEntry entry : NPCManager._bootySetMap.get(mob.getMobBase().bootySet)){
output += entry.lootTable + newline;
output += "[" + entry.bootyType + "] " + entry.lootTable + newline;
}
output += "Time Required To Gain Simulated Booty: " + respawnTime * 100 + " Seconds" + newline;
output += "GLASS DROPS: " + GlassItems.size() + newline;
for(Item glassItem : GlassItems){
output += glassItem.getName() + newline;
}
output += "RUNE DROPS: " + Runes.size() + newline;
for(Item runeItem : Runes){
output += runeItem.getName() + newline;
}
output += "CONTRACTS DROPS: " + Contracts.size() + newline;
for(Item contractItem : Contracts){
output += contractItem.getName() + newline;
}
output += "RESOURCE DROPS: " + Resources.size() + newline;
for(Item resourceItem : Contracts){
output += resourceItem.getName() + newline;
}
output += "OFFERINGS DROPPED: " + Offerings.size() + newline;
output += "OTHER ITEMS DROPPED: " + OtherDrops.size() + newline;
output += "FAILED ROLLS: " + failures + newline;

36
src/engine/loot/LootManager.java

@ -144,23 +144,25 @@ public class LootManager { @@ -144,23 +144,25 @@ public class LootManager {
}
outItem = new MobLoot(mob, ItemBase.getItemBase(itemUUID), false);
Enum.ItemType outType = outItem.getItemBase().getType();
if(outType.ordinal() == Enum.ItemType.WEAPON.ordinal() || outType.ordinal() == Enum.ItemType.ARMOR.ordinal() || outType.ordinal() == Enum.ItemType.JEWELRY.ordinal() && outItem.getItemBase().isGlass() == false) {
ModTypeTable prefixTable = modTypeTables.get(selectedRow.pModTable);
ModTypeTable suffixTable = modTypeTables.get(selectedRow.sModTable);
if (modTables.get(prefixTable.getRowForRange(100).modTableID) != null) {
ModTable prefixModTable = modTables.get(prefixTable.getRowForRange(100).modTableID);
ModTableRow prefixMod = prefixModTable.getRowForRange(new Random().nextInt(maxRollRange) + minRollRange);
if (prefixMod != null && prefixMod.action.length() > 0) {
outItem.setPrefix(prefixMod.action);
}
}
if (modTables.get(suffixTable.getRowForRange(100).modTableID) != null) {
ModTable suffixModTable = modTables.get(suffixTable.getRowForRange(100).modTableID);
ModTableRow suffixMod = suffixModTable.getRowForRange(new Random().nextInt(maxRollRange) + minRollRange);
if (suffixMod != null && suffixMod.action.length() > 0) {
outItem.setSuffix(suffixMod.action);
}
}
if(outType.ordinal() == Enum.ItemType.WEAPON.ordinal() || outType.ordinal() == Enum.ItemType.ARMOR.ordinal() || outType.ordinal() == Enum.ItemType.JEWELRY.ordinal()) {
if(outItem.getItemBase().isGlass() == false) {
ModTypeTable prefixTable = modTypeTables.get(selectedRow.pModTable);
ModTypeTable suffixTable = modTypeTables.get(selectedRow.sModTable);
if (modTables.get(prefixTable.getRowForRange(100).modTableID) != null) {
ModTable prefixModTable = modTables.get(prefixTable.getRowForRange(100).modTableID);
ModTableRow prefixMod = prefixModTable.getRowForRange(new Random().nextInt(maxRollRange) + minRollRange);
if (prefixMod != null && prefixMod.action.length() > 0) {
outItem.setPrefix(prefixMod.action);
}
}
if (modTables.get(suffixTable.getRowForRange(100).modTableID) != null) {
ModTable suffixModTable = modTables.get(suffixTable.getRowForRange(100).modTableID);
ModTableRow suffixMod = suffixModTable.getRowForRange(new Random().nextInt(maxRollRange) + minRollRange);
if (suffixMod != null && suffixMod.action.length() > 0) {
outItem.setSuffix(suffixMod.action);
}
}
}
}
return outItem;
}

Loading…
Cancel
Save