diff --git a/.gitignore b/.gitignore index 3deccff..8ed83d6 100644 --- a/.gitignore +++ b/.gitignore @@ -1,4 +1,5 @@ .idea libs copy.sh +copytbc.sh package.sh \ No newline at end of file diff --git a/README.md b/README.md index 71b8778..6701061 100644 --- a/README.md +++ b/README.md @@ -66,4 +66,4 @@ Here is a list of feature I want to implement at some point, no specific order i Do not use github download button on this page, get the latest release zip file from https://github.com/Slivo-fr/TranqRotate/releases -Also available here https://www.curseforge.com/wow/addons/tranqrotate and there https://wowclassicui.com/fr/addons/tranqrotate +Also available on [curseforge](https://www.curseforge.com/wow/addons/tranqrotate) diff --git a/TranqRotate.toc b/TranqRotate.toc index 58bd944..86e646a 100644 --- a/TranqRotate.toc +++ b/TranqRotate.toc @@ -1,8 +1,8 @@ ## Interface: 11401 -## Title: TranqRotate |cff00aa002.2.2|r +## Title: TranqRotate |cff00aa002.2.3|r ## Notes: A tranqshot rotation assistant ## Author: Slivo -## Version: 2.2.2 +## Version: 2.2.3 ## SavedVariables: TranqRotateDb ## OptionalDeps: Ace3 diff --git a/TranqRotate_TBC.toc b/TranqRotate_TBC.toc new file mode 100644 index 0000000..d962f94 --- /dev/null +++ b/TranqRotate_TBC.toc @@ -0,0 +1,40 @@ +## Interface: 20502 +## Title: TranqRotate |cff00aa002.2.3|r +## Notes: A tranqshot rotation assistant +## Author: Slivo +## Version: 2.2.3 +## SavedVariables: TranqRotateDb +## OptionalDeps: Ace3 + +#@no-lib-strip@ +libs\LibStub\LibStub.lua +libs\CallbackHandler-1.0\CallbackHandler-1.0.xml +libs\AceDB-3.0\AceDB-3.0.xml +libs\AceDBOptions-3.0\AceDBOptions-3.0.xml +libs\AceGUI-3.0\AceGUI-3.0.xml +libs\AceConfig-3.0\AceConfig-3.0.xml +libs\AceComm-3.0\AceComm-3.0.xml +libs\AceSerializer-3.0\AceSerializer-3.0.xml +#@end-no-lib-strip@ + +locales\enUS.lua +locales\frFR.lua +locales\zhCN.lua +locales\zhTW.lua +locales\ruRU.lua + +src\tranqRotate.lua +src\events.lua +src\rotation.lua +src\constants.lua +src\frames.lua +src\gui.lua +src\dragdrop.lua +src\comms.lua +src\defaults.lua +src\settings.lua +src\utils.lua +src\debuff.lua +src\migration.lua +src\raidIcons.lua +src\encounter.lua diff --git a/changelog.md b/changelog.md index b5f9557..858790a 100644 --- a/changelog.md +++ b/changelog.md @@ -1,5 +1,9 @@ ## TranqRotate Changelog +#### v2.2.3 + +- Incapacitated backup alert should now work properly + #### v2.2.2 - Bump toc for 1.14.1 diff --git a/src/debuff.lua b/src/debuff.lua index 1454591..5f7bb49 100644 --- a/src/debuff.lua +++ b/src/debuff.lua @@ -1,19 +1,24 @@ -- Checks if player is incapacitated by a debuff for too long function TranqRotate:isPlayedIncapacitatedByDebuff() - for i, debuffId in ipairs(TranqRotate.constants.incapacitatingDebuffs) do + local name, expirationTime = TranqRotate:getPlayerDebuff(debuffId) + if (name and expirationTime - GetTime() > TranqRotate.db.profile.incapacitatedDelay) then + return true + end + end - local name, _, _, _, _, expirationTime, _, _, _, spellId, _, isBossDebuff - = AuraUtil.FindAuraByName(GetSpellInfo(debuffId), "player") + return false +end - if (name) then - print(name, expirationTime - GetTime(), spellId, isBossDebuff) +function TranqRotate:getPlayerDebuff(debuffId) + for i=1, 32, 1 do + local name, icon, count, dispelType, duration, expirationTime, source, isStealable, nameplateShowPersonal, + spellId, canApplyAura, isBossDebuff, castByPlayer, nameplateShowAll, timeMod = UnitDebuff("player", i) - if (expirationTime - GetTime() > TranqRotate.constants.incapacitatedDelay) then - return true - end + if (spellId and spellId == debuffId) then + return name, expirationTime end end - return false + return nil end diff --git a/src/rotation.lua b/src/rotation.lua index 493b4c4..d48d3d9 100644 --- a/src/rotation.lua +++ b/src/rotation.lua @@ -248,7 +248,7 @@ function TranqRotate:testRotation() hunterToRotate = TranqRotate.rotationTables.rotation[1] end - TranqRotate:sendSyncTranq(hunterToRotate, false, timestamp) + TranqRotate:sendSyncTranq(hunterToRotate, false, GetTime()) TranqRotate:rotate(hunterToRotate) end diff --git a/src/tranqRotate.lua b/src/tranqRotate.lua index 2bd956f..428c3c2 100644 --- a/src/tranqRotate.lua +++ b/src/tranqRotate.lua @@ -159,7 +159,7 @@ end function TranqRotate:printRotationSetup() if (IsInRaid()) then - TranqRotate:sendRotationSetupBroadcastMessage('--- ' .. TranqRotate.constants.printPrefix .. L['BROADCAST_HEADER_TEXT'] .. ' ---', channel) + TranqRotate:sendRotationSetupBroadcastMessage('--- ' .. TranqRotate.constants.printPrefix .. L['BROADCAST_HEADER_TEXT'] .. ' ---') if (TranqRotate.db.profile.useMultilineRotationReport) then TranqRotate:printMultilineRotation(TranqRotate.rotationTables.rotation)