Bug 1516 Trotz Reserviere, Pferde abgegeben.

Gib xyz anzahl irgendwas ignoriert nicht mehr das eigene Reserviere.
This commit is contained in:
CTD 2014-07-29 14:33:57 +02:00
parent 46ab9e7bb6
commit 246a92f666
1 changed files with 2 additions and 2 deletions

View File

@ -120,7 +120,7 @@ give_item(int want, const item_type * itype, unit * src, unit * dest,
int n, r; int n, r;
assert(itype != NULL); assert(itype != NULL);
n = get_pooled(src, item2resource(itype), GET_DEFAULT, want); n = get_pooled(src, item2resource(itype), GET_SLACK | GET_POOLED_SLACK, want);
n = _min(want, n); n = _min(want, n);
r = n; r = n;
if (dest && src->faction != dest->faction if (dest && src->faction != dest->faction
@ -144,7 +144,7 @@ give_item(int want, const item_type * itype, unit * src, unit * dest,
int use = use_pooled(src, item2resource(itype), GET_SLACK, n); int use = use_pooled(src, item2resource(itype), GET_SLACK, n);
if (use < n) if (use < n)
use += use +=
use_pooled(src, item2resource(itype), GET_RESERVE | GET_POOLED_SLACK, use_pooled(src, item2resource(itype), GET_POOLED_SLACK,
n - use); n - use);
if (dest) { if (dest) {
r = give_quota(src, dest, itype, n); r = give_quota(src, dest, itype, n);