diff --git a/changelog b/changelog index 76ba2b4..eeb12b2 100644 --- a/changelog +++ b/changelog @@ -35,11 +35,13 @@ export (QQ's a zone into a tarball) Xlist (mlist, olist, rlist, zlist, slist, tlist, qlist) (lots of major bugfixes too) @ +[Aug 25 2011] - Rumble + Comment fixes, clarification, and warning cleanup. (thanks Kyle) [Sep 11 2011] - Fizban - Added MXP, MSP, MSSP, MSDP, ATCP, CHARSET, NAWS, TTYPE, 256-color protocols. (Thanks KaVir) + Added MXP, MSP, MSSP, MSDP, ATCP, CHARSET, NAWS, TTYPE, 256-color protocols. (Thanks KaVir) [Aug 18 2011] - Fizban - Added hitroll and damroll fields to DG Scripts. Also made them editable via scripts. - Made do_stat_character show scripts attached to players. + Added hitroll and damroll fields to DG Scripts. Also made them editable via scripts. + Made do_stat_character show scripts attached to players. [Mar 31 2011] - Rumble Fixed several typos and formatting issues. (Thanks Kyle) Added check to prevent immortals from getting poisoned. diff --git a/lib/misc/bugs b/lib/misc/bugs index ab34f7d..e69de29 100644 --- a/lib/misc/bugs +++ b/lib/misc/bugs @@ -1,17 +0,0 @@ -Text couldnt find 2nd floor's moongate in ultima~ -Body couldn't find 2nd floor's moongate in ultima -~ -Name Neptune~ -Level 30 -Room 55524 -Flags 0 0 0 0 -End -Text still about the 2nd moongate in ultima~ -Body I found that there's a trigger in some room that handles the command -"open shelf" -- there should be a hint somewhere in the descriptions. -~ -Name Neptune~ -Level 30 -Room 55571 -Flags 0 0 0 0 -End diff --git a/lib/world/wld/555.wld b/lib/world/wld/555.wld index 43bdc60..459e685 100644 --- a/lib/world/wld/555.wld +++ b/lib/world/wld/555.wld @@ -595,7 +595,7 @@ D3 ~ 0 0 55533 E -shelf shelves bookshelf bookshelves~ +shelf shelves bookshelves bookcases~ Secret Door: Open Shelf ~ S @@ -1298,22 +1298,22 @@ D0 You see trees. ~ ~ -0 0 55570 +0 0 55576 D1 You see trees. ~ ~ -0 0 55576 +0 0 55572 D2 You see trees. ~ ~ -0 0 55572 +0 0 55581 D3 You see trees. ~ ~ -0 0 55581 +0 0 55570 S T 55571 #55572 diff --git a/src/act.item.c b/src/act.item.c index cef00f9..51d1314 100644 --- a/src/act.item.c +++ b/src/act.item.c @@ -931,7 +931,7 @@ ACMD(do_drink) act("$n chokes and utters some strange sounds.", TRUE, ch, 0, 0, TO_ROOM); new_affect(&af); - af.type = SPELL_POISON; + af.spell = SPELL_POISON; af.duration = amount * 3; SET_BIT_AR(af.bitvector, AFF_POISON); affect_join(ch, &af, FALSE, FALSE, FALSE, FALSE); @@ -1006,7 +1006,7 @@ ACMD(do_eat) act("$n coughs and utters some strange sounds.", FALSE, ch, 0, 0, TO_ROOM); new_affect(&af); - af.type = SPELL_POISON; + af.spell = SPELL_POISON; af.duration = amount * 2; SET_BIT_AR(af.bitvector, AFF_POISON); affect_join(ch, &af, FALSE, FALSE, FALSE, FALSE); diff --git a/src/act.other.c b/src/act.other.c index cc41104..383a498 100644 --- a/src/act.other.c +++ b/src/act.other.c @@ -118,7 +118,7 @@ ACMD(do_sneak) return; new_affect(&af); - af.type = SKILL_SNEAK; + af.spell = SKILL_SNEAK; af.duration = GET_LEVEL(ch); SET_BIT_AR(af.bitvector, AFF_SNEAK); affect_to_char(ch, &af); diff --git a/src/act.wizard.c b/src/act.wizard.c index 323c6b7..aa8b2d0 100644 --- a/src/act.wizard.c +++ b/src/act.wizard.c @@ -901,7 +901,7 @@ void do_stat_character(struct char_data *ch, struct char_data *k) /* Routine to show what spells a char is affected by */ if (k->affected) { for (aff = k->affected; aff; aff = aff->next) { - send_to_char(ch, "SPL: (%3dhr) %s%-21s%s ", aff->duration + 1, CCCYN(ch, C_NRM), skill_name(aff->type), CCNRM(ch, C_NRM)); + send_to_char(ch, "SPL: (%3dhr) %s%-21s%s ", aff->duration + 1, CCCYN(ch, C_NRM), skill_name(aff->spell), CCNRM(ch, C_NRM)); if (aff->modifier) send_to_char(ch, "%+d to %s", aff->modifier, apply_types[(int) aff->location]); diff --git a/src/comm.c b/src/comm.c index 99f4578..dba7e26 100644 --- a/src/comm.c +++ b/src/comm.c @@ -1101,7 +1101,8 @@ const char CCODE[] = "@nNdbgcrmywDBGCRMYW01234567luoe!"; static size_t proc_colors(char *txt, size_t maxlen, int parse) { - char *d, *s, *c, *p; + char *d, *s, *p; + const char *c; int i; if (!txt || !strchr(txt, '@')) /* skip out if no color codes */ diff --git a/src/dg_misc.c b/src/dg_misc.c index 80ff023..cf55dff 100644 --- a/src/dg_misc.c +++ b/src/dg_misc.c @@ -228,7 +228,7 @@ void do_dg_affect(void *go, struct script_data *sc, trig_data *trig, /* add the affect */ new_affect(&af); - af.type = SPELL_DG_AFFECT; + af.spell = SPELL_DG_AFFECT; af.duration = duration -1; af.modifier = value; diff --git a/src/dg_wldcmd.c b/src/dg_wldcmd.c index d1671d9..a85d0b8 100644 --- a/src/dg_wldcmd.c +++ b/src/dg_wldcmd.c @@ -373,7 +373,7 @@ WCMD(do_wpurge) { char arg[MAX_INPUT_LENGTH]; char_data *ch, *next_ch; - obj_data *obj, *next_obj; + obj_data *obj = NULL, *next_obj; one_argument(argument, arg); @@ -399,7 +399,7 @@ WCMD(do_wpurge) ch = get_char_in_room(room, arg); if (!ch) { - if (*arg == UID_CHAR) + if (obj && *arg == UID_CHAR) obj = get_obj(arg); else obj = get_obj_in_room(room, arg); diff --git a/src/fight.c b/src/fight.c index 9ad1fd2..ec5503d 100644 --- a/src/fight.c +++ b/src/fight.c @@ -416,7 +416,7 @@ static void group_gain(struct char_data *ch, struct char_data *victim) if (AFF_FLAGGED(f->follower, AFF_GROUP) && IN_ROOM(f->follower) == IN_ROOM(ch)) tot_members++; - /* round up to the next highest tot_members */ + /* round up to the nearest tot_members */ tot_gain = (GET_EXP(victim) / 3) + tot_members - 1; /* prevent illegal xp creation when killing players */ diff --git a/src/handler.c b/src/handler.c index 2838850..d1e4c64 100644 --- a/src/handler.c +++ b/src/handler.c @@ -309,14 +309,14 @@ void affect_remove(struct char_data *ch, struct affected_type *af) affect_total(ch); } -/* Call affect_remove with every spell of spelltype "skill" */ +/* Call affect_remove with every affect from the spell "type" */ 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) + if (hjp->spell == type) affect_remove(ch, hjp); } } @@ -328,7 +328,7 @@ bool affected_by_spell(struct char_data *ch, int type) struct affected_type *hjp; for (hjp = ch->affected; hjp; hjp = hjp->next) - if (hjp->type == type) + if (hjp->spell == type) return (TRUE); return (FALSE); @@ -343,7 +343,7 @@ void affect_join(struct char_data *ch, struct affected_type *af, for (hjp = ch->affected; !found && hjp; hjp = next) { next = hjp->next; - if ((hjp->type == af->type) && (hjp->location == af->location)) { + if ((hjp->spell == af->spell) && (hjp->location == af->location)) { if (add_dur) af->duration += hjp->duration; else if (avg_dur) diff --git a/src/magic.c b/src/magic.c index 4f863ea..bd5b8de 100644 --- a/src/magic.c +++ b/src/magic.c @@ -67,11 +67,11 @@ void affect_update(void) else if (af->duration == -1) /* No action */ ; else { - if ((af->type > 0) && (af->type <= MAX_SPELLS)) - if (!af->next || (af->next->type != af->type) || + if ((af->spell > 0) && (af->spell <= MAX_SPELLS)) + if (!af->next || (af->next->spell != af->spell) || (af->next->duration > 0)) - if (spell_info[af->type].wear_off_msg) - send_to_char(i, "%s\r\n", spell_info[af->type].wear_off_msg); + if (spell_info[af->spell].wear_off_msg) + send_to_char(i, "%s\r\n", spell_info[af->spell].wear_off_msg); affect_remove(i, af); } } @@ -318,7 +318,7 @@ void mag_affects(int level, struct char_data *ch, struct char_data *victim, for (i = 0; i < MAX_SPELL_AFFECTS; i++) { new_affect(&(af[i])); - af[i].type = spellnum; + af[i].spell = spellnum; } switch (spellnum) { diff --git a/src/players.c b/src/players.c index 739db35..0a2dca2 100644 --- a/src/players.c +++ b/src/players.c @@ -724,12 +724,12 @@ void save_char(struct char_data * ch) } /* Save affects */ - if (tmp_aff[0].type > 0) { + if (tmp_aff[0].spell > 0) { fprintf(fl, "Affs:\n"); for (i = 0; i < MAX_AFFECT; i++) { aff = &tmp_aff[i]; - if (aff->type) - fprintf(fl, "%d %d %d %d %d %d %d %d\n", aff->type, aff->duration, + if (aff->spell) + fprintf(fl, "%d %d %d %d %d %d %d %d\n", aff->spell, aff->duration, aff->modifier, aff->location, aff->bitvector[0], aff->bitvector[1], aff->bitvector[2], aff->bitvector[3]); } fprintf(fl, "0 0 0 0 0 0 0 0\n"); @@ -742,7 +742,7 @@ void save_char(struct char_data * ch) /* More char_to_store code to add spell and eq affections back in. */ for (i = 0; i < MAX_AFFECT; i++) { - if (tmp_aff[i].type) + if (tmp_aff[i].spell) affect_to_char(ch, &tmp_aff[i]); } @@ -898,7 +898,7 @@ static void load_affects(FILE *fl, struct char_data *ch) get_line(fl, line); n_vars = sscanf(line, "%d %d %d %d %d %d %d %d", &num, &num2, &num3, &num4, &num5, &num6, &num7, &num8); if (num > 0) { - af.type = num; + af.spell = num; af.duration = num2; af.modifier = num3; af.location = num4; diff --git a/src/spells.c b/src/spells.c index 26aa033..ebcd718 100644 --- a/src/spells.c +++ b/src/spells.c @@ -278,7 +278,7 @@ ASPELL(spell_charm) add_follower(victim, ch); new_affect(&af); - af.type = SPELL_CHARM; + af.spell = SPELL_CHARM; af.duration = 24 * 2; if (GET_CHA(ch)) af.duration *= GET_CHA(ch); diff --git a/src/structs.h b/src/structs.h index 2f08b29..1bbbc16 100644 --- a/src/structs.h +++ b/src/structs.h @@ -1024,7 +1024,7 @@ struct mob_special_data /** An affect structure. */ struct affected_type { - sh_int type; /**< The type of spell that caused this */ + sh_int spell; /**< The spell that caused this */ sh_int duration; /**< For how long its effects will last */ sbyte modifier; /**< Added/subtracted to/from apropriate ability */ byte location; /**< Tells which ability to change(APPLY_XXX). */ diff --git a/src/utils.c b/src/utils.c index d47e4dd..661e5d5 100644 --- a/src/utils.c +++ b/src/utils.c @@ -1474,7 +1474,7 @@ char *strpaste(char *str1, char *str2, char *joiner) void new_affect(struct affected_type *af) { int i; - af->type = 0; + af->spell = 0; af->duration = 0; af->modifier = 0; af->location = APPLY_NONE;