WoWInterface SVN NeedToKnow-Updated

Compare Revisions

  • This comparison shows the changes necessary to convert path
    /
    from Rev 116 to Rev 117
    Reverse comparison

Rev 116 → Rev 117

trunk/NeedToKnow/NeedToKnow.lua
76,7 → 76,7
}
-- NEEDTOKNOW = {} is defined in the localization file, which must be loaded before this file
 
NEEDTOKNOW.VERSION = "4.0.03"
NEEDTOKNOW.VERSION = "4.0.04"
NEEDTOKNOW.UPDATE_INTERVAL = 0.05
NEEDTOKNOW.MAXBARS = 20
 
2068,12 → 2068,35
function NeedToKnow.GetItemCooldown(bar, entry)
local start, cd_len, enable = GetItemCooldown(entry.id)
if start then
local name, _, _, _, _, _, _, _, icon = GetItemInfo(entry.id)
local name, _, _, _, _, _, _, _, _, icon = GetItemInfo(entry.id)
return start, cd_len, enable, name, icon
end
end
 
 
function NeedToKnow.UpdateWeaponEnchantData(data, slot)
local oldname = data.name
data.name = NeedToKnow.DetermineTempEnchantFromTooltip(slot)
if not data.name then
data.name = "Unknown"
data.icon = nil
--trace("Warning: NTK couldn't figure out what enchant is on weapon slot",slot)
end
data.expiration = GetTime() + data.expiration/1000
if oldname ~= data.name then
_,_,data.icon = GetSpellInfo(data.name)
if nil == data.icon then
_,_,data.icon = GetSpellInfo(data.name .. " Weapon")
end
if nil == data.icon then
_,_,_,_,_,_,_,_,_,data.icon = GetItemInfo(data.name)
end
if nil == data.icon then
data.icon=GetInventoryItemTexture("player",slot)
end
end
end
 
-- Scrapes the current tooltips for the player's weapons to tease out
-- the name of the current weapon imbue (and not just the name of the
-- weapon, like you get from the Blizzard API.) This info gets cached
2087,31 → 2110,13
= GetWeaponEnchantInfo()
 
if ( mdata.present ) then
local oldname = mdata.name
mdata.name = NeedToKnow.DetermineTempEnchantFromTooltip(16)
if not mdata.name then
mdata.name = "Unknown"
print("Warning: NTK couldn't figure out what enchant is on the main hand weapon")
end
mdata.expiration = GetTime() + mdata.expiration/1000
if oldname ~= mdata.name then
_,_,mdata.icon = GetSpellInfo(mdata.name)
end
NeedToKnow.UpdateWeaponEnchantData(mdata, 16)
else
mdata.name=nil
end
 
if ( odata.present ) then
local oldname = odata.name
odata.name = NeedToKnow.DetermineTempEnchantFromTooltip(17)
if not odata.name then
odata.name = "Unknown"
print("Warning: NTK couldn't figure out what enchant is on the off-hand weapon")
end
odata.expiration = GetTime() + odata.expiration/1000
if oldname ~= odata.name then
_,_,odata.icon = GetSpellInfo(odata.name)
end
NeedToKnow.UpdateWeaponEnchantData(odata, 17)
else
odata.name = nil
end
trunk/NeedToKnow/NeedToKnow.toc
1,7 → 1,7
## Interface: 040300
## Title: NeedToKnow
## Author: Kitjan, lieandswell
## Version: 4.0.03
## Version: 4.0.04
## Notes: Timer bars for buffs, debuffs, cooldowns, etc.
## X-Credits: Bilt, Fxfighter EU-Echsenkessel, metalchoir, sp00n, Vlakarados, wowui.cn
## X-Category: Buffs, Combat