Re: Question about find_skill_num()

From: George (greerga@CIRCLEMUD.ORG)
Date: 09/21/98

On Thu, 10 Sep 1998, Angus Mezick wrote:

>Just wondering why we don't use spells[spell_sort_info[i]] instead of spells[i]
>for searching for spell numbers.  Just replace all instances of skindex with

I'd assume because all the !UNUSED! end up at the top of the sorted list.

>spell_sort_info[skindex].  We recently ran into a problem with a skill named
>shock following the shocking grasp spell and the player not being able to
>practice the skill.  Anyone see any problems with this? esp since we spend all
>that time bubble sorting all the spells/skills during boot.

qsort() now.  Shouldn't really be a problem, but beware of the !RESERVED!
and !UNUSED! spells popping up first.  They're filtered out of the
list_skills() function by this line:

    if (GET_LEVEL(ch) >= spell_info[i].min_level[(int) GET_CLASS(ch)]) {

George Greer, | Genius may have its limitations, but   (mostly) | stupidity is not thus handicapped.    |                  -- Elbert Hubbard

     | Ensure that you have read the CircleMUD Mailing List FAQ:  |
     | |

This archive was generated by hypermail 2b30 : 12/15/00 PST