follow-up: just use existing carrying()
This commit is contained in:
@@ -1360,7 +1360,6 @@ extern void perm_invent_toggled(boolean negated);
|
|||||||
extern void prepare_perminvent(winid window);
|
extern void prepare_perminvent(winid window);
|
||||||
extern struct obj *carrying_stoning_corpse(void);
|
extern struct obj *carrying_stoning_corpse(void);
|
||||||
extern void repopulate_perminvent(void);
|
extern void repopulate_perminvent(void);
|
||||||
extern boolean hero_has_one_of_these(short);
|
|
||||||
|
|
||||||
/* ### ioctl.c ### */
|
/* ### ioctl.c ### */
|
||||||
|
|
||||||
|
|||||||
@@ -671,7 +671,7 @@ docall(struct obj *obj)
|
|||||||
*uname_p = dupstr(buf);
|
*uname_p = dupstr(buf);
|
||||||
discover_object(obj->otyp, FALSE, TRUE, TRUE); /* possibly add to disco[] */
|
discover_object(obj->otyp, FALSE, TRUE, TRUE); /* possibly add to disco[] */
|
||||||
}
|
}
|
||||||
if (obj->where == OBJ_INVENT || hero_has_one_of_these(obj->otyp))
|
if (obj->where == OBJ_INVENT || carrying(obj->otyp))
|
||||||
update_inventory();
|
update_inventory();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
12
src/invent.c
12
src/invent.c
@@ -2779,18 +2779,6 @@ learn_unseen_invent(void)
|
|||||||
update_inventory();
|
update_inventory();
|
||||||
}
|
}
|
||||||
|
|
||||||
boolean
|
|
||||||
hero_has_one_of_these(short otyp)
|
|
||||||
{
|
|
||||||
struct obj *otmp;
|
|
||||||
|
|
||||||
for (otmp = gi.invent; otmp; otmp = otmp->nobj) {
|
|
||||||
if (otmp->otyp == otyp)
|
|
||||||
return TRUE;
|
|
||||||
}
|
|
||||||
return FALSE;
|
|
||||||
}
|
|
||||||
|
|
||||||
/* persistent inventory window is maintained by interface code;
|
/* persistent inventory window is maintained by interface code;
|
||||||
'update_inventory' used to be a macro for
|
'update_inventory' used to be a macro for
|
||||||
(*windowprocs.win_update_inventory) but the restore hackery to suppress
|
(*windowprocs.win_update_inventory) but the restore hackery to suppress
|
||||||
|
|||||||
Reference in New Issue
Block a user