From 69c2acbe9c17153437deb675947cd87c4970c883 Mon Sep 17 00:00:00 2001 From: "Johnny C. Lam" Date: Mon, 19 May 2014 16:41:16 +0000 Subject: [PATCH] Fix wrong order of arguments in ConsumeRune() signature. Also add some additional debugging information. git-svn-id: svn://svn.curseforge.net/wow/ovale/mainline/trunk@1469 d5049fe3-3747-40f7-a4b5-f36d6801af5f --- OvaleRunes.lua | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/OvaleRunes.lua b/OvaleRunes.lua index c0c0a16..228da32 100644 --- a/OvaleRunes.lua +++ b/OvaleRunes.lua @@ -273,12 +273,13 @@ end -- statePrototype.DebugRunes = function(state) + Ovale:FormatPrint("Current rune state:") local now = state.currentTime for slot, rune in ipairs(state.rune) do if rune:IsActiveRune(now) then - Ovale:FormatPrint("rune[%d] (%s) is active.", slot, RUNE_NAME[rune.type]) + Ovale:FormatPrint(" rune[%d] (%s) is active.", slot, RUNE_NAME[rune.type]) else - Ovale:FormatPrint("rune[%d] (%s) comes off cooldown in %f seconds.", slot, RUNE_NAME[rune.type], rune.endCooldown - now) + Ovale:FormatPrint(" rune[%d] (%s) comes off cooldown in %f seconds.", slot, RUNE_NAME[rune.type], rune.endCooldown - now) end end end @@ -291,7 +292,7 @@ statePrototype.ApplyRuneCost = function(state, spellId, atTime, spellcast) local count = si[name] or 0 while count > 0 do local snapshot = spellcast and spellcast.snapshot or nil - state:ConsumeRune(atTime, spellId, name, snapshot) + state:ConsumeRune(spellId, atTime, name, snapshot) count = count - 1 end end @@ -381,7 +382,7 @@ statePrototype.ConsumeRune = function(state, spellId, atTime, name, snapshot) local maxi = OvalePower.maxPower.runicpower state.runicpower = (runicpower < maxi) and runicpower or maxi else - Ovale:FormatPrint("No %s rune available to consume!", RUNE_NAME[runeType]) + Ovale:FormatPrint("No %s rune available at %f to consume for spell %d!", RUNE_NAME[runeType], atTime, spellId) end end -- 1.7.9.5