Quantcast

Remove the base from weapon scores

James Whitehead II [08-17-08 - 13:50]
Remove the base from weapon scores
Filename
DressToKill.lua
diff --git a/DressToKill.lua b/DressToKill.lua
index 70b7794..4216015 100644
--- a/DressToKill.lua
+++ b/DressToKill.lua
@@ -162,12 +162,8 @@ local function scanFunction(weightFunction)

 	-- 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
@@ -180,7 +176,7 @@ local function scanFunction(weightFunction)
 		if mh_equipped then
 			debug(L["Successfully equipped %s"], link)
 			local mh_link = GetInventoryItemLink("player", mainslot)
-			local mh_score = weightFunction(mh_link, mainslot) - mh_base
+			local mh_score = weightFunction(mh_link, mainslot)
 			debug(L["Mainhand score: %d"], mh_score)

 			if not IsEquippedItemType("Two-Hand") then
@@ -198,7 +194,7 @@ local function scanFunction(weightFunction)
 						if oh_equipped then
 							local oh_link = GetInventoryItemLink("player", offslot) or linen_shirt
 							local oh_score = weightFunction(oh_link, offslot)
-							score = score + oh_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)