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:
@ -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;
|
||||
|
Reference in New Issue
Block a user