mirror of
https://github.com/vcmi/vcmi.git
synced 2024-11-24 08:32:34 +02:00
Merge pull request #1033 from kambala-decapitator/necro-witch-hut-rmg
don't add Necromancy to Witch Hut on random maps
This commit is contained in:
commit
21c035e5d7
@ -58,7 +58,6 @@ CObjectClassesHandler::CObjectClassesHandler()
|
||||
SET_HANDLER("randomDwelling", CGDwelling);
|
||||
|
||||
SET_HANDLER("generic", CGObjectInstance);
|
||||
SET_HANDLER("market", CGMarket);
|
||||
SET_HANDLER("cartographer", CCartographer);
|
||||
SET_HANDLER("artifact", CGArtifact);
|
||||
SET_HANDLER("blackMarket", CGBlackMarket);
|
||||
|
@ -1452,8 +1452,10 @@ void CGWitchHut::initObj(CRandomGenerator & rand)
|
||||
{
|
||||
if (allowedAbilities.empty()) //this can happen for RMG. regular maps load abilities from map file
|
||||
{
|
||||
// Necromancy can't be learned on random maps
|
||||
for(int i = 0; i < VLC->skillh->size(); i++)
|
||||
allowedAbilities.push_back(i);
|
||||
if(VLC->skillh->getByIndex(i)->getId() != SecondarySkill::NECROMANCY)
|
||||
allowedAbilities.push_back(i);
|
||||
}
|
||||
ability = *RandomGeneratorUtil::nextItem(allowedAbilities, rand);
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user