comparison Main.lua @ 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
comparison
equal deleted inserted replaced
471:1fc8da9b8cd8 472:39e87b600cad
55 local PLAYER_RACE = _G.select(2, _G.UnitRace("player")) 55 local PLAYER_RACE = _G.select(2, _G.UnitRace("player"))
56 56
57 local LOOT_SLOT_CURRENCY = _G.LOOT_SLOT_CURRENCY 57 local LOOT_SLOT_CURRENCY = _G.LOOT_SLOT_CURRENCY
58 local LOOT_SLOT_ITEM = _G.LOOT_SLOT_ITEM 58 local LOOT_SLOT_ITEM = _G.LOOT_SLOT_ITEM
59 local LOOT_SLOT_MONEY = _G.LOOT_SLOT_MONEY 59 local LOOT_SLOT_MONEY = _G.LOOT_SLOT_MONEY
60
61 -- Removed in Legion but still needed
62 local ERR_QUEST_REWARD_ITEM_MULT_IS = _G.ERR_QUEST_REWARD_ITEM_MULT_IS or "Received %d of item: %s."
63 local ERR_QUEST_REWARD_ITEM_S = _G.ERR_QUEST_REWARD_ITEM_S or "Received item: %s."
60 64
61 local ALLOWED_LOCALES = { 65 local ALLOWED_LOCALES = {
62 enUS = true, 66 enUS = true,
63 enGB = true, 67 enGB = true,
64 enTW = true, 68 enTW = true,
1613 TradeSkillExecutePer(RecordDiscovery) 1617 TradeSkillExecutePer(RecordDiscovery)
1614 end 1618 end
1615 1619
1616 1620
1617 function WDP:CHAT_MSG_SYSTEM(event_name, message) 1621 function WDP:CHAT_MSG_SYSTEM(event_name, message)
1618 local item_link, quantity = deformat(message, _G.ERR_QUEST_REWARD_ITEM_MULT_IS) 1622 local item_link, quantity = deformat(message, ERR_QUEST_REWARD_ITEM_MULT_IS)
1619 if not item_link then 1623 if not item_link then
1620 quantity, item_link = 1, deformat(message, _G.ERR_QUEST_REWARD_ITEM_S) 1624 quantity, item_link = 1, deformat(message, ERR_QUEST_REWARD_ITEM_S)
1621 end 1625 end
1622 local item_id = ItemLinkToID(item_link) 1626 local item_id = ItemLinkToID(item_link)
1623 1627
1624 -- If it isn't a quest message, check the other uses of system messages 1628 -- If it isn't a quest message, check the other uses of system messages
1625 if not item_id then 1629 if not item_id then