Re: Newbie EQ... Class/Race affected:)

From: Admin of The Keep (dkoepke@california.com)
Date: 10/21/96


On Mon, 21 Oct 1996, Admin of The Keep wrote:

>     #define BIT(x)	(1 << (x))
>     #define RACE_SET	(eq[j][3] != -1 && IS_SET(eq[j][3], race))
>     #define CLASS_SET   (eq[j][4] != -1 && IS_SET(eq[j][4], cls))

  Oops, this might be a small bug, change these to:
    #define RACE_SET	(eq[j][3] == -1 || IS_SET(eq[j][3], race))
    #define CLASS_SET	(eq[j][4] == -1 || IS_SET(eq[j][4], race))

  When it's the other way it returns FALSE if eq[j][3] is -1, which is
  supposed to be the "any race" check.  Which means that it'll skip it
  if race/class is -1 (so all general eq will be ignored).  With the
  new version it will return true if it's equal to -1 or if the race is
  in the race list, and only false if both of these aren't true.


  <*=-+Daniel+-=*>
  "Forgive me father, for I am sin."


+-----------------------------------------------------------+
| Ensure that you have read the CircleMUD Mailing List FAQ: |
|   http://cspo.queensu.ca/~fletcher/Circle/list_faq.html   |
+-----------------------------------------------------------+



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