From afb1015d90148d1917c24011bd8325e866c93fda Mon Sep 17 00:00:00 2001 From: elvador Date: Sun, 16 Jul 2017 22:24:23 +0200 Subject: [PATCH] CourtOfStars/Trash: Throttle key pickup messages --- Legion/CourtOfStars/Trash.lua | 23 ++++++++++++++++++----- 1 file changed, 18 insertions(+), 5 deletions(-) diff --git a/Legion/CourtOfStars/Trash.lua b/Legion/CourtOfStars/Trash.lua index 566e87880..af113f043 100644 --- a/Legion/CourtOfStars/Trash.lua +++ b/Legion/CourtOfStars/Trash.lua @@ -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