[ScryMUD] SVN Commit Info r876 - trunk/mud/grrmud/server

scrymud at wanfear.com scrymud at wanfear.com
Mon Feb 12 23:25:25 PST 2007


Author: eroper
Date: 2007-02-12 23:25:25 -0800 (Mon, 12 Feb 2007)
New Revision: 876

Modified:
   trunk/mud/grrmud/server/misc.cc
Log:
Canned versions of certain spells (like weaken) are being called with a
duration of 0. The check to remove them was checking for exactly 0 and was
preceeded by a decrement, thus the effects were never being removed.


Modified: trunk/mud/grrmud/server/misc.cc
===================================================================
--- trunk/mud/grrmud/server/misc.cc	2007-02-13 06:58:21 UTC (rev 875)
+++ trunk/mud/grrmud/server/misc.cc	2007-02-13 07:25:25 UTC (rev 876)
@@ -385,6 +385,7 @@
       if (crit_ptr->PAUSE > 0) {
          crit_ptr->PAUSE--;
       }//
+
       // Eliminate 15 minutes of real-life battle stun.
       if (crit_ptr->PAUSE > 4) {
          crit_ptr->PAUSE = 4;
@@ -392,7 +393,9 @@
       crit_ptr->MINI_AFFECTED_BY.head(scell);
       sc_ptr = scell.next();
       while (sc_ptr) {
+
          sc_ptr->bonus_duration--;
+
          if (sc_ptr->bonus_duration == 0) {
             rem_effects_crit(sc_ptr->stat_spell, *crit_ptr, TRUE);
             delete sc_ptr;
@@ -1259,7 +1262,7 @@
          while (sp_ptr) {
                if (sp_ptr->bonus_duration != -1)
                sp_ptr->bonus_duration--;
-            if (sp_ptr->bonus_duration == 0) {
+            if (sp_ptr->bonus_duration <= 0) {
                rem_effects_crit(sp_ptr->stat_spell, *crit_ptr, TRUE);
                delete sp_ptr;
                sp_ptr = crit_ptr->affected_by.lose(sp_cell);




More information about the ScryMUD mailing list