libpredict: add prediction without group

This commit is contained in:
shagu
2024-11-04 12:44:25 +01:00
parent 5f62acacb1
commit ffca176694
+10 -4
View File
@@ -390,8 +390,10 @@ local hotsetbonus = libtipscan:GetScanner("hotsetbonus")
local regrowthCancel = false
function libpredict.triggerRegrowth(target, duration)
if regrowthCancel == true then regrowthCancel = false return end -- if a SPELLCAST_INTERRUPTED event happened we abandon ship and reset regrowthCancel to false to not mess with future casts
libpredict.sender:SendHealCommMsg("Regr/"..target.."/"..duration.."/")
if regrowthCancel == true then regrowthCancel = false return end
local msg = "Regr/"..target.."/"..duration.."/"
libpredict.sender:SendHealCommMsg(msg)
libpredict:ParseComm(player, msg)
end
libpredict.sender:SetScript("OnEvent", function()
@@ -504,11 +506,15 @@ libpredict.sender:SetScript("OnEvent", function()
if spell_queue[1] == "Rejuvenation" then
hotsetbonus:SetInventoryItem("player", 1)
local duration = hotsetbonus:Find(L["healduration"]["Rejuvenation"]) and 15 or 12
libpredict.sender:SendHealCommMsg("Reju/"..spell_queue[3].."/"..duration.."/")
local msg = "Reju/"..spell_queue[3].."/"..duration.."/"
libpredict.sender:SendHealCommMsg(msg)
libpredict:ParseComm(player, msg)
elseif spell_queue[1] == "Renew" then
hotsetbonus:SetInventoryItem("player", 1)
local duration = hotsetbonus:Find(L["healduration"]["Renew"]) and 15 or 12
libpredict.sender:SendHealCommMsg("Renew/"..spell_queue[3].."/"..duration.."/")
local msg = "Renew/"..spell_queue[3].."/"..duration.."/"
libpredict.sender:SendHealCommMsg(msg)
libpredict:ParseComm(player, msg)
elseif spell_queue[1] == "Regrowth" then
local duration = 21 --Made this a variable even tho it is static in case future items mess with it
regrowthCancel = false