divquotahotfix - Couldn't division anything correctly that wasn't in a
authornveid <nveid@comcast.net>
Sun, 29 Oct 2006 18:27:12 +0000 (18:27 +0000)
committernveid <nveid@comcast.net>
Sun, 29 Oct 2006 18:27:12 +0000 (18:27 +0000)
division in the first place

src/division.c
src/predicat.c

index 088605888f179c75fa5d5e23372560e5326c61b8..cfb761dc089a231ad7a4ed914a2a235287fd6e17 100644 (file)
@@ -1534,7 +1534,7 @@ division_set(dbref exec, dbref target, const char *arg2)
     return;
   }
   
-  if(Division(target))
+  if(GoodObject(Division(target)) && Division(target))
     change_quota(Division(target), cnt);
 
   if (Typeof(target) == TYPE_PLAYER)
index 0007f6b7c7ffbbfec750e5662265efc4b9fb136f..b5f4721ba1192173f9b0357af17d1840968edbd3 100644 (file)
@@ -660,7 +660,7 @@ change_quota(dbref who, int payment)
 
   /* Check If Division Quota has to be adjusted now */
 
-  if(!NoQuota(Division(who))) 
+  if(GoodObject(Division(who)) && !NoQuota(Division(who))) 
   (void) atr_add(Division(who), "RQUOTA",
                 tprintf("%d", get_current_quota(Division(who)) + payment), GOD, NOTHING);