WoWInterface SVN DressToKill

Compare Revisions

  • This comparison shows the changes necessary to convert path
    /trunk
    from Rev 21 to Rev 20
    Reverse comparison

Rev 21 → Rev 20

DressToKill.lua
162,8 → 162,12
 
-- Calculate weapon base score with nothing equipped
local linen_shirt = "\124cffffffff\124Hitem:2576:0:0:0:0:0:0:0\124h[White Linen Shirt]\124h\124r"
local mh_base = weightFunction(linen_shirt, mainslot) or 0
local oh_base = mh_base
local weapon_max, weapon_win = (- math.huge), {}
 
debug(L["Weapon base score: %s"], mh_base)
 
-- Try on each mainhand weapon
local score
for mh_mask,item in pairs(mh_avail) do
176,7 → 180,7
if mh_equipped then
debug(L["Successfully equipped %s"], link)
local mh_link = GetInventoryItemLink("player", mainslot)
local mh_score = weightFunction(mh_link, mainslot)
local mh_score = weightFunction(mh_link, mainslot) - mh_base
debug(L["Mainhand score: %d"], mh_score)
 
if not IsEquippedItemType("Two-Hand") then
194,7 → 198,7
if oh_equipped then
local oh_link = GetInventoryItemLink("player", offslot) or linen_shirt
local oh_score = weightFunction(oh_link, offslot)
score = oh_score
score = score + oh_score
debug(L["Got score of %s for %s/%s"], score, mh_link, oh_link)
else
debug(L["Failed to equip %s"], link)