Issue information

Issue ID
#1567
Status
Fixed
Severity
None
Started
Hercules Elf Bot
May 25, 2008 13:13
Last Post
Hercules Elf Bot
May 25, 2008 13:13
Confirmation
N/A

Hercules Elf Bot - May 25, 2008 13:13

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

There are several walk speed calculations that are occuring outside of the status calc structure:
CODE
    if(sd->speed_rate < 0)
        sd->speed_rate = 0;
    if(sd->speed_rate != 100)
        status->speed = status->speed*sd->speed_rate/100;

    // Relative modifiers from passive skills
    if((sd->class_&MAPID_UPPERMASK) == MAPID_ASSASSIN && (skill=pc_checkskill(sd,TF_MISS))>0)
        status->speed -= status->speed * skill/100;
    if(pc_isriding(sd) && pc_checkskill(sd,KN_RIDING)>0)
        status->speed -= status->speed * 25/100;
    if(pc_iscarton(sd) && (skill=pc_checkskill(sd,MC_PUSHCART))>0)
        status->speed += status->speed * (100-10*skill)/100;

Tests show that at least for Peco riding, this modifier is applied linearly alongside Increase AGI. This means that agi cuts of 25% of the speed value, and peco riding another 25%, giving a reduction of 150 -> 75. On Eathena these two stack, giving 150 -> 112 -> 84. I suspect that the other situations also behave like this.

DracoRPG in r3020 moved common code into status_calc_bl_* functions. This makes it impossible to cleanly integrate the above code, because these are currently player-dependant attributes and would require some ugly bl casting and sd checking.