viewing paste Unknown #5010 | C

Posted on the
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69
// this is for server-side skill delays to prevent no-delay shit
// these numbers are chosen based off testing done by goodgamersro and proro staff, investigating it myself felt like a waste of time
static int skill_min_delay(struct map_session_data *sd, int skill_id)
{
    int min = battle_config.min_skill_delay_limit?battle_config.min_skill_delay_limit:200; //the 200 is arbitrarily chosen
    int minimum_min = min;
    static int instance = 0;
    unsigned int time = gettick();
 
 
    switch(skill_id)
    {
        case AL_HEAL:
        case MG_FIREBOLT:
        case MG_COLDBOLT:
        case MG_LIGHTNINGBOLT:
        case MG_SOULSTRIKE:
        case WZ_EARTHSPIKE: 
        case WZ_JUPITEL:
        case AS_GRIMTOOTH:
        case CR_SHIELDCHARGE:
        case CR_SHIELDBOOMERANG:
        case PA_SHIELDCHAIN:
        case SN_FALCONASSAULT:
        case WS_CARTTERMINATION:
            min = 192;
            break;
 
        case SM_BASH:
        case PA_PRESSURE:
        case AC_DOUBLE:
        case SN_SHARPSHOOTING:
        case NJ_HYOUSENSOU:
        case NJ_KAMAITACHI:
        case NJ_BAKUENRYU:
            min = 224;
            break;
        case CR_DEVOTION:
        case SA_DISPEL:
        case AL_BLESSING:
            min = 312;
            break;
        case HW_GANBANTEIN:
        case SA_LANDPROTECTOR:
            min = 480;
            break;
        case WZ_HEAVENDRIVE:
            min = 512;
            break;
        case PR_STRECOVERY:
        case PR_LEXAETERNA:
        case HT_DETECTING:
        case SL_KAUPE:
        case SL_KAITE:
            min = 544;
            break;
        case AC_SHOWER:
            min = 768;
            break;
    }
 
 
 
    if ( min > minimum_min && DIFF_TICK(time, sd->hit_tick) < minimum_min*5 ) // that is, you've been hit between now ~600 ms ago
        min = minimum_min;
 
 
    return max(min, minimum_min);
}
Viewed 696 times, submitted by Guest.