Refactor lootTable/itemtable for client alignment.
This commit is contained in:
@@ -120,12 +120,12 @@ public class SimulateBootyCmd extends AbstractDevCmd {
|
|||||||
for (BootySetEntry entry : NPCManager._bootySetMap.get(mob.getMobBase().bootySet)) {
|
for (BootySetEntry entry : NPCManager._bootySetMap.get(mob.getMobBase().bootySet)) {
|
||||||
|
|
||||||
if (entry.bootyType.equals("GOLD"))
|
if (entry.bootyType.equals("GOLD"))
|
||||||
output += "NORMAL TABLE [" + entry.bootyType + "] " + entry.lootTable + ": " + entry.dropChance + newline;
|
output += "NORMAL TABLE [" + entry.bootyType + "] " + entry.itemTable + ": " + entry.dropChance + newline;
|
||||||
else
|
else
|
||||||
output += "NORMAL TABLE [" + entry.bootyType + "] " + entry.lootTable + ": " + entry.dropChance * dropRate + newline;
|
output += "NORMAL TABLE [" + entry.bootyType + "] " + entry.itemTable + ": " + entry.dropChance * dropRate + newline;
|
||||||
|
|
||||||
if (hotZoneRan == false && ZoneManager.inHotZone(mob.getLoc()) && LootManager.generalItemTables.containsKey(entry.lootTable + 1)) {
|
if (hotZoneRan == false && ZoneManager.inHotZone(mob.getLoc()) && LootManager.generalItemTables.containsKey(entry.itemTable + 1)) {
|
||||||
output += "HOTZONE TABLE [" + entry.bootyType + "] " + (entry.lootTable + 1) + ": " + entry.dropChance * dropRate + newline;
|
output += "HOTZONE TABLE [" + entry.bootyType + "] " + (entry.itemTable + 1) + ": " + entry.dropChance * dropRate + newline;
|
||||||
hotZoneRan = true;
|
hotZoneRan = true;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -120,14 +120,14 @@ public enum LootManager {
|
|||||||
dropRate = LootManager.NORMAL_DROP_RATE;
|
dropRate = LootManager.NORMAL_DROP_RATE;
|
||||||
|
|
||||||
if (ThreadLocalRandom.current().nextInt(1, 100 + 1) < (bse.dropChance * dropRate))
|
if (ThreadLocalRandom.current().nextInt(1, 100 + 1) < (bse.dropChance * dropRate))
|
||||||
GenerateLootDrop(mob, bse.lootTable, false); //generate normal loot drop
|
GenerateLootDrop(mob, bse.itemTable, false); //generate normal loot drop
|
||||||
|
|
||||||
// Generate hotzone loot if in hotzone
|
// Generate hotzone loot if in hotzone
|
||||||
// Only one bite at the hotzone apple per bootyset.
|
// Only one bite at the hotzone apple per bootyset.
|
||||||
|
|
||||||
if (inHotzone == true && hotzoneWasRan == false)
|
if (inHotzone == true && hotzoneWasRan == false)
|
||||||
if (generalItemTables.containsKey(bse.lootTable + 1) && ThreadLocalRandom.current().nextInt(1, 100 + 1) < (bse.dropChance * dropRate)) {
|
if (generalItemTables.containsKey(bse.itemTable + 1) && ThreadLocalRandom.current().nextInt(1, 100 + 1) < (bse.dropChance * dropRate)) {
|
||||||
GenerateLootDrop(mob, bse.lootTable + 1, true); //generate loot drop from hotzone table
|
GenerateLootDrop(mob, bse.itemTable + 1, true); //generate loot drop from hotzone table
|
||||||
hotzoneWasRan = true;
|
hotzoneWasRan = true;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -18,7 +18,7 @@ public class BootySetEntry {
|
|||||||
public int lowGold;
|
public int lowGold;
|
||||||
public int highGold;
|
public int highGold;
|
||||||
public int itemBase;
|
public int itemBase;
|
||||||
public int lootTable;
|
public int itemTable;
|
||||||
public float dropChance;
|
public float dropChance;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@@ -30,7 +30,7 @@ public class BootySetEntry {
|
|||||||
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.itemBase = (rs.getInt("itemBase"));
|
||||||
this.lootTable = (rs.getInt("lootTable"));
|
this.itemTable = (rs.getInt("itemTable"));
|
||||||
this.dropChance = (rs.getFloat("dropChance"));
|
this.dropChance = (rs.getFloat("dropChance"));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user