From b39d73f3e35d4c9811a0044c61f31cf9aad2e8be Mon Sep 17 00:00:00 2001 From: Slivo Date: Thu, 6 May 2021 20:05:21 +0200 Subject: [PATCH 01/24] Remove local declaration for TranqRotate --- locales/enUS.lua | 2 +- locales/frFR.lua | 2 +- locales/ruRU.lua | 2 +- locales/zhCN.lua | 2 +- locales/zhTW.lua | 2 +- src/comms.lua | 2 -- src/constants.lua | 2 -- src/debuff.lua | 2 -- src/dragdrop.lua | 2 -- src/events.lua | 2 -- src/frames.lua | 2 -- src/gui.lua | 2 -- src/rotation.lua | 2 -- src/utils.lua | 2 -- 14 files changed, 5 insertions(+), 23 deletions(-) diff --git a/locales/enUS.lua b/locales/enUS.lua index 5e677f3..679d16e 100644 --- a/locales/enUS.lua +++ b/locales/enUS.lua @@ -1,4 +1,4 @@ -local TranqRotate = select(2, ...) +TranqRotate = select(2, ...) local L = { diff --git a/locales/frFR.lua b/locales/frFR.lua index abaed86..0c47b86 100644 --- a/locales/frFR.lua +++ b/locales/frFR.lua @@ -1,6 +1,6 @@ if (GetLocale() ~= "frFR") then return end -local TranqRotate = select(2, ...) +TranqRotate = select(2, ...) local L = { diff --git a/locales/ruRU.lua b/locales/ruRU.lua index b38a288..d4eda61 100644 --- a/locales/ruRU.lua +++ b/locales/ruRU.lua @@ -1,6 +1,6 @@ if (GetLocale() ~= "ruRU") then return end -local TranqRotate = select(2, ...) +TranqRotate = select(2, ...) local L = { diff --git a/locales/zhCN.lua b/locales/zhCN.lua index 78004e6..250249a 100644 --- a/locales/zhCN.lua +++ b/locales/zhCN.lua @@ -1,6 +1,6 @@ if (GetLocale() ~= "zhCN") then return end -local TranqRotate = select(2, ...) +TranqRotate = select(2, ...) local L = { diff --git a/locales/zhTW.lua b/locales/zhTW.lua index e04f62c..24cad0c 100644 --- a/locales/zhTW.lua +++ b/locales/zhTW.lua @@ -1,6 +1,6 @@ if (GetLocale() ~= "zhTW") then return end -local TranqRotate = select(2, ...) +TranqRotate = select(2, ...) local L = { diff --git a/src/comms.lua b/src/comms.lua index 07d4064..6c1994d 100644 --- a/src/comms.lua +++ b/src/comms.lua @@ -1,5 +1,3 @@ -local TranqRotate = select(2, ...) - local AceComm = LibStub("AceComm-3.0") local AceSerializer = LibStub("AceSerializer-3.0") diff --git a/src/constants.lua b/src/constants.lua index 67f2ee6..d2afac7 100644 --- a/src/constants.lua +++ b/src/constants.lua @@ -1,5 +1,3 @@ -local TranqRotate = select(2, ...) - TranqRotate.colors = { ['green'] = CreateColor(0.67, 0.83, 0.45), ['darkGreen'] = CreateColor(0.1, 0.4, 0.1), diff --git a/src/debuff.lua b/src/debuff.lua index 827a3d8..1454591 100644 --- a/src/debuff.lua +++ b/src/debuff.lua @@ -1,5 +1,3 @@ -local TranqRotate = select(2, ...) - -- Checks if player is incapacitated by a debuff for too long function TranqRotate:isPlayedIncapacitatedByDebuff() diff --git a/src/dragdrop.lua b/src/dragdrop.lua index 69be684..aec7267 100644 --- a/src/dragdrop.lua +++ b/src/dragdrop.lua @@ -1,5 +1,3 @@ -local TranqRotate = select(2, ...) - -- Enable drag & drop for all hunter frames function TranqRotate:toggleListSorting(allowSorting) for key,hunter in pairs(TranqRotate.hunterTable) do diff --git a/src/events.lua b/src/events.lua index d167e7d..2065adb 100644 --- a/src/events.lua +++ b/src/events.lua @@ -1,5 +1,3 @@ -local TranqRotate = select(2, ...) - local tranqShot = GetSpellInfo(19801) local arcaneShot = GetSpellInfo(14287) diff --git a/src/frames.lua b/src/frames.lua index ae132e7..045828f 100644 --- a/src/frames.lua +++ b/src/frames.lua @@ -1,5 +1,3 @@ -local TranqRotate = select(2, ...) - -- Create main window function TranqRotate:createMainFrame() TranqRotate.mainFrame = CreateFrame("Frame", 'mainFrame', UIParent) diff --git a/src/gui.lua b/src/gui.lua index 73e6d1d..08e77e0 100644 --- a/src/gui.lua +++ b/src/gui.lua @@ -1,5 +1,3 @@ -local TranqRotate = select(2, ...) - local L = TranqRotate.L -- Initialize GUI frames. Shouldn't be called more than once diff --git a/src/rotation.lua b/src/rotation.lua index 043e912..c371bf0 100644 --- a/src/rotation.lua +++ b/src/rotation.lua @@ -1,5 +1,3 @@ -local TranqRotate = select(2, ...) - local L = TranqRotate.L -- Adds hunter to global table and one of the two rotation tables diff --git a/src/utils.lua b/src/utils.lua index 93888cb..dd6053c 100644 --- a/src/utils.lua +++ b/src/utils.lua @@ -1,5 +1,3 @@ -local TranqRotate = select(2, ...) - -- Check if a table contains the given element function TranqRotate:tableContains(table, element) From 8df4ce913c2827a23a357ab8acb36aa6ecf43365 Mon Sep 17 00:00:00 2001 From: Slivo Date: Thu, 6 May 2021 20:06:30 +0200 Subject: [PATCH 02/24] Adds gluth fear to incapacitating debuff list --- src/constants.lua | 1 + 1 file changed, 1 insertion(+) diff --git a/src/constants.lua b/src/constants.lua index d2afac7..11a9c73 100644 --- a/src/constants.lua +++ b/src/constants.lua @@ -76,5 +76,6 @@ TranqRotate.constants = { 19408, -- Magmadar fear 23171, -- Chromaggus Bronze affliction stun 23311, -- Chromaggus Time lapse + 29685, -- Gluth fear }, } From 5169c2e0471dd581f21360a87635e8a36dcff778 Mon Sep 17 00:00:00 2001 From: Slivo Date: Thu, 6 May 2021 20:08:21 +0200 Subject: [PATCH 03/24] Handle lua error for yell and say in open world --- locales/enUS.lua | 1 + locales/frFR.lua | 1 + locales/ruRU.lua | 1 + locales/zhCN.lua | 1 + locales/zhTW.lua | 1 + src/tranqRotate.lua | 13 ++++++++++++- 6 files changed, 17 insertions(+), 1 deletion(-) diff --git a/locales/enUS.lua b/locales/enUS.lua index 679d16e..6295560 100644 --- a/locales/enUS.lua +++ b/locales/enUS.lua @@ -45,6 +45,7 @@ local L = { ["SETTING_ANNOUNCES"] = "Announces", ["ENABLE_ANNOUNCES"] = "Enable announces", ["ENABLE_ANNOUNCES_DESC"] = "Enable / disable the announcement.", + ["YELL_SAY_DISABLED_OPEN_WORLD"] = "(Yell and say channels does not work in open world, but will inside your raids)", ---- Channels ["ANNOUNCES_CHANNEL_HEADER"] = "Announce channel", diff --git a/locales/frFR.lua b/locales/frFR.lua index 0c47b86..202fd85 100644 --- a/locales/frFR.lua +++ b/locales/frFR.lua @@ -47,6 +47,7 @@ local L = { ["SETTING_ANNOUNCES"] = "Annonces", ["ENABLE_ANNOUNCES"] = "Activer les annonces", ["ENABLE_ANNOUNCES_DESC"] = "Activer / désactiver les annonces", + ["YELL_SAY_DISABLED_OPEN_WORLD"] = "(Les canaux dire et crier ne fonctionnent pas hors instance)", ---- Channels ["ANNOUNCES_CHANNEL_HEADER"] = "Canal", diff --git a/locales/ruRU.lua b/locales/ruRU.lua index d4eda61..a5022ee 100644 --- a/locales/ruRU.lua +++ b/locales/ruRU.lua @@ -47,6 +47,7 @@ local L = { ["SETTING_ANNOUNCES"] = "Оповещения", ["ENABLE_ANNOUNCES"] = "Включить оповещения", ["ENABLE_ANNOUNCES_DESC"] = "Включить / отключить оповещения", + ["YELL_SAY_DISABLED_OPEN_WORLD"] = "(Yell and say channels does not work in open world, but will inside your raids)", ---- Channels ["ANNOUNCES_CHANNEL_HEADER"] = "Канал оповещений", diff --git a/locales/zhCN.lua b/locales/zhCN.lua index 250249a..1b7e174 100644 --- a/locales/zhCN.lua +++ b/locales/zhCN.lua @@ -47,6 +47,7 @@ local L = { ["SETTING_ANNOUNCES"] = "通告", ["ENABLE_ANNOUNCES"] = "启用通告", ["ENABLE_ANNOUNCES_DESC"] = "启用 / 禁用通告", + ["YELL_SAY_DISABLED_OPEN_WORLD"] = "(Yell and say channels does not work in open world, but will inside your raids)", ---- Channels ["ANNOUNCES_CHANNEL_HEADER"] = "通告频道", diff --git a/locales/zhTW.lua b/locales/zhTW.lua index 24cad0c..e81e3cf 100644 --- a/locales/zhTW.lua +++ b/locales/zhTW.lua @@ -47,6 +47,7 @@ local L = { ["SETTING_ANNOUNCES"] = "通告", ["ENABLE_ANNOUNCES"] = "啟用通告", ["ENABLE_ANNOUNCES_DESC"] = "啟用 / 禁用通告", + ["YELL_SAY_DISABLED_OPEN_WORLD"] = "(Yell and say channels does not work in open world, but will inside your raids)", ---- Channels ["ANNOUNCES_CHANNEL_HEADER"] = "通告頻道", diff --git a/src/tranqRotate.lua b/src/tranqRotate.lua index 7260c1a..4ef63ce 100644 --- a/src/tranqRotate.lua +++ b/src/tranqRotate.lua @@ -70,6 +70,17 @@ end -- Send a tranq announce message to a given channel function TranqRotate:sendAnnounceMessage(message, targetName) + + -- Prints instead to avoid lua error in open world with say and yell + if ( + not IsInInstance() and ( + TranqRotate.db.profile.channelType == "SAY" or TranqRotate.db.profile.channelType == "YELL" + ) + ) then + TranqRotate:printPrefixedMessage(message .. " " .. L["YELL_SAY_DISABLED_OPEN_WORLD"]) + return + end + if TranqRotate.db.profile.enableAnnounces then TranqRotate:sendMessage( message, @@ -117,7 +128,7 @@ SlashCmdList["TRANQROTATE"] = function(msg) elseif (cmd == 'rotate') then -- @todo decide if this should be removed or not TranqRotate:testRotation() elseif (cmd == 'test') then -- @todo: remove this - TranqRotate:test() + TranqRotate:toggleArcaneShotTesting() elseif (cmd == 'report') then TranqRotate:printRotationSetup() elseif (cmd == 'settings') then From 20325b763106c0be7e89e0ed1b1b471b89338bc3 Mon Sep 17 00:00:00 2001 From: Slivo Date: Thu, 6 May 2021 20:33:23 +0200 Subject: [PATCH 04/24] small tweak on version retrieval --- src/tranqRotate.lua | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/src/tranqRotate.lua b/src/tranqRotate.lua index 4ef63ce..fe89f0c 100644 --- a/src/tranqRotate.lua +++ b/src/tranqRotate.lua @@ -2,8 +2,7 @@ TranqRotate = select(2, ...) local L = TranqRotate.L -local parent = ... -TranqRotate.version = GetAddOnMetadata(parent, "Version") +TranqRotate.version = GetAddOnMetadata(..., "Version") -- Initialize addon - Shouldn't be call more than once function TranqRotate:init() From 52c157fdef4bf3f5ecf7958555f523bcdf5174c6 Mon Sep 17 00:00:00 2001 From: Slivo Date: Thu, 6 May 2021 23:53:02 +0200 Subject: [PATCH 05/24] Fix timed alert feature --- src/events.lua | 1 + 1 file changed, 1 insertion(+) diff --git a/src/events.lua b/src/events.lua index 2065adb..749b3af 100644 --- a/src/events.lua +++ b/src/events.lua @@ -55,6 +55,7 @@ function TranqRotate:COMBAT_LOG_EVENT_UNFILTERED() elseif (event == "SPELL_AURA_APPLIED" and TranqRotate:isBossFrenzy(spellName, sourceGUID)) then TranqRotate.frenzy = true if (TranqRotate:isPlayerNextTranq()) then + TranqRotate:handleTimedAlert() TranqRotate:throwTranqAlert() if (TranqRotate.db.profile.enableIncapacitatedBackupAlert and TranqRotate:isPlayedIncapacitatedByDebuff()) then From ec301fc9d56f5347e0d76cab9c76654932f484f2 Mon Sep 17 00:00:00 2001 From: Slivo Date: Thu, 6 May 2021 23:54:07 +0200 Subject: [PATCH 06/24] Remove frenzy on SPELL_AURA_REMOVED --- src/events.lua | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/events.lua b/src/events.lua index 749b3af..a1815d5 100644 --- a/src/events.lua +++ b/src/events.lua @@ -66,7 +66,9 @@ function TranqRotate:COMBAT_LOG_EVENT_UNFILTERED() local type, id = TranqRotate:getIdFromGuid(sourceGUID) TranqRotate:startBossFrenzyCooldown(TranqRotate.constants.bosses[id].cooldown) end - elseif event == "UNIT_DIED" and TranqRotate:isTranqableBoss(destGUID) then + elseif (event == "SPELL_AURA_REMOVED" and TranqRotate:isBossFrenzy(spellName, sourceGUID)) then + TranqRotate.frenzy = false + elseif (event == "UNIT_DIED" and TranqRotate:isTranqableBoss(destGUID)) then TranqRotate:resetRotation() TranqRotate.mainFrame.frenzyFrame:Hide() end From b4e8b383a660dc64f62db6c5ed0a514df442820b Mon Sep 17 00:00:00 2001 From: Slivo Date: Thu, 6 May 2021 23:56:07 +0200 Subject: [PATCH 07/24] Allow test rotation to rotate from fresh --- src/rotation.lua | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/rotation.lua b/src/rotation.lua index c371bf0..c80ccc6 100644 --- a/src/rotation.lua +++ b/src/rotation.lua @@ -214,8 +214,8 @@ end function TranqRotate:testRotation() for key, hunter in pairs(TranqRotate.rotationTables.rotation) do - if (hunter.nextTranq) then - TranqRotate:rotate(hunter, false) + if (hunter.nextTranq or key == #TranqRotate.rotationTables.rotation) then + TranqRotate:rotate(hunter) break end end From 1f5a707f718a98725e555948b09e1b3fba1f240b Mon Sep 17 00:00:00 2001 From: Slivo Date: Thu, 6 May 2021 23:57:21 +0200 Subject: [PATCH 08/24] Avoid self whispering when calling backup in some edge cases --- src/rotation.lua | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/src/rotation.lua b/src/rotation.lua index c80ccc6..d6aafbc 100644 --- a/src/rotation.lua +++ b/src/rotation.lua @@ -463,9 +463,11 @@ function TranqRotate:alertBackup(message, nextHunter, noComms) nextHunter = TranqRotate:getNextRotationHunter(player) end - SendChatMessage(message, 'WHISPER', nil, nextHunter.name) - if (noComms ~= true) then - TranqRotate:sendBackupRequest(nextHunter.name) + if (playerName ~= nextHunter.name) then + SendChatMessage(message, 'WHISPER', nil, nextHunter.name) + if (noComms ~= true) then + TranqRotate:sendBackupRequest(nextHunter.name) + end end else TranqRotate:whisperBackup(message) From de1b73d13577fbc421bfd399cac92aa0d4dc20f3 Mon Sep 17 00:00:00 2001 From: Slivo Date: Thu, 6 May 2021 23:58:31 +0200 Subject: [PATCH 09/24] Small reword in readme --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index 30e809a..059222d 100644 --- a/README.md +++ b/README.md @@ -20,7 +20,7 @@ Please report any issue using github issues : https://github.com/Slivo-fr/TranqR - Display the list of raid hunters - Display offline and dead status on hunters frames - Allow player to re-order players between two groups : main rotation and backup -- Synchronize rotation order between player using the addon +- Synchronize rotation order between addon users - Allow player to broadcast the configured rotation and backup group to the raid - Provide a real time visual feedback about the rotation status, even if no one else use the addon in your raid - Synchronize tranqshot casts to other player using the addon From 7aee0ce3fba7640c0ecf78c3fbdea4c7c0c62178 Mon Sep 17 00:00:00 2001 From: Slivo Date: Fri, 7 May 2021 00:00:14 +0200 Subject: [PATCH 10/24] Improve and rework fails handling --- src/comms.lua | 11 ++++--- src/constants.lua | 1 + src/events.lua | 11 ++++--- src/rotation.lua | 84 ++++++++++++++++++++++++++++++++--------------- 4 files changed, 71 insertions(+), 36 deletions(-) diff --git a/src/comms.lua b/src/comms.lua index 6c1994d..9b43d74 100644 --- a/src/comms.lua +++ b/src/comms.lua @@ -130,10 +130,13 @@ function TranqRotate:receiveSyncTranq(prefix, message, channel, sender) return end - local notDuplicate = hunter.lastTranqTime < GetTime() - TranqRotate.constants.duplicateTranqshotDelayThreshold - - if (notDuplicate) then - TranqRotate:rotate(hunter, message.fail) + if (not message.fail) then + local notDuplicate = hunter.lastTranqTime < GetTime() - TranqRotate.constants.duplicateTranqshotDelayThreshold + if (notDuplicate) then + TranqRotate:rotate(hunter) + end + else + TranqRotate:handleFailTranq(hunter) end end diff --git a/src/constants.lua b/src/constants.lua index 11a9c73..ef603c9 100644 --- a/src/constants.lua +++ b/src/constants.lua @@ -27,6 +27,7 @@ TranqRotate.constants = { ['printPrefix'] = 'TranqRotate - ', ['duplicateTranqshotDelayThreshold'] = 10, + ['duplicateFailedTranqshotDelayThreshold'] = 10, ['minimumCooldownElapsedForEligibility'] = 10, diff --git a/src/events.lua b/src/events.lua index a1815d5..3ad89f8 100644 --- a/src/events.lua +++ b/src/events.lua @@ -29,25 +29,26 @@ function TranqRotate:COMBAT_LOG_EVENT_UNFILTERED() -- @todo : Improve this with register / unregister event to save resources -- Avoid parsing combat log when not able to use it - if not TranqRotate.raidInitialized then return end + if (not TranqRotate.raidInitialized) then return end -- Avoid parsing combat log when outside instance if test mode isn't enabled - if not TranqRotate.testMode and not IsInInstance() then return end + if (not TranqRotate.testMode and not IsInInstance()) then return end local timestamp, event, _, sourceGUID, sourceName, sourceFlags, sourceRaidFlags, destGUID, destName, destFlags, destRaidFlags = CombatLogGetCurrentEventInfo() local spellId, spellName, spellSchool, amount, overkill, school, resisted, blocked, absorbed, critical, glancing, crushing, isOffHand = select(12, CombatLogGetCurrentEventInfo()) - -- @todo try to refactor a bit if (spellName == tranqShot or (TranqRotate.testMode and spellName == arcaneShot)) then local hunter = TranqRotate:getHunter(nil, sourceGUID) if (event == "SPELL_CAST_SUCCESS") then TranqRotate:sendSyncTranq(hunter, false, timestamp) - TranqRotate:rotate(hunter, false) + TranqRotate:rotate(hunter) if (sourceGUID == UnitGUID("player")) then TranqRotate:sendAnnounceMessage(TranqRotate.db.profile.announceSuccessMessage, destName) end elseif (event == "SPELL_MISSED" or event == "SPELL_DISPEL_FAILED") then + -- @Todo remove this when releasing beta + print(event) TranqRotate:sendSyncTranq(hunter, true, timestamp) - TranqRotate:rotate(hunter, true) + TranqRotate:handleFailTranq(hunter) if (sourceGUID == UnitGUID("player")) then TranqRotate:sendAnnounceMessage(TranqRotate.db.profile.announceFailMessage, destName) end diff --git a/src/rotation.lua b/src/rotation.lua index d6aafbc..a1b14d6 100644 --- a/src/rotation.lua +++ b/src/rotation.lua @@ -10,6 +10,7 @@ function TranqRotate:registerHunter(hunterName) hunter.frame = nil hunter.nextTranq = false hunter.lastTranqTime = 0 + hunter.lastFailTime = 0 -- Add to global list table.insert(TranqRotate.hunterTable, hunter) @@ -51,19 +52,11 @@ function TranqRotate:removeHunter(deletedHunter) end -- Update the rotation list once a tranq has been done. --- The parameter is the hunter that used it's tranq (successfully or not) -function TranqRotate:rotate(lastHunter, fail, rotateWithoutCooldown) +-- The parameter is the hunter that used it's tranq +function TranqRotate:rotate(lastHunter, rotateWithoutCooldown) - -- Default value to false - fail = fail or false - - if (not fail) then - TranqRotate.frenzy = false - end - - local playerName, realm = UnitName("player") + TranqRotate.frenzy = false local lastHunterRotationTable = TranqRotate:getHunterRotationTable(lastHunter) - local hasPlayerFailed = playerName == lastHunter.name and fail lastHunter.lastTranqTime = GetTime() @@ -79,25 +72,50 @@ function TranqRotate:rotate(lastHunter, fail, rotateWithoutCooldown) if (nextHunter ~= nil) then TranqRotate:setNextTranq(nextHunter) - - if ((fail and nextHunter.name == playerName) and - #TranqRotate.rotationTables.backup < 1 and - TranqRotate:isHunterTranqCooldownReady(nextHunter) - ) then - TranqRotate:throwTranqAlert() - end end end +end - if (fail) then - if (hasPlayerFailed) then - TranqRotate:alertBackup(TranqRotate.db.profile.whisperFailMessage, nextHunter, true) - end +-- Handle miss or dispel resist scenario +function TranqRotate:handleFailTranq(hunter) - local playerRotationTable = TranqRotate:getHunterRotationTable(TranqRotate:getHunter(playerName)) - if (playerRotationTable == TranqRotate.rotationTables.backup and not hasPlayerFailed) then - TranqRotate:throwTranqAlert() - end + -- Do not process multiple SPELL_DISPEL_FAILED events or multiple fail broadcasts + local duplicate = hunter.lastFailTime >= GetTime() - TranqRotate.constants.duplicateFailedTranqshotDelayThreshold + if (duplicate) then + return + end + + local playerName, realm = UnitName("player") + local hasPlayerFailed = playerName == hunter.name + local nextHunter = TranqRotate:getHighlightedHunter() + local lastHunterRotationTable = TranqRotate:getHunterRotationTable(hunter) + + -- Could happen if the first event received is a miss/resist + if (nextHunter == nil) then + nextHunter = TranqRotate:getNextRotationHunter(hunter) + end + + hunter.lastFailTime = GetTime() + + -- No backup, if player is next in rotation he will be warned to handle the fail + if ( + lastHunterRotationTable == TranqRotate.rotationTables.rotation and + nextHunter.name == playerName and + #TranqRotate.rotationTables.backup < 1 and + TranqRotate:isHunterTranqCooldownReady(nextHunter) + ) then + TranqRotate:throwTranqAlert() + end + + -- The player failed, sending fail message and backup alerts + if (hasPlayerFailed) then + TranqRotate:alertBackup(TranqRotate.db.profile.whisperFailMessage, nextHunter, true) + end + + -- Player is in backup group, display an alert when someone fails + local playerRotationTable = TranqRotate:getHunterRotationTable(TranqRotate:getHunter(playerName)) + if (playerRotationTable == TranqRotate.rotationTables.backup and not hasPlayerFailed) then + TranqRotate:throwTranqAlert() end end @@ -325,7 +343,7 @@ function TranqRotate:updateHunterStatus(hunter) -- Jump to the next hunter if the current one is dead or offline if (hunter.nextTranq and (not TranqRotate:isHunterAliveAndOnline(hunter))) then - TranqRotate:rotate(hunter, false, true) + TranqRotate:rotate(hunter, true) end TranqRotate:refreshHunterFrame(hunter) @@ -493,3 +511,15 @@ function TranqRotate:whisperBackup(message, noComms) end end end + +-- Returns the hunter currently wearing the "next" flag +function TranqRotate:getHighlightedHunter() + + for key,hunter in pairs(TranqRotate.rotationTables.rotation) do + if (hunter.nextTranq) then + return hunter + end + end + + return nil +end From 097f094bb6efd249fd32f5118083e401f2d81d97 Mon Sep 17 00:00:00 2001 From: Slivo Date: Fri, 7 May 2021 00:39:40 +0200 Subject: [PATCH 11/24] Implements version check --- src/comms.lua | 8 ++++++-- src/rotation.lua | 1 + src/tranqRotate.lua | 40 +++++++++++++++++++++++++++++++++++++++- 3 files changed, 46 insertions(+), 3 deletions(-) diff --git a/src/comms.lua b/src/comms.lua index 9b43d74..c3dd4f9 100644 --- a/src/comms.lua +++ b/src/comms.lua @@ -85,7 +85,8 @@ function TranqRotate:sendSyncOrder(whisper, name) local message = { ['type'] = TranqRotate.constants.commsTypes.syncOrder, ['version'] = TranqRotate.syncVersion, - ['rotation'] = TranqRotate:getSimpleRotationTables() + ['rotation'] = TranqRotate:getSimpleRotationTables(), + ['addonVersion'] = TranqRotate.version, } if (whisper) then @@ -100,6 +101,7 @@ function TranqRotate:sendSyncOrderRequest() local message = { ['type'] = TranqRotate.constants.commsTypes.syncRequest, + ['addonVersion'] = TranqRotate.version, } TranqRotate:sendRaidAddonMessage(message) @@ -144,6 +146,7 @@ end function TranqRotate:receiveSyncOrder(prefix, message, channel, sender) TranqRotate:updateRaidStatus() + TranqRotate:updatePlayerAddonVersion(sender, message.addonVersion) if (TranqRotate:isVersionEligible(message.version, sender)) then TranqRotate.syncVersion = (message.version) @@ -155,7 +158,8 @@ function TranqRotate:receiveSyncOrder(prefix, message, channel, sender) end -- Request to send current roration configuration received -function TranqRotate:receiveSyncRequest(prefix, data, channel, sender) +function TranqRotate:receiveSyncRequest(prefix, message, channel, sender) + TranqRotate:updatePlayerAddonVersion(sender, message.addonVersion) TranqRotate:sendSyncOrder(true, sender) end diff --git a/src/rotation.lua b/src/rotation.lua index a1b14d6..9164dcb 100644 --- a/src/rotation.lua +++ b/src/rotation.lua @@ -11,6 +11,7 @@ function TranqRotate:registerHunter(hunterName) hunter.nextTranq = false hunter.lastTranqTime = 0 hunter.lastFailTime = 0 + hunter.addonVersion = nil -- Add to global list table.insert(TranqRotate.hunterTable, hunter) diff --git a/src/tranqRotate.lua b/src/tranqRotate.lua index fe89f0c..0ec6e9f 100644 --- a/src/tranqRotate.lua +++ b/src/tranqRotate.lua @@ -17,6 +17,7 @@ function TranqRotate:init() self:CreateConfig() TranqRotate.hunterTable = {} + TranqRotate.addonVersions = {} TranqRotate.rotationTables = { rotation = {}, backup = {} } TranqRotate.raidInitialized = false @@ -132,6 +133,8 @@ SlashCmdList["TRANQROTATE"] = function(msg) TranqRotate:printRotationSetup() elseif (cmd == 'settings') then TranqRotate:openSettings() + elseif (cmd == 'check') then + TranqRotate:checkVersions() else TranqRotate:printHelp() end @@ -209,8 +212,9 @@ function TranqRotate:printHelp() TranqRotate:printMessage(spacing .. TranqRotate:colorText('lock') .. ' : Lock the main window position') TranqRotate:printMessage(spacing .. TranqRotate:colorText('unlock') .. ' : Unlock the main window position') TranqRotate:printMessage(spacing .. TranqRotate:colorText('settings') .. ' : Open TranqRotate settings') - TranqRotate:printMessage(spacing .. TranqRotate:colorText('report') .. ' : Print the rotation setup to the configured channel') + TranqRotate:printMessage(spacing .. TranqRotate:colorText('report') .. ' : Prints the rotation setup to the configured channel') TranqRotate:printMessage(spacing .. TranqRotate:colorText('backup') .. ' : Whispers backup hunters to immediately tranq') + TranqRotate:printMessage(spacing .. TranqRotate:colorText('check') .. ' : Prints users version of TranqRotate') end -- Adds color to given text @@ -234,3 +238,37 @@ function TranqRotate:toggleArcaneShotTesting(disable) TranqRotate:printPrefixedMessage(L['ARCANE_SHOT_TESTING_DISABLED']) end end + +function TranqRotate:updatePlayerAddonVersion(player, version) + + local hunter = TranqRotate:getHunter(player) + if (hunter) then + hunter.addonVersion = version + else + TranqRotate.addonVersions[player] = version + end +end + +function TranqRotate:checkVersions() + TranqRotate:printPrefixedMessage("## Version check ##") + TranqRotate:printPrefixedMessage("You - " .. TranqRotate.version) + + for key, hunter in pairs(TranqRotate.hunterTable) do + if (hunter.name ~= UnitName("player")) then + TranqRotate:printPrefixedMessage(hunter.name .. " - " .. TranqRotate:formatAddonVersion(hunter.addonVersion)) + end + end + for key, player in pairs(TranqRotate.addonVersions) do + if (player ~= UnitName("player")) then + TranqRotate:printPrefixedMessage(hunter.name .. " - " .. TranqRotate:formatAddonVersion(hunter.addonVersion)) + end + end +end + +function TranqRotate:formatAddonVersion(version) + if (version == nil) then + return "None or below 1.6.0" + else + return version + end +end From 4cf4dc53bfae81fec43af02bb61e00b44257ec9a Mon Sep 17 00:00:00 2001 From: Slivo Date: Fri, 7 May 2021 00:39:58 +0200 Subject: [PATCH 12/24] 1.6.0 changelog --- changelog.md | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/changelog.md b/changelog.md index 2d594cd..6f48472 100644 --- a/changelog.md +++ b/changelog.md @@ -1,5 +1,13 @@ ## TranqRotate Changelog +#### v1.6.0 + +- Improve miss and resist tranqshot handling (no more duplicate calls) +- Adds gluth fear to handled list of incapacitating debuffs +- Adds `/tranq check` command to display the version others users have installed +- Fixed timed alert feature that never worked (forgot to call it :D) +- Fix an ui error when trying to send announces on say/yell channel in open world (test mode) + #### v1.5.1 - Handles the new dispel resistance mechanic From c5cecbfd6b1e9d40c8e68477f7a526bc80e62f35 Mon Sep 17 00:00:00 2001 From: Slivo Date: Fri, 7 May 2021 00:40:39 +0200 Subject: [PATCH 13/24] Update version to 1.6.0 --- TranqRotate.toc | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/TranqRotate.toc b/TranqRotate.toc index 1baaf83..8286fb6 100644 --- a/TranqRotate.toc +++ b/TranqRotate.toc @@ -1,8 +1,8 @@ ## Interface: 11307 -## Title: TranqRotate |cff00aa001.5.1|r +## Title: TranqRotate |cff00aa001.6.0|r ## Notes: A tranqshot rotation assistant ## Author: Slivo -## Version: 1.5.1 +## Version: 1.6.0 ## SavedVariables: TranqRotateDb ## OptionalDeps: Ace3 From 63362329cc925cdfe9c3e559b4a656304f14ac61 Mon Sep 17 00:00:00 2001 From: Slivo Date: Fri, 7 May 2021 08:56:41 +0200 Subject: [PATCH 14/24] rewording --- changelog.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/changelog.md b/changelog.md index 6f48472..82282cf 100644 --- a/changelog.md +++ b/changelog.md @@ -2,7 +2,7 @@ #### v1.6.0 -- Improve miss and resist tranqshot handling (no more duplicate calls) +- Improve miss and resist tranqshot handling (no more duplicate announces) - Adds gluth fear to handled list of incapacitating debuffs - Adds `/tranq check` command to display the version others users have installed - Fixed timed alert feature that never worked (forgot to call it :D) From cebc8ab765c204d7ece1b4a75d7e6870e9ffda88 Mon Sep 17 00:00:00 2001 From: Slivo Date: Sat, 8 May 2021 11:50:08 +0200 Subject: [PATCH 15/24] Disable timed backup alert by default, adds migrations, tweak few default values, renamed timed backup alert var names --- TranqRotate.toc | 1 + src/defaults.lua | 7 ++++--- src/events.lua | 4 ++-- src/migration.lua | 19 +++++++++++++++++++ src/settings.lua | 8 ++++---- src/tranqRotate.lua | 1 + 6 files changed, 31 insertions(+), 9 deletions(-) create mode 100644 src/migration.lua diff --git a/TranqRotate.toc b/TranqRotate.toc index 8286fb6..770fdc0 100644 --- a/TranqRotate.toc +++ b/TranqRotate.toc @@ -35,3 +35,4 @@ src\defaults.lua src\settings.lua src\utils.lua src\debuff.lua +src\migration.lua diff --git a/src/defaults.lua b/src/defaults.lua index 65bb363..e7c3f01 100644 --- a/src/defaults.lua +++ b/src/defaults.lua @@ -20,9 +20,10 @@ function TranqRotate:LoadDefaults() showWindowWhenTargetingBoss = false, showFrenzyCooldownProgress = true, enableIncapacitatedBackupAlert = true, - incapacitatedDelay = 1.5, - enableTimedBackupAlertValue = true, - timedBackupAlertValueDelay = 1.5, + incapacitatedDelay = 2, + enableTimedBackupAlert = false, + timedBackupAlertDelay = 3, + currentMigration = #TranqRotate.migrations, }, } end diff --git a/src/events.lua b/src/events.lua index 3ad89f8..9e17609 100644 --- a/src/events.lua +++ b/src/events.lua @@ -122,8 +122,8 @@ end -- Handle timed alert for non tranqed frenzy function TranqRotate:handleTimedAlert() - if (TranqRotate.db.profile.enableTimedBackupAlertValue) then - C_Timer.After(TranqRotate.db.profile.timedBackupAlertValueDelay, function() + if (TranqRotate.db.profile.enableTimedBackupAlert) then + C_Timer.After(TranqRotate.db.profile.timedBackupAlertDelay, function() if (TranqRotate.frenzy and TranqRotate:isPlayerNextTranq()) then TranqRotate:alertBackup(TranqRotate.db.profile.unableToTranqMessage) end diff --git a/src/migration.lua b/src/migration.lua new file mode 100644 index 0000000..5cf7675 --- /dev/null +++ b/src/migration.lua @@ -0,0 +1,19 @@ +function TranqRotate:migrateProfile() + + if (TranqRotate.db.profile.currentMigration == nil) then + TranqRotate.db.profile.currentMigration = 0 + end + + for i = TranqRotate.db.profile.currentMigration + 1, #TranqRotate.migrations, 1 do + TranqRotate.migrations[i]() + end +end + +TranqRotate.migrations = { + -- 1.6.0 + function() + -- Those are old, badly named key + TranqRotate.db.profile.enableTimedBackupAlertValue = nil + TranqRotate.db.profile.timedBackupAlertValueDelay = nil + end, +} diff --git a/src/settings.lua b/src/settings.lua index cc4f472..f23e78e 100644 --- a/src/settings.lua +++ b/src/settings.lua @@ -141,24 +141,24 @@ function TranqRotate:CreateConfig() order = 26, width = "normal", min = 1, - max = 4, + max = 6, step = 0.1, }, - enableTimedBackupAlertValue = { + enableTimedBackupAlert = { name = L["ENABLE_AUTOMATIC_TIMED_BACKUP_ALERT"], desc = L["ENABLE_AUTOMATIC_TIMED_BACKUP_ALERT_DESC"], type = "toggle", order = 30, width = "double", }, - timedBackupAlertValueDelay = { + timedBackupAlertDelay = { name = L["TIMED_DELAY_THRESHOLD"], desc = L["TIMED_DELAY_THRESHOLD_DESC"], type = "range", order = 31, width = "normal", min = 1, - max = 4, + max = 6, step = 0.1, }, } diff --git a/src/tranqRotate.lua b/src/tranqRotate.lua index 0ec6e9f..92617de 100644 --- a/src/tranqRotate.lua +++ b/src/tranqRotate.lua @@ -15,6 +15,7 @@ function TranqRotate:init() self.db.RegisterCallback(self, "OnProfileReset", "ProfilesChanged") self:CreateConfig() + TranqRotate.migrateProfile() TranqRotate.hunterTable = {} TranqRotate.addonVersions = {} From 8c117f70b5c83cf6f1ac5dc725f63ed42cf3aa76 Mon Sep 17 00:00:00 2001 From: Slivo Date: Sat, 8 May 2021 11:51:25 +0200 Subject: [PATCH 16/24] Do not hide/show window on setting changes --- src/tranqRotate.lua | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/src/tranqRotate.lua b/src/tranqRotate.lua index 92617de..af694f6 100644 --- a/src/tranqRotate.lua +++ b/src/tranqRotate.lua @@ -28,6 +28,7 @@ function TranqRotate:init() TranqRotate:initGui() TranqRotate:updateRaidStatus() TranqRotate:applySettings() + TranqRotate:updateDisplay() TranqRotate:updateDragAndDrop() TranqRotate:initComms() @@ -53,8 +54,6 @@ function TranqRotate:applySettings() TranqRotate.mainFrame:SetPoint("CENTER", UIParent, "CENTER", 0, 0) end - TranqRotate:updateDisplay() - TranqRotate.mainFrame:EnableMouse(not TranqRotate.db.profile.lock) TranqRotate.mainFrame:SetMovable(not TranqRotate.db.profile.lock) end From 472da5754f68bdd9fa5423860b2d9b5ecdd39a71 Mon Sep 17 00:00:00 2001 From: Slivo Date: Sat, 8 May 2021 11:52:54 +0200 Subject: [PATCH 17/24] Update changelog --- changelog.md | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/changelog.md b/changelog.md index 82282cf..f0ebe8c 100644 --- a/changelog.md +++ b/changelog.md @@ -2,11 +2,12 @@ #### v1.6.0 -- Improve miss and resist tranqshot handling (no more duplicate announces) +- Improves miss and resist tranqshot handling (no more duplicate announces) - Adds gluth fear to handled list of incapacitating debuffs -- Adds `/tranq check` command to display the version others users have installed -- Fixed timed alert feature that never worked (forgot to call it :D) +- Adds `/tranq check` command to display the version other users have installed +- Fix timed alert feature that never worked (forgot to call it :D), changed default value to disabled - Fix an ui error when trying to send announces on say/yell channel in open world (test mode) +- Fix windows hiding unexpectedly when changing settings #### v1.5.1 From 029959cfdbddcee56b7ede3e8f8989784f0194bf Mon Sep 17 00:00:00 2001 From: Slivo Date: Sat, 8 May 2021 11:57:24 +0200 Subject: [PATCH 18/24] Removes debug printing of events names --- src/events.lua | 2 -- 1 file changed, 2 deletions(-) diff --git a/src/events.lua b/src/events.lua index 9e17609..c4b27a0 100644 --- a/src/events.lua +++ b/src/events.lua @@ -45,8 +45,6 @@ function TranqRotate:COMBAT_LOG_EVENT_UNFILTERED() TranqRotate:sendAnnounceMessage(TranqRotate.db.profile.announceSuccessMessage, destName) end elseif (event == "SPELL_MISSED" or event == "SPELL_DISPEL_FAILED") then - -- @Todo remove this when releasing beta - print(event) TranqRotate:sendSyncTranq(hunter, true, timestamp) TranqRotate:handleFailTranq(hunter) if (sourceGUID == UnitGUID("player")) then From 956fbc121c8ff496c7981cae3b211624d80c25cd Mon Sep 17 00:00:00 2001 From: Slivo Date: Sat, 8 May 2021 15:52:14 +0200 Subject: [PATCH 19/24] Fix migration process --- src/defaults.lua | 1 - src/migration.lua | 7 +++++-- 2 files changed, 5 insertions(+), 3 deletions(-) diff --git a/src/defaults.lua b/src/defaults.lua index e7c3f01..e7b2b20 100644 --- a/src/defaults.lua +++ b/src/defaults.lua @@ -23,7 +23,6 @@ function TranqRotate:LoadDefaults() incapacitatedDelay = 2, enableTimedBackupAlert = false, timedBackupAlertDelay = 3, - currentMigration = #TranqRotate.migrations, }, } end diff --git a/src/migration.lua b/src/migration.lua index 5cf7675..0e595b3 100644 --- a/src/migration.lua +++ b/src/migration.lua @@ -4,8 +4,11 @@ function TranqRotate:migrateProfile() TranqRotate.db.profile.currentMigration = 0 end - for i = TranqRotate.db.profile.currentMigration + 1, #TranqRotate.migrations, 1 do - TranqRotate.migrations[i]() + if (TranqRotate.db.profile.currentMigration < #TranqRotate.migrations) then + for i = TranqRotate.db.profile.currentMigration + 1, #TranqRotate.migrations, 1 do + TranqRotate.migrations[i]() + TranqRotate.db.profile.currentMigration = i + end end end From 7b2436b88f02aeb9df00a1ba2152fb51c6f385f3 Mon Sep 17 00:00:00 2001 From: Slivo Date: Sun, 9 May 2021 11:51:06 +0200 Subject: [PATCH 20/24] Hide the news section in settings --- src/settings.lua | 24 ++++++++++++------------ 1 file changed, 12 insertions(+), 12 deletions(-) diff --git a/src/settings.lua b/src/settings.lua index f23e78e..bd818fe 100644 --- a/src/settings.lua +++ b/src/settings.lua @@ -41,18 +41,18 @@ function TranqRotate:CreateConfig() order = 2, }, -- @todo : find a way to space widget properly - spacer3 = { - name = ' ', - type = "description", - width = "full", - order = 3, - }, - baseVersion = { - name = L['SETTING_GENERAL_DESC'], - type = "description", - width = "full", - order = 4, - }, + --spacer3 = { + -- name = ' ', + -- type = "description", + -- width = "full", + -- order = 3, + --}, + --baseVersion = { + -- name = L['SETTING_GENERAL_DESC'], + -- type = "description", + -- width = "full", + -- order = 4, + --}, -- @todo : find a way to space widget properly spacer4 = { name = ' ', From 8b9b024598a1ace553bd92fd5d502c2fbd0fb576 Mon Sep 17 00:00:00 2001 From: Slivo Date: Sun, 9 May 2021 11:52:42 +0200 Subject: [PATCH 21/24] Improve testRotation function --- src/rotation.lua | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) diff --git a/src/rotation.lua b/src/rotation.lua index 9164dcb..532a552 100644 --- a/src/rotation.lua +++ b/src/rotation.lua @@ -232,12 +232,20 @@ end -- @todo: remove this | TEST FUNCTION - Manually rotate hunters for test purpose function TranqRotate:testRotation() + local hunterToRotate = nil for key, hunter in pairs(TranqRotate.rotationTables.rotation) do - if (hunter.nextTranq or key == #TranqRotate.rotationTables.rotation) then - TranqRotate:rotate(hunter) + if (hunter.nextTranq) then + hunterToRotate = hunter break end end + + if (not hunterToRotate) then + hunterToRotate = TranqRotate.rotationTables.rotation[1] + end + + TranqRotate:sendSyncTranq(hunterToRotate, false, timestamp) + TranqRotate:rotate(hunterToRotate) end -- Check if a hunter is already registered From b2979f0336c01fe51dca5c26a0fca0d3e6d4e7fe Mon Sep 17 00:00:00 2001 From: Slivo Date: Sun, 9 May 2021 11:55:56 +0200 Subject: [PATCH 22/24] homogenize backup calls, no comms when tranq fail --- src/rotation.lua | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/rotation.lua b/src/rotation.lua index 532a552..575b0d7 100644 --- a/src/rotation.lua +++ b/src/rotation.lua @@ -497,7 +497,7 @@ function TranqRotate:alertBackup(message, nextHunter, noComms) end end else - TranqRotate:whisperBackup(message) + TranqRotate:whisperBackup(message, noComms) end end From 9de6f06c64ce4e28f537a591cbdb95792aefa5bd Mon Sep 17 00:00:00 2001 From: Slivo Date: Sun, 9 May 2021 11:56:55 +0200 Subject: [PATCH 23/24] Adds fail event in comms and fail print to chat --- src/comms.lua | 5 +++-- src/events.lua | 4 ++-- src/rotation.lua | 4 +++- src/tranqRotate.lua | 11 +++++++++++ 4 files changed, 19 insertions(+), 5 deletions(-) diff --git a/src/comms.lua b/src/comms.lua index c3dd4f9..492fc33 100644 --- a/src/comms.lua +++ b/src/comms.lua @@ -65,12 +65,13 @@ end ----------------------------------------------------------------------------------------------------------------------- -- Broadcast a tranqshot event -function TranqRotate:sendSyncTranq(hunter, fail, timestamp) +function TranqRotate:sendSyncTranq(hunter, fail, timestamp, failEvent) local message = { ['type'] = TranqRotate.constants.commsTypes.tranqshotDone, ['timestamp'] = timestamp, ['player'] = hunter.name, ['fail'] = fail, + ['failEvent'] = failEvent, } TranqRotate:sendRaidAddonMessage(message) @@ -138,7 +139,7 @@ function TranqRotate:receiveSyncTranq(prefix, message, channel, sender) TranqRotate:rotate(hunter) end else - TranqRotate:handleFailTranq(hunter) + TranqRotate:handleFailTranq(hunter, message.failEvent) end end diff --git a/src/events.lua b/src/events.lua index c4b27a0..480317d 100644 --- a/src/events.lua +++ b/src/events.lua @@ -45,8 +45,8 @@ function TranqRotate:COMBAT_LOG_EVENT_UNFILTERED() TranqRotate:sendAnnounceMessage(TranqRotate.db.profile.announceSuccessMessage, destName) end elseif (event == "SPELL_MISSED" or event == "SPELL_DISPEL_FAILED") then - TranqRotate:sendSyncTranq(hunter, true, timestamp) - TranqRotate:handleFailTranq(hunter) + TranqRotate:sendSyncTranq(hunter, true, timestamp, event) + TranqRotate:handleFailTranq(hunter, event) if (sourceGUID == UnitGUID("player")) then TranqRotate:sendAnnounceMessage(TranqRotate.db.profile.announceFailMessage, destName) end diff --git a/src/rotation.lua b/src/rotation.lua index 575b0d7..df99207 100644 --- a/src/rotation.lua +++ b/src/rotation.lua @@ -78,7 +78,7 @@ function TranqRotate:rotate(lastHunter, rotateWithoutCooldown) end -- Handle miss or dispel resist scenario -function TranqRotate:handleFailTranq(hunter) +function TranqRotate:handleFailTranq(hunter, event) -- Do not process multiple SPELL_DISPEL_FAILED events or multiple fail broadcasts local duplicate = hunter.lastFailTime >= GetTime() - TranqRotate.constants.duplicateFailedTranqshotDelayThreshold @@ -86,6 +86,8 @@ function TranqRotate:handleFailTranq(hunter) return end + TranqRotate:printFail(hunter, event) + local playerName, realm = UnitName("player") local hasPlayerFailed = playerName == hunter.name local nextHunter = TranqRotate:getHighlightedHunter() diff --git a/src/tranqRotate.lua b/src/tranqRotate.lua index af694f6..24111e1 100644 --- a/src/tranqRotate.lua +++ b/src/tranqRotate.lua @@ -272,3 +272,14 @@ function TranqRotate:formatAddonVersion(version) return version end end + +function TranqRotate:printFail(hunter, event) + if (event == "SPELL_MISSED") then + TranqRotate:printPrefixedMessage(hunter.name .. " missed his tranqshot!") + elseif(event == "SPELL_DISPEL_FAILED") then + TranqRotate:printPrefixedMessage(hunter.name .. "'s tranqshot was resisted!") + else + -- v1.5.1 and older do not send the event type + TranqRotate:printPrefixedMessage(hunter.name .. "'s tranqshot was missed or resisted!") + end +end From bff0f27237606d2b30b44e3aff35819da143ea27 Mon Sep 17 00:00:00 2001 From: Slivo Date: Sun, 9 May 2021 12:18:53 +0200 Subject: [PATCH 24/24] Update readme & changelog --- README.md | 5 +++++ changelog.md | 3 ++- 2 files changed, 7 insertions(+), 1 deletion(-) diff --git a/README.md b/README.md index 059222d..e6db739 100644 --- a/README.md +++ b/README.md @@ -32,6 +32,7 @@ Please report any issue using github issues : https://github.com/Slivo-fr/TranqR - Display the frenzy cooldown of each boss - Optional automatic backup call when incapacitated - Optional automatic timed backup call +- Prints to chat name and reason of a tranq fail (miss or resist) ## Usage @@ -53,6 +54,8 @@ The reset button is also able to resync raid hunters and rotation setup if you n You may adds the `/tranq backup` command to a macro that you can use when you are unable to tranq and you need some help, It will whisper all backup hunters the fail message. +The `/tranq check` command allows you to list version or TranqRotate used by others hunters and others non-hunters players + ## Roadmap Here is a list of feature I want to implement at some point, no specific order is decided yet. @@ -60,6 +63,8 @@ Here is a list of feature I want to implement at some point, no specific order i - Automatic handling of death and disconnection of hunters on the rotation group (swap with a backup, send an alert about it) - Use raid symbols to mark hunters that need to tranq, or that need to backup a failed tranqshot - Automatic reset of rotation when raid wipe +- Adds raid markers to tranq announces if target has one +- Show an indicator on hunters that does not use TranqRotate (So you know you have to inform them about the rotation) ## Download diff --git a/changelog.md b/changelog.md index f0ebe8c..a3f368d 100644 --- a/changelog.md +++ b/changelog.md @@ -2,9 +2,10 @@ #### v1.6.0 -- Improves miss and resist tranqshot handling (no more duplicate announces) +- Improves miss and resist tranqshot handling (no more duplicate announces or whispers) - Adds gluth fear to handled list of incapacitating debuffs - Adds `/tranq check` command to display the version other users have installed +- Adds printing of fail to chat window - Fix timed alert feature that never worked (forgot to call it :D), changed default value to disabled - Fix an ui error when trying to send announces on say/yell channel in open world (test mode) - Fix windows hiding unexpectedly when changing settings