2014-06-22 13:39:40 +03:00
|
|
|
/*
|
2015-12-08 08:53:14 +02:00
|
|
|
* JsonRandom.cpp, part of VCMI engine
|
2014-06-22 13:39:40 +03:00
|
|
|
*
|
|
|
|
* Authors: listed in file AUTHORS in main folder
|
|
|
|
*
|
|
|
|
* License: GNU General Public License v2.0 or later
|
|
|
|
* Full text of license available in license.txt file, in main folder
|
|
|
|
*
|
|
|
|
*/
|
|
|
|
|
|
|
|
#include "StdInc.h"
|
|
|
|
#include "JsonRandom.h"
|
|
|
|
|
|
|
|
#include "../JsonNode.h"
|
|
|
|
#include "../CRandomGenerator.h"
|
|
|
|
#include "../StringConstants.h"
|
|
|
|
#include "../VCMI_Lib.h"
|
|
|
|
#include "../CModHandler.h"
|
|
|
|
#include "../CArtHandler.h"
|
|
|
|
#include "../CCreatureHandler.h"
|
|
|
|
#include "../CCreatureSet.h"
|
2015-02-02 10:25:26 +02:00
|
|
|
#include "../spells/CSpellHandler.h"
|
2023-04-07 22:59:43 +02:00
|
|
|
#include "../CSkillHandler.h"
|
2023-04-07 23:22:27 +02:00
|
|
|
#include "../mapObjects/CObjectHandler.h"
|
|
|
|
#include "../IGameCallback.h"
|
2014-06-22 13:39:40 +03:00
|
|
|
|
2022-07-26 15:07:42 +02:00
|
|
|
VCMI_LIB_NAMESPACE_BEGIN
|
|
|
|
|
2014-06-22 13:39:40 +03:00
|
|
|
namespace JsonRandom
|
|
|
|
{
|
|
|
|
si32 loadValue(const JsonNode & value, CRandomGenerator & rng, si32 defaultValue)
|
|
|
|
{
|
|
|
|
if (value.isNull())
|
|
|
|
return defaultValue;
|
2016-11-13 12:38:42 +02:00
|
|
|
if (value.isNumber())
|
2020-10-01 10:38:06 +02:00
|
|
|
return static_cast<si32>(value.Float());
|
2023-01-28 00:01:10 +02:00
|
|
|
if (value.isVector())
|
|
|
|
{
|
|
|
|
const auto & vector = value.Vector();
|
|
|
|
|
|
|
|
size_t index= rng.getIntRange(0, vector.size()-1)();
|
|
|
|
return loadValue(vector[index], rng, 0);
|
|
|
|
}
|
2014-06-22 13:39:40 +03:00
|
|
|
if (!value["amount"].isNull())
|
2023-01-24 16:18:59 +02:00
|
|
|
return static_cast<si32>(loadValue(value["amount"], rng, defaultValue));
|
2023-01-28 00:01:10 +02:00
|
|
|
si32 min = static_cast<si32>(loadValue(value["min"], rng, 0));
|
|
|
|
si32 max = static_cast<si32>(loadValue(value["max"], rng, 0));
|
2014-06-22 13:39:40 +03:00
|
|
|
return rng.getIntRange(min, max)();
|
|
|
|
}
|
|
|
|
|
2023-04-07 22:38:51 +02:00
|
|
|
std::string loadKey(const JsonNode & value, CRandomGenerator & rng, std::set<std::string> valuesSet)
|
2023-01-22 18:17:26 +02:00
|
|
|
{
|
|
|
|
if (value.isNull())
|
2023-04-07 22:38:51 +02:00
|
|
|
return valuesSet.empty() ? "" : *RandomGeneratorUtil::nextItem(valuesSet, rng);
|
2023-01-22 18:17:26 +02:00
|
|
|
if (value.isString())
|
|
|
|
return value.String();
|
|
|
|
if (!value["type"].isNull())
|
|
|
|
return value["type"].String();
|
|
|
|
|
2023-04-07 23:25:32 +02:00
|
|
|
if(!value["anyOf"].isNull())
|
|
|
|
return RandomGeneratorUtil::nextItem(value["anyOf"].Vector(), rng)->String();
|
2023-04-07 22:38:51 +02:00
|
|
|
|
2023-04-07 23:25:32 +02:00
|
|
|
if(!value["noneOf"].isNull())
|
2023-04-07 22:38:51 +02:00
|
|
|
{
|
2023-04-07 23:25:32 +02:00
|
|
|
for(auto & s : value["noneOf"].Vector())
|
2023-04-07 22:38:51 +02:00
|
|
|
valuesSet.erase(s.String());
|
|
|
|
}
|
|
|
|
|
|
|
|
return valuesSet.empty() ? "" : *RandomGeneratorUtil::nextItem(valuesSet, rng);
|
2023-01-22 18:17:26 +02:00
|
|
|
}
|
|
|
|
|
2014-06-22 13:39:40 +03:00
|
|
|
TResources loadResources(const JsonNode & value, CRandomGenerator & rng)
|
|
|
|
{
|
|
|
|
TResources ret;
|
2023-01-22 18:17:26 +02:00
|
|
|
|
|
|
|
if (value.isVector())
|
|
|
|
{
|
|
|
|
for (const auto & entry : value.Vector())
|
|
|
|
ret += loadResource(entry, rng);
|
|
|
|
return ret;
|
|
|
|
}
|
|
|
|
|
2014-06-22 13:39:40 +03:00
|
|
|
for (size_t i=0; i<GameConstants::RESOURCE_QUANTITY; i++)
|
|
|
|
{
|
|
|
|
ret[i] = loadValue(value[GameConstants::RESOURCE_NAMES[i]], rng);
|
|
|
|
}
|
|
|
|
return ret;
|
|
|
|
}
|
|
|
|
|
2023-01-22 18:17:26 +02:00
|
|
|
TResources loadResource(const JsonNode & value, CRandomGenerator & rng)
|
|
|
|
{
|
2023-04-07 22:59:43 +02:00
|
|
|
std::set<std::string> defaultResources(GameConstants::RESOURCE_NAMES, GameConstants::RESOURCE_NAMES + GameConstants::RESOURCE_QUANTITY - 2); //except mithril
|
|
|
|
|
|
|
|
std::string resourceName = loadKey(value, rng, defaultResources);
|
2023-01-22 18:17:26 +02:00
|
|
|
si32 resourceAmount = loadValue(value, rng, 0);
|
|
|
|
si32 resourceID(VLC->modh->identifiers.getIdentifier(value.meta, "resource", resourceName).get());
|
|
|
|
|
|
|
|
TResources ret;
|
|
|
|
ret[resourceID] = resourceAmount;
|
|
|
|
return ret;
|
|
|
|
}
|
|
|
|
|
|
|
|
|
2014-06-22 13:39:40 +03:00
|
|
|
std::vector<si32> loadPrimary(const JsonNode & value, CRandomGenerator & rng)
|
|
|
|
{
|
|
|
|
std::vector<si32> ret;
|
2023-02-12 22:39:17 +02:00
|
|
|
for(const auto & name : PrimarySkill::names)
|
2014-06-22 13:39:40 +03:00
|
|
|
{
|
|
|
|
ret.push_back(loadValue(value[name], rng));
|
|
|
|
}
|
2023-04-07 18:34:01 +02:00
|
|
|
|
|
|
|
if(!value["random"].isNull())
|
|
|
|
{
|
|
|
|
*RandomGeneratorUtil::nextItem(ret, rng) = loadValue(value["random"], rng);
|
|
|
|
}
|
|
|
|
|
2014-06-22 13:39:40 +03:00
|
|
|
return ret;
|
|
|
|
}
|
|
|
|
|
|
|
|
std::map<SecondarySkill, si32> loadSecondary(const JsonNode & value, CRandomGenerator & rng)
|
|
|
|
{
|
|
|
|
std::map<SecondarySkill, si32> ret;
|
2023-04-07 22:59:43 +02:00
|
|
|
if(value.isStruct())
|
|
|
|
{
|
|
|
|
for(const auto & pair : value.Struct())
|
|
|
|
{
|
|
|
|
SecondarySkill id(VLC->modh->identifiers.getIdentifier(pair.second.meta, "skill", pair.first).get());
|
|
|
|
ret[id] = loadValue(pair.second, rng);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
if(value.isVector())
|
2014-06-22 13:39:40 +03:00
|
|
|
{
|
2023-04-07 22:59:43 +02:00
|
|
|
std::set<std::string> defaultSkills;
|
|
|
|
for(const auto & skill : VLC->skillh->objects)
|
2023-04-07 23:22:27 +02:00
|
|
|
{
|
|
|
|
IObjectInterface::cb->isAllowed(2, skill->getIndex());
|
2023-04-07 22:59:43 +02:00
|
|
|
defaultSkills.insert(skill->getNameTextID());
|
2023-04-07 23:22:27 +02:00
|
|
|
}
|
2023-04-07 22:59:43 +02:00
|
|
|
|
|
|
|
for(const auto & element : value.Vector())
|
|
|
|
{
|
|
|
|
SecondarySkill id(VLC->modh->identifiers.getIdentifier(value.meta, "skill", loadKey(element, rng, defaultSkills)).get());
|
|
|
|
ret[id] = loadValue(value, rng);
|
|
|
|
}
|
2014-06-22 13:39:40 +03:00
|
|
|
}
|
|
|
|
return ret;
|
|
|
|
}
|
|
|
|
|
|
|
|
ArtifactID loadArtifact(const JsonNode & value, CRandomGenerator & rng)
|
|
|
|
{
|
2017-11-26 23:18:18 +02:00
|
|
|
if (value.getType() == JsonNode::JsonType::DATA_STRING)
|
2014-06-22 13:39:40 +03:00
|
|
|
return ArtifactID(VLC->modh->identifiers.getIdentifier("artifact", value).get());
|
|
|
|
|
|
|
|
std::set<CArtifact::EartClass> allowedClasses;
|
|
|
|
std::set<ArtifactPosition> allowedPositions;
|
|
|
|
ui32 minValue = 0;
|
|
|
|
ui32 maxValue = std::numeric_limits<ui32>::max();
|
|
|
|
|
2017-11-26 23:18:18 +02:00
|
|
|
if (value["class"].getType() == JsonNode::JsonType::DATA_STRING)
|
2023-02-12 22:39:17 +02:00
|
|
|
allowedClasses.insert(CArtHandler::stringToClass(value["class"].String()));
|
2014-06-22 13:39:40 +03:00
|
|
|
else
|
2023-02-12 22:39:17 +02:00
|
|
|
for(const auto & entry : value["class"].Vector())
|
|
|
|
allowedClasses.insert(CArtHandler::stringToClass(entry.String()));
|
2014-06-22 13:39:40 +03:00
|
|
|
|
2017-11-26 23:18:18 +02:00
|
|
|
if (value["slot"].getType() == JsonNode::JsonType::DATA_STRING)
|
2023-02-12 22:39:17 +02:00
|
|
|
allowedPositions.insert(ArtifactPosition(value["class"].String()));
|
2014-06-22 13:39:40 +03:00
|
|
|
else
|
2023-02-12 22:39:17 +02:00
|
|
|
for(const auto & entry : value["slot"].Vector())
|
|
|
|
allowedPositions.insert(ArtifactPosition(entry.String()));
|
2014-06-22 13:39:40 +03:00
|
|
|
|
2020-10-01 10:38:06 +02:00
|
|
|
if (!value["minValue"].isNull()) minValue = static_cast<ui32>(value["minValue"].Float());
|
|
|
|
if (!value["maxValue"].isNull()) maxValue = static_cast<ui32>(value["maxValue"].Float());
|
2014-06-22 13:39:40 +03:00
|
|
|
|
2023-02-12 22:39:17 +02:00
|
|
|
return VLC->arth->pickRandomArtifact(rng, [=](const ArtifactID & artID) -> bool
|
2014-06-22 13:39:40 +03:00
|
|
|
{
|
Entities redesign and a few ERM features
* Made most Handlers derived from CHandlerBase and moved service API there.
* Declared existing Entity APIs.
* Added basic script context caching
* Started Lua script module
* Started Lua spell effect API
* Started script state persistence
* Started battle info callback binding
* CommitPackage removed
* Extracted spells::Caster to own header; Expanded Spell API.
* implemented !!MC:S, !!FU:E, !!FU:P, !!MA, !!VR:H, !!VR:C
* !!BU:C, !!BU:E, !!BU:G, !!BU:M implemented
* Allow use of "MC:S@varName@" to declare normal variable (technically v-variable with string key)
* Re-enabled VERM macros.
* !?GM0 added
* !?TM implemented
* Added !!MF:N
* Started !?OB, !!BM, !!HE, !!OW, !!UN
* Added basic support of w-variables
* Added support for ERM indirect variables
* Made !?FU regular trigger
* !!re (ERA loop receiver) implemented
* Fixed ERM receivers with zero args.
2018-03-17 16:58:30 +02:00
|
|
|
CArtifact * art = VLC->arth->objects[artID];
|
2014-06-22 13:39:40 +03:00
|
|
|
|
2023-02-12 22:39:17 +02:00
|
|
|
if(!vstd::iswithin(art->price, minValue, maxValue))
|
2014-06-22 13:39:40 +03:00
|
|
|
return false;
|
|
|
|
|
2023-02-12 22:39:17 +02:00
|
|
|
if(!allowedClasses.empty() && !allowedClasses.count(art->aClass))
|
2014-06-22 13:39:40 +03:00
|
|
|
return false;
|
2023-04-07 23:22:27 +02:00
|
|
|
|
|
|
|
if(!IObjectInterface::cb->isAllowed(1, art->getIndex()))
|
|
|
|
return false;
|
2014-06-22 13:39:40 +03:00
|
|
|
|
2023-02-12 22:39:17 +02:00
|
|
|
if(!allowedPositions.empty())
|
2014-06-22 13:39:40 +03:00
|
|
|
{
|
2023-02-12 22:39:17 +02:00
|
|
|
for(const auto & pos : art->possibleSlots[ArtBearer::HERO])
|
2014-06-22 13:39:40 +03:00
|
|
|
{
|
2023-02-12 22:39:17 +02:00
|
|
|
if(allowedPositions.count(pos))
|
2014-06-22 13:39:40 +03:00
|
|
|
return true;
|
|
|
|
}
|
|
|
|
return false;
|
|
|
|
}
|
|
|
|
return true;
|
|
|
|
});
|
|
|
|
}
|
|
|
|
|
|
|
|
std::vector<ArtifactID> loadArtifacts(const JsonNode & value, CRandomGenerator & rng)
|
|
|
|
{
|
|
|
|
std::vector<ArtifactID> ret;
|
|
|
|
for (const JsonNode & entry : value.Vector())
|
|
|
|
{
|
|
|
|
ret.push_back(loadArtifact(entry, rng));
|
|
|
|
}
|
|
|
|
return ret;
|
|
|
|
}
|
|
|
|
|
|
|
|
SpellID loadSpell(const JsonNode & value, CRandomGenerator & rng, std::vector<SpellID> spells)
|
|
|
|
{
|
2017-11-26 23:18:18 +02:00
|
|
|
if (value.getType() == JsonNode::JsonType::DATA_STRING)
|
2014-06-22 13:39:40 +03:00
|
|
|
return SpellID(VLC->modh->identifiers.getIdentifier("spell", value).get());
|
|
|
|
|
2023-02-12 22:39:17 +02:00
|
|
|
vstd::erase_if(spells, [=](const SpellID & spell)
|
2014-06-22 13:39:40 +03:00
|
|
|
{
|
2023-03-27 13:56:39 +02:00
|
|
|
return VLC->spellh->getById(spell)->getLevel() != si32(value["level"].Float());
|
2016-01-26 08:37:55 +02:00
|
|
|
});
|
2014-06-22 13:39:40 +03:00
|
|
|
|
|
|
|
return SpellID(*RandomGeneratorUtil::nextItem(spells, rng));
|
|
|
|
}
|
|
|
|
|
2023-02-12 22:39:17 +02:00
|
|
|
std::vector<SpellID> loadSpells(const JsonNode & value, CRandomGenerator & rng, const std::vector<SpellID> & spells)
|
2014-06-22 13:39:40 +03:00
|
|
|
{
|
|
|
|
// possible extensions: (taken from spell json config)
|
|
|
|
// "type": "adventure",//"adventure", "combat", "ability"
|
|
|
|
// "school": {"air":true, "earth":true, "fire":true, "water":true},
|
|
|
|
// "level": 1,
|
|
|
|
|
|
|
|
std::vector<SpellID> ret;
|
|
|
|
for (const JsonNode & entry : value.Vector())
|
|
|
|
{
|
|
|
|
ret.push_back(loadSpell(entry, rng, spells));
|
|
|
|
}
|
|
|
|
return ret;
|
|
|
|
}
|
|
|
|
|
|
|
|
CStackBasicDescriptor loadCreature(const JsonNode & value, CRandomGenerator & rng)
|
|
|
|
{
|
|
|
|
CStackBasicDescriptor stack;
|
Entities redesign and a few ERM features
* Made most Handlers derived from CHandlerBase and moved service API there.
* Declared existing Entity APIs.
* Added basic script context caching
* Started Lua script module
* Started Lua spell effect API
* Started script state persistence
* Started battle info callback binding
* CommitPackage removed
* Extracted spells::Caster to own header; Expanded Spell API.
* implemented !!MC:S, !!FU:E, !!FU:P, !!MA, !!VR:H, !!VR:C
* !!BU:C, !!BU:E, !!BU:G, !!BU:M implemented
* Allow use of "MC:S@varName@" to declare normal variable (technically v-variable with string key)
* Re-enabled VERM macros.
* !?GM0 added
* !?TM implemented
* Added !!MF:N
* Started !?OB, !!BM, !!HE, !!OW, !!UN
* Added basic support of w-variables
* Added support for ERM indirect variables
* Made !?FU regular trigger
* !!re (ERA loop receiver) implemented
* Fixed ERM receivers with zero args.
2018-03-17 16:58:30 +02:00
|
|
|
stack.type = VLC->creh->objects[VLC->modh->identifiers.getIdentifier("creature", value["type"]).get()];
|
2014-06-22 13:39:40 +03:00
|
|
|
stack.count = loadValue(value, rng);
|
|
|
|
if (!value["upgradeChance"].isNull() && !stack.type->upgrades.empty())
|
|
|
|
{
|
|
|
|
if (int(value["upgradeChance"].Float()) > rng.nextInt(99)) // select random upgrade
|
|
|
|
{
|
Entities redesign and a few ERM features
* Made most Handlers derived from CHandlerBase and moved service API there.
* Declared existing Entity APIs.
* Added basic script context caching
* Started Lua script module
* Started Lua spell effect API
* Started script state persistence
* Started battle info callback binding
* CommitPackage removed
* Extracted spells::Caster to own header; Expanded Spell API.
* implemented !!MC:S, !!FU:E, !!FU:P, !!MA, !!VR:H, !!VR:C
* !!BU:C, !!BU:E, !!BU:G, !!BU:M implemented
* Allow use of "MC:S@varName@" to declare normal variable (technically v-variable with string key)
* Re-enabled VERM macros.
* !?GM0 added
* !?TM implemented
* Added !!MF:N
* Started !?OB, !!BM, !!HE, !!OW, !!UN
* Added basic support of w-variables
* Added support for ERM indirect variables
* Made !?FU regular trigger
* !!re (ERA loop receiver) implemented
* Fixed ERM receivers with zero args.
2018-03-17 16:58:30 +02:00
|
|
|
stack.type = VLC->creh->objects[*RandomGeneratorUtil::nextItem(stack.type->upgrades, rng)];
|
2014-06-22 13:39:40 +03:00
|
|
|
}
|
|
|
|
}
|
|
|
|
return stack;
|
|
|
|
}
|
|
|
|
|
|
|
|
std::vector<CStackBasicDescriptor> loadCreatures(const JsonNode & value, CRandomGenerator & rng)
|
|
|
|
{
|
|
|
|
std::vector<CStackBasicDescriptor> ret;
|
|
|
|
for (const JsonNode & node : value.Vector())
|
|
|
|
{
|
|
|
|
ret.push_back(loadCreature(node, rng));
|
|
|
|
}
|
|
|
|
return ret;
|
|
|
|
}
|
|
|
|
|
|
|
|
std::vector<RandomStackInfo> evaluateCreatures(const JsonNode & value)
|
|
|
|
{
|
|
|
|
std::vector<RandomStackInfo> ret;
|
|
|
|
for (const JsonNode & node : value.Vector())
|
|
|
|
{
|
|
|
|
RandomStackInfo info;
|
|
|
|
|
|
|
|
if (!node["amount"].isNull())
|
2020-10-01 10:38:06 +02:00
|
|
|
info.minAmount = info.maxAmount = static_cast<si32>(node["amount"].Float());
|
2014-06-22 13:39:40 +03:00
|
|
|
else
|
|
|
|
{
|
2020-10-01 10:38:06 +02:00
|
|
|
info.minAmount = static_cast<si32>(node["min"].Float());
|
|
|
|
info.maxAmount = static_cast<si32>(node["max"].Float());
|
2014-06-22 13:39:40 +03:00
|
|
|
}
|
Entities redesign and a few ERM features
* Made most Handlers derived from CHandlerBase and moved service API there.
* Declared existing Entity APIs.
* Added basic script context caching
* Started Lua script module
* Started Lua spell effect API
* Started script state persistence
* Started battle info callback binding
* CommitPackage removed
* Extracted spells::Caster to own header; Expanded Spell API.
* implemented !!MC:S, !!FU:E, !!FU:P, !!MA, !!VR:H, !!VR:C
* !!BU:C, !!BU:E, !!BU:G, !!BU:M implemented
* Allow use of "MC:S@varName@" to declare normal variable (technically v-variable with string key)
* Re-enabled VERM macros.
* !?GM0 added
* !?TM implemented
* Added !!MF:N
* Started !?OB, !!BM, !!HE, !!OW, !!UN
* Added basic support of w-variables
* Added support for ERM indirect variables
* Made !?FU regular trigger
* !!re (ERA loop receiver) implemented
* Fixed ERM receivers with zero args.
2018-03-17 16:58:30 +02:00
|
|
|
const CCreature * crea = VLC->creh->objects[VLC->modh->identifiers.getIdentifier("creature", node["type"]).get()];
|
2014-06-22 13:39:40 +03:00
|
|
|
info.allowedCreatures.push_back(crea);
|
2014-08-03 16:19:16 +03:00
|
|
|
if (node["upgradeChance"].Float() > 0)
|
2014-06-22 13:39:40 +03:00
|
|
|
{
|
2023-02-12 22:39:17 +02:00
|
|
|
for(const auto & creaID : crea->upgrades)
|
Entities redesign and a few ERM features
* Made most Handlers derived from CHandlerBase and moved service API there.
* Declared existing Entity APIs.
* Added basic script context caching
* Started Lua script module
* Started Lua spell effect API
* Started script state persistence
* Started battle info callback binding
* CommitPackage removed
* Extracted spells::Caster to own header; Expanded Spell API.
* implemented !!MC:S, !!FU:E, !!FU:P, !!MA, !!VR:H, !!VR:C
* !!BU:C, !!BU:E, !!BU:G, !!BU:M implemented
* Allow use of "MC:S@varName@" to declare normal variable (technically v-variable with string key)
* Re-enabled VERM macros.
* !?GM0 added
* !?TM implemented
* Added !!MF:N
* Started !?OB, !!BM, !!HE, !!OW, !!UN
* Added basic support of w-variables
* Added support for ERM indirect variables
* Made !?FU regular trigger
* !!re (ERA loop receiver) implemented
* Fixed ERM receivers with zero args.
2018-03-17 16:58:30 +02:00
|
|
|
info.allowedCreatures.push_back(VLC->creh->objects[creaID]);
|
2014-06-22 13:39:40 +03:00
|
|
|
}
|
2014-08-09 12:31:43 +03:00
|
|
|
ret.push_back(info);
|
2014-06-22 13:39:40 +03:00
|
|
|
}
|
|
|
|
return ret;
|
|
|
|
}
|
|
|
|
|
2014-06-26 23:05:27 +03:00
|
|
|
//std::vector<Component> loadComponents(const JsonNode & value)
|
|
|
|
//{
|
|
|
|
// std::vector<Component> ret;
|
|
|
|
// return ret;
|
|
|
|
// //TODO
|
|
|
|
//}
|
2014-06-26 21:12:37 +03:00
|
|
|
|
|
|
|
std::vector<Bonus> DLL_LINKAGE loadBonuses(const JsonNode & value)
|
2014-06-22 13:39:40 +03:00
|
|
|
{
|
|
|
|
std::vector<Bonus> ret;
|
|
|
|
for (const JsonNode & entry : value.Vector())
|
|
|
|
{
|
2016-09-19 23:36:35 +02:00
|
|
|
auto bonus = JsonUtils::parseBonus(entry);
|
2014-06-22 13:39:40 +03:00
|
|
|
ret.push_back(*bonus);
|
|
|
|
}
|
|
|
|
return ret;
|
|
|
|
}
|
|
|
|
|
|
|
|
}
|
2022-07-26 15:07:42 +02:00
|
|
|
|
|
|
|
VCMI_LIB_NAMESPACE_END
|