From 92e30d8695d44d0b899a0bdb15fcb2eab26e7c49 Mon Sep 17 00:00:00 2001 From: skotlex Date: Sat, 22 Jul 2006 17:02:58 +0000 Subject: - Applied use of EQI/EQP constants to the strip skills code. git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@7831 54d463be-8e91-2dee-dedb-b68131a5f0ec --- src/map/skill.c | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) (limited to 'src') diff --git a/src/map/skill.c b/src/map/skill.c index 92af54cb9..8c25f823b 100644 --- a/src/map/skill.c +++ b/src/map/skill.c @@ -4531,12 +4531,12 @@ int skill_castend_nodamage_id (struct block_list *src, struct block_list *bl, in break; } if (dstsd) { - for (i=0;i<11;i++) { + for (i=0;iequip_index[i]<0 || !dstsd->inventory_data[dstsd->equip_index[i]]) continue; switch (i) { - case 8: //Shield / left-hand weapon - if(dstsd->inventory_data[dstsd->equip_index[8]]->type == 5) + case EQI_HAND_L: //Shield / left-hand weapon + if(dstsd->inventory_data[dstsd->equip_index[EQI_HAND_L]]->type == IT_ARMOR) { //Shield if (equip&EQP_SHIELD && !(dstsd->unstripable_equip&EQP_SHIELD) && @@ -4548,7 +4548,7 @@ int skill_castend_nodamage_id (struct block_list *src, struct block_list *bl, in continue; } //Continue to weapon - case 9: + case EQI_HAND_R: if (equip &EQP_WEAPON && !(dstsd->unstripable_equip&EQP_WEAPON) && !(tsc && tsc->data[SC_CP_WEAPON].timer != -1) @@ -4557,7 +4557,7 @@ int skill_castend_nodamage_id (struct block_list *src, struct block_list *bl, in pc_unequipitem(dstsd,dstsd->equip_index[i],3); } break; - case 7: //Armor + case EQI_ARMOR: //Armor if (equip &EQP_ARMOR && !(dstsd->unstripable_equip &EQP_ARMOR) && !(tsc && tsc->data[SC_CP_ARMOR].timer != -1) @@ -4566,7 +4566,7 @@ int skill_castend_nodamage_id (struct block_list *src, struct block_list *bl, in pc_unequipitem(dstsd,dstsd->equip_index[i],3); } break; - case 6: //Helm + case EQI_HEAD_TOP: //Helm if (equip &EQP_HELM && !(dstsd->unstripable_equip &EQP_HELM) && !(tsc && tsc->data[SC_CP_HELM].timer != -1) -- cgit v1.2.3-70-g09d2