From 068350a7810d53a4fbd7fc3ae37edfcb74bcda40 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Micha=C5=82=20W=2E=20Urba=C5=84czyk?= Date: Mon, 31 May 2010 23:26:46 +0000 Subject: [PATCH] Minor fix. --- hch/CArtHandler.cpp | 15 ++++++++++----- 1 file changed, 10 insertions(+), 5 deletions(-) diff --git a/hch/CArtHandler.cpp b/hch/CArtHandler.cpp index a899603cf..a09d2fc12 100644 --- a/hch/CArtHandler.cpp +++ b/hch/CArtHandler.cpp @@ -216,9 +216,13 @@ void CArtHandler::loadArtifacts(bool onlyTxt) if(desc[0] == '\"' && desc[desc.size()-1] == '\"') desc = desc.substr(1,desc.size()-2); + if(onlyTxt) + continue; + // Fill in information about combined artifacts. Should perhaps be moved to a config file? nart.constituentOf = NULL; - switch (nart.id) { + switch (nart.id) + { case 129: // Angelic Alliance nart.constituents = new std::vector(); *nart.constituents += 31, 32, 33, 34, 35, 36; @@ -286,12 +290,13 @@ void CArtHandler::loadArtifacts(bool onlyTxt) break; } - if(!onlyTxt) - artifacts.push_back(nart); + artifacts.push_back(nart); } sortArts(); - if(!onlyTxt) - addBonuses(); + if(onlyTxt) + return; + + addBonuses(); // Populate reverse mappings of combinational artifacts. BOOST_FOREACH(CArtifact artifact, artifacts) {