avoid another magic number
Some of the hardcoded +1 scattered about are likely invlet_gold or invlet_overflow, but I didn't hunt those down.
This commit is contained in:
@@ -3887,7 +3887,7 @@ wizkit_addinv(struct obj *obj)
|
||||
if (Role_if(PM_CLERIC))
|
||||
obj->bknown = 1; /* ok to bypass set_bknown() */
|
||||
/* same criteria as lift_object()'s check for available inventory slot */
|
||||
if (obj->oclass != COIN_CLASS && inv_cnt(FALSE) >= 52
|
||||
if (obj->oclass != COIN_CLASS && inv_cnt(FALSE) >= invlet_basic
|
||||
&& !merge_choice(gi.invent, obj)) {
|
||||
/* inventory overflow; can't just place & stack object since
|
||||
hero isn't in position yet, so schedule for arrival later */
|
||||
|
||||
Reference in New Issue
Block a user