1
0
mirror of https://github.com/vcmi/vcmi.git synced 2024-12-24 22:14:36 +02:00

Fix none-Of operator for skills

This commit is contained in:
nordsoft 2023-04-29 17:05:44 +04:00 committed by Nordsoft91
parent c7ade44d07
commit d2e0d6a754

View File

@ -11,6 +11,8 @@
#include "StdInc.h"
#include "JsonRandom.h"
#include <vstd/StringUtils.h>
#include "../JsonNode.h"
#include "../CRandomGenerator.h"
#include "../StringConstants.h"
@ -150,7 +152,11 @@ namespace JsonRandom
for(const auto & skill : VLC->skillh->objects)
{
IObjectInterface::cb->isAllowed(2, skill->getIndex());
defaultSkills.insert(skill->getNameTextID());
auto scopeAndName = vstd::splitStringToPair(skill->getJsonKey(), ':');
if(scopeAndName.first == CModHandler::scopeBuiltin() || scopeAndName.first == value.meta)
defaultSkills.insert(scopeAndName.second);
else
defaultSkills.insert(skill->getJsonKey());
}
for(const auto & element : value.Vector())