forked from MagicBane/Server
new booty system update
This commit is contained in:
@@ -182,9 +182,14 @@ public class dbLootTableHandler extends dbHandlerBase {
|
|||||||
while (rs.next()) {
|
while (rs.next()) {
|
||||||
|
|
||||||
recordsRead++;
|
recordsRead++;
|
||||||
|
try {
|
||||||
LootManager.ModTypeTableRow mttr = new LootManager.ModTypeTableRow(rs);
|
LootManager.ModTypeTableRow mttr = new LootManager.ModTypeTableRow(rs);
|
||||||
LootManager.AddModTypeTableRow(rs.getInt("modGroup"), mttr);
|
LootManager.AddModTypeTableRow(rs.getInt("modGroup"), mttr);
|
||||||
}
|
}
|
||||||
|
catch(Exception ex){
|
||||||
|
Logger.info("MOD TABLE ERROR: " + rs.getInt("modGroup"));
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
Logger.info( "read: " + recordsRead);
|
Logger.info( "read: " + recordsRead);
|
||||||
|
|
||||||
|
|||||||
@@ -65,7 +65,7 @@ public class LootManager {
|
|||||||
MobLoot goldAmount = new MobLoot(mob, (int) (gold * multiplier));
|
MobLoot goldAmount = new MobLoot(mob, (int) (gold * multiplier));
|
||||||
mob.getCharItemManager().addItemToInventory(goldAmount);
|
mob.getCharItemManager().addItemToInventory(goldAmount);
|
||||||
}
|
}
|
||||||
} else if (bse.bootyType.equals("BOOTYTABLE")) {
|
} else if (bse.bootyType.equals("LOOT")) {
|
||||||
//iterate the booty tables and add items to mob inventory
|
//iterate the booty tables and add items to mob inventory
|
||||||
Item toAdd = getGenTableItem(bse.lootTable, mob);
|
Item toAdd = getGenTableItem(bse.lootTable, mob);
|
||||||
if(toAdd != null) {
|
if(toAdd != null) {
|
||||||
@@ -75,6 +75,10 @@ public class LootManager {
|
|||||||
Item toAddHZ = getGenTableItem(bse.lootTable + 1, mob);
|
Item toAddHZ = getGenTableItem(bse.lootTable + 1, mob);
|
||||||
mob.getCharItemManager().addItemToInventory(toAddHZ);
|
mob.getCharItemManager().addItemToInventory(toAddHZ);
|
||||||
}
|
}
|
||||||
|
} else if(bse.bootyType.equals("ITEM")){
|
||||||
|
if(Item.getItem(bse.itemBase) != null) {
|
||||||
|
mob.getCharItemManager().addItemToInventory(Item.getItem(bse.itemBase));
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
//lastly, check mobs inventory for godly or disc runes to send a server announcement
|
//lastly, check mobs inventory for godly or disc runes to send a server announcement
|
||||||
|
|||||||
Reference in New Issue
Block a user