mirror of
https://gitlab.com/OpenMW/openmw.git
synced 2025-01-27 03:35:27 +00:00
Editor: Warn if a magic effect's max magnitude is zero
This commit is contained in:
parent
2fdbd6287d
commit
ba20ba2c6c
@ -87,6 +87,9 @@ void CSMTools::EnchantmentCheckStage::perform(int stage, CSMDoc::Messages& messa
|
||||
if (effect->mData.mMagnMax < 0)
|
||||
messages.add(
|
||||
id, "Effect #" + number + " maximum magnitude is negative", "", CSMDoc::Message::Severity_Error);
|
||||
else if (effect->mData.mMagnMax == 0)
|
||||
messages.add(
|
||||
id, "Effect #" + number + " maximum magnitude is zero", "", CSMDoc::Message::Severity_Warning);
|
||||
if (effect->mData.mMagnMin > effect->mData.mMagnMax)
|
||||
messages.add(id, "Effect #" + number + " minimum magnitude is higher than maximum magnitude", "",
|
||||
CSMDoc::Message::Severity_Error);
|
||||
|
@ -363,6 +363,9 @@ void CSMTools::ReferenceableCheckStage::potionCheck(
|
||||
if (effect->mData.mMagnMax < 0)
|
||||
messages.add(
|
||||
id, "Effect #" + number + " maximum magnitude is negative", "", CSMDoc::Message::Severity_Error);
|
||||
else if (effect->mData.mMagnMax == 0)
|
||||
messages.add(
|
||||
id, "Effect #" + number + " maximum magnitude is zero", "", CSMDoc::Message::Severity_Warning);
|
||||
if (effect->mData.mMagnMin > effect->mData.mMagnMax)
|
||||
messages.add(id, "Effect #" + number + " minimum magnitude is higher than maximum magnitude", "",
|
||||
CSMDoc::Message::Severity_Error);
|
||||
|
@ -79,6 +79,9 @@ void CSMTools::SpellCheckStage::perform(int stage, CSMDoc::Messages& messages)
|
||||
if (effect->mData.mMagnMax < 0)
|
||||
messages.add(
|
||||
id, "Effect #" + number + " maximum magnitude is negative", "", CSMDoc::Message::Severity_Error);
|
||||
else if (effect->mData.mMagnMax == 0)
|
||||
messages.add(
|
||||
id, "Effect #" + number + " maximum magnitude is zero", "", CSMDoc::Message::Severity_Warning);
|
||||
if (effect->mData.mMagnMin > effect->mData.mMagnMax)
|
||||
messages.add(id, "Effect #" + number + " minimum magnitude is higher than maximum magnitude", "",
|
||||
CSMDoc::Message::Severity_Error);
|
||||
|
Loading…
x
Reference in New Issue
Block a user