Re: [CODE] Magical Weapons' Duration

From: Christoffer Lundberg (avatar@ORION.BODEN.SE)
Date: 12/07/97


I made like this:

void affect_from_char(struct char_data * ch, int type)
{
  struct affected_type *hjp, *next;

  for (hjp = ch->affected; hjp; hjp = next) {
    next = hjp->next;
    if (hjp->type == type)
      affect_remove(ch, hjp);
    if (hjp->type == SPELL_MAGEBLADE)
      remove_cweapon(ch);
  }
}

void remove_cweapon(struct char_data *ch)
{
   struct obj_data *obj, *next_obj;

   unequip_char(ch, WEAR_WIELD);

   for (obj = ch->carrying; obj; obj = next_obj) {
      next_obj = obj->next_content;

      if (GET_OBJ_EXTRA(obj) == ITEM_ASTRAL) {
        obj_from_char(obj);
        extract_obj(obj);
      }
   }
}


But it doesn't happen anything when the spell runs out. What have I
done wrong?

/Christoffer


     +------------------------------------------------------------+
     | Ensure that you have read the CircleMUD Mailing List FAQ:  |
     | http://democracy.queensu.ca/~fletcher/Circle/list-faq.html |
     +------------------------------------------------------------+



This archive was generated by hypermail 2b30 : 12/08/00 PST