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, DotBot, Sogou, Yahoo!

Members: 0
Guests: 12
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 » Bugfix Lists » SWR FUSS Bugfix List » [Bug] Smuggled objects are no...
Forum Rules | Mark all | Recent Posts

[Bug] Smuggled objects are not being handled properly
< Newer Topic :: Older Topic >

Pages:<< prev 1 next >>
Post is unread #1 Jul 3, 2006, 8:29 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: Smuggled objects are not being handled properly
Danger: Medium - Players will not be credited properly for smuggling large groups of items
Found by: Halcyon
Fixed by: Halcyon

---

special.c, spec_customs_alcohol

Locate:
            else if( can_see( ch, victim ) && !IS_SET( obj->extra_flags, ITEM_CONTRABAND ) )
            {
               ch_exp =
                  UMIN( obj->cost * 10,
                        ( exp_level( victim->skill_level[SMUGGLING_ABILITY] + 1 ) -
                          exp_level( victim->skill_level[SMUGGLING_ABILITY] ) ) );
               ch_printf( victim, "You receive %ld experience for smuggling %s.\r\n ", ch_exp, obj->short_descr );
               gain_exp( victim, ch_exp, SMUGGLING_ABILITY );

               act( AT_ACTION, "$n looks at $N suspiciously.", ch, NULL, victim, TO_NOTVICT );
               act( AT_ACTION, "$n look at you suspiciously.", ch, NULL, victim, TO_VICT );
               SET_BIT( obj->extra_flags, ITEM_CONTRABAND );

               return TRUE;
            }
            else if( !IS_SET( obj->extra_flags, ITEM_CONTRABAND ) )
            {
               ch_exp =
                  UMIN( obj->cost * 10,
                        ( exp_level( victim->skill_level[SMUGGLING_ABILITY] + 1 ) -
                          exp_level( victim->skill_level[SMUGGLING_ABILITY] ) ) );
               ch_printf( victim, "You receive %ld experience for smuggling %s.\r\n ", ch_exp, obj->short_descr );
               gain_exp( victim, ch_exp, SMUGGLING_ABILITY );

               SET_BIT( obj->extra_flags, ITEM_CONTRABAND );
               return TRUE;
            }


Change to:
            else if( can_see( ch, victim ) && !IS_SET( obj->extra_flags, ITEM_CONTRABAND ) )
            {
               ch_exp =
                  UMIN( obj->cost * 10,
                        ( exp_level( victim->skill_level[SMUGGLING_ABILITY] + 1 ) -
                          exp_level( victim->skill_level[SMUGGLING_ABILITY] ) ) );
               ch_printf( victim, "You receive %ld experience for smuggling %s.\r\n ", ch_exp, obj->short_descr );
               gain_exp( victim, ch_exp, SMUGGLING_ABILITY );

               act( AT_ACTION, "$n looks at $N suspiciously.", ch, NULL, victim, TO_NOTVICT );
               act( AT_ACTION, "$n look at you suspiciously.", ch, NULL, victim, TO_VICT );
               separate_obj( obj );
               SET_BIT( obj->extra_flags, ITEM_CONTRABAND );

               return TRUE;
            }
            else if( !IS_SET( obj->extra_flags, ITEM_CONTRABAND ) )
            {
               ch_exp =
                  UMIN( obj->cost * 10,
                        ( exp_level( victim->skill_level[SMUGGLING_ABILITY] + 1 ) -
                          exp_level( victim->skill_level[SMUGGLING_ABILITY] ) ) );
               ch_printf( victim, "You receive %ld experience for smuggling %s.\r\n ", ch_exp, obj->short_descr );
               gain_exp( victim, ch_exp, SMUGGLING_ABILITY );
               separate_obj( obj );
               SET_BIT( obj->extra_flags, ITEM_CONTRABAND );
               return TRUE;
            }


Locate:
               {
                  ch_exp =
                     UMIN( content->cost * 10,
                           ( exp_level( victim->skill_level[SMUGGLING_ABILITY] + 1 ) -
                             exp_level( victim->skill_level[SMUGGLING_ABILITY] ) ) );
                  ch_printf( victim, "You receive %ld experience for smuggling %s.\r\n ", ch_exp, content->short_descr );
                  gain_exp( victim, ch_exp, SMUGGLING_ABILITY );
                  SET_BIT( content->extra_flags, ITEM_CONTRABAND );
                  return TRUE;
               }


Change to:
               {
                  ch_exp =
                     UMIN( content->cost * 10,
                           ( exp_level( victim->skill_level[SMUGGLING_ABILITY] + 1 ) -
                             exp_level( victim->skill_level[SMUGGLING_ABILITY] ) ) );
                  ch_printf( victim, "You receive %ld experience for smuggling %s.\r\n ", ch_exp, content->short_descr );
                  gain_exp( victim, ch_exp, SMUGGLING_ABILITY );
                  separate_obj( content );
                  SET_BIT( content->extra_flags, ITEM_CONTRABAND );
                  return TRUE;
               }


Do the same fix in: spec_customs_smut, spec_customs_weapons, and spec_customs_spice

The smuggling checks do not properly separate individual items out from the stacks before tagging them as contraband. So if you happen to be carrying several copies of the same item, all of them will be marked even though they should not have been.
       
Pages:<< prev 1 next >>