diff options
-rw-r--r-- | src/map/skill.c | 17 |
1 files changed, 11 insertions, 6 deletions
diff --git a/src/map/skill.c b/src/map/skill.c index d2021b0b4..065aa8e01 100644 --- a/src/map/skill.c +++ b/src/map/skill.c @@ -8627,6 +8627,8 @@ int skill_castend_nodamage_id(struct block_list *src, struct block_list *bl, uin } break; case 2: + if( sd->bonus.shieldmdef == 0 ) + break; // Nothing should happen if the shield has no mdef, not even displaying a message if ( sd->bonus.shieldmdef >= 1 && sd->bonus.shieldmdef <= 3 ) splashrange = 1; else if ( sd->bonus.shieldmdef >= 4 && sd->bonus.shieldmdef <= 5 ) @@ -8654,22 +8656,25 @@ int skill_castend_nodamage_id(struct block_list *src, struct block_list *bl, uin break; case 3: { - struct item *shield = &sd->status.inventory[sd->equip_index[EQI_HAND_L]]; int rate = 0; + + if( shield_data->refine == 0 ) + break; // Nothing should happen if the shield has no refine, not even displaying a message + switch( opt ) { case 1: - sc_start(src,bl,SC_SHIELDSPELL_REF,100,opt,shield->refine * 30000); //Now breaks Armor at 100% rate + sc_start(src,bl,SC_SHIELDSPELL_REF,100,opt,shield_data->refine * 30000); //Now breaks Armor at 100% rate break; case 2: val = shield->refine * 10 * status->get_lv(src) / 100; //DEF Increase rate = (shield->refine * 2) + (status_get_luk(src) / 10); //Status Resistance Rate - if( sc_start2(src,bl,SC_SHIELDSPELL_REF,100,opt,val,shield->refine * 20000)) + if( sc_start2(src,bl,SC_SHIELDSPELL_REF,100,opt,val,shield_data->refine * 20000)) clif->skill_nodamage(src,bl,SC_SCRESIST,skill_lv, - sc_start(src,bl,SC_SCRESIST,100,rate,shield->refine * 30000)); + sc_start(src,bl,SC_SCRESIST,100,rate,shield_data->refine * 30000)); break; case 3: sc_start(src,bl,SC_SHIELDSPELL_REF,100,opt,INVALID_TIMER); //HP Recovery - val = sstatus->max_hp * ((status->get_lv(src) / 10) + (shield->refine + 1)) / 100; + val = sstatus->max_hp * ((status->get_lv(src) / 10) + (shield_data->refine + 1)) / 100; status->heal(bl, val, 0, 2); status_change_end(bl,SC_SHIELDSPELL_REF,INVALID_TIMER); break; @@ -8769,8 +8774,8 @@ int skill_castend_nodamage_id(struct block_list *src, struct block_list *bl, uin { sp = dstsd->spiritball; //1%sp per spiritball. pc->delspiritball(dstsd, dstsd->spiritball, 0); + status_percent_heal(src, 0, sp); } - if( sp ) status_percent_heal(src, 0, sp); clif->skill_nodamage(src, bl, skill_id, skill_lv, sp ? 1:0); } else { clif->skill_damage(src,bl,tick, status_get_amotion(src), 0, -30000, 1, skill_id, skill_lv, 6); |