Commit fe2b81a4 authored by Ivaria's avatar Ivaria

Workaround as now PLAYER_EQUIPMENT_CHANGED sometimes fires before VUHDO_CONFIG...

Workaround as now PLAYER_EQUIPMENT_CHANGED sometimes fires before VUHDO_CONFIG is loaded and available
parent 37949191
......@@ -228,7 +228,13 @@ function VUHDO_aoeUpdateSpellAverages()
tSpellModi = tInfo["base"] / tInfo["divisor"];
tInfo["avg"] = floor((tInfo["base"] + tBonus * tSpellModi) + 0.5);
end
tInfo["thresh"] = VUHDO_CONFIG["AOE_ADVISOR"]["config"][tName]["thresh"];
-- FIXME: as of 9.0.1 PLAYER_EQUIPMENT_CHANGED sometimes fires before VUHDO_CONFIG is loaded and available
if VUHDO_CONFIG then
tInfo["thresh"] = VUHDO_CONFIG["AOE_ADVISOR"]["config"][tName]["thresh"];
elseif not tInfo["thresh"] then
tInfo["thresh"] = 8000; -- FIXME: current lowest threshold
end
--print("VUHDO_aoeUpdateSpellAverages(): name = " .. tName .. ", avg = floor((base + bonus * spellMod) + 0.5) | " .. tInfo["avg"] .. " = floor((" .. tInfo["base"] .. " + " .. tBonus .. " * " .. tSpellModi .. ") + 0.5)");
end
end
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment