diff options
author | Haru <haru@dotalux.com> | 2016-12-03 03:41:08 +0100 |
---|---|---|
committer | Haru <haru@dotalux.com> | 2017-09-17 17:48:15 +0200 |
commit | a681d759cc887e8adccbd30d3b7a7ca355bbda96 (patch) | |
tree | cdea2ed4340cd81f31d05e34772ad0d2cf7ffd57 /src/map/skill.c | |
parent | 9a7536d2e092d9a7737e795094e68e6d1f94f6e9 (diff) | |
download | hercules-a681d759cc887e8adccbd30d3b7a7ca355bbda96.tar.gz hercules-a681d759cc887e8adccbd30d3b7a7ca355bbda96.tar.bz2 hercules-a681d759cc887e8adccbd30d3b7a7ca355bbda96.tar.xz hercules-a681d759cc887e8adccbd30d3b7a7ca355bbda96.zip |
Differentiate variables that hold a ViewSprite and a weapon Subtype
`sd->status.weapon` is renamed to `sd->status.look.weapon` and only
holds ViewSprite IDs. Its previous other meaning is now transferred to
`sd->weapontype` (holding the currently equipped weapon type,
considering both hands at once)
Signed-off-by: Haru <haru@dotalux.com>
Diffstat (limited to 'src/map/skill.c')
-rw-r--r-- | src/map/skill.c | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/src/map/skill.c b/src/map/skill.c index 1f510e6fe..4649ace42 100644 --- a/src/map/skill.c +++ b/src/map/skill.c @@ -806,7 +806,7 @@ int skill_additional_effect(struct block_list* src, struct block_list *bl, uint1 break; // If a normal attack is a skill, it's splash damage. [Inkfish] if(sd) { // Automatic trigger of Blitz Beat - if (pc_isfalcon(sd) && sd->status.weapon == W_BOW && (temp=pc->checkskill(sd,HT_BLITZBEAT))>0 && + if (pc_isfalcon(sd) && sd->weapontype == W_BOW && (temp=pc->checkskill(sd,HT_BLITZBEAT))>0 && rnd()%1000 <= sstatus->luk*3 ) { rate = sd->status.job_level / 10 + 1; skill->castend_damage_id(src,bl,HT_BLITZBEAT,(temp<rate)?temp:rate,tick,SD_LEVEL); @@ -815,7 +815,7 @@ int skill_additional_effect(struct block_list* src, struct block_list *bl, uint1 if( pc_iswug(sd) && (temp=pc->checkskill(sd,RA_WUGSTRIKE)) > 0 && rnd()%1000 <= sstatus->luk*3 ) skill->castend_damage_id(src,bl,RA_WUGSTRIKE,temp,tick,0); // Gank - if(dstmd && sd->status.weapon != W_BOW && + if(dstmd && sd->weapontype != W_BOW && (temp=pc->checkskill(sd,RG_SNATCHER)) > 0 && (temp*15 + 55) + pc->checkskill(sd,TF_STEAL)*10 > rnd()%1000) { if(pc->steal_item(sd,bl,pc->checkskill(sd,TF_STEAL))) @@ -2012,7 +2012,7 @@ int skill_break_equip (struct block_list *bl, unsigned short where, int rate, in if (sd->bonus.unbreakable) rate -= rate*sd->bonus.unbreakable/100; if (where&EQP_WEAPON) { - switch (sd->status.weapon) { + switch (sd->weapontype) { case W_FIST: //Bare fists should not break :P case W_1HAXE: case W_2HAXE: @@ -5917,7 +5917,7 @@ int skill_castend_nodamage_id(struct block_list *src, struct block_list *bl, uin case SA_LIGHTNINGLOADER: case SA_SEISMICWEAPON: if (dstsd) { - if(dstsd->status.weapon == W_FIST || + if (dstsd->weapontype == W_FIST || (dstsd->sc.count && !dstsd->sc.data[type] && ( //Allow re-enchanting to lengthen time. [Skotlex] dstsd->sc.data[SC_PROPERTYFIRE] || @@ -13391,7 +13391,7 @@ int skill_isammotype (struct map_session_data *sd, int skill_id) nullpo_ret(sd); return ( battle_config.arrow_decrement==2 && - (sd->status.weapon == W_BOW || (sd->status.weapon >= W_REVOLVER && sd->status.weapon <= W_GRENADE)) && + (sd->weapontype == W_BOW || (sd->weapontype >= W_REVOLVER && sd->weapontype <= W_GRENADE)) && skill_id != HT_PHANTASMIC && skill->get_type(skill_id) == BF_WEAPON && !(skill->get_nk(skill_id)&NK_NO_DAMAGE) && |