Login
User Name:

Password:



Register
Forgot your password?
Vote for Us!
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
Bug in do_drag( )
Oct 8, 2017, 12:40 am
By GatewaySysop
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
Beastmaster 6D sound files
Author: Vladaar
Submitted by: Vladaar
Users Online
CommonCrawl, Majestic-12, Yandex, DotBot, Yahoo!

Members: 0
Guests: 11
Stats
Files
Topics
Posts
Members
Newest Member
476
3,704
19,231
608
LAntorcha
Today's Birthdays
There are no member birthdays today.
Related Links
» SmaugMuds.org » 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, 1:27 am
Go to the top of the page
Go to the bottom of the page

GatewaySysop
Conjurer
GroupMembers
Posts367
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, 3: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, 4:38 pm
Go to the top of the page
Go to the bottom of the page

GatewaySysop
Conjurer
GroupMembers
Posts367
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, 10:01 am
Go to the top of the page
Go to the bottom of the page

Remcon
Geomancer
GroupAdministrators
Posts1,857
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 >>