Login
User Name:

Password:



Register
Forgot your password?
Vote for Us!
tintin++ ogg sound player script for linux
Author: Robert Smith
Submitted by: Vladaar
6Dragons ogg Soundpack
Author: Vladaar
Submitted by: Vladaar
6Dragons 4.4
Author: Vladaar
Submitted by: Vladaar
LoP 1.46
Author: Remcon
Submitted by: Remcon
LOP 1.45
Author: Remcon
Submitted by: Remcon
Users Online
CommonCrawl, DotBot, Bing, Yandex

Members: 0
Guests: 9
Stats
Files
Topics
Posts
Members
Newest Member
481
3,739
19,386
623
MelbaBoudr
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 >>