Login
User Name:

Password:



Register
Forgot your password?
Vote for Us!
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
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
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
Memwatch
Author: Johan Lindh
Submitted by: Vladaar
Users Online
CommonCrawl, Google, Sogou, Yahoo!, DotBot

Members: 0
Guests: 13
Stats
Files
Topics
Posts
Members
Newest Member
477
3,706
19,240
608
LAntorcha
Today's Birthdays
There are no member birthdays today.
Related Links
» SmaugMuds.org » Bugfix Lists » AFKMud Bugfix List » [Bug] Projectile skills are n...
Forum Rules | Mark all | Recent Posts

[Bug] Projectile skills are not properly learnable
< Newer Topic :: Older Topic > AFKMud 2.02

Pages:<< prev 1 next >>
Post is unread #1 Dec 2, 2007, 7:06 pm   Last edited Dec 2, 2007, 7:10 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: Projectile skills are not properly learnable
Danger: Low - All projectile skill is being applied to archery alone and not blowguns or slings.
Discovered in: AFKMud 2.02
Found by: Zeno and Kayle
Fixed by: Samson

---

archery.cpp, ranged_got_target

Locate:
   switch ( projectile->value[3] )
   {
      default:
      case 13:
      case 14:
         wtype = gsn_archery;
         break;

      case 15:
         wtype = gsn_blowguns;
         break;

      case 16:
         wtype = gsn_slings;
         break;
   }


Change to:
   switch ( projectile->value[4] )
   {
      default:
      case PROJ_BOLT:
      case PROJ_ARROW:
         wtype = gsn_archery;
         break;

      case PROJ_DART:
         wtype = gsn_blowguns;
         break;

      case PROJ_STONE:
         wtype = gsn_slings;
         break;
   }


Locate:
      switch ( projectile->value[3] )
      {
         default:
         case 13:
         case 14:
            ch->learn_from_failure( gsn_archery );
            break;

         case 15:
            ch->learn_from_failure( gsn_blowguns );
            break;

         case 16:
            ch->learn_from_failure( gsn_slings );
            break;
      }


Change to:
      switch ( projectile->value[4] )
      {
         default:
         case PROJ_BOLT:
         case PROJ_ARROW:
            ch->learn_from_failure( gsn_archery );
            break;

         case PROJ_DART:
            ch->learn_from_failure( gsn_blowguns );
            break;

         case PROJ_STONE:
            ch->learn_from_failure( gsn_slings );
            break;
      }


The projectile/archery code additions were quite complex and changed a number of things. One of which was the meaning of the various values on projectile items. value[3] is the damage type, which is not relevant to the skill being used. The code should have been referencing value[4] which is the PROJECTILE type, which matches up to the type of weapon being used. Further, since it was using hardcoded numerical values, the checks were out of range anyway and would always cause the skill increase to apply to archery even if the person is not using a crossbow or bow.
       
Pages:<< prev 1 next >>