changeset 472:39e87b600cad

Fixed a new bug caused by the removal of certain global variables in Legion beta build 21996.
author Caleb Atherton <catherton@curse.com>
date Wed, 22 Jun 2016 01:14:08 -0400
parents 1fc8da9b8cd8
children 063a09a99cb8
files Main.lua
diffstat 1 files changed, 6 insertions(+), 2 deletions(-) [+]
line wrap: on
line diff
--- a/Main.lua	Mon Jun 20 05:25:06 2016 -0400
+++ b/Main.lua	Wed Jun 22 01:14:08 2016 -0400
@@ -58,6 +58,10 @@
 local LOOT_SLOT_ITEM = _G.LOOT_SLOT_ITEM
 local LOOT_SLOT_MONEY = _G.LOOT_SLOT_MONEY
 
+-- Removed in Legion but still needed
+local ERR_QUEST_REWARD_ITEM_MULT_IS = _G.ERR_QUEST_REWARD_ITEM_MULT_IS or "Received %d of item: %s."
+local ERR_QUEST_REWARD_ITEM_S = _G.ERR_QUEST_REWARD_ITEM_S or "Received item: %s."
+
 local ALLOWED_LOCALES = {
     enUS = true,
     enGB = true,
@@ -1615,9 +1619,9 @@
 
 
     function WDP:CHAT_MSG_SYSTEM(event_name, message)
-        local item_link, quantity = deformat(message, _G.ERR_QUEST_REWARD_ITEM_MULT_IS)
+        local item_link, quantity = deformat(message, ERR_QUEST_REWARD_ITEM_MULT_IS)
         if not item_link then
-            quantity, item_link = 1, deformat(message, _G.ERR_QUEST_REWARD_ITEM_S)
+            quantity, item_link = 1, deformat(message, ERR_QUEST_REWARD_ITEM_S)
         end
         local item_id = ItemLinkToID(item_link)