From 06533b8d71a10139816996a3f68042b7f4aff14e Mon Sep 17 00:00:00 2001 From: Marc Zinnschlag Date: Thu, 4 Apr 2013 10:31:10 +0200 Subject: [PATCH] additional check for using the same attribute twice in a class --- apps/opencs/model/tools/classcheck.cpp | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/apps/opencs/model/tools/classcheck.cpp b/apps/opencs/model/tools/classcheck.cpp index 302af6b9db..da2e9f19a6 100644 --- a/apps/opencs/model/tools/classcheck.cpp +++ b/apps/opencs/model/tools/classcheck.cpp @@ -42,6 +42,15 @@ void CSMTools::ClassCheckStage::perform (int stage, std::vector& me messages.push_back (stream.str()); } + if (class_.mData.mAttribute[0]==class_.mData.mAttribute[1] && class_.mData.mAttribute[0]!=-1) + { + std::ostringstream stream; + + stream << id.toString() << "|Class lists same attribute twice"; + + messages.push_back (stream.str()); + } + // test for non-unique skill std::map skills; // ID, number of occurrences