1
0
mirror of https://github.com/vcmi/vcmi.git synced 2025-07-15 01:24:45 +02:00

Moved "max heroes on map per player", "max heroes available for player" to "defaultMods.json"

This commit is contained in:
Macron1Robot
2014-04-27 10:43:42 +04:00
parent 907caedb13
commit 8ec7a9b919
9 changed files with 64 additions and 15 deletions

View File

@ -876,7 +876,7 @@ void CGHeroInstance::onHeroVisit(const CGHeroInstance * h) const
{
int txt_id;
if(cb->getHeroCount(h->tempOwner,false) < GameConstants::MAX_HEROES_PER_PLAYER) //free hero slot
if (cb->getHeroCount(h->tempOwner, false) < VLC->modh->settings.MAX_HEROES_ON_MAP_PER_PLAYER)//GameConstants::MAX_HEROES_PER_PLAYER) //free hero slot
{
cb->changeObjPos(id,pos+int3(1,0,0),0);
//update hero parameters
@ -2277,10 +2277,12 @@ TResources CGTownInstance::dailyIncome() const
{
ret[i] = 0;
}
BOOST_FOREACH(TPairCBuilding p, town->buildings)
//BOOST_FOREACH(TPairCBuilding p, town->buildings)
for (TPairCBuilding p : town->buildings)
{
BuildingID buildingUpgrade;
BOOST_FOREACH(TPairCBuilding p2, town->buildings)
// BOOST_FOREACH(TPairCBuilding p2, town->buildings)
for (TPairCBuilding p2 : town->buildings)
{
if (p2.second->upgrade == p.first)
{