Commit 1e5330d9 authored by Capostrophic's avatar Capostrophic

Use Messages::add in skill record verifier

parent 35281d7c
#include "skillcheck.hpp"
#include <sstream>
#include <components/esm/loadskil.hpp>
#include "../prefs/state.hpp"
......@@ -33,16 +31,14 @@ void CSMTools::SkillCheckStage::perform (int stage, CSMDoc::Messages& messages)
CSMWorld::UniversalId id (CSMWorld::UniversalId::Type_Skill, skill.mId);
if (skill.mDescription.empty())
messages.add(id, "Description is missing", "", CSMDoc::Message::Severity_Warning);
for (int i=0; i<4; ++i)
if (skill.mData.mUseValue[i]<0)
std::ostringstream stream;
stream << "Usage experience value #" << i << " is negative";
messages.push_back (std::make_pair (id, stream.str()));
messages.add(id, "Usage experience value #" + std::to_string(i) + " is negative", "", CSMDoc::Message::Severity_Error);
if (skill.mDescription.empty())
messages.push_back (std::make_pair (id, "Description is missing"));
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