mirror of
				https://github.com/vcmi/vcmi.git
				synced 2025-10-31 00:07:39 +02:00 
			
		
		
		
	Initialize random dwelling added to map
This commit is contained in:
		| @@ -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) | ||||
|   | ||||
		Reference in New Issue
	
	Block a user