Skip to content

Commit

Permalink
PawnGemQualityLevels is now sometimes nil
Browse files Browse the repository at this point in the history
  • Loading branch information
TravisSpomer committed Jun 2, 2024
1 parent 6cb40cd commit c11627a
Show file tree
Hide file tree
Showing 2 changed files with 26 additions and 23 deletions.
48 changes: 25 additions & 23 deletions Pawn.lua
Original file line number Diff line number Diff line change
Expand Up @@ -1200,34 +1200,36 @@ function PawnRecalculateScaleTotal(ScaleName)
end
local ThisScaleBestGems = PawnScaleBestGems[ScaleName]

local QualityLevelData
for _, QualityLevelData in pairs(PawnGemQualityLevels) do
local ItemLevel = QualityLevelData[1]
local GemData = QualityLevelData[2]
if PawnGemQualityLevels then
local QualityLevelData
for _, QualityLevelData in pairs(PawnGemQualityLevels) do
local ItemLevel = QualityLevelData[1]
local GemData = QualityLevelData[2]

if PawnCommon.Debug then
VgerCore.Message("")
VgerCore.Message("GEMS FOR ITEM LEVEL " .. tostring(ItemLevel))
VgerCore.Message("")
end
if PawnCommon.Debug then
VgerCore.Message("")
VgerCore.Message("GEMS FOR ITEM LEVEL " .. tostring(ItemLevel))
VgerCore.Message("")
end

local BestPrismatic
BestPrismatic, ThisScaleBestGems.PrismaticSocket[ItemLevel] = PawnFindBestGems(ScaleName, GemData)
ThisScaleBestGems.PrismaticSocketValue[ItemLevel] = BestPrismatic
local BestPrismatic
BestPrismatic, ThisScaleBestGems.PrismaticSocket[ItemLevel] = PawnFindBestGems(ScaleName, GemData)
ThisScaleBestGems.PrismaticSocketValue[ItemLevel] = BestPrismatic

-- Classic Era and the retail realms don't have colored sockets, so don't bother trying to calculate for those.
if not VgerCore.IsClassic and not VgerCore.IsMainline then
local BestRed
BestRed, ThisScaleBestGems.RedSocket[ItemLevel] = PawnFindBestGems(ScaleName, GemData, true, false, false)
ThisScaleBestGems.RedSocketValue[ItemLevel] = BestRed
-- Classic Era and the retail realms don't have colored sockets, so don't bother trying to calculate for those.
if not VgerCore.IsClassic and not VgerCore.IsMainline then
local BestRed
BestRed, ThisScaleBestGems.RedSocket[ItemLevel] = PawnFindBestGems(ScaleName, GemData, true, false, false)
ThisScaleBestGems.RedSocketValue[ItemLevel] = BestRed

local BestYellow
BestYellow, ThisScaleBestGems.YellowSocket[ItemLevel] = PawnFindBestGems(ScaleName, GemData, false, true, false)
ThisScaleBestGems.YellowSocketValue[ItemLevel] = BestYellow
local BestYellow
BestYellow, ThisScaleBestGems.YellowSocket[ItemLevel] = PawnFindBestGems(ScaleName, GemData, false, true, false)
ThisScaleBestGems.YellowSocketValue[ItemLevel] = BestYellow

local BestBlue
BestBlue, ThisScaleBestGems.BlueSocket[ItemLevel] = PawnFindBestGems(ScaleName, GemData, false, false, true)
ThisScaleBestGems.BlueSocketValue[ItemLevel] = BestBlue
local BestBlue
BestBlue, ThisScaleBestGems.BlueSocket[ItemLevel] = PawnFindBestGems(ScaleName, GemData, false, false, true)
ThisScaleBestGems.BlueSocketValue[ItemLevel] = BestBlue
end
end
end

Expand Down
1 change: 1 addition & 0 deletions Readme.htm
Original file line number Diff line number Diff line change
Expand Up @@ -313,6 +313,7 @@ <h3>Version 2.9.6</h3>
<li>Cataclysm Classic: Updated default stat weights for all specs and classes are included, thanks to the <a href="https://wowsims.github.io" target="_blank">WoWSims</a> team. Simulations are still in their early stages, so expect some oddities—let me know if you find something egregiously wrong. Simulating your character with WoWSims (or any other favorite sim) will get you the most accurate results, and you can export custom stat weights to use in Pawn for quick in-game advice.</li>
<li>Cataclysm Classic: You can now set a weight for the non-stat effect of meta gems like you could in Burning Crusade Classic and Wrath Classic.</li>
<li>Cataclysm Classic: The deprecated stats Defense Rating and Block Value will no longer show up in Pawn.</li>
<li>Classic Era and Season of Discovery: Fixed a harmless error message about gem data.</li>
</ul>
<h3>Version 2.9.5</h3>
<ul>
Expand Down

0 comments on commit c11627a

Please sign in to comment.