- removing a debug
Sidoine De Wispelaere [12-21-09 - 10:11]
- removing a debug
- added soundtime parameter
git-svn-id: svn://svn.curseforge.net/wow/ovale/mainline/trunk@171 d5049fe3-3747-40f7-a4b5-f36d6801af5f
diff --git a/Ovale.lua b/Ovale.lua
index 48313f4..a097661 100644
--- a/Ovale.lua
+++ b/Ovale.lua
@@ -324,10 +324,10 @@ function Ovale:COMBAT_LOG_EVENT_UNFILTERED(event, ...)
local otherDebuff = self:GetOtherDebuffs(spellName)
if event == "SPELL_AURA_APPLIED" or event == "SPELL_AURA_REFRESH" then
otherDebuff[destGUID] = Ovale.maintenant + self.spellInfo[spellName].duration
- self:Print("ajout de "..spellName.." à "..destGUID)
+ -- self:Print("ajout de "..spellName.." à "..destGUID)
elseif event == "SPELL_AURA_REMOVED" then
otherDebuff[destGUID] = nil
- self:Print("suppression de "..spellName.." de "..destGUID)
+ -- self:Print("suppression de "..spellName.." de "..destGUID)
end
end
end
@@ -864,7 +864,9 @@ function Ovale:AddSpellToStack(spellName, startCast, endCast, nextCast)
if startCast>Ovale.maintenant then
local _, _, _, cost = GetSpellInfo(spellName)
- self.state.mana = self.state.mana - cost
+ if cost then
+ self.state.mana = self.state.mana - cost
+ end
end
self.attenteFinCast = nextCast
diff --git a/Ovale.toc b/Ovale.toc
index 38ff5b3..cf01643 100644
--- a/Ovale.toc
+++ b/Ovale.toc
@@ -3,7 +3,7 @@
## Notes: Show the icon of the next spell to cast
## Notes-frFR: Affiche l'icône du prochain sort à lancer
## Author: Sidoine
-## Version: 3.3.3
+## Version: 3.3.4
## OptionalDeps: Ace3, ButtonFacade, Recount
## SavedVariables: OvaleDB
## SavedVariablesPerCharacter: OvaleDBPC
diff --git a/OvaleIcone.lua b/OvaleIcone.lua
index 2945ccb..60a0507 100644
--- a/OvaleIcone.lua
+++ b/OvaleIcone.lua
@@ -48,9 +48,13 @@ local function Update(self, element, minAttente, actionTexture, actionInRange, a
if (minAttente==Ovale.maintenant) then
self.cd:Hide()
- if element.params.sound and not self.lastSound then
+ end
+
+ if element.params.sound and not self.lastSound then
+ local delay = self.soundtime or 0.5
+ if Ovale.maintenant>=minAttente - delay then
self.lastSound = element.params.sound
- print("Play" .. self.lastSound)
+ -- print("Play" .. self.lastSound)
PlaySoundFile(self.lastSound)
end
end