From a681d759cc887e8adccbd30d3b7a7ca355bbda96 Mon Sep 17 00:00:00 2001 From: Haru Date: Sat, 3 Dec 2016 03:41:08 +0100 Subject: 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 --- src/map/skill.c | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) (limited to 'src/map/skill.c') 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,(tempcheckskill(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) && -- cgit v1.2.3-60-g2f50