forked from MagicBane/Server
Initial warehouse refactor
This commit is contained in:
@@ -177,10 +177,10 @@ public enum LootManager {
|
||||
|
||||
if (ItemTemplate.itemTemplates.get(itemUUID).item_type.equals(Enum.ItemType.RESOURCE)) {
|
||||
int amount = ThreadLocalRandom.current().nextInt(tableRow.minSpawn, tableRow.maxSpawn + 1);
|
||||
return new MobLoot(mob, ItemBase.getItemBase(itemUUID), amount, false);
|
||||
return new MobLoot(mob, ItemTemplate.itemTemplates.get(itemUUID), amount, false);
|
||||
}
|
||||
|
||||
outItem = new MobLoot(mob, ItemBase.getItemBase(itemUUID), false);
|
||||
outItem = new MobLoot(mob, ItemTemplate.itemTemplates.get(itemUUID), false);
|
||||
|
||||
if(selectedRow.pModTable != 0){
|
||||
try {
|
||||
@@ -348,7 +348,7 @@ public enum LootManager {
|
||||
if (equipmentRoll > dropChance)
|
||||
continue;
|
||||
|
||||
MobLoot ml = new MobLoot(mob, me.getItemBase(), false);
|
||||
MobLoot ml = new MobLoot(mob, me.template, false);
|
||||
|
||||
if (ml != null && dropCount < 1) {
|
||||
ml.setIsID(true);
|
||||
@@ -369,7 +369,7 @@ public enum LootManager {
|
||||
if (chanceRoll > bse.dropChance)
|
||||
return;
|
||||
|
||||
MobLoot lootItem = new MobLoot(mob, ItemBase.getItemBase(bse.itemBase), true);
|
||||
MobLoot lootItem = new MobLoot(mob, ItemTemplate.itemTemplates.get(bse.itemBase), true);
|
||||
|
||||
if (lootItem != null)
|
||||
mob.getCharItemManager().addItemToInventory(lootItem);
|
||||
@@ -417,7 +417,7 @@ public enum LootManager {
|
||||
|
||||
//create the item from the table, quantity is always 1
|
||||
|
||||
MobLoot winnings = new MobLoot(playerCharacter, ItemBase.getItemBase(selectedItem.cacheID), 1, false);
|
||||
MobLoot winnings = new MobLoot(playerCharacter, ItemTemplate.itemTemplates.get(selectedItem.cacheID), 1, false);
|
||||
|
||||
if (winnings == null)
|
||||
return;
|
||||
|
||||
Reference in New Issue
Block a user