Skip to content

Commit

Permalink
Merge pull request #44 from Slivo-fr/release/v1.5.1
Browse files Browse the repository at this point in the history
Release/v1.5.1
  • Loading branch information
Slivo-fr authored May 1, 2021
2 parents d04ef76 + 59f2f18 commit 096623b
Show file tree
Hide file tree
Showing 5 changed files with 26 additions and 8 deletions.
6 changes: 3 additions & 3 deletions TranqRotate.toc
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
## Interface: 11305
## Title: TranqRotate |cff00aa001.5.0|r
## Interface: 11307
## Title: TranqRotate |cff00aa001.5.1|r
## Notes: A tranqshot rotation assistant
## Author: Slivo
## Version: 1.5.0
## Version: 1.5.1
## SavedVariables: TranqRotateDb
## OptionalDeps: Ace3

Expand Down
6 changes: 6 additions & 0 deletions changelog.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,11 @@
## TranqRotate Changelog

#### v1.5.1

- Handles the new dispel resistance mechanic
- Fix a bad nil check in comms
- Fix a logic issue in hunter list cleaning function

#### v1.5.0

- Restricted ordering tranq rotation to raid leader, raid assists and hunters
Expand Down
9 changes: 7 additions & 2 deletions src/comms.lua
Original file line number Diff line number Diff line change
Expand Up @@ -127,10 +127,15 @@ end
function TranqRotate:receiveSyncTranq(prefix, message, channel, sender)

local hunter = TranqRotate:getHunter(message.player)

if (hunter == nil) then
return
end

local notDuplicate = hunter.lastTranqTime < GetTime() - TranqRotate.constants.duplicateTranqshotDelayThreshold

if (hunter ~= nil and notDuplicate) then
TranqRotate:rotate(TranqRotate:getHunter(message.player), message.fail)
if (notDuplicate) then
TranqRotate:rotate(hunter, message.fail)
end
end

Expand Down
2 changes: 1 addition & 1 deletion src/events.lua
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ function TranqRotate:COMBAT_LOG_EVENT_UNFILTERED()
if (sourceGUID == UnitGUID("player")) then
TranqRotate:sendAnnounceMessage(TranqRotate.db.profile.announceSuccessMessage, destName)
end
elseif (event == "SPELL_MISSED") then
elseif (event == "SPELL_MISSED" or event == "SPELL_DISPEL_FAILED") then
TranqRotate:sendSyncTranq(hunter, true, timestamp)
TranqRotate:rotate(hunter, true)
if (sourceGUID == UnitGUID("player")) then
Expand Down
11 changes: 9 additions & 2 deletions src/rotation.lua
Original file line number Diff line number Diff line change
Expand Up @@ -250,12 +250,19 @@ end

-- Iterate over hunter list and purge hunter that aren't in the group anymore
function TranqRotate:purgeHunterList()

local hunterToRemove = {}

for _, hunter in pairs(TranqRotate.hunterTable) do
if (not UnitInParty(hunter.name)) then
TranqRotate:unregisterUnitEvents(hunter)
TranqRotate:removeHunter(hunter)
table.insert(hunterToRemove, hunter)
end
end

for _, hunter in pairs(hunterToRemove) do
TranqRotate:unregisterUnitEvents(hunter)
TranqRotate:removeHunter(hunter)
end
end

-- Iterate over all raid members to find hunters and update their status
Expand Down

0 comments on commit 096623b

Please sign in to comment.