Merge pull request #40 from CTD1/Fix-0001865-for-E2

Bug 1865: largest building or region owner pays for certain empty buildings. Fix for E2,
This commit is contained in:
Enno Rehling 2014-10-18 20:35:51 +02:00
commit c337d3f505
1 changed files with 3 additions and 5 deletions

View File

@ -1039,12 +1039,10 @@ static bool maintain(building * b, bool first)
u = building_owner(b);
if (u == NULL)
return false;
/* If the owner is the region owner, check if biggest castle has the dontpay flag */
/* If the owner is the region owner, check if dontpay flag is set for the building where he is in */
if (check_param(global.parameters, "rules.region_owner_pay_building", b->type->_name)) {
if (u == building_owner(largestbuilding(r, &cmp_taxes, false))) {
if (fval(u->building, BLD_DONTPAY)) {
return false;
}
if (fval(u->building, BLD_DONTPAY)) {
return false;
}
}
for (c = 0; b->type->maintenance[c].number; ++c) {