Remove crash bug when purging a dropped item in a wtrigger.

We're leveraging the lookup table, because it's a safer way
to see if an object has been free'd than looking at the object
itself (which while it may work may just as well fail).

Fixes #83
This commit is contained in:
Thomas Arp 2020-03-01 01:19:06 +01:00
parent 140cdc5d22
commit d5a11618f1
3 changed files with 40 additions and 19 deletions

View file

@ -449,6 +449,8 @@ void wld_command_interpreter(room_data *room, char *argument);
// id helpers
extern long char_script_id(char_data *ch);
extern long obj_script_id(obj_data *obj);
extern int has_obj_by_uid_in_lookup_table(long uid);
#define room_script_id(room) ((long)(room)->number + ROOM_ID_BASE)
#endif /* _DG_SCRIPTS_H_ */