Okay, I have been looking into this but unfortunately could not find the issue. Wondering if this has anything to do with the hexed...
I don't see anything that could be affecting this in the code below.
static int skill_magic_reflect(struct block_list* src, struct block_list* bl, int type)
{
struct status_change *sc = status_get_sc(bl);
struct map_session_data* sd = BL_CAST(BL_PC, bl);
if (!sc || !sc->data[SC_KYOMU]) { // Kyomu doesn't reflect
// Item-based reflection - Bypasses Boss check
if (sd && sd->bonus.magic_damage_return && type && rnd()%100 < sd->bonus.magic_damage_return)
return 1;
}
// Magic Mirror reflection - Bypasses Boss check
if (sc && sc->data[SC_MAGICMIRROR] && rnd()%100 < sc->data[SC_MAGICMIRROR]->val2)
return 1;
if( status_get_class_(src) == CLASS_BOSS )
return 0;
// status-based reflection
if( !sc || sc->count == 0 )
return 0;
// Kaite reflection - Does not bypass Boss check
if( sc->data[SC_KAITE] && (src->type == BL_PC || status_get_lv(src) <= 80) ) {
// Kaite only works against non-players if they are low-level.
// Kyomu doesn't disable Kaite, but the "skill fail chance" part of Kyomu applies to it.
clif_specialeffect(bl, 438, AREA);
if( --sc->data[SC_KAITE]->val2 <= 0 )
status_change_end(bl, SC_KAITE, INVALID_TIMER);
return 2;
}
return 0;
}
Maybe it is related to the devotion formula in battle.c?
Still trying to find out the issue here...
I have further looked into this and manually removed all source related modifications I have made into the server. I ran a clean version of the emulator and the bug is still there.
Could this be a bug in the emulator?