Quantcast

Fixed nil error when calculating ideal gems for prismatic sockets

Kevin Lyles [01-09-11 - 18:46]
Fixed nil error when calculating ideal gems for prismatic sockets
Updated to version 1.4r2
Updated make-zip script
Filename
WeightsWatcher.lua
WeightsWatcher.toc
make-zip.sh
diff --git a/WeightsWatcher.lua b/WeightsWatcher.lua
index 6b846bf..d41bd71 100644
--- a/WeightsWatcher.lua
+++ b/WeightsWatcher.lua
@@ -108,15 +108,15 @@ ww_weightIdealCacheWeightMetatable = {
 			bestGems.blue, bestGems.blueScore = WeightsWatcher.bestGemForSocket("blue", tbl.weight, ww_vars.options.gems.qualityLimit)
 			bestGems.meta, bestGems.metaScore = WeightsWatcher.bestGemForSocket("meta", tbl.weight, ww_vars.options.gems.qualityLimit)

-			bestGems.overall = bestGems.red
-			bestGems.overallScore = bestGems.redScore
-			if bestGems.overallScore < bestGems.blueScore then
-				bestGems.overall = bestGems.blue
-				bestGems.overallScore = bestGems.blueScore
+			bestGems.prismatic = bestGems.red
+			bestGems.prismaticScore = bestGems.redScore
+			if bestGems.prismaticScore < bestGems.blueScore then
+				bestGems.prismatic = bestGems.blue
+				bestGems.prismaticScore = bestGems.blueScore
 			end
-			if bestGems.overallScore < bestGems.yellowScore then
-				bestGems.overall = bestGems.yellow
-				bestGems.overallScore = bestGems.yellowScore
+			if bestGems.prismaticScore < bestGems.yellowScore then
+				bestGems.prismatic = bestGems.yellow
+				bestGems.prismaticScore = bestGems.yellowScore
 			end
 			tbl.bestGems = bestGems

@@ -135,8 +135,8 @@ ww_weightIdealCacheWeightMetatable = {
 			table.insert(bestGems, tbl.bestGems[color])
 			gemScore = gemScore + tbl.bestGems[color .. "Score"]
 			if breakSocketColors and color ~= "meta" then
-				table.insert(bestGemsIgnoreSocket, tbl.bestGems.overall)
-				gemScoreIgnoreSocket = gemScoreIgnoreSocket + tbl.bestGems.overallScore
+				table.insert(bestGemsIgnoreSocket, tbl.bestGems.prismatic)
+				gemScoreIgnoreSocket = gemScoreIgnoreSocket + tbl.bestGems.prismaticScore
 			end
 		end
 		local gemStats = WeightsWatcher.getGemStats(bestGems)
diff --git a/WeightsWatcher.toc b/WeightsWatcher.toc
index 1a296cb..2491e5f 100644
--- a/WeightsWatcher.toc
+++ b/WeightsWatcher.toc
@@ -2,7 +2,7 @@
 ## Title: Weights Watcher
 ## Notes: Ranks gear according to customizable stat weights
 ## Author: The Flying Squirrels
-## Version: 1.4r1
+## Version: 1.4r2
 ## OptionalDeps: AtlasLoot
 ## SavedVariables: ww_vars
 ## SavedVariablesPerCharacter: ww_charVars
diff --git a/make-zip.sh b/make-zip.sh
index ca41ff2..0b206d6 100755
--- a/make-zip.sh
+++ b/make-zip.sh
@@ -6,4 +6,4 @@ VERSION="`grep '^## Version: ' WeightsWatcher.toc | sed -e 's/.* //'`"
 # echo "'$VERSION'"
 # exit

-cd .. && 7z a -tzip -xr!'.git*' -xr!'Todo*' -xr!'*~' -xr-!'WeightsWatcher/goals' -xr-!'WeightsWatcher/future-features' -xr-!'WeightsWatcher/wowhead values' -xr-!'WeightsWatcher/localization notes' -xr-!'WeightsWatcher/*.sh' -xr-!'WeightsWatcher/unknown-gems' -mx=9 WeightsWatcher-$VERSION.zip WeightsWatcher/
+cd .. && 7z a -tzip -xr!'.git*' -xr!'Todo*' -xr!'*~' -xr-!'WeightsWatcher/goals' -xr-!'WeightsWatcher/future-features' -xr-!'WeightsWatcher/wowhead values' -xr-!'WeightsWatcher/localization notes' -xr-!'WeightsWatcher/*.sh' -xr-!'WeightsWatcher/unknown-gems' -xr-!'WeightsWatcher/gem-ids*' -xr-!'WeightsWatcher/create-*' -mx=9 WeightsWatcher-$VERSION.zip WeightsWatcher/