Issue information

Issue ID
#2751
Status
Fixed
Severity
Low
Started
Hercules Elf Bot
Feb 7, 2009 6:06
Last Post
Hercules Elf Bot
Apr 18, 2012 15:40
Confirmation
N/A

Hercules Elf Bot - Feb 7, 2009 6:06

Originally posted by [b]Inkfish[/b]
http://www.eathena.ws/board/index.php?autocom=bugtracker&showbug=2751

first, in atcommand.c, 'sd->spirit_timer' is used before 'nullpo_retr'.
CODE
    int max_spiritballs = min(ARRAYLENGTH(sd->spirit_timer), 0x7FFF);
    int number;
    nullpo_retr(-1, sd);


then, well... FlavioJS chose case B... there is something I wanna say.

for example, you now have 50 spiritballs created by gm command. then you use 'call spiritball' skill level 5(levels not mattering), which is supposed to add 1 more spirit ball for you.
however, in this situation, the server will first delete a ball from you because of the following code and then add one with a timer:
CODE
    if( sd->spiritball && sd->spiritball >= max )
    {
            if(sd->spirit_timer[0] != -1)
                delete_timer(sd->spirit_timer[0],pc_spiritball_timer);
            sd->spiritball--;
            if( sd->spiritball != 0 )
                memmove(sd->spirit_timer+0, sd->spirit_timer+1, (sd->spiritball)*sizeof(int));
            sd->spirit_timer[sd->spiritball] = INVALID_TIMER;
    }

Then you have 49 spiritballs created by gm command and 1 by skill.
You don't get one for real, even if the max spirit ball amount has not been reached.
This behavior is kind of strange...we use a skill only to find it has no benefits and brings a bad effect that makes the spirit ball be deleted later.

This post has been edited by Inkfish: Feb 6 2009, 10:18 PM

Hercules Elf Bot - Dec 26, 2011 11:16

Originally posted by [b]Ind[/b]
1: fixed in [rev=15285]
2: it's a "custom behavior" (?) I'd rather remove the whole thing than fixing it (is there anyone who evens use that?)