forked from github/server
added missing case for `AT_DRAIN_EXP' (bug 1514).
added assert that triggers if a unit has no faction.
This commit is contained in:
parent
2da0d0f783
commit
59d5c1e94f
2 changed files with 2 additions and 0 deletions
|
@ -2616,6 +2616,7 @@ static bool display_race(faction * f, unit * u, const race * rc)
|
|||
case AT_SPELL:
|
||||
case AT_COMBATSPELL:
|
||||
case AT_DRAIN_ST:
|
||||
case AT_DRAIN_EXP:
|
||||
case AT_DAZZLE:
|
||||
bytes = snprintf(bufp, size, "%s", LOC(f->locale, "attack_magical"));
|
||||
break;
|
||||
|
|
|
@ -225,6 +225,7 @@ int gift_items(unit * u, int flags)
|
|||
int rule = rule_give();
|
||||
|
||||
assert(u->region);
|
||||
assert(u->faction);
|
||||
|
||||
if ((u->faction->flags & FFL_QUIT) == 0 || (rule & GIVE_ONDEATH) == 0) {
|
||||
if ((rule & GIVE_ALLITEMS) == 0 && (flags & GIFT_FRIENDS))
|
||||
|
|
Loading…
Reference in a new issue