mirror of
https://github.com/vcmi/vcmi.git
synced 2024-12-04 09:42:40 +02:00
Initialize random dwelling added to map
This commit is contained in:
parent
4180ea9523
commit
fcf3679377
@ -91,6 +91,20 @@ void Initializer::initialize(CGDwelling * o)
|
||||
if(!o) return;
|
||||
|
||||
o->tempOwner = defaultPlayer;
|
||||
|
||||
if(o->ID == Obj::RANDOM_DWELLING || o->ID == Obj::RANDOM_DWELLING_LVL || o->ID == Obj::RANDOM_DWELLING_FACTION)
|
||||
{
|
||||
o->randomizationInfo = CGDwellingRandomizationInfo();
|
||||
if(o->ID == Obj::RANDOM_DWELLING_LVL)
|
||||
{
|
||||
o->randomizationInfo->minLevel = o->subID;
|
||||
o->randomizationInfo->maxLevel = o->subID;
|
||||
}
|
||||
if(o->ID == Obj::RANDOM_DWELLING_FACTION)
|
||||
{
|
||||
o->randomizationInfo->allowedFactions.insert(FactionID(o->subID));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
void Initializer::initialize(CGGarrison * o)
|
||||
|
Loading…
Reference in New Issue
Block a user