forked from github/server
remove unnecessary assert that prevents throwing away money on an ocean
github issue #437 https://bugs.eressea.de/view.php?id=2173#c6411
This commit is contained in:
parent
60ea74ce50
commit
fa55f84b41
2 changed files with 7 additions and 9 deletions
|
@ -588,7 +588,9 @@ struct order *ord)
|
|||
use +=
|
||||
use_pooled(s, item2resource(itype), GET_RESERVE | GET_POOLED_SLACK,
|
||||
n - use);
|
||||
rsetmoney(s->region, rmoney(s->region) + use);
|
||||
if (s->region->land) {
|
||||
rsetmoney(s->region, rmoney(s->region) + use);
|
||||
}
|
||||
return 0;
|
||||
}
|
||||
return -1; /* use the mechanism */
|
||||
|
|
|
@ -603,8 +603,7 @@ void rsetpeasants(region * r, int value)
|
|||
if (r->land) {
|
||||
assert(value >= 0);
|
||||
r->land->peasants = value;
|
||||
} else
|
||||
assert(value == 0);
|
||||
}
|
||||
}
|
||||
|
||||
int rmoney(const region * r)
|
||||
|
@ -617,8 +616,7 @@ void rsethorses(const region * r, int value)
|
|||
if (r->land) {
|
||||
assert(value >= 0);
|
||||
r->land->horses = value;
|
||||
} else
|
||||
assert(value == 0);
|
||||
}
|
||||
}
|
||||
|
||||
int rhorses(const region * r)
|
||||
|
@ -631,8 +629,7 @@ void rsetmoney(region * r, int value)
|
|||
if (r->land) {
|
||||
assert(value >= 0);
|
||||
r->land->money = value;
|
||||
} else
|
||||
assert(value == 0);
|
||||
}
|
||||
}
|
||||
|
||||
int rherbs(const struct region *r)
|
||||
|
@ -645,8 +642,7 @@ void rsetherbs(const struct region *r, int value)
|
|||
if (r->land) {
|
||||
assert(value >= 0);
|
||||
r->land->herbs = (short)(value);
|
||||
} else
|
||||
assert(value == 0);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
|
Loading…
Reference in a new issue