changeset 422:063309f31455

Fixed typo preventing the recording of Garrison Cache object data.
author MMOSimca <MMOSimca@gmail.com>
date Wed, 07 Jan 2015 17:21:50 -0500
parents b2cfa966277f
children 0aac203792c2
files Constants.lua Main.lua
diffstat 2 files changed, 4 insertions(+), 2 deletions(-) [+]
line wrap: on
line diff
--- a/Constants.lua	Wed Jan 07 05:01:13 2015 -0500
+++ b/Constants.lua	Wed Jan 07 17:21:50 2015 -0500
@@ -32,7 +32,6 @@
     ["Full Garrison Cache"] = 237722,
     ["Hefty Garrison Cache"] = 237723,
 }
-private.GARRISON_CACHE_LOOT_SOURCE_ID = 10
 
 -- Mapping of items that, when right-clicked, fire a spell (which can fail, so we have to check success).
 -- They reward loot via loot toast popups upon completion of that spell.
--- a/Main.lua	Wed Jan 07 05:01:13 2015 -0500
+++ b/Main.lua	Wed Jan 07 17:21:50 2015 -0500
@@ -42,6 +42,9 @@
 
 local ITEM_ID_TIMBER = 114781
 
+local LOOT_SOURCE_ID_REDUNDANT = 3
+local LOOT_SOURCE_ID_GARRISON_CACHE = 10
+
 local OBJECT_ID_ANVIL = 192628
 local OBJECT_ID_FISHING_BOBBER = 35591
 local OBJECT_ID_FORGE = 1685
@@ -1449,7 +1452,7 @@
     Debug("%s: loot_type: %s, item_link: %s, quantity: %s, spec_ID: %s, sex_ID: %s, is_personal: %s, loot_source: %s", event_name, loot_type, item_link, quantity, spec_ID, sex_ID, is_personal, loot_source)
 
     -- Handle Garrison cache specially
-    if lootSource and (lootSource == private.GARRISON_CACHE_LOOT_SOURCE_ID) and last_garrison_cache_object_id then
+    if loot_source and (loot_source == LOOT_SOURCE_ID_GARRISON_CACHE) and last_garrison_cache_object_id then
         -- Record location data for cache
         UpdateDBEntryLocation("objects", ("OPENING:%d"):format(last_garrison_cache_object_id))