Originally posted by [b]theultramage[/b]
http://www.eathena.ws/board/index.php?autocom=bugtracker&showbug=2980
Soul Drain should make the player sprite flash when executing. But currently on eathena, this visual effect doesn't show up.
The cause is packets being sent to the client in incorrect order: first comes clif_clearunit_area(), then clif_skill_nodamage(). By the time the server informs about the effect activation, the client had already been ordered to remove the target mob! On Aegis these packets come switched.
I got word that this feature "broke a year ago", meaning it was working until then. Which code causes this?
CODE
int battle_delay_damage_sub(int tid, unsigned int tick, int id, intptr data)
{
struct delay_damage *dat = (struct delay_damage *)data;
struct block_list *target = map_id2bl(dat->target);
if (target && dat && map_id2bl(id) == dat->src && target->prev != NULL && !status_isdead(target) &&
target->m == dat->src->m &&
(target->type != BL_PC || ((TBL_PC*)target)->invincible_timer == -1) &&
check_distance_bl(dat->src, target, dat->distance)) //Check to see if you haven't teleported. [Skotlex]
{
map_freeblock_lock();
* status_fix_damage(dat->src, target, dat->damage, dat->delay);
if (dat->damage > 0 && dat->attack_type)
{
if (!status_isdead(target))
skill_additional_effect(dat->src,target,dat->skill_id,dat->skill_lv,dat->attack_type,tick);
* skill_counter_additional_effect(dat->src,target,dat->skill_id,dat->skill_lv,dat->attack_type,tick);
}
map_freeblock_unlock();
}
ers_free(delay_damage_ers, dat);
return 0;
}
Stars indicate points of interest. The status_fix_damage() function performs the actual damaging, and the additional_effect() function activates soul drain effect.
I do not know which revision actually caused this problem. It's already there on r12013 trunk, though.
This post has been edited by theultramage: Apr 18 2009, 02:14 AM