Login
User Name:

Password:



Register
Forgot your password?
Vote for Us!
Couple bugs
Dec 12, 2017, 5:42 pm
By Remcon
Bug in disarm( )
Nov 12, 2017, 6:54 pm
By GatewaySysop
Bug in will_fall( )
Oct 23, 2017, 1:35 am
By GatewaySysop
Bug in do_zap( ), do_brandish( )
Oct 18, 2017, 1:52 pm
By GatewaySysop
Bug in get_exp_worth( )
Oct 10, 2017, 1:26 am
By GatewaySysop
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
Memwatch
Author: Johan Lindh
Submitted by: Vladaar
Users Online
CommonCrawl, Yandex, Bing

Members: 0
Guests: 11
Stats
Files
Topics
Posts
Members
Newest Member
477
3,705
19,232
608
LAntorcha
Today's Birthdays
There are no member birthdays today.
Related Links
» SmaugMuds.org » Bugfix Lists » SmaugFUSS Bugfix List » [Bug] Clan and council leader...
Forum Rules | Mark all | Recent Posts

[Bug] Clan and council leadership being outcast does not clear their names
< Newer Topic :: Older Topic >

Pages:<< prev 1 next >>
Post is unread #1 Jul 30, 2005, 6:38 am
Go to the top of the page
Go to the bottom of the page

Samson
Black Hand
GroupAdministrators
Posts3,639
JoinedJan 1, 2002

Bug: Clan and council leadership being outcast does not clear their names from the leader list.
Danger: Low - Data maintenance
Found by: Gatewaysysop
Fixed by: Gatewaysysop

---

build.c, do_mset

Locate:
         /*
          * Added a check on immortals so immortals don't take up
          * * any membership space. --Shaddai
          */
	   if( !IS_IMMORTAL( victim ) ) 
         {
            --victim->pcdata->clan->members;
            if( victim->pcdata->clan->members < 0 )
               victim->pcdata->clan->members = 0;
            save_clan( victim->pcdata->clan );
         }


Replace with:

         /* Added a check on immortals so immortals don't take up
          * any membership space. --Shaddai
          */
         if( !IS_IMMORTAL( victim ) )
         {
            --victim->pcdata->clan->members; 
            if( victim->pcdata->clan->members < 0 )
               victim->pcdata->clan->members = 0;

            if( !str_cmp( victim->name, victim->pcdata->clan->leader ) )
            {
               STRFREE( victim->pcdata->clan->leader );
               victim->pcdata->clan->leader = STRALLOC( "" );
            }
            if( !str_cmp( victim->name, victim->pcdata->clan->number1 ) )
            {
               STRFREE( victim->pcdata->clan->number1 );
               victim->pcdata->clan->number1 = STRALLOC( "" );
            }
            if( !str_cmp( victim->name, victim->pcdata->clan->number2 ) )
            {
               STRFREE( victim->pcdata->clan->number2 );
               victim->pcdata->clan->number2 = STRALLOC( "" );
            } 
            if( !str_cmp( victim->name, victim->pcdata->clan->deity ) )
            {
               STRFREE( victim->pcdata->clan->deity );
               victim->pcdata->clan->deity = STRALLOC( "" );
            }
            save_clan( victim->pcdata->clan );
         }


Then further below, locate:
      if( victim->pcdata->clan != NULL && !IS_IMMORTAL( victim ) )
      {
         --victim->pcdata->clan->members;
         if( victim->pcdata->clan->members < 0 )
            victim->pcdata->clan->members = 0;
         save_clan( victim->pcdata->clan );
      }


Replace with:
      if( victim->pcdata->clan != NULL && !IS_IMMORTAL( victim ) )
      {
         --victim->pcdata->clan->members; 
         if( victim->pcdata->clan->members < 0 )
            victim->pcdata->clan->members = 0;

         if( !str_cmp( victim->name, victim->pcdata->clan->leader ) )
         {
            STRFREE( victim->pcdata->clan->leader );
            victim->pcdata->clan->leader = STRALLOC( "" );
         }
         if( !str_cmp( victim->name, victim->pcdata->clan->number1 ) )
         {
            STRFREE( victim->pcdata->clan->number1 );
            victim->pcdata->clan->number1 = STRALLOC( "" );
         }
         if( !str_cmp( victim->name, victim->pcdata->clan->number2 ) )
         {
            STRFREE( victim->pcdata->clan->number2 );
            victim->pcdata->clan->number2 = STRALLOC( "" );
         } 
         if( !str_cmp( victim->name, victim->pcdata->clan->deity ) )
         {
            STRFREE( victim->pcdata->clan->deity );
            victim->pcdata->clan->deity = STRALLOC( "" );
         }
         save_clan( victim->pcdata->clan );
      }


Further below that, locate:
      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;
      }


Replace with:
      if( !arg3 || arg3[0] == '\0' )
      {
         if( victim->pcdata->council )
         {
            --victim->pcdata->council->members;
            if( victim->pcdata->council->members < 0 )
               victim->pcdata->council->members = 0;

            if( !str_cmp( victim->name, victim->pcdata->council->head ) )
            {
               STRFREE( victim->pcdata->council->head );
               victim->pcdata->council->head = STRALLOC( "" );
            }
            if( victim->pcdata->council->head2 != NULL 
              && !str_cmp( victim->name, victim->pcdata->council->head2 ) )
            {
               STRFREE( victim->pcdata->council->head2 );
               victim->pcdata->council->head2 = NULL;
            }
            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;
      }


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


Replace with:
      if( victim->pcdata->council )
      {
         --victim->pcdata->council->members;
         if( victim->pcdata->council->members < 0 )
            victim->pcdata->council->members = 0;

         if( !str_cmp( victim->name, victim->pcdata->council->head ) )
         {
            STRFREE( victim->pcdata->council->head );
            victim->pcdata->council->head = STRALLOC( "" );
         }
         if( victim->pcdata->council->head2 != NULL 
           && !str_cmp( victim->name, victim->pcdata->council->head2 ) )
         {
            STRFREE( victim->pcdata->council->head2 );
            victim->pcdata->council->head2 = NULL;
         }
         save_council( victim->pcdata->council );
      }


All this does is make sure the leadership spots on clans and councils are properly maintained when a leader of one is either outcast, or changed to a new one. This keeps the records accurate.
       
Pages:<< prev 1 next >>