loot refactoring and a small armor/shield fix.

This commit is contained in:
Enno Rehling 2014-11-09 14:39:48 +01:00
parent f55ab5f752
commit a28cbc647a
2 changed files with 4 additions and 13 deletions

View file

@ -1059,8 +1059,8 @@ terminate(troop dt, troop at, int type, const char *damage, bool missile)
int hp;
int ar = 0, an, am;
const armor_type *armor = select_armor(dt, true);
const armor_type *shield = select_armor(dt, false);
const armor_type *armor = select_armor(dt, false);
const armor_type *shield = select_armor(dt, true);
const weapon_type *dwtype = NULL;
const weapon_type *awtype = NULL;
@ -2554,16 +2554,7 @@ static void loot_items(fighter * corpse)
mustloot ? loot : loot_quota(corpse->unit, fig->unit, itm->type,
loot);
if (trueloot > 0) {
item *l = fig->loot;
while (l && l->type != itm->type)
l = l->next;
if (!l) {
l = calloc(sizeof(item), 1);
l->next = fig->loot;
fig->loot = l;
l->type = itm->type;
}
l->number += trueloot;
i_change(&fig->loot, itm->type, trueloot);
}
}
}

View file

@ -1418,7 +1418,7 @@ static void durchreisende(FILE * F, const region * r, const faction * f)
if (cansee_durchgezogen(f, r, u, 0)) {
++counter;
if (u->ship != NULL) {
#ifdef GERMAN_FLUFF_DISABLED
#ifdef GERMAN_FLUFF_ENABLED
if (counter == 1) {
bytes = (int)strlcpy(bufp, "Die ", size);
}