I'll be very thankful to anyone who can explain, why it is necessary to subtract everything char affected with and then add it again in affect_total. After 1 hour of examining the code I'm still unable to figure it out. :( Here is affect_total function: /* restoring original abilities, and then affecting all again */ void affect_total(struct char_data * ch) { struct affected_type *af; int i, j; for (i = 0; i < NUM_WEARS; i++) { if (GET_EQ(ch, i)) for (j = 0; j < MAX_OBJ_AFFECT; j++) affect_modify(ch, GET_EQ(ch, i)->affected[j].location, GET_EQ(ch, i)->affected[j].modifier, GET_EQ(ch, i)->obj_flags.bitvector, FALSE); } for (af = ch->affected; af; af = af->next) affect_modify(ch, af->location, af->modifier, af->bitvector, FALSE); ch->aff_abils = ch->real_abils; // Btw, can ch->aff_abils and ch->real_abils+affects differ or this can happen as a result of bug only? I.e., is there any reason to assign real_abils to aff_abils if real_abils is the same as aff_abils is in this part of function? [two affect_modify(...., TRUE) cycles skipped] Zmey Three Moons World (telnet://rmud.net.ru:4000, rus lng only) +------------------------------------------------------------+ | Ensure that you have read the CircleMUD Mailing List FAQ: | | http://qsilver.queensu.ca/~fletchra/Circle/list-faq.html | +------------------------------------------------------------+
This archive was generated by hypermail 2b30 : 12/15/00 PST