diff options
author | skotlex <skotlex@54d463be-8e91-2dee-dedb-b68131a5f0ec> | 2006-07-22 17:02:58 +0000 |
---|---|---|
committer | skotlex <skotlex@54d463be-8e91-2dee-dedb-b68131a5f0ec> | 2006-07-22 17:02:58 +0000 |
commit | 92e30d8695d44d0b899a0bdb15fcb2eab26e7c49 (patch) | |
tree | 421927909153ddf5ce812a154cdfed43afe981e3 /src/map/skill.c | |
parent | 21df4bacda4a4624afbf955d44763bf1e180a89e (diff) | |
download | hercules-92e30d8695d44d0b899a0bdb15fcb2eab26e7c49.tar.gz hercules-92e30d8695d44d0b899a0bdb15fcb2eab26e7c49.tar.bz2 hercules-92e30d8695d44d0b899a0bdb15fcb2eab26e7c49.tar.xz hercules-92e30d8695d44d0b899a0bdb15fcb2eab26e7c49.zip |
- 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
Diffstat (limited to 'src/map/skill.c')
-rw-r--r-- | src/map/skill.c | 12 |
1 files changed, 6 insertions, 6 deletions
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;i<EQI_MAX;i++) { if (dstsd->equip_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) |