Mercurial > wow > prospect-me
changeset 11:61b9ea84a44c
Added groundwork for Legion mass prospecting and milling.
author | Geoff Brock <mischivin@gmail.com> |
---|---|
date | Wed, 17 Aug 2016 13:41:17 -0400 |
parents | 7adac5b705e6 |
children | c5a66cdf45e2 |
files | ProspectMe.lua |
diffstat | 1 files changed, 33 insertions(+), 6 deletions(-) [+] |
line wrap: on
line diff
--- a/ProspectMe.lua Tue Aug 16 12:56:32 2016 -0400 +++ b/ProspectMe.lua Wed Aug 17 13:41:17 2016 -0400 @@ -1,9 +1,16 @@ local PROSPECT_ID = 31252 local MILLING_ID = 51005 +local MASS_PROSPECT_FELSLATE_ID = 225902 +local MASS_PROSPECT_LEYSTONE_ID = 225902 +local MASS_MILLING_YSERALLINE_ID = 210116 local PROSPECT = GetSpellInfo(PROSPECT_ID) local MILLING = GetSpellInfo(MILLING_ID) +local MASS_PROSPECT_FELSLATE = GetSpellInfo(MASS_PROSPECT_FELSLATE_ID) +local MASS_PROSPECT_LEYSTONE = GetSpellInfo(MASS_PROSPECT_FELSLATE_ID) +local MASS_MILLING_YSERALLINE = GetSpellInfo(MASS_PROSPECT_FELSLATE_ID) local containerID, containerLink = nil, nil local getContents = false +local bulkMultiplier = 1 --This will be used for mass prospecting/milling in Legion local function PM_Init() if not PM_ResultsTable then @@ -72,8 +79,8 @@ end end - PM_ResultsTable[containerID].timesProspected = PM_ResultsTable[containerID].timesProspected + 1 - PM_SessionTable[containerID].timesProspected = PM_SessionTable[containerID].timesProspected + 1 + PM_ResultsTable[containerID].timesProspected = PM_ResultsTable[containerID].timesProspected + bulkMultiplier + PM_SessionTable[containerID].timesProspected = PM_SessionTable[containerID].timesProspected + bulkMultiplier end local function EventHandler(self, event, ...) @@ -132,26 +139,46 @@ hooksecurefunc("CastSpell", function(...) local spellName = GetSpellInfo(...) - if spellName:lower() == PROSPECT:lower() or spellName:lower() == MILLING:lower() then + 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 getContents = true + if spellName:lower() == MASS_PROSPECT_FELSLATE:lower() or spellName:lower() == MASS_PROSPECT_LEYSTONE:lower() or spellName:lower() == MASS_MILLING_YSERALLINE :lower () then + bulkMultiplier = 4 + else + bulkMultiplier = 1 + end end end) hooksecurefunc("CastSpellByID", function(spellID) - if spellID == PROSPECT_ID or spellID == MILLING_ID then + if spellID == PROSPECT_ID or spellID == MILLING_ID or spellID == MASS_PROSPECT_FELSTATE_ID or spellID == MASS_PROSPECT_LEYSTONE_ID or spellID == MASS_MILLING_YSERALLINE_ID then getContents = true + if spellID == MASS_PROSPECT_FELSTATE_ID or spellID == MASS_PROSPECT_LEYSTONE_ID or spellID == MASS_MILLING_YSERALLINE_ID then + bulkMultiplier = 4 + else + bulkMultiplier = 1 + end end end) hooksecurefunc("UseAction", function(actionID) local spellID = select(2, GetActionInfo(actionID)) - if spellID == PROSPECT_ID or spellID == MILLING_ID then + if spellID == PROSPECT_ID or spellID == MILLING_ID or spellID == MASS_PROSPECT_FELSTATE_ID or spellID == MASS_PROSPECT_LEYSTONE_ID or spellID == MASS_MILLING_YSERALLINE_ID then getContents = true + if spellID == MASS_PROSPECT_FELSTATE_ID or spellID == MASS_PROSPECT_LEYSTONE_ID or spellID == MASS_MILLING_YSERALLINE_ID then + bulkMultiplier = 4 + else + bulkMultiplier = 1 + end end end) hooksecurefunc("CastSpellByName", function(spellName, onSelf) - if spellName:lower() == PROSPECT:lower() or spellName:lower() == MILLING:lower() then + 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 getContents = true + if spellName:lower() == MASS_PROSPECT_FELSLATE:lower() or spellName:lower() == MASS_PROSPECT_LEYSTONE:lower() or spellName:lower() == MASS_MILLING_YSERALLINE :lower () then + bulkMultiplier = 4 + else + bulkMultiplier = 1 + end end end) \ No newline at end of file