Skip to content

Commit

Permalink
Updating for patch 8.2
Browse files Browse the repository at this point in the history
  • Loading branch information
funkjedi committed Jun 28, 2019
1 parent eaef7b6 commit 0cd02a9
Show file tree
Hide file tree
Showing 4 changed files with 18 additions and 8 deletions.
4 changes: 2 additions & 2 deletions SheepMonitor.toc
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
## Interface: 80000
## Interface: 80200
## Title: Sheep Monitor
## Notes: Provides various methods of notification to help you keep track of your flock.
## Author: funkjedi
## Version: 1.18
## Version: 1.19
## SavedVariables: SheepMonitorDatabase
## OptionalDeps: Ace3, LibAuras, LibAuraInfo-1.0

Expand Down
3 changes: 3 additions & 0 deletions changelog.txt
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
1.19
- updated for patch 8.2.0

1.18
- added support for Peacock, Bumblebee, Direhorn and Imprison

Expand Down
16 changes: 12 additions & 4 deletions main.lua
Original file line number Diff line number Diff line change
Expand Up @@ -132,7 +132,7 @@ function SheepMonitor:POLYMORPH_UPDATE(aura, remaining)
end
end
if self.db.char.enableAudibleBreakWarning and remaining == 5 then
PlaySoundFile(self.db.char.audibleBreakWarningSound)
self:PlaySoundFile(self.db.char.audibleBreakWarningSound)
end
end

Expand All @@ -144,7 +144,7 @@ function SheepMonitor:POLYMORPH_REMOVED(aura)
self:HideQuartz(aura)
end
if self.db.char.enableAudibleBreak then
PlaySoundFile(self.db.char.audibleBreakSound)
self:PlaySoundFile(self.db.char.audibleBreakSound)
end
if self.db.char.enableBreakMessages then
local message = L['WARNING_BROKEN']:format(aura.spellName)
Expand Down Expand Up @@ -184,5 +184,13 @@ function SheepMonitor:SendAnnouncement(message)
end
end



function SheepMonitor:PlaySoundFile(file)
local sounds = {
['Sound\\Interface\\AlarmClockWarning3.wav'] = 567458,
['Sound\\Interface\\RaidWarning.wav'] = 567397,
}
if sounds[file] then
file = sounds[file]
end
PlaySoundFile(file)
end
3 changes: 1 addition & 2 deletions options.lua
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ local function setOption(key, value)
end
local function setOptionPreview(key, value)
SheepMonitor.db.char[key] = value
PlaySoundFile(value)
SheepMonitor:PlaySoundFile(value)
end


Expand Down Expand Up @@ -237,4 +237,3 @@ function SheepMonitor:CreateInterfaceOptions()
audibleBreakWarningDesc:SetJustifyH('LEFT')
audibleBreakWarningDesc:SetJustifyV('MIDDLE')
end

0 comments on commit 0cd02a9

Please sign in to comment.