1
0
mirror of https://github.com/vcmi/vcmi.git synced 2025-06-15 00:05:02 +02:00

- probably fixed 1671

- fixed missing loss condition in Birth of Barbarian
- fixed some bugs found by cppcheck
This commit is contained in:
Ivan Savenko
2014-01-30 11:08:37 +00:00
parent f159f28b9f
commit 3779a54ddd
6 changed files with 68 additions and 16 deletions

View File

@ -198,10 +198,7 @@ void CArtHandler::loadObject(std::string scope, std::string name, const JsonNode
{
auto object = loadFromJson(data);
object->id = ArtifactID(artifacts.size());
//if (object->id < ArtifactID::ART_SELECTION)
object->iconIndex = object->id;
//else
// object->iconIndex = object->id + 2;
object->iconIndex = object->id + 5;
artifacts.push_back(object);
@ -212,10 +209,7 @@ void CArtHandler::loadObject(std::string scope, std::string name, const JsonNode
{
auto object = loadFromJson(data);
object->id = ArtifactID(index);
//if (object->id < ArtifactID::ART_SELECTION)
object->iconIndex = object->id;
//else
// object->iconIndex = object->id + 2;
object->iconIndex = object->id;
assert(artifacts[index] == nullptr); // ensure that this id was not loaded before
artifacts[index] = object;