A much easier and more efficient way of doing this is to change the obj_to_? functions in handler.c to simply insert new items into the linked list in a sorted fashion (sorted by VNUM, probably). Just have it go through the linked lists, and if any object in the list has the same vnum, stick the new item right at that spot in the list, otherwise stick it at the end of the list. Then its quick to count the number of each item in the list, and, as you do, pass the count to show_obj_to_char.
This archive was generated by hypermail 2b30 : 12/18/00 PST