Skip to content

Commit

Permalink
CourtOfStars/Trash: Throttle key pickup messages
Browse files Browse the repository at this point in the history
  • Loading branch information
elvador committed Jul 16, 2017
1 parent c628016 commit afb1015
Showing 1 changed file with 18 additions and 5 deletions.
23 changes: 18 additions & 5 deletions Legion/CourtOfStars/Trash.lua
Original file line number Diff line number Diff line change
Expand Up @@ -427,11 +427,24 @@ function mod:EyeStorm(args)
self:Bar(args.spellId, 8, CL.cast:format(args.spellName))
end

function mod:PickingUp(args)
self:TargetMessage(args.spellId, args.sourceName, "Neutral", "Info")
do
local prev = 0
function mod:PickingUp(args)
local t = GetTime()
if t-prev > 10 then
prev = t
self:TargetMessage(args.spellId, args.sourceName, "Neutral", "Info")
end
end
end

function mod:PickingUpSuccess(args)
self:StopBar(args.spellId, args.sourceName)
self:TargetMessage(args.spellId, args.sourceName, "Positive", "Long", args.destName)
do
local prev = 0
function mod:PickingUpSuccess(args)
local t = GetTime()
if t-prev > 10 then
prev = t
self:TargetMessage(args.spellId, args.sourceName, "Positive", "Long", args.destName)
end
end
end

0 comments on commit afb1015

Please sign in to comment.