mirror of
https://github.com/vcmi/vcmi.git
synced 2025-07-03 00:46:55 +02:00
Merge pull request #1111 from GermanAizek/develop
Code refactor and fix condition bug
This commit is contained in:
@ -532,7 +532,7 @@ std::pair<Obj,int> CGameState::pickObject (CGObjectInstance *obj)
|
||||
if (auto info = dynamic_cast<CCreGenAsCastleInfo*>(dwl->info))
|
||||
{
|
||||
faction = getRandomGenerator().nextInt((int)VLC->townh->size() - 1);
|
||||
if(info->asCastle && info->instanceId != "")
|
||||
if(info->asCastle && !info->instanceId.empty())
|
||||
{
|
||||
auto iter = map->instanceNames.find(info->instanceId);
|
||||
|
||||
|
Reference in New Issue
Block a user