diff --git a/SheepMonitor.toc b/SheepMonitor.toc index 21f2197..342ef52 100755 --- a/SheepMonitor.toc +++ b/SheepMonitor.toc @@ -2,7 +2,7 @@ ## Title: Sheep Monitor ## Notes: Provides various methods of notification to help you keep track of your flock. ## Author: funkjedi -## Version: 1.21 +## Version: 1.22 ## SavedVariables: SheepMonitorDatabase ## OptionalDeps: Ace3, LibAuras, LibAuraInfo-1.0 diff --git a/changelog.txt b/changelog.txt index c63f2d0..3f1a7ac 100644 --- a/changelog.txt +++ b/changelog.txt @@ -1,3 +1,6 @@ +1.22 +- use correct durations based on Polymorph rank + 1.21 - added support for Polymorph (Rank 2), Polymorph (Rank 3) and Polymorph (Rank 4) diff --git a/main.lua b/main.lua index 2623bd5..c539e37 100755 --- a/main.lua +++ b/main.lua @@ -43,6 +43,14 @@ function SheepMonitor:OnInitialize() self:CreateInterfaceOptions() --InterfaceOptionsFrame_OpenToCategory('SheepMonitor') + + if (self:IsClassic()) { + LibAuraInfo.auraInfo[118] = '20;1' + LibAuraInfo.auraInfo[12824] = '30;1' + LibAuraInfo.auraInfo[12825] = '40;1' + LibAuraInfo.auraInfo[12826] = '50;1' + LibAuraInfo.auraInfo[28272] = '50;1' + } end function SheepMonitor:IsClassic() @@ -76,16 +84,7 @@ function SheepMonitor:COMBAT_LOG_EVENT_UNFILTERED(event, ...) timestamp = GetTime(), duration = LibAuraInfo:GetDuration(spellId, sourceGUID, destGUID), } - if self:IsClassic() then - local playerLevel = UnitLevel('player') - if spellId == 118 and playerLevel < 20 then - aura.duration = 20 - elseif spellId == 118 and playerLevel < 40 then - aura.duration = 30 - elseif spellId == 118 and playerLevel < 60 then - aura.duration = 40 - end - elseif destGUID == UnitGUID('target') then + if not self:IsClassic() and destGUID == UnitGUID('target') then aura.duration = select(5, LibAuras:UnitAura('target', spellId, 'PLAYER|HARMFUL')) or 0 end self:AuraApplied(aura)