From 107c3b28112d5e27e42504b7895a7a0e8ddcdfde Mon Sep 17 00:00:00 2001 From: Rumble Date: Thu, 12 Jun 2008 01:12:46 +0000 Subject: [PATCH] [Jun 12 2008] - Rumble Fixed toggle quest to toggle correctly. Fixed bug in dg find_replacement to call text_processed at the beginning, regardless of whethe r something matching the variable is found or not. (thanks Laoris) Fixed log error that was using rnum instead of vnum. (thanks Jamdog) --- changelog | 4 ++++ src/act.informative.c | 4 ++-- src/db.c | 2 +- src/dg_variables.c | 8 +++----- 4 files changed, 10 insertions(+), 8 deletions(-) diff --git a/changelog b/changelog index 1dd69cc..fb4a875 100644 --- a/changelog +++ b/changelog @@ -3,6 +3,10 @@ help, find any bugs, or have ideas for improvement please stop by TBA at telnet://tbamud.com:9091 or email rumble@tbamud.com --Rumble tbaMUD 3.56 +[Jun 12 2008] - Rumble + Fixed toggle quest to toggle correctly. + Fixed bug in dg find_replacement to call text_processed at the beginning, regardless of whether something matching the variable is found or not. (thanks Laoris) + Fixed log error that was using rnum instead of vnum. (thanks Jamdog) [Jun 11 2008] - Rumble Added notification via prompt for new MOTD and news entries. (thanks Jamdog) Added all option to the restore command. (thanks Jamdog) diff --git a/src/act.informative.c b/src/act.informative.c index 0e1dd76..6d3f407 100644 --- a/src/act.informative.c +++ b/src/act.informative.c @@ -1833,8 +1833,8 @@ ACMD(do_toggle) "You can now hear the Wiz-channel.\r\n", "You are now deaf to the Wiz-channel.\r\n"}, {"quest", PRF_QUEST, 0, - "Okay, you are part of the Quest.\r\n", - "You are no longer part of the Quest.\r\n"}, + "You are no longer part of the Quest.\r\n", + "Okay, you are part of the Quest.\r\n"}, {"showvnums", PRF_SHOWVNUMS, LVL_IMMORT, "You will no longer see the vnums.\r\n", "You will now see the vnums.\r\n"}, diff --git a/src/db.c b/src/db.c index 43838d1..32feb12 100644 --- a/src/db.c +++ b/src/db.c @@ -1155,7 +1155,7 @@ void parse_room(FILE *fl, int virtual_nr) snprintf(buf2, sizeof(buf2), "room #%d", virtual_nr); if (virtual_nr < zone_table[zone].bot) { - log("SYSERR: Room #%d is below zone %d.", virtual_nr, zone); + log("SYSERR: Room #%d is below zone %d (bot=%d, top=%d).", virtual_nr, zone_table[zone].number, zone_table[zone].bot, zone_table[zone].top); exit(1); } while (virtual_nr > zone_table[zone].top) diff --git a/src/dg_variables.c b/src/dg_variables.c index 87e65e0..ee30cb8 100644 --- a/src/dg_variables.c +++ b/src/dg_variables.c @@ -301,6 +301,8 @@ void find_replacement(void *go, struct script_data *sc, trig_data *trig, return; } + else if (vd && text_processed(field, subfield, vd, str, slen)) return; + else { if (vd) { name = vd->value; @@ -523,9 +525,7 @@ void find_replacement(void *go, struct script_data *sc, trig_data *trig, } if (c) { - if (text_processed(field, subfield, vd, str, slen)) return; - - else if (!str_cmp(field, "global")) { /* get global of something else */ + if (!str_cmp(field, "global")) { /* get global of something else */ if (IS_NPC(c) && c->script) { find_replacement(go, c->script, NULL, MOB_TRIGGER, subfield, NULL, NULL, str, slen); @@ -1051,7 +1051,6 @@ void find_replacement(void *go, struct script_data *sc, trig_data *trig, } /* if (c) ...*/ else if (o) { - if (text_processed(field, subfield, vd, str, slen)) return; *str = '\x1'; switch (LOWER(*field)) { @@ -1248,7 +1247,6 @@ o->contains) ? "1" : "0")); } /* if (o) ... */ else if (r) { - if (text_processed(field, subfield, vd, str, slen)) return; /* special handling of the void, as it stores all 'full global' variables */ if (r->number == 0) {