Today when I for the first time tried to implement a spell that requires magical components, and tried to use the mag_materials function in magic.c I discovered a bug. I don't know if this has been reported before, but I thought I might as well post the fix here, just to make sure. Replace the original's first for-statement with the one below, and remember that you SHOULDN'T sent a NOTHING to the function if you don't want to use all availble slots, just use an 0. for (tobj = ch->carrying; tobj; tobj = tobj->next_content) { if ((item0 > 0) && (GET_OBJ_VNUM(tobj) == item0)) { obj0 = tobj; item0 = -1; } else if ((item1 > 0) && (GET_OBJ_VNUM(tobj) == item1)) { obj1 = tobj; item1 = -1; } else if ((item2 > 0) && (GET_OBJ_VNUM(tobj) == item2)) { obj2 = tobj; item2 = -1; } } Amiga
This archive was generated by hypermail 2b30 : 12/07/00 PST