int status_change_spread( struct block_list *src, struct block_list *bl ) {
int i, flag = 0;
struct status_change *sc = status->get_sc(src);
int64 tick;
struct status_change_data data;
if( !sc || !sc->count )
return 0;
tick = timer->gettick();
for( i = SC_COMMON_MIN; i < SC_MAX; i++ ) {
if( !sc->data[i] || i == SC_COMMON_MAX )
continue;
switch( i ) {
//Debuffs that can be spreaded.
// NOTE: We'll add/delte SCs when we are able to confirm it.
case SC_CURSE:
case SC_SILENCE:
case SC_CONFUSION:
case SC_BLIND:
case SC_NOCHAT:
case SC_ILLUSION:
case SC_CRUCIS:
case SC_DEC_AGI:
case SC_SLOWDOWN:
case SC_MINDBREAKER:
case SC_DC_WINKCHARM:
case SC_STOP:
case SC_ORCISH:
//case SC_NOEQUIPWEAPON://Omg I got infected and had the urge to strip myself physically.
//case SC_NOEQUIPSHIELD://No this is stupid and shouldnt be spreadable at all.
//case SC_NOEQUIPARMOR:// Disabled until I can confirm if it does or not. [Rytech]
//case SC_NOEQUIPHELM:
//case SC__STRIPACCESSARY:
case SC_WUGBITE:
case SC_FROSTMISTY:
case SC_VENOMBLEED:
case SC_DEATHHURT:
case SC_PARALYSE:
if( sc->data[i]->timer != INVALID_TIMER ) {
const struct TimerData *td = timer->get(sc->data[i]->timer);
if (td == NULL || td->func != status->change_timer || DIFF_TICK(td->tick,tick) < 0)
continue;
data.tick = DIFF_TICK32(td->tick,tick);
} else
data.tick = INVALID_TIMER;
break;
// Special cases
case SC_POISON:
case SC_DPOISON:
data.tick = sc->data[i]->val3 * 1000;
break;
case SC_FEAR:
case SC_LEECHESEND:
data.tick = sc->data[i]->val4 * 1000;
break;
case SC_BURNING:
data.tick = sc->data[i]->val4 * 2000;
break;
case SC_PYREXIA:
case SC_OBLIVIONCURSE:
data.tick = sc->data[i]->val4 * 3000;
break;
case SC_MAGICMUSHROOM:
data.tick = sc->data[i]->val4 * 4000;
break;
case SC_TOXIN:
case SC_BLOODING:
data.tick = sc->data[i]->val4 * 10000;
break;
default:
continue;
}
if( i ) {
data.val1 = sc->data[i]->val1;
data.val2 = sc->data[i]->val2;
data.val3 = sc->data[i]->val3;
data.val4 = sc->data[i]->val4;
status->change_start(src,bl,(sc_type)i,10000,data.val1,data.val2,data.val3,data.val4,data.tick,SCFLAG_NOAVOID|SCFLAG_FIXEDTICK|SCFLAG_FIXEDRATE);
flag = 1;
}
}
return flag;
}