forked from github/server
E2 fähig gemacht
Der Burgenbesitzer sieht nur noch etwas wenn er auch Leuchtturmbesitzer ist. Das geht jetzt auch für E2 ohne region_owner rule.
This commit is contained in:
parent
90cf6d845f
commit
fe0ff71aa1
|
@ -670,7 +670,12 @@ static unit *building_owner_ex(const building * bld, const struct faction * last
|
|||
}
|
||||
}
|
||||
if (!heir && check_param(global.parameters, "rules.region_owner_pay_building", bld->type->_name)) {
|
||||
if (rule_region_owners()) {
|
||||
u = building_owner(largestbuilding(bld->region, &cmp_taxes, false));
|
||||
}
|
||||
else {
|
||||
u = building_owner(largestbuilding(bld->region, &cmp_wage, false));
|
||||
}
|
||||
if (u) {
|
||||
heir = u;
|
||||
}
|
||||
|
|
|
@ -1538,8 +1538,10 @@ int lighthouse_range(const building * b, const faction * f)
|
|||
int c = 0;
|
||||
unit *u;
|
||||
for (u = r->units; u; u = u->next) {
|
||||
if (u->building == b || u == building_owner(b)) {
|
||||
if (u->building == b) {
|
||||
c += u->number;
|
||||
}
|
||||
if (c > buildingcapacity(b))
|
||||
break;
|
||||
if (f == NULL || u->faction == f) {
|
||||
|
|
|
@ -1526,8 +1526,7 @@ static void prepare_reports(void)
|
|||
if (check_param(global.parameters, "rules.region_owner_pay_building", bt_lighthouse->_name)) {
|
||||
for (b = rbuildings(r); b; b = b->next) {
|
||||
if (b && b->type == bt_lighthouse) {
|
||||
u = building_owner(largestbuilding(r, &cmp_taxes, false));
|
||||
/* alternativ: u = building_owner(b); if not all region owners should see */
|
||||
u = building_owner(b);
|
||||
if (u) {
|
||||
prepare_lighthouse(b, u->faction);
|
||||
if (u_race(u) != get_race(RC_SPELL) || u->number == RS_FARVISION) {
|
||||
|
|
Loading…
Reference in New Issue