Skip to content

Commit

Permalink
MoltenCore/TheMoltenCore: Fix a rare chance of chat spam not stopping
Browse files Browse the repository at this point in the history
  • Loading branch information
funkydude committed Jul 31, 2024
1 parent 2804ef1 commit d6dcb7c
Showing 1 changed file with 2 additions and 6 deletions.
8 changes: 2 additions & 6 deletions MoltenCore/TheMoltenCore.lua
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,6 @@ mod:SetAllowWin(true)

local heartOfAshTarget = nil
local heartOfAshOnMe = false
local heartOfCinderOnMe = false
local mySaySpamTarget = nil
local firefighters = {}
local lineCount = 4
Expand Down Expand Up @@ -82,7 +81,6 @@ end
function mod:OnEngage()
heartOfAshTarget = nil
heartOfAshOnMe = false
heartOfCinderOnMe = false
mySaySpamTarget = nil
firefighters = {}
lineCount = 3
Expand Down Expand Up @@ -111,9 +109,9 @@ do
end

function mod:HeartOfAshRemoved(args)
mySaySpamTarget = nil -- Sometimes only one of the two has a removed event (player death?) so just nil it for everyone
if self:Me(args.destGUID) then
heartOfAshOnMe = false
mySaySpamTarget = nil
self:Say(args.spellId, CL.link_removed, true, "Link removed")
end
self:CustomIcon(heartOfAshMarker, args.destName)
Expand All @@ -124,7 +122,6 @@ do
self:TargetMessage(args.spellId, "yellow", args.destName, CL.count_icon:format(CL.link, 2, 6))
self:CustomIcon(heartOfCinderMarker, args.destName, 6)
if self:Me(args.destGUID) then
heartOfCinderOnMe = true
if heartOfAshTarget and self:GetOption("custom_on_linked_spam") then
mySaySpamTarget = {6, self:Ambiguate(heartOfAshTarget, "short")}
self:SimpleTimer(RepeatLinkSay, 1.5)
Expand All @@ -143,9 +140,8 @@ do
end

function mod:HeartOfCinderRemoved(args)
mySaySpamTarget = nil -- Sometimes only one of the two has a removed event (player death?) so just nil it for everyone
if self:Me(args.destGUID) then
heartOfCinderOnMe = false
mySaySpamTarget = nil
self:Say(args.spellId, CL.link_removed, true, "Link removed")
end
self:CustomIcon(heartOfCinderMarker, args.destName)
Expand Down

0 comments on commit d6dcb7c

Please sign in to comment.