Re: multiple attacks

From: George Greer (
Date: 09/25/01

On Tue, 25 Sep 2001, Mielikki wrote:

>SYSERR: Mob using '((ch)->player_specials-saved.skills[ 141])' at
>The line it is referencing in the code is as follows:
>     if (GET_SKILL(ch, SKILL_SECOND_ATTACK) >= number(1, 101)) {

That's a notice that mobiles do not have "player_specials."  Therefore, any
access of a player special variable by a mobile will return whatever
happens to be in 'dummy_mob' at the time.  Since 'dummy_mob' is shared by
ALL mobiles, you shouldn't do that.  So make sure to check !IS_NPC before
that code and handle them properly.

Look on the bright side, we could just dereference a NULL pointer and crash
whenever people accessed a player_special on a mobile...

George Greer

   | FAQ: |
   | Archives: |

This archive was generated by hypermail 2b30 : 12/06/01 PST