From: nveid Date: Sun, 29 Oct 2006 18:27:12 +0000 (+0000) Subject: divquotahotfix - Couldn't division anything correctly that wasn't in a X-Git-Tag: 0.72p2~3 X-Git-Url: https://git.theari.com/?a=commitdiff_plain;h=21b8296dfae3dcc986be20fad433a432bede3fea;p=cobramush.git divquotahotfix - Couldn't division anything correctly that wasn't in a division in the first place (cherry picked from commit 0908d98d6321ac41d0c231ef4ae3dd4b6e7cab55) --- diff --git a/src/division.c b/src/division.c index 0886058..cfb761d 100644 --- a/src/division.c +++ b/src/division.c @@ -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) diff --git a/src/predicat.c b/src/predicat.c index 0007f6b..b5f4721 100644 --- a/src/predicat.c +++ b/src/predicat.c @@ -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);