From e86e8803f9e4005105270f23c24c388e14883ce4 Mon Sep 17 00:00:00 2001 From: Slivo Date: Mon, 10 May 2021 19:37:57 +0200 Subject: [PATCH 1/5] Nil check on hunter before processing tranq event --- src/events.lua | 24 +++++++++++++----------- 1 file changed, 13 insertions(+), 11 deletions(-) diff --git a/src/events.lua b/src/events.lua index 480317d..dd1f390 100644 --- a/src/events.lua +++ b/src/events.lua @@ -38,17 +38,19 @@ function TranqRotate:COMBAT_LOG_EVENT_UNFILTERED() 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) - if (sourceGUID == UnitGUID("player")) then - TranqRotate:sendAnnounceMessage(TranqRotate.db.profile.announceSuccessMessage, destName) - end - elseif (event == "SPELL_MISSED" or event == "SPELL_DISPEL_FAILED") then - TranqRotate:sendSyncTranq(hunter, true, timestamp, event) - TranqRotate:handleFailTranq(hunter, event) - if (sourceGUID == UnitGUID("player")) then - TranqRotate:sendAnnounceMessage(TranqRotate.db.profile.announceFailMessage, destName) + if (hunter) then + if (event == "SPELL_CAST_SUCCESS") then + TranqRotate:sendSyncTranq(hunter, false, timestamp) + 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 + TranqRotate:sendSyncTranq(hunter, true, timestamp, event) + TranqRotate:handleFailTranq(hunter, event) + if (sourceGUID == UnitGUID("player")) then + TranqRotate:sendAnnounceMessage(TranqRotate.db.profile.announceFailMessage, destName) + end end end elseif (event == "SPELL_AURA_APPLIED" and TranqRotate:isBossFrenzy(spellName, sourceGUID)) then From bb5119953a22e58d4886adf8488aa4a57619bae2 Mon Sep 17 00:00:00 2001 From: Slivo Date: Mon, 10 May 2021 19:38:24 +0200 Subject: [PATCH 2/5] Fix the target name in the test mode yell/say print --- src/tranqRotate.lua | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/tranqRotate.lua b/src/tranqRotate.lua index 24111e1..25e2e78 100644 --- a/src/tranqRotate.lua +++ b/src/tranqRotate.lua @@ -77,7 +77,7 @@ function TranqRotate:sendAnnounceMessage(message, targetName) TranqRotate.db.profile.channelType == "SAY" or TranqRotate.db.profile.channelType == "YELL" ) ) then - TranqRotate:printPrefixedMessage(message .. " " .. L["YELL_SAY_DISABLED_OPEN_WORLD"]) + TranqRotate:printPrefixedMessage(string.format(message, targetName) .. " " .. L["YELL_SAY_DISABLED_OPEN_WORLD"]) return end From 332f1c53dadcddebf848da711efd8f1b40a3aa9f Mon Sep 17 00:00:00 2001 From: Slivo Date: Mon, 10 May 2021 20:12:31 +0200 Subject: [PATCH 3/5] Fix check command non hunter version print --- src/tranqRotate.lua | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/tranqRotate.lua b/src/tranqRotate.lua index 25e2e78..34d457e 100644 --- a/src/tranqRotate.lua +++ b/src/tranqRotate.lua @@ -260,7 +260,7 @@ function TranqRotate:checkVersions() end for key, player in pairs(TranqRotate.addonVersions) do if (player ~= UnitName("player")) then - TranqRotate:printPrefixedMessage(hunter.name .. " - " .. TranqRotate:formatAddonVersion(hunter.addonVersion)) + TranqRotate:printPrefixedMessage(player .. " - " .. TranqRotate:formatAddonVersion(hunter.addonVersion)) end end end From b41f687b2f1b8519c7affed683d1e2749d0a31c1 Mon Sep 17 00:00:00 2001 From: Slivo Date: Tue, 11 May 2021 00:21:15 +0200 Subject: [PATCH 4/5] Update changelog for 1.6.1 --- changelog.md | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/changelog.md b/changelog.md index a3f368d..66f3dcc 100644 --- a/changelog.md +++ b/changelog.md @@ -1,5 +1,11 @@ ## TranqRotate Changelog +#### v1.6.1 + +- Update ace3 libs for TBC prepatch +- Fix few minor issues with test mode +- Fix a lua error using `/tranq check` with non hunter users + #### v1.6.0 - Improves miss and resist tranqshot handling (no more duplicate announces or whispers) From e05227f1ce25cf53e82ffbd4c7b8de1c6d321875 Mon Sep 17 00:00:00 2001 From: Slivo Date: Tue, 11 May 2021 10:35:05 +0200 Subject: [PATCH 5/5] Update toc for 1.6.1 --- TranqRotate.toc | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/TranqRotate.toc b/TranqRotate.toc index 770fdc0..d7bc874 100644 --- a/TranqRotate.toc +++ b/TranqRotate.toc @@ -1,8 +1,8 @@ ## Interface: 11307 -## Title: TranqRotate |cff00aa001.6.0|r +## Title: TranqRotate |cff00aa001.6.1|r ## Notes: A tranqshot rotation assistant ## Author: Slivo -## Version: 1.6.0 +## Version: 1.6.1 ## SavedVariables: TranqRotateDb ## OptionalDeps: Ace3