mirror of
https://github.com/vcmi/vcmi.git
synced 2025-10-08 23:22:25 +02:00
Merge pull request #33 from rhn/develop
Fixed wrong message when building a structure, Rewarding objects won't loose their state on reload
This commit is contained in:
@@ -408,12 +408,12 @@ EBuildingState::EBuildingState CGameInfoCallback::canBuildStructure( const CGTow
|
|||||||
return t->hasBuilt(id);
|
return t->hasBuilt(id);
|
||||||
};
|
};
|
||||||
|
|
||||||
if(t->builded >= VLC->modh->settings.MAX_BUILDING_PER_TURN)
|
|
||||||
return EBuildingState::CANT_BUILD_TODAY; //building limit
|
|
||||||
|
|
||||||
if (!building->requirements.test(buildTest))
|
if (!building->requirements.test(buildTest))
|
||||||
return EBuildingState::PREREQUIRES;
|
return EBuildingState::PREREQUIRES;
|
||||||
|
|
||||||
|
if(t->builded >= VLC->modh->settings.MAX_BUILDING_PER_TURN)
|
||||||
|
return EBuildingState::CANT_BUILD_TODAY; //building limit
|
||||||
|
|
||||||
if (building->upgrade != BuildingID::NONE && !t->hasBuilt(building->upgrade))
|
if (building->upgrade != BuildingID::NONE && !t->hasBuilt(building->upgrade))
|
||||||
return EBuildingState::MISSING_BASE;
|
return EBuildingState::MISSING_BASE;
|
||||||
|
|
||||||
|
@@ -222,7 +222,7 @@ public:
|
|||||||
h & exp & level & name & biography & portrait & mana & secSkills & movement
|
h & exp & level & name & biography & portrait & mana & secSkills & movement
|
||||||
& sex & inTownGarrison & spells & patrol & moveDir & skillsInfo;
|
& sex & inTownGarrison & spells & patrol & moveDir & skillsInfo;
|
||||||
h & visitedTown & boat;
|
h & visitedTown & boat;
|
||||||
h & type & specialty & commander;
|
h & type & specialty & commander & visitedObjects;
|
||||||
BONUS_TREE_DESERIALIZATION_FIX
|
BONUS_TREE_DESERIALIZATION_FIX
|
||||||
//visitied town pointer will be restored by map serialization method
|
//visitied town pointer will be restored by map serialization method
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user