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
6Dragons 4.4
Author: Vladaar
Submitted by: Vladaar
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
Users Online
CommonCrawl, Yandex, Google, DotBot

Members: 0
Guests: 13
Stats
Files
Topics
Posts
Members
Newest Member
479
3,708
19,242
614
BenitoVirg
Today's Birthdays
There are no member birthdays today.
Related Links
» SmaugMuds.org » Codebases » AFKMud Support & Development » Archery Code Bug
Forum Rules | Mark all | Recent Posts

Archery Code Bug
< Newer Topic :: Older Topic >

Pages:<< prev 1 next >>
Post is unread #1 Dec 2, 2007, 7:02 pm   Last edited Dec 2, 2007, 7:02 pm by Kayle
Go to the top of the page
Go to the bottom of the page

Kayle
Off the Edge of the Map
GroupAdministrators
Posts1,195
JoinedMar 21, 2006

In the archery code, the code references the damage type of the projectile in two places, and it should be checking the projectile type. The code in question is in archery.c - ch_ret ranged_got_target( CHAR_DATA * ch, CHAR_DATA * victim, OBJ_DATA * weapon, OBJ_DATA * projectile, short dist, short dt,
char *stxt, short color )
   /*
    * check dam type of projectile to determine value of wtype 
    * * wtype points to same "short" as the skill assigned to that
    * * range by the code and as such the proper skill will be used. 
    * * Grimm 
    */
   switch ( projectile->value[3] )
   {
      case 13:
      case 14:
         wtype = gsn_archery;
         break;
      case 15:
         wtype = gsn_blowguns;
         break;
      case 16:
         wtype = gsn_slings;
         break;
   }


should become:

   /*
    * check dam type of projectile to determine value of wtype 
    * * wtype points to same "short" as the skill assigned to that
    * * range by the code and as such the proper skill will be used. 
    * * Grimm 
    */
   switch ( projectile->value[4] )
   {
      case 0:
      case 1:
         wtype = gsn_archery;
         break;
      case 2:
         wtype = gsn_blowguns;
         break;
      case 3:
         wtype = gsn_slings;
         break;
   }


And further down,
      switch ( projectile->value[3] )
      {
         case 13:
         case 14:
            learn_from_failure( ch, gsn_archery );
            break;

         case 15:
            learn_from_failure( ch, gsn_blowguns );
            break;

         case 16:
            learn_from_failure( ch, gsn_slings );
            break;
      }


Should become:
      switch ( projectile->value[4] )
      {
         case 0:
         case 1:
            learn_from_failure( ch, gsn_archery );
            break;

         case 2:
            learn_from_failure( ch, gsn_blowguns );
            break;

         case 3:
            learn_from_failure( ch, gsn_slings );
            break;
      }
       
Pages:<< prev 1 next >>