# HG changeset patch # User MMOSimca # Date 1412952099 14400 # Node ID 6fc3f3e1be54fd14b1432490f5a94f3619891a2b # Parent 2776c8b1e253fcf44c821ed1f1acdbab756b95d6 Fix for salvage item quantities and timber loot counts always being 1. diff -r 2776c8b1e253 -r 6fc3f3e1be54 Main.lua --- a/Main.lua Wed Oct 08 15:33:05 2014 -0400 +++ b/Main.lua Fri Oct 10 10:41:39 2014 -0400 @@ -1392,7 +1392,7 @@ if container_id and (container_id == BAG_OF_SALVAGE_ITEM_ID or container_id == CRATE_OF_SALVAGE_ITEM_ID or container_id == BIG_CRATE_OF_SALVAGE_ITEM_ID) then Debug("CHAT_MSG_LOOT: AF.ITEM %d (%d)", item_id, quantity) current_loot.sources[container_id] = current_loot.sources[container_id] or {} - current_loot.sources[container_id][item_id] = current_loot.sources[container_id][item_id] or 0 + quantity + current_loot.sources[container_id][item_id] = (current_loot.sources[container_id][item_id] or 0) + quantity else -- If not, cancel the timer and wipe the loot table early Debug("CHAT_MSG_LOOT: We would have assigned the wrong loot to salvage crates!") ClearTimeBasedLootData() @@ -1409,7 +1409,7 @@ local difficulty_token = InstanceDifficultyToken() if object_entry[difficulty_token] then -- Increment loot count - object_entry[difficulty_token]["opening_count"] = object_entry[difficulty_token]["opening_count"] or 0 + 1 + object_entry[difficulty_token]["opening_count"] = (object_entry[difficulty_token]["opening_count"] or 0) + 1 -- Add drop data object_entry[difficulty_token]["opening"] = object_entry[difficulty_token]["opening"] or {}