Login
User Name:

Password:



Register
Forgot your password?
Vote for Us!
auth_update crash
Dec 23, 2017, 10:15 pm
By Remcon
check_tumble
Dec 18, 2017, 7:21 pm
By Remcon
parse description bug
Dec 15, 2017, 10:08 pm
By Remcon
Couple bugs
Dec 12, 2017, 5:42 pm
By Remcon
Bug in disarm( )
Nov 12, 2017, 6:54 pm
By GatewaySysop
LoP 1.46
Author: Remcon
Submitted by: Remcon
LOP 1.45
Author: Remcon
Submitted by: Remcon
LOP Heroes Edition
Author: Vladaar
Submitted by: Vladaar
Heroes sound extras
Author: Vladaar
Submitted by: Vladaar
6Dragons 4.3
Author: Vladaar
Submitted by: Vladaar
Users Online
CommonCrawl, DotBot, Yandex, Yahoo!

Members: 0
Guests: 11
Stats
Files
Topics
Posts
Members
Newest Member
478
3,708
19,242
612
Jacki72H
Today's Birthdays
There are no member birthdays today.
Related Links
» SmaugMuds.org » Bugfix Lists » SmaugFUSS Bugfix List » [Bug] Council membership numb...
Forum Rules | Mark all | Recent Posts

[Bug] Council membership numbers are not being updated properly
< Newer Topic :: Older Topic >

Pages:<< prev 1 next >>
Post is unread #1 May 10, 2005, 10:47 pm
Go to the top of the page
Go to the bottom of the page

Samson
Black Hand
GroupAdministrators
Posts3,639
JoinedJan 1, 2002

Bug: Council membership numbers are not being updated properly.
Danger: Low - Data inaccuracy
Found by: Gatewaysysop
Fixed by: Gatewaysysop

---

build.c, do_mset

Locate:

   if( !str_cmp( arg2, "council" ) )
   {
      COUNCIL_DATA *council;

      if( get_trust( ch ) < LEVEL_SUB_IMPLEM )
      {
         send_to_char( "You can't do that.\n\r", ch );
         return;
      }
      if( IS_NPC( victim ) )
      {
         send_to_char( "Not on NPC's.\n\r", ch );
         return;
      }

      if( !arg3 || arg3[0] == '\0' )
      {
         STRFREE( victim->pcdata->council_name );
         victim->pcdata->council_name = STRALLOC( "" );
         victim->pcdata->council = NULL;
         send_to_char( "Removed from council.\n\rPlease make sure you adjust that council's members accordingly.\n\r", ch );
         return;
      }

      council = get_council( arg3 );
      if( !council )
      {
         send_to_char( "No such council.\n\r", ch );
         return;
      }
      STRFREE( victim->pcdata->council_name );
      victim->pcdata->council_name = QUICKLINK( council->name );
      victim->pcdata->council = council;
      send_to_char( "Done.\n\rPlease make sure you adjust that council's members accordingly.\n\r", ch );
      return;
   }


Replace that with:

   if ( !str_cmp( arg2, "council" ) )
   {
      COUNCIL_DATA *council;

      if( get_trust( ch ) < LEVEL_SUB_IMPLEM )
      {
         send_to_char( "You can't do that.\n\r", ch );
         return;
      }
      if( IS_NPC(victim) )
      {
         send_to_char( "Not on NPC's.\n\r", ch );
         return;
      }

      if( !arg3 || arg3[0] == '\0' )
      {
         if( victim->pcdata->council )
         {
            --victim->pcdata->council->members;
            if( victim->pcdata->council->members < 0 )
               victim->pcdata->council->members = 0;
            save_council( victim->pcdata->council );
         }
         STRFREE( victim->pcdata->council_name );
         victim->pcdata->council_name = STRALLOC( "" );
         victim->pcdata->council = NULL;
         send_to_char( "Removed from council.\n\r", ch );
         return;
      }

      council = get_council( arg3 );
      if( !council )
      {
         send_to_char( "No such council.\n\r", ch );
         return;
      }

      if( victim->pcdata->council )
      {
         --victim->pcdata->council->members;
         if( victim->pcdata->council->members < 0 )
            victim->pcdata->council->members = 0;
         save_council( victim->pcdata->council );
      }

      STRFREE( victim->pcdata->council_name );
      victim->pcdata->council_name = QUICKLINK( council->name );
      victim->pcdata->council = council;
      ++council->members;
      save_council( council );
      send_to_char( "Done.\n\r", ch );
      return;
   }


clans.c, do_council_outcast

Locate:

   --council->members;


Change to:

   --council->members;
   if( council->members < 0 )
      council->members = 0;


For the same reasons as the deity and clan adjustments, keeping the data correct is important.
       
Pages:<< prev 1 next >>