DRINKCON aliases

From: Kras Kresh (kras_kresh@hotmail.com)
Date: 07/27/01


I've been getting the logs of not being able to remove the alias for a while
now. I've finally decided to do something about it. The bug was that in game
if you change the liquid or empty a drink container, the alias changes or
the drink name is removed. But if rented with, the alias is restored from
game and is not saved. Something should be done so that rented objects be
updated with the ones in the game. I've already did stuff to update objects
rented with. This one is for ITEM_DRINKCON and ITEM_FOUNTAIN - it was used
in a switch statement.

in objsave.c in function:
struct obj_data *Obj_from_store(struct obj_file_elem object, int *location)

if (GET_OBJ_TYPE(obj) == ITEM_DRINKCON) {

      GET_OBJ_VAL(obj, 1) = object.value[1];    // how filled
      if (!GET_OBJ_VAL(obj, 1)) {               // kill if empty
        name_from_drinkcon(obj);
        GET_OBJ_VAL(obj, 2) = 0;
      } else if (GET_OBJ_VAL(obj, 2) != object.value[2]) {
        name_from_drinkcon(obj);                // change names
        GET_OBJ_VAL(obj, 2) = object.value[2];  // type of drink
        name_to_drinkcon(obj, GET_OBJ_VAL(obj, 2));
      }
      GET_OBJ_VAL(obj, 3) = object.value[3];    // poison
      GET_OBJ_WEIGHT(obj) = object.weight;
}

if this is buggy, please make sure to tell me.

_________________________________________________________________
Get your FREE download of MSN Explorer at http://explorer.msn.com/intl.asp

--
   +---------------------------------------------------------------+
   | FAQ: http://qsilver.queensu.ca/~fletchra/Circle/list-faq.html |
   | Archives: http://post.queensu.ca/listserv/wwwarch/circle.html |
   +---------------------------------------------------------------+



This archive was generated by hypermail 2b30 : 12/06/01 PST