diff options
Diffstat (limited to 'src/map/skill.c')
-rw-r--r-- | src/map/skill.c | 43 |
1 files changed, 42 insertions, 1 deletions
diff --git a/src/map/skill.c b/src/map/skill.c index ab1c026f3..2559a7a5b 100644 --- a/src/map/skill.c +++ b/src/map/skill.c @@ -557,6 +557,7 @@ int skillnotok (uint16 skill_id, struct map_session_data *sd) clif->skill_fail(sd,skill_id,USESKILL_FAIL_THERE_ARE_NPC_AROUND,0); return 1; } + FALLTHROUGH case MC_IDENTIFY: return 0; // always allowed case WZ_ICEWALL: @@ -2508,6 +2509,7 @@ int skill_attack(int attack_type, struct block_list* src, struct block_list *dsr case KO_MUCHANAGE: if( dmg.dmg_lv == ATK_FLEE ) break; + FALLTHROUGH case WL_SOULEXPANSION: case WL_COMET: case NJ_HUUMA: @@ -2520,6 +2522,7 @@ int skill_attack(int attack_type, struct block_list* src, struct block_list *dsr case LG_OVERBRAND: /* Fall through */ dmg.amotion = status_get_amotion(src) * 2; + FALLTHROUGH case LG_OVERBRAND_PLUSATK: dmg.dmotion = clif->skill_damage(dsrc,bl,tick,status_get_amotion(src),dmg.dmotion,damage,dmg.div_,skill_id,-1,BDT_SPLASH); break; @@ -2578,6 +2581,7 @@ int skill_attack(int attack_type, struct block_list* src, struct block_list *dsr dmg.dmotion = clif->skill_damage(src,bl,tick, dmg.amotion, dmg.dmotion, damage, dmg.div_, skill_id, (flag&SD_LEVEL) ? -1 : skill_lv, BDT_SPLASH); if( dsrc != src ) // avoid damage display redundancy break; + FALLTHROUGH case HT_LANDMINE: dmg.dmotion = clif->skill_damage(dsrc,bl,tick, dmg.amotion, dmg.dmotion, damage, dmg.div_, skill_id, -1, type); break; @@ -2590,6 +2594,7 @@ int skill_attack(int attack_type, struct block_list* src, struct block_list *dsr case AB_DUPLELIGHT_MELEE: case AB_DUPLELIGHT_MAGIC: dmg.amotion = 300;/* makes the damage value not overlap with previous damage (when displayed by the client) */ + FALLTHROUGH default: skill->attack_display_unknown(&attack_type, src, dsrc, bl, &skill_id, &skill_lv, &tick, &flag, &type, &dmg, &damage); break; @@ -3003,6 +3008,7 @@ int skill_check_unit_range_sub(struct block_list *bl, va_list ap) case AL_PNEUMA: if(g_skill_id == SA_LANDPROTECTOR) break; + FALLTHROUGH case MG_SAFETYWALL: case MH_STEINWAND: case SC_MAELSTROM: @@ -3425,6 +3431,7 @@ int skill_timerskill(int tid, int64 tick, int id, intptr_t data) { skill->blown(src,target,skill->get_blewcount(skl->skill_id, skl->skill_lv), -1, 0x0 ); break; } + FALLTHROUGH } default: skill->timerskill_target_unknown(tid, tick, src, target, ud, skl); @@ -3451,6 +3458,7 @@ int skill_timerskill(int tid, int64 tick, int id, intptr_t data) { map->foreachinarea(skill->cell_overlap,src->m,skl->x-i,skl->y-i,skl->x+i,skl->y+i,BL_SKILL,skl->skill_id,&dummy,src); } + FALLTHROUGH // fall through ... case WL_EARTHSTRAIN: skill->unitsetting(src,skl->skill_id,skl->skill_lv,skl->x,skl->y,(skl->type<<16)|skl->flag); @@ -3958,6 +3966,7 @@ int skill_castend_damage_id(struct block_list* src, struct block_list *bl, uint1 case MC_CARTREVOLUTION: case NPC_SPLASHATTACK: flag |= SD_PREAMBLE; // a fake packet will be sent for the first target to be hit + FALLTHROUGH case AS_SPLASHER: case HT_BLITZBEAT: case AC_SHOWER: @@ -4338,6 +4347,7 @@ int skill_castend_damage_id(struct block_list* src, struct block_list *bl, uint1 if( (tsc = status->get_sc(bl)) && tsc->data[SC_HIDING] ) break; } + FALLTHROUGH case HVAN_EXPLOSION: if (src != bl) skill->attack(BF_MISC,src,src,bl,skill_id,skill_lv,tick,flag); @@ -4595,6 +4605,7 @@ int skill_castend_damage_id(struct block_list* src, struct block_list *bl, uint1 } break; } + FALLTHROUGH case RA_WUGBITE: if( path->search(NULL,src,src->m,src->x,src->y,bl->x,bl->y,1,CELL_CHKNOREACH) ) { skill->attack(BF_WEAPON,src,src,bl,skill_id,skill_lv,tick,flag); @@ -5353,6 +5364,7 @@ int skill_castend_nodamage_id(struct block_list *src, struct block_list *bl, uin if (sd) clif->skill_fail(sd,skill_id,USESKILL_FAIL_LEVEL,0) ; break ; } + FALLTHROUGH case AL_HEAL: /** @@ -7592,6 +7604,7 @@ int skill_castend_nodamage_id(struct block_list *src, struct block_list *bl, uin // remove trap should be used instead break; // otherwise fall through to below + FALLTHROUGH case UNT_BLASTMINE: case UNT_SKIDTRAP: case UNT_LANDMINE: @@ -7629,7 +7642,8 @@ int skill_castend_nodamage_id(struct block_list *src, struct block_list *bl, uin clif->skill_nodamage(src,bl,skill_id,skill_lv, sc_start4(src,bl,type,100,skill_lv,skill_id,src->id,skill->get_time(skill_id,skill_lv),1000)); #ifndef RENEWAL - if (sd) skill->blockpc_start (sd, skill_id, skill->get_time(skill_id, skill_lv)+3000); + if (sd) + skill->blockpc_start(sd, skill_id, skill->get_time(skill_id, skill_lv) + 3000); #endif break; @@ -10406,6 +10420,7 @@ int skill_castend_pos2(struct block_list* src, int x, int y, uint16 skill_id, ui clif->skill_fail(sd,skill_id,USESKILL_FAIL_LEVEL,0); break; } + FALLTHROUGH case MG_SAFETYWALL: { @@ -10415,6 +10430,7 @@ int skill_castend_pos2(struct block_list* src, int x, int y, uint16 skill_id, ui return 0; // Don't consume gems if cast on LP } } + FALLTHROUGH case MG_FIREWALL: case MG_THUNDERSTORM: @@ -10525,6 +10541,7 @@ int skill_castend_pos2(struct block_list* src, int x, int y, uint16 skill_id, ui case RL_B_TRAP: case MH_XENO_SLASHER: flag|=1;//Set flag to 1 to prevent deleting ammo (it will be deleted on group-delete). + FALLTHROUGH case GS_GROUNDDRIFT: //Ammo should be deleted right away. if ( skill_id == WM_SEVERE_RAINSTORM ) sc_start(src,src,SC_NO_SWITCH_EQUIP,100,0,skill->get_time(skill_id,skill_lv)); @@ -11284,8 +11301,10 @@ struct skill_unit_group* skill_unitsetting(struct block_list *src, uint16 skill_ case HT_ANKLESNARE: if( flag&2 ) val3 = SC_ESCAPE; + FALLTHROUGH case HT_SHOCKWAVE: val1=skill_lv*15+10; + FALLTHROUGH case HT_SANDMAN: case MA_SANDMAN: case HT_CLAYMORETRAP: @@ -11470,12 +11489,16 @@ struct skill_unit_group* skill_unitsetting(struct block_list *src, uint16 skill_ { case ELE_FIRE: subunt++; + FALLTHROUGH case ELE_WATER: subunt++; + FALLTHROUGH case ELE_POISON: subunt++; + FALLTHROUGH case ELE_DARK: subunt++; + FALLTHROUGH case ELE_WIND: break; default: @@ -11512,6 +11535,7 @@ struct skill_unit_group* skill_unitsetting(struct block_list *src, uint16 skill_ target = BCT_ALL; val1 = skill_lv + 1; val2 = 1; + FALLTHROUGH case WM_POEMOFNETHERWORLD: // Can't be placed on top of Land Protector. case SO_WATER_INSIGNIA: case SO_FIRE_INSIGNIA: @@ -11836,6 +11860,7 @@ int skill_unit_onplace(struct skill_unit *src, struct block_list *bl, int64 tick case UNT_HERMODE: if (sg->src_id!=bl->id && battle->check_target(&src->bl,bl,BCT_PARTY|BCT_GUILD) > 0) status->change_clear_buffs(bl,1); //Should dispell only allies. + FALLTHROUGH case UNT_RICHMANKIM: case UNT_ETERNALCHAOS: case UNT_DRUMBATTLEFIELD: @@ -11854,6 +11879,7 @@ int skill_unit_onplace(struct skill_unit *src, struct block_list *bl, int64 tick if (!battle_config.song_timer_reset && sc && sce) return 0; // Let it fall through + FALLTHROUGH case UNT_WHISTLE: case UNT_ASSASSINCROSS: case UNT_POEMBRAGI: @@ -12238,11 +12264,13 @@ int skill_unit_onplace_timer(struct skill_unit *src, struct block_list *bl, int6 case UNT_VERDURETRAP: if( bl->type == BL_PC )// it won't work on players break; + FALLTHROUGH case UNT_FIRINGTRAP: case UNT_ICEBOUNDTRAP: case UNT_CLUSTERBOMB: if( bl->id == ss->id )// it won't trigger on caster break; + FALLTHROUGH case UNT_LANDMINE: case UNT_BLASTMINE: case UNT_SHOCKWAVE: @@ -12534,6 +12562,7 @@ int skill_unit_onplace_timer(struct skill_unit *src, struct block_list *bl, int6 case UNT_STEALTHFIELD: if( bl->id == sg->src_id ) break; // Don't work on Self (video shows that) + FALLTHROUGH case UNT_NEUTRALBARRIER: sc_start(ss,bl,type,100,sg->skill_lv,sg->interval + 100); break; @@ -13315,6 +13344,7 @@ int skill_check_condition_castbegin(struct map_session_data* sd, uint16 skill_id case KO_YAMIKUMO: if( sc && sc->data[status->skill2sc(skill_id)] ) return 1; + FALLTHROUGH default: { int ret = skill->check_condition_castbegin_off_unknown(sc, &skill_id); @@ -13421,6 +13451,7 @@ int skill_check_condition_castbegin(struct map_session_data* sd, uint16 skill_id clif->skill_fail(sd,skill_id,USESKILL_FAIL_LEVEL,0); return 0; } + FALLTHROUGH case SA_CASTCANCEL: if(sd->ud.skilltimer == INVALID_TIMER) { clif->skill_fail(sd,skill_id,USESKILL_FAIL_LEVEL,0); @@ -13670,6 +13701,7 @@ int skill_check_condition_castbegin(struct map_session_data* sd, uint16 skill_id clif->skill_fail(sd,skill_id,USESKILL_FAIL_LEVEL,0); return 0; } + FALLTHROUGH case GD_EMERGENCYCALL: // other checks were already done in skillnotok() if (!sd->status.guild_id || !sd->state.gmaster_flag) @@ -13692,6 +13724,7 @@ int skill_check_condition_castbegin(struct map_session_data* sd, uint16 skill_id clif->skill_fail(sd,skill_id,USESKILL_FAIL_LEVEL,0); return 0; } + FALLTHROUGH case NJ_BUNSINJYUTSU: if (!(sc && sc->data[SC_NJ_NEN])) { clif->skill_fail(sd,skill_id,USESKILL_FAIL_LEVEL,0); @@ -14018,6 +14051,7 @@ int skill_check_condition_castbegin(struct map_session_data* sd, uint16 skill_id clif->skill_fail(sd,skill_id,USESKILL_FAIL_LEVEL,0); return 0; } + FALLTHROUGH case ST_CART: if(!pc_iscarton(sd)) { clif->skill_fail(sd,skill_id,USESKILL_FAIL_CART,0); @@ -14111,11 +14145,13 @@ int skill_check_condition_castbegin(struct map_session_data* sd, uint16 skill_id clif->skill_fail(sd,skill_id,USESKILL_FAIL_LEVEL,0); return 0; } + FALLTHROUGH case ST_MH_GRAPPLING: if (!(sc && sc->data[SC_STYLE_CHANGE] && sc->data[SC_STYLE_CHANGE]->val2 == MH_MD_GRAPPLING)){ clif->skill_fail(sd,skill_id,USESKILL_FAIL_LEVEL,0); return 0; } + FALLTHROUGH case ST_PECO: if (!pc_isridingpeco(sd)) { clif->skill_fail(sd,skill_id,USESKILL_FAIL_LEVEL,0); @@ -14989,6 +15025,7 @@ int skill_vfcastfix(struct block_list *bl, double time, uint16 skill_id, uint16 case WZ_FIREPILLAR: if(skill_lv < 5) break; + FALLTHROUGH case HW_GRAVITATION: case MG_SAFETYWALL: case MG_STONECURSE: @@ -16740,6 +16777,7 @@ int skill_unit_timer_sub(union DBKey key, struct DBData *data, va_list ap) skill->delunit(su); break; } + FALLTHROUGH case UNT_SKIDTRAP: case UNT_LANDMINE: case UNT_SHOCKWAVE: @@ -17404,12 +17442,15 @@ int skill_produce_mix(struct map_session_data *sd, uint16 skill_id, int nameid, case ITEMID_HAGALAZ: case ITEMID_OTHILA: D -= 500; //Rank C + FALLTHROUGH case ITEMID_ISA: case ITEMID_WYRD: D -= 500; //Rank B + FALLTHROUGH case ITEMID_NAUTHIZ: case ITEMID_URUZ: D -= 500; //Rank A + FALLTHROUGH case ITEMID_BERKANA: case ITEMID_LUX_ANIMA: D -= 500; //Rank S |