From 900aab3d16203d05bb82ea7c2eb08a4f11a5af32 Mon Sep 17 00:00:00 2001 From: James Whitehead II Date: Sun, 17 Aug 2008 12:21:46 +0000 Subject: [PATCH] Make the start "winner" score (- math.huge) instead of 0 --- DressToKill.lua | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/DressToKill.lua b/DressToKill.lua index 406b6f9..d589dc3 100644 --- a/DressToKill.lua +++ b/DressToKill.lua @@ -159,7 +159,7 @@ local function scanFunction(weightFunction) 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 = 0, {} + local weapon_max, weapon_win = (- math.huge), {} debug(L["Weapon base score: %s"], mh_base) @@ -241,7 +241,7 @@ local function scanFunction(weightFunction) local stash = {} -- Loop through all of the inventory slots for slotId,avail in pairs(slotAvail) do - local maxScore, winner = 0, nil + local maxScore, winner = (- math.huge), nil local link = GetInventoryItemLink("player", slotId) if link then -- We current have an item equipped, so stash that item elsewhere -- 1.7.9.5