summaryrefslogtreecommitdiff
path: root/src/map/battle.c
diff options
context:
space:
mode:
authorHaru <haru@dotalux.com>2013-11-19 03:05:01 +0100
committerHaru <haru@dotalux.com>2013-11-19 03:45:03 +0100
commit385e1e599f03703329e8b9114e8001ce19f15fa5 (patch)
treed49b1f505082d326d120dcab073fc3509cdca276 /src/map/battle.c
parent12dce46d611d6ea7c772174ebbd555fa10fead99 (diff)
downloadhercules-385e1e599f03703329e8b9114e8001ce19f15fa5.tar.gz
hercules-385e1e599f03703329e8b9114e8001ce19f15fa5.tar.bz2
hercules-385e1e599f03703329e8b9114e8001ce19f15fa5.tar.xz
hercules-385e1e599f03703329e8b9114e8001ce19f15fa5.zip
Replaced hardcoded Item IDs with constants
- This makes it harder to get the item IDs wrong in the code. - Fixes item 'Slot_Coupon' being incorrectly considered a Spell Book due to an oversight (wrong item nameid) when the check was introduced. Signed-off-by: Haru <haru@dotalux.com>
Diffstat (limited to 'src/map/battle.c')
-rw-r--r--src/map/battle.c20
1 files changed, 10 insertions, 10 deletions
diff --git a/src/map/battle.c b/src/map/battle.c
index 78f54733c..812301cd6 100644
--- a/src/map/battle.c
+++ b/src/map/battle.c
@@ -2414,21 +2414,21 @@ int battle_calc_skillratio(int attack_type, struct block_list *src, struct block
case GN_SLINGITEM_RANGEMELEEATK:
if( sd ) {
switch( sd->itemid ) {
- case 13260: // Apple Bomob
- case 13261: // Coconut Bomb
- case 13262: // Melon Bomb
- case 13263: // Pinapple Bomb
- skillratio += 400; // Unconfirded
+ case ITEMID_APPLE_BOMB:
+ case ITEMID_COCONUT_BOMB:
+ case ITEMID_MELON_BOMB:
+ case ITEMID_PINEAPPLE_BOMB:
+ skillratio += 400; // Unconfirmed
break;
- case 13264: // Banana Bomb 2000%
+ case ITEMID_BANANA_BOMB: // 2000%
skillratio += 1900;
break;
- case 13265: skillratio -= 75; break; // Black Lump 25%
- case 13266: skillratio -= 25; break; // Hard Black Lump 75%
- case 13267: skillratio += 100; break; // Extremely Hard Black Lump 200%
+ case ITEMID_BLACK_LUMP: skillratio -= 75; break; // 25%
+ case ITEMID_BLACK_HARD_LUMP: skillratio -= 25; break; // 75%
+ case ITEMID_VERY_HARD_LUMP: skillratio += 100; break; // 200%
}
} else
- skillratio += 300; // Bombs
+ skillratio += 300; // Bombs
break;
case SO_VARETYR_SPEAR://ATK [{( Striking Level x 50 ) + ( Varetyr Spear Skill Level x 50 )} x Caster Base Level / 100 ] %
skillratio += -100 + 50 * skill_lv + ( sd ? pc->checkskill(sd, SO_STRIKING) * 50 : 0 );