It is really frustrating when you need help but you can barely express yourself and explain your problem... I'd like to apologise in advance for the messy text!
We just came back with a new server on our community after 5 years offline and our players are not really happy with the behaviour of minibosses now-a-days.
According to their feedback, minibosses no longer stop when hit by a skill and it is like they are under the effect of endure or something like that.
I am not a C coder but I believe I could have this matter sorted out by editing unit_set_walkdelay in unit.c:
This is the original function from rAthena :
/**
* Applies a walk delay to a unit
* @param bl: Object to apply walk delay to
* @param tick: Current tick
* @param delay: Amount of time to set walk delay
* @param type: Type of delay
* 0: Damage induced delay; Do not change previous delay
* 1: Skill induced delay; Walk delay can only be increased, not decreased
* @return Success(1); Fail(0);
*/
int unit_set_walkdelay(struct block_list *bl, unsigned int tick, int delay, int type)
{
struct unit_data *ud = unit_bl2ud(bl);
if (delay <= 0 || !ud)
return 0;
if (type) {
//Bosses can ignore skill induced walkdelay (but not damage induced)
if(bl->type == BL_MOB && (((TBL_MOB*)bl)->status.mode&MD_BOSS))
return 0;
//Make sure walk delay is not decreased
if (DIFF_TICK(ud->canmove_tick, tick+delay) > 0)
return 0;
} else {
// Don't set walk delays when already trapped.
if (!unit_can_move(bl))
return 0;
//Immune to being stopped for double the flinch time
if (DIFF_TICK(ud->canmove_tick, tick-delay) > 0)
return 0;
}
ud->canmove_tick = tick + delay;
if (ud->walktimer != INVALID_TIMER) { // Stop walking, if chasing, readjust timers.
if (delay == 1) // Minimal delay (walk-delay) disabled. Just stop walking.
unit_stop_walking(bl,4);
else {
// Resume running after can move again [Kevin]
if(ud->state.running)
add_timer(ud->canmove_tick, unit_resume_running, bl->id, (intptr_t)ud);
else {
unit_stop_walking(bl,4);
if(ud->target)
add_timer(ud->canmove_tick+1, unit_walktobl_sub, bl->id, ud->target);
}
}
}
return 1;
}
Could anyone please help me to get to the desired result? I mean, a world where minibosses would stop when hit?
Question
biali
Hi there!
It is really frustrating when you need help but you can barely express yourself and explain your problem... I'd like to apologise in advance for the messy text!
We just came back with a new server on our community after 5 years offline and our players are not really happy with the behaviour of minibosses now-a-days.
According to their feedback, minibosses no longer stop when hit by a skill and it is like they are under the effect of endure or something like that.
I am not a C coder but I believe I could have this matter sorted out by editing unit_set_walkdelay in unit.c:
This is the original function from rAthena :
Could anyone please help me to get to the desired result? I mean, a world where minibosses would stop when hit?
Thank you very much in advance!!
Link to comment
Share on other sites
0 answers to this question
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.