Thread Tools Display Modes
12-03-14, 07:33 AM   #1
cryangel
A Fallenroot Satyr
Join Date: Aug 2012
Posts: 25
Durability

NxWarehouse.lua

ch["DurPercent"]
ch["DurLowPercent"]

not Work..

Code:
if ch["DurPercent"] then

local strformat = string.format 
local mathfloor = math.floor 
local GetInventoryItemDurability = GetInventoryItemDurability
local curDur, maxDur = 0,0
for i = 1, 20 do 
 local curD, maxD = GetInventoryItemDurability(i) 
 if maxD then 
 curDur = curDur + curD 
 maxDur = maxDur + maxD 
 end 
 end 

local durPercent = strformat("%d", mathfloor((curDur/maxDur)*100))

local col = (ch["DurPercent"] < 50 or ch["DurLowPercent"] < 50) and "|cffff0000" or hicol

list:ItemAdd (cnum)
list:ItemSet (2, format (" Durability: %s%d%%, Min %d%%", col, durPercent, ch["DurLowPercent"]))
 
 

WoWInterface » Featured Projects » Carbonite » Carbonite Archive » Durability

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off