Login
User Name:

Password:



Register

Forgot your password?
Changes list / Addchange
Author: Khonsu
Submitted by: Khonsu
6Dragons mp3 sound pack
Author: Vladaar
Submitted by: Vladaar
AFKMud 2.2.3
Author: AFKMud Team
Submitted by: Samson
SWFOTEFUSS 1.5
Author: Various
Submitted by: Samson
SWRFUSS 1.4
Author: Various
Submitted by: Samson
Users Online
Google, AhrefsBot

Members: 0
Guests: 34
Stats
Files
Topics
Posts
Members
Newest Member
488
3,789
19,632
596
Elwood

Today's Birthdays
There are no member birthdays today.
» SmaugMuds » Codebases » SmaugFUSS » Bug in format_obj_to_char( )
Forum Rules | Mark all | Recent Posts

Bug in format_obj_to_char( )
< Newer Topic :: Older Topic >

Pages:<< prev 1 next >>
Post is unread #1 Jan 12, 2017 3:27 am   
Go to the top of the page
Go to the bottom of the page

GatewaySysop
Conjurer
GroupMembers
Posts413
JoinedMar 7, 2005

 
Another one that I found recently. Not sure if someone was just really confused when they did this or what, but the more I looked, the less sense it made. :blink:

Original code is found in act_info.c, format_obj_to_char( )

   if( ch->Class == CLASS_PALADIN
       && ( IS_OBJ_STAT( obj, ITEM_ANTI_EVIL ) && !IS_OBJ_STAT( obj, ITEM_ANTI_NEUTRAL )
            && !IS_OBJ_STAT( obj, ITEM_ANTI_GOOD ) ) )
      mudstrlcat( buf, "(Flaming Red) ", MAX_STRING_LENGTH );
   if( ch->Class == CLASS_PALADIN
       && ( !IS_OBJ_STAT( obj, ITEM_ANTI_EVIL ) && IS_OBJ_STAT( obj, ITEM_ANTI_NEUTRAL )
            && !IS_OBJ_STAT( obj, ITEM_ANTI_GOOD ) ) )
      mudstrlcat( buf, "(Flaming Grey) ", MAX_STRING_LENGTH );
   if( ch->Class == CLASS_PALADIN
       && ( !IS_OBJ_STAT( obj, ITEM_ANTI_EVIL ) && !IS_OBJ_STAT( obj, ITEM_ANTI_NEUTRAL )
            && IS_OBJ_STAT( obj, ITEM_ANTI_GOOD ) ) )
      mudstrlcat( buf, "(Flaming White) ", MAX_STRING_LENGTH );

   if( ch->Class == CLASS_PALADIN
       && ( IS_OBJ_STAT( obj, ITEM_ANTI_EVIL ) && IS_OBJ_STAT( obj, ITEM_ANTI_NEUTRAL )
            && !IS_OBJ_STAT( obj, ITEM_ANTI_GOOD ) ) )
      mudstrlcat( buf, "(Smouldering Red-Grey) ", MAX_STRING_LENGTH );
   if( ch->Class == CLASS_PALADIN
       && ( IS_OBJ_STAT( obj, ITEM_ANTI_EVIL ) && !IS_OBJ_STAT( obj, ITEM_ANTI_NEUTRAL )
            && IS_OBJ_STAT( obj, ITEM_ANTI_GOOD ) ) )
      mudstrlcat( buf, "(Smouldering Red-White) ", MAX_STRING_LENGTH );
   if( ch->Class == CLASS_PALADIN
       && ( !IS_OBJ_STAT( obj, ITEM_ANTI_EVIL ) && IS_OBJ_STAT( obj, ITEM_ANTI_NEUTRAL )
            && IS_OBJ_STAT( obj, ITEM_ANTI_GOOD ) ) )
      mudstrlcat( buf, "(Smouldering Grey-White) ", MAX_STRING_LENGTH );



Am I crazy, or should that not be written like this instead? :huh:

    if ( ch->Class==CLASS_PALADIN && ( IS_OBJ_STAT(obj, ITEM_ANTI_EVIL) && !IS_OBJ_STAT(obj, ITEM_ANTI_NEUTRAL) && !IS_OBJ_STAT(obj, ITEM_ANTI_GOOD))   )
          mudstrlcat( buf, "(Smouldering Grey-White) ", MAX_STRING_LENGTH  );
    if ( ch->Class==CLASS_PALADIN && ( !IS_OBJ_STAT(obj, ITEM_ANTI_EVIL) && IS_OBJ_STAT(obj, ITEM_ANTI_NEUTRAL) && !IS_OBJ_STAT(obj, ITEM_ANTI_GOOD))   )
          mudstrlcat( buf, "(Smouldering Red-White) ", MAX_STRING_LENGTH  );
    if ( ch->Class==CLASS_PALADIN && (!IS_OBJ_STAT(obj, ITEM_ANTI_EVIL) && !IS_OBJ_STAT(obj, ITEM_ANTI_NEUTRAL) && IS_OBJ_STAT(obj, ITEM_ANTI_GOOD))   )
          mudstrlcat( buf, "(Smouldering Red-Grey) ", MAX_STRING_LENGTH  );
    if ( ch->Class==CLASS_PALADIN && ( IS_OBJ_STAT(obj, ITEM_ANTI_EVIL) && IS_OBJ_STAT(obj, ITEM_ANTI_NEUTRAL) && !IS_OBJ_STAT(obj, ITEM_ANTI_GOOD))   )
          mudstrlcat( buf, "(Burning White) ", MAX_STRING_LENGTH  );
    if ( ch->Class==CLASS_PALADIN && ( IS_OBJ_STAT(obj, ITEM_ANTI_EVIL) && !IS_OBJ_STAT(obj, ITEM_ANTI_NEUTRAL) && IS_OBJ_STAT(obj, ITEM_ANTI_GOOD))   )
          mudstrlcat( buf, "(Burning Grey) ", MAX_STRING_LENGTH  );
    if ( ch->Class==CLASS_PALADIN && ( !IS_OBJ_STAT(obj, ITEM_ANTI_EVIL) && IS_OBJ_STAT(obj, ITEM_ANTI_NEUTRAL) && IS_OBJ_STAT(obj, ITEM_ANTI_GOOD))   )
          mudstrlcat( buf, "(Burning Red) ", MAX_STRING_LENGTH  );


Post is unread #2 Jan 12, 2017 5:02 pm   
Go to the top of the page
Go to the bottom of the page

Sadiq
Fledgling
GroupMembers
Posts24
JoinedJan 7, 2010

 
I would make (and have made) this change. The rest of the SMAUG code traditionally uses the Red=Evil, Grey=Neutral, White=Good format, so this makes sense. Implemented. :wink:

Post is unread #3 Jan 12, 2017 6:38 pm   
Go to the top of the page
Go to the bottom of the page

GatewaySysop
Conjurer
GroupMembers
Posts413
JoinedMar 7, 2005

 

Sadiq said:

I would make (and have made) this change. The rest of the SMAUG code traditionally uses the Red=Evil, Grey=Neutral, White=Good format, so this makes sense. Implemented. :wink:


I knew I wasn't crazy! Thanks for the confirmation. :cyclops:

Post is unread #4 Jan 13, 2017 12:01 pm   
Go to the top of the page
Go to the bottom of the page

Remcon
Geomancer
GroupAdministrators
Posts1,914
JoinedJul 26, 2005

 
thanks while i had changed the whole look of that stuff because of how confusing it looked i hadn't paid the stuff it showed any attention, modified it :)

Pages:<< prev 1 next >>