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, Yandex, DotBot

Members: 0
Guests: 13
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 » AFKMud Bugfix List » AFKMud Bug Archive » [Bug] After bitflag fixes, th...
Forum Rules | Mark all | Recent Posts

[Bug] After bitflag fixes, there are flag_string calls which need changing
< Newer Topic :: Older Topic > AFKMud 1.75

Pages:<< prev 1 next >>
Post is unread #1 Sep 10, 2005, 8:54 am   Last edited Nov 13, 2005, 11:03 am by Samson
Go to the top of the page
Go to the bottom of the page

Samson
Black Hand
GroupAdministrators
Posts3,639
JoinedJan 1, 2002

Bug: After bitflag fixes, there are flag_string calls which need changing
Discovered in: AFKMud 1.75
Danger: Fatal - Compile failure
Found by: Samson
Fixed by: Samson

---

act_wiz.c, do_showclass

Locate:
   pager_printf( ch, "&wResistant to: &W%s\n\r", flag_string( Class->resist, ris_flags ) );
   pager_printf( ch, "&wSusceptible to: &W%s\n\r", flag_string( Class->suscept, ris_flags ) );


Change to:
   pager_printf( ch, "&wResistant to: &W%s\n\r", ext_flag_string( &Class->resist, ris_flags ) );
   pager_printf( ch, "&wSusceptible to: &W%s\n\r", ext_flag_string( &Class->suscept, ris_flags ) );


create_new_class

Locate:
   class_table[Class]->resist = 0;
   class_table[Class]->suscept = 0;


Change to:
   xCLEAR_BITS( class_table[Class]->resist );
   xCLEAR_BITS( class_table[Class]->suscept );


do_setclass

Locate:
            TOGGLE_BIT( Class->resist, 1 << value );


Change to:
            xTOGGLE_BIT( Class->resist, value );


Locate:
            TOGGLE_BIT( Class->suscept, 1 << value );


Change to:
            xTOGGLE_BIT( Class->suscept, value );


create_new_race

Locate:
   race_table[race]->resist = 0;
   race_table[race]->suscept = 0;


Change to:
   xCLEAR_BITS( race_table[race]->resist );
   xCLEAR_BITS( race_table[race]->suscept );


do_setrace

Locate:
            TOGGLE_BIT( race->resist, 1 << value );


Change to:
            xTOGGLE_BIT( race->resist, value );


Locate:
            TOGGLE_BIT( race->suscept, 1 << value );


Change to:
            xTOGGLE_BIT( race->suscept, value );


do_showrace

Locate:
   send_to_char( "Resistant to: ", ch );
   send_to_char( flag_string( race->resist, ris_flags ), ch );
   send_to_char( "\n\r", ch );

   send_to_char( "Susceptible to: ", ch );
   send_to_char( flag_string( race->suscept, ris_flags ), ch );
   send_to_char( "\n\r", ch );


Change to:
   send_to_char( "Resistant to: ", ch );
   send_to_char( ext_flag_string( &race->resist, ris_flags ), ch );
   send_to_char( "\n\r", ch );

   send_to_char( "Susceptible to: ", ch );
   send_to_char( ext_flag_string( &race->suscept, ris_flags ), ch );
   send_to_char( "\n\r", ch );


handler.c, update_aris

Locate:
      SET_RESIS( ch, race_table[ch->race]->resist );
      SET_SUSCEP( ch, race_table[ch->race]->suscept );


Chage to:
      xSET_BITS( ch->resistant, race_table[ch->race]->resist );
      xSET_BITS( ch->susceptible, race_table[ch->race]->suscept );


Locate:
      SET_RESIS( ch, class_table[ch->Class]->resist );
      SET_SUSCEP( ch, class_table[ch->Class]->suscept );


Change to:
      xSET_BITS( ch->resistant, class_table[ch->Class]->resist );
      xSET_BITS( ch->susceptible, class_table[ch->Class]->suscept );


tables.c, load_class_file

Locate:
   Class->resist = 0;
   Class->suscept = 0;


Change to:
   xCLEAR_BITS( Class->resist );
   xCLEAR_BITS( Class->suscept );


The above bit handlers got missed during the first patch to this fix. The price one pays for trying to get things done after having been up for nearly 20 hours!
       
Pages:<< prev 1 next >>