mirror of
https://github.com/vcmi/vcmi.git
synced 2025-11-29 23:07:48 +02:00
Simplified building ID logic
- Replaced overcomplicated and broken math on dwelling ID's with fixed enum - Fixed broken 2nd upgrades and 8th dwelling - Removed no longer used enumeration values from building ID's
This commit is contained in:
@@ -2083,7 +2083,7 @@ bool CGameHandler::buildStructure(ObjectInstanceID tid, BuildingID requestedID,
|
||||
//Performs stuff that has to be done before new building is built
|
||||
auto processBeforeBuiltStructure = [t, this](const BuildingID buildingID)
|
||||
{
|
||||
if(buildingID >= BuildingID::DWELL_FIRST) //dwelling
|
||||
if(buildingID.IsDwelling())
|
||||
{
|
||||
int level = BuildingID::getLevelFromDwelling(buildingID);
|
||||
int upgradeNumber = BuildingID::getUpgradedFromDwelling(buildingID);
|
||||
|
||||
Reference in New Issue
Block a user