Blackfoot
February 18th, 2016, 18:10
I was looking at creating an extension to handle temporary CLC bonuses when I stumbled on this error.
This is from the Spell Actions Manager in 3.5. There is an error here in the Effects Reporting portion:
function modCLC(rSource, rTarget, rRoll)
if rSource then
-- Get negative levels
local nNegLevelMod, nNegLevelCount = EffectManager.getEffectsBonus(rSource, {"NLVL"}, true);
if nNegLevelCount > 0 then
rRoll.nMod = rRoll.nMod - nNegLevelMod;
rRoll.sDesc = rRoll.sDesc .. " [" .. Interface.getString("effects_tag") .. " -" .. nNegLevelCount .. "]";
end
end
end
In this line: rRoll.sDesc = rRoll.sDesc .. " [" .. Interface.getString("effects_tag") .. " -" .. nNegLevelCount .. "]";
It is reporting the number of effects rather than the actual effect modifier. The effect works right.. but is reporting wrong.
The line should actually be: rRoll.sDesc = rRoll.sDesc .. " [" .. Interface.getString("effects_tag") .. " " .. nNegLevelMod .. "]";
BUT since this needs to be tweaked anyway... this could replace it and it would allow CLC Effects to work for temporary CL Bonuses...
function modCLC(rSource, rTarget, rRoll)
if rSource then
-- Get negative levels
local nNegLevelMod, nNegLevelCount = EffectManager.getEffectsBonus(rSource, {"NLVL"}, true);
-- Get CLC Effects
local nCLCMod, nCLCCount = EffectManager.getEffectsBonus(rSource, {"CLC"}, true);
if nNegLevelCount > 0 or nCLCCount > 0 then
rRoll.nMod = rRoll.nMod - nNegLevelMod + nCLCmod;
rRoll.sDesc = rRoll.sDesc .. " [" .. Interface.getString("effects_tag") .. " " .. (nCLCMod - nNegLevelMod) .. "]";
end
end
endThis would correct the error and add some additional functionality! A win WIN!
This is from the Spell Actions Manager in 3.5. There is an error here in the Effects Reporting portion:
function modCLC(rSource, rTarget, rRoll)
if rSource then
-- Get negative levels
local nNegLevelMod, nNegLevelCount = EffectManager.getEffectsBonus(rSource, {"NLVL"}, true);
if nNegLevelCount > 0 then
rRoll.nMod = rRoll.nMod - nNegLevelMod;
rRoll.sDesc = rRoll.sDesc .. " [" .. Interface.getString("effects_tag") .. " -" .. nNegLevelCount .. "]";
end
end
end
In this line: rRoll.sDesc = rRoll.sDesc .. " [" .. Interface.getString("effects_tag") .. " -" .. nNegLevelCount .. "]";
It is reporting the number of effects rather than the actual effect modifier. The effect works right.. but is reporting wrong.
The line should actually be: rRoll.sDesc = rRoll.sDesc .. " [" .. Interface.getString("effects_tag") .. " " .. nNegLevelMod .. "]";
BUT since this needs to be tweaked anyway... this could replace it and it would allow CLC Effects to work for temporary CL Bonuses...
function modCLC(rSource, rTarget, rRoll)
if rSource then
-- Get negative levels
local nNegLevelMod, nNegLevelCount = EffectManager.getEffectsBonus(rSource, {"NLVL"}, true);
-- Get CLC Effects
local nCLCMod, nCLCCount = EffectManager.getEffectsBonus(rSource, {"CLC"}, true);
if nNegLevelCount > 0 or nCLCCount > 0 then
rRoll.nMod = rRoll.nMod - nNegLevelMod + nCLCmod;
rRoll.sDesc = rRoll.sDesc .. " [" .. Interface.getString("effects_tag") .. " " .. (nCLCMod - nNegLevelMod) .. "]";
end
end
endThis would correct the error and add some additional functionality! A win WIN!