forked from MagicBane/Server
simulatebooty command added data output
This commit is contained in:
@@ -83,8 +83,6 @@ public class simulateBootyCmd extends AbstractDevCmd {
|
|||||||
try {
|
try {
|
||||||
mob.loadInventory();
|
mob.loadInventory();
|
||||||
for (Item lootItem : mob.getCharItemManager().getInventory()) {
|
for (Item lootItem : mob.getCharItemManager().getInventory()) {
|
||||||
ItemBase ib = lootItem.getItemBase();
|
|
||||||
int ordinal = ib.getType().ordinal();
|
|
||||||
switch (lootItem.getItemBase().getType()) {
|
switch (lootItem.getItemBase().getType()) {
|
||||||
case CONTRACT: //CONTRACT
|
case CONTRACT: //CONTRACT
|
||||||
Contracts.add(lootItem);
|
Contracts.add(lootItem);
|
||||||
@@ -121,25 +119,13 @@ public class simulateBootyCmd extends AbstractDevCmd {
|
|||||||
output += "BootySet: " + mob.getMobBase().bootySet + newline;
|
output += "BootySet: " + mob.getMobBase().bootySet + newline;
|
||||||
output += "Tables Rolled On: " + newline;
|
output += "Tables Rolled On: " + newline;
|
||||||
for(BootySetEntry entry : NPCManager._bootySetMap.get(mob.getMobBase().bootySet)){
|
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 += "Time Required To Gain Simulated Booty: " + respawnTime * 100 + " Seconds" + newline;
|
||||||
output += "GLASS DROPS: " + GlassItems.size() + newline;
|
output += "GLASS DROPS: " + GlassItems.size() + newline;
|
||||||
for(Item glassItem : GlassItems){
|
|
||||||
output += glassItem.getName() + newline;
|
|
||||||
}
|
|
||||||
output += "RUNE DROPS: " + Runes.size() + newline;
|
output += "RUNE DROPS: " + Runes.size() + newline;
|
||||||
for(Item runeItem : Runes){
|
|
||||||
output += runeItem.getName() + newline;
|
|
||||||
}
|
|
||||||
output += "CONTRACTS DROPS: " + Contracts.size() + newline;
|
output += "CONTRACTS DROPS: " + Contracts.size() + newline;
|
||||||
for(Item contractItem : Contracts){
|
|
||||||
output += contractItem.getName() + newline;
|
|
||||||
}
|
|
||||||
output += "RESOURCE DROPS: " + Resources.size() + newline;
|
output += "RESOURCE DROPS: " + Resources.size() + newline;
|
||||||
for(Item resourceItem : Contracts){
|
|
||||||
output += resourceItem.getName() + newline;
|
|
||||||
}
|
|
||||||
output += "OFFERINGS DROPPED: " + Offerings.size() + newline;
|
output += "OFFERINGS DROPPED: " + Offerings.size() + newline;
|
||||||
output += "OTHER ITEMS DROPPED: " + OtherDrops.size() + newline;
|
output += "OTHER ITEMS DROPPED: " + OtherDrops.size() + newline;
|
||||||
output += "FAILED ROLLS: " + failures + newline;
|
output += "FAILED ROLLS: " + failures + newline;
|
||||||
|
|||||||
@@ -144,23 +144,25 @@ public class LootManager {
|
|||||||
}
|
}
|
||||||
outItem = new MobLoot(mob, ItemBase.getItemBase(itemUUID), false);
|
outItem = new MobLoot(mob, ItemBase.getItemBase(itemUUID), false);
|
||||||
Enum.ItemType outType = outItem.getItemBase().getType();
|
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) {
|
if(outType.ordinal() == Enum.ItemType.WEAPON.ordinal() || outType.ordinal() == Enum.ItemType.ARMOR.ordinal() || outType.ordinal() == Enum.ItemType.JEWELRY.ordinal()) {
|
||||||
ModTypeTable prefixTable = modTypeTables.get(selectedRow.pModTable);
|
if(outItem.getItemBase().isGlass() == false) {
|
||||||
ModTypeTable suffixTable = modTypeTables.get(selectedRow.sModTable);
|
ModTypeTable prefixTable = modTypeTables.get(selectedRow.pModTable);
|
||||||
if (modTables.get(prefixTable.getRowForRange(100).modTableID) != null) {
|
ModTypeTable suffixTable = modTypeTables.get(selectedRow.sModTable);
|
||||||
ModTable prefixModTable = modTables.get(prefixTable.getRowForRange(100).modTableID);
|
if (modTables.get(prefixTable.getRowForRange(100).modTableID) != null) {
|
||||||
ModTableRow prefixMod = prefixModTable.getRowForRange(new Random().nextInt(maxRollRange) + minRollRange);
|
ModTable prefixModTable = modTables.get(prefixTable.getRowForRange(100).modTableID);
|
||||||
if (prefixMod != null && prefixMod.action.length() > 0) {
|
ModTableRow prefixMod = prefixModTable.getRowForRange(new Random().nextInt(maxRollRange) + minRollRange);
|
||||||
outItem.setPrefix(prefixMod.action);
|
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);
|
if (modTables.get(suffixTable.getRowForRange(100).modTableID) != null) {
|
||||||
ModTableRow suffixMod = suffixModTable.getRowForRange(new Random().nextInt(maxRollRange) + minRollRange);
|
ModTable suffixModTable = modTables.get(suffixTable.getRowForRange(100).modTableID);
|
||||||
if (suffixMod != null && suffixMod.action.length() > 0) {
|
ModTableRow suffixMod = suffixModTable.getRowForRange(new Random().nextInt(maxRollRange) + minRollRange);
|
||||||
outItem.setSuffix(suffixMod.action);
|
if (suffixMod != null && suffixMod.action.length() > 0) {
|
||||||
}
|
outItem.setSuffix(suffixMod.action);
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
return outItem;
|
return outItem;
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user