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, Yahoo!, Yandex

Members: 0
Guests: 9
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] wear_obj is still being...
Forum Rules | Mark all | Recent Posts

[Bug] wear_obj is still being an evil little bitch
< Newer Topic :: Older Topic >

Pages:<< prev 1 next >>
Post is unread #1 Sep 17, 2005, 3:36 pm   Last edited Sep 17, 2005, 3:36 pm 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: wear_obj is still being an evil little bitch
Danger: Low - Inconsistent handling of wielding/wearing items
Found by: Remcon
Fixed by: Remcon

---

act_obj.c, wear_obj

Locate:
      case ITEM_WEAR_SHIELD:
         if( get_eq_char( ch, WEAR_DUAL_WIELD )
             || ( get_eq_char( ch, WEAR_WIELD ) && get_eq_char( ch, WEAR_MISSILE_WIELD ) )
             || ( get_eq_char( ch, WEAR_WIELD ) && get_eq_char( ch, WEAR_HOLD ) ) )
         {
            send_to_char( "You can't use a shield AND two weapons!\n\r", ch );
            return;
         }


Change to:
      case ITEM_WEAR_SHIELD:
         if( get_eq_char( ch, WEAR_DUAL_WIELD )
             || ( get_eq_char( ch, WEAR_WIELD ) && get_eq_char( ch, WEAR_MISSILE_WIELD ) )
             || ( get_eq_char( ch, WEAR_WIELD ) && get_eq_char( ch, WEAR_HOLD ) ) )
         {
            if( get_eq_char( ch, WEAR_HOLD ) )
               send_to_char( "You can't use a shield while using a weapon and holding something!\n\r", ch );
            else
               send_to_char( "You can't use a shield AND two weapons!\n\r", ch );
            return;
         }


Locate:
      case ITEM_HOLD:
         if( get_eq_char( ch, WEAR_DUAL_WIELD )
             || ( get_eq_char( ch, WEAR_WIELD ) && get_eq_char( ch, WEAR_MISSILE_WIELD ) ) )
         {
            send_to_char( "You cannot hold something AND two weapons!\n\r", ch );
            return;
         }


Chaneg to:
      case ITEM_HOLD:
         if( get_eq_char( ch, WEAR_DUAL_WIELD )
         || ( get_eq_char( ch, WEAR_WIELD )
         && ( get_eq_char( ch, WEAR_MISSILE_WIELD ) || get_eq_char( ch, WEAR_SHIELD ) ) ) )
         {
            if( get_eq_char( ch, WEAR_SHIELD ) )
               send_to_char( "You cannot hold something while using a weapon and a shield!\n\r", ch );
            else
               send_to_char( "You cannot hold something AND two weapons!\n\r", ch );
            return;
         }


Locate:
            OBJ_DATA *mw, *dw, *hd, *sd;
            tmpobj = get_eq_char( ch, WEAR_WIELD );
            mw = get_eq_char( ch, WEAR_MISSILE_WIELD );
            dw = get_eq_char( ch, WEAR_DUAL_WIELD );
            hd = get_eq_char( ch, WEAR_HOLD );
            sd = get_eq_char( ch, WEAR_SHIELD );


Below that, add:
            if( hd && sd )
            {
               send_to_char( "You are already holding something and wearing a shield.\n\r", ch );
               return;
            }


Some bugs just refuse to die. This is rapidly becoming one of them. Hopefully this will be the last time this one needs to be fixed after having been fixed after having been fixed......
       
Pages:<< prev 1 next >>