1
0
mirror of https://gitlab.com/OpenMW/openmw.git synced 2025-01-29 09:32:45 +00:00

Accept invalid effect IDs and ranges in EffectsListAdapter

This commit is contained in:
Alexei Kotov 2024-06-08 13:49:39 +03:00
parent 252ee7f8c4
commit 3051e0834a

View File

@ -319,12 +319,7 @@ namespace CSMWorld
switch (subColIndex)
{
case 0:
{
if (effect.mEffectID >= 0 && effect.mEffectID < ESM::MagicEffect::Length)
return effect.mEffectID;
else
throw std::runtime_error("Magic effects ID unexpected value");
}
return effect.mEffectID;
case 1:
{
switch (effect.mEffectID)
@ -354,12 +349,7 @@ namespace CSMWorld
}
}
case 3:
{
if (effect.mRange >= 0 && effect.mRange <= 2)
return effect.mRange;
else
throw std::runtime_error("Magic effects range unexpected value");
}
return effect.mRange;
case 4:
return effect.mArea;
case 5: