From 3a913d91349d25576c62815671670cd4dc362d80 Mon Sep 17 00:00:00 2001 From: nveid Date: Thu, 26 Oct 2006 00:10:46 +0000 Subject: [PATCH] division quota hotfix - Nothing cuold be assigned to master division appropriately as of a block on predicat.c, and the amoutn being allocated into a division quota wasn't being calculated properely. (cherry picked from commit 50d0fdb7de199a719d7183f1a98f8f3e7ada5cb2) --- src/division.c | 6 ++++-- src/predicat.c | 8 +++++--- 2 files changed, 9 insertions(+), 5 deletions(-) diff --git a/src/division.c b/src/division.c index 1dc8557..0886058 100644 --- a/src/division.c +++ b/src/division.c @@ -574,7 +574,7 @@ powergroup_db_set(dbref executor, dbref player, const char *powergroup, } for (pg_indx = 0; pg_indx < pg_cnt; reset = 0, pg_indx++) { p = p_buf[pg_indx]; - if (*p == '!') { + if (*p == NOT_TOKEN) { reset++; p++; } @@ -1523,7 +1523,9 @@ division_set(dbref exec, dbref target, const char *arg2) if(Typeof(target) == TYPE_PLAYER) { for(cnt = cur_obj = 0; cur_obj < db_top ; cur_obj++) - if(Owner(cur_obj) == target && Division(cur_obj) == Division(target)) + if(!IsPlayer(cur_obj) && + (Owner(cur_obj) == target) + && (Division(cur_obj) == Division(target))) cnt++; } else cnt = 1; diff --git a/src/predicat.c b/src/predicat.c index 7d749ed..24749d5 100644 --- a/src/predicat.c +++ b/src/predicat.c @@ -679,10 +679,12 @@ pay_quota(dbref who, int cost) int curr; /* Check to make sure they can pass the division first */ - curr = get_current_quota(Division(who)); + if(GoodObject(Division(who))) { + curr = get_current_quota(Division(who)); - if(USE_QUOTA && !NoQuota(Division(who)) && (curr - cost < 0)) - return 0; + if(USE_QUOTA && !NoQuota(Division(who)) && (curr - cost < 0)) + return 0; + } /* some people don't need a quota */ if (NoQuota(who)) -- 2.30.2