mirror of
https://github.com/vcmi/vcmi.git
synced 2025-04-04 22:14:25 +02:00
Fix loading of preset artifacts and creatures on some custom maps
This commit is contained in:
parent
3f60c1b0b3
commit
6730ec64d5
@ -215,8 +215,12 @@ void CGCreature::pickRandomObject(CRandomGenerator & rand)
|
|||||||
subID = VLC->creh->pickRandomMonster(rand, 7);
|
subID = VLC->creh->pickRandomMonster(rand, 7);
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (ID != MapObjectID::MONSTER)
|
||||||
|
{
|
||||||
ID = MapObjectID::MONSTER;
|
ID = MapObjectID::MONSTER;
|
||||||
setType(ID, subID);
|
setType(ID, subID);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
void CGCreature::initObj(CRandomGenerator & rand)
|
void CGCreature::initObj(CRandomGenerator & rand)
|
||||||
|
@ -739,10 +739,13 @@ void CGArtifact::pickRandomObject(CRandomGenerator & rand)
|
|||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (ID != Obj::SPELL_SCROLL)
|
if (ID != MapObjectID::SPELL_SCROLL && ID != MapObjectID::ARTIFACT)
|
||||||
|
{
|
||||||
ID = MapObjectID::ARTIFACT;
|
ID = MapObjectID::ARTIFACT;
|
||||||
|
|
||||||
setType(ID, subID);
|
setType(ID, subID);
|
||||||
|
}
|
||||||
|
else if (ID != MapObjectID::SPELL_SCROLL)
|
||||||
|
ID = MapObjectID::ARTIFACT;
|
||||||
}
|
}
|
||||||
|
|
||||||
void CGArtifact::initObj(CRandomGenerator & rand)
|
void CGArtifact::initObj(CRandomGenerator & rand)
|
||||||
|
Loading…
x
Reference in New Issue
Block a user