From 7cb9c738ccc9956298c080d1593d3eae939eafe0 Mon Sep 17 00:00:00 2001 From: Parnic Date: Thu, 16 Oct 2008 14:30:43 +0000 Subject: [PATCH] - increased vertical offsets (by request) - fixed Slice and Dice module for new Imp SnD talent values as well as the new SnD glyph --- IceHUD.lua | 4 ++-- modules/SliceAndDice.lua | 21 ++++++++++++++++++++- 2 files changed, 22 insertions(+), 3 deletions(-) diff --git a/IceHUD.lua b/IceHUD.lua index ff2be27..040064b 100644 --- a/IceHUD.lua +++ b/IceHUD.lua @@ -38,8 +38,8 @@ IceHUD.options = set = function(v) IceHUD.IceCore:SetVerticalPos(v) end, - min = -400, - max = 400, + min = -700, + max = 700, step = 10, order = 11 }, diff --git a/modules/SliceAndDice.lua b/modules/SliceAndDice.lua index ffa32ef..4204a95 100644 --- a/modules/SliceAndDice.lua +++ b/modules/SliceAndDice.lua @@ -6,12 +6,15 @@ local NetherbladeItemIdList = {29044, 29045, 29046, 29047, 29048} -- Parnic - bah, have to abandon the more robust string representation of each slot because of loc issues... local NetherbladeEquipLocList = {1, 3, 5, 7, 10} --"HeadSlot", "ShoulderSlot", "ChestSlot", "LegsSlot", "HandsSlot"} +local GlyphSpellId = 56810 + local baseTime = 9 local gapPerComboPoint = 3 local netherbladeBonus = 3 +local glyphBonusSec = 3 local impSndTalentPage = 2 local impSndTalentIdx = 4 -local impSndBonusPerRank = 0.15 +local impSndBonusPerRank = 0.25 local maxComboPoints = 5 local sndEndTime = 0 local sndDuration = 0 @@ -302,6 +305,10 @@ function SliceAndDice.prototype:GetMaxBuffTime(numComboPoints) maxduration = maxduration + netherbladeBonus end + if self:HasGlyphBonus() then + maxduration = maxduration + glyphBonusSec + end + _, _, _, _, rank = GetTalentInfo(impSndTalentPage, impSndTalentIdx) maxduration = maxduration * (1 + (rank * impSndBonusPerRank)) @@ -335,6 +342,18 @@ function SliceAndDice.prototype:HasNetherbladeBonus() end end +function SliceAndDice.prototype:HasGlyphBonus() + for i=1,GetNumGlyphSockets() do + local enabled, _, spell = GetGlyphSocketInfo(i) + + if enabled and spell == GlyphSpellId then + return true + end + end + + return false +end + function SliceAndDice.prototype:GetItemIdFromItemLink(linkStr) local itemId