comparison ProspectMe.lua @ 12:c5a66cdf45e2

Fix for a longstanding (and unnoticed... until now...) bug with interrupted attempts at milling.
author Geoff Brock <mischivin@gmail.com>
date Wed, 17 Aug 2016 13:51:13 -0400
parents 61b9ea84a44c
children 56a8d7064c9a
comparison
equal deleted inserted replaced
11:61b9ea84a44c 12:c5a66cdf45e2
88 PM_Init() 88 PM_Init()
89 PM_UpdateValues() 89 PM_UpdateValues()
90 end 90 end
91 if event == "UNIT_SPELLCAST_INTERRUPTED" then 91 if event == "UNIT_SPELLCAST_INTERRUPTED" then
92 local unitID, spell, rank = ... 92 local unitID, spell, rank = ...
93 if unitID == "player" and spell == PROSPECT then 93 if unitID == "player" and (spell == PROSPECT or spell == MILLING or spell == MASS_PROSPECT_FELSLATE or spell == MASS_PROSPECT_LEYSTONE or spell == MASS_MILLING_YSERALLINE)then
94 getContents = false 94 getContents = false
95 end 95 end
96 end 96 end
97 if event == "LOOT_OPENED" then 97 if event == "LOOT_OPENED" then
98 if getContents then 98 if getContents then
139 139
140 hooksecurefunc("CastSpell", function(...) 140 hooksecurefunc("CastSpell", function(...)
141 local spellName = GetSpellInfo(...) 141 local spellName = GetSpellInfo(...)
142 if spellName:lower() == PROSPECT:lower() or spellName:lower() == MILLING:lower() or spellName:lower() == MASS_PROSPECT_FELSLATE:lower() or spellName:lower() == MASS_PROSPECT_LEYSTONE:lower() or spellName:lower() == MASS_MILLING_YSERALLINE :lower () then 142 if spellName:lower() == PROSPECT:lower() or spellName:lower() == MILLING:lower() or spellName:lower() == MASS_PROSPECT_FELSLATE:lower() or spellName:lower() == MASS_PROSPECT_LEYSTONE:lower() or spellName:lower() == MASS_MILLING_YSERALLINE :lower () then
143 getContents = true 143 getContents = true
144 if spellName:lower() == MASS_PROSPECT_FELSLATE:lower() or spellName:lower() == MASS_PROSPECT_LEYSTONE:lower() or spellName:lower() == MASS_MILLING_YSERALLINE :lower () then 144 if spellName:lower() == MASS_PROSPECT_FELSLATE:lower() or spellName:lower() == MASS_PROSPECT_LEYSTONE:lower() or spellName:lower() == MASS_MILLING_YSERALLINE:lower () then
145 bulkMultiplier = 4 145 bulkMultiplier = 4
146 else 146 else
147 bulkMultiplier = 1 147 bulkMultiplier = 1
148 end 148 end
149 end 149 end
173 end) 173 end)
174 174
175 hooksecurefunc("CastSpellByName", function(spellName, onSelf) 175 hooksecurefunc("CastSpellByName", function(spellName, onSelf)
176 if spellName:lower() == PROSPECT:lower() or spellName:lower() == MILLING:lower() or spellName:lower() == MASS_PROSPECT_FELSLATE:lower() or spellName:lower() == MASS_PROSPECT_LEYSTONE:lower() or spellName:lower() == MASS_MILLING_YSERALLINE :lower () then 176 if spellName:lower() == PROSPECT:lower() or spellName:lower() == MILLING:lower() or spellName:lower() == MASS_PROSPECT_FELSLATE:lower() or spellName:lower() == MASS_PROSPECT_LEYSTONE:lower() or spellName:lower() == MASS_MILLING_YSERALLINE :lower () then
177 getContents = true 177 getContents = true
178 if spellName:lower() == MASS_PROSPECT_FELSLATE:lower() or spellName:lower() == MASS_PROSPECT_LEYSTONE:lower() or spellName:lower() == MASS_MILLING_YSERALLINE :lower () then 178 if spellName:lower() == MASS_PROSPECT_FELSLATE:lower() or spellName:lower() == MASS_PROSPECT_LEYSTONE:lower() or spellName:lower() == MASS_MILLING_YSERALLINE:lower () then
179 bulkMultiplier = 4 179 bulkMultiplier = 4
180 else 180 else
181 bulkMultiplier = 1 181 bulkMultiplier = 1
182 end 182 end
183 end 183 end