diff options
author | Haru <haru@dotalux.com> | 2013-11-19 03:05:01 +0100 |
---|---|---|
committer | Haru <haru@dotalux.com> | 2013-11-19 03:45:03 +0100 |
commit | 385e1e599f03703329e8b9114e8001ce19f15fa5 (patch) | |
tree | d49b1f505082d326d120dcab073fc3509cdca276 /src/map/status.c | |
parent | 12dce46d611d6ea7c772174ebbd555fa10fead99 (diff) | |
download | hercules-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/status.c')
-rw-r--r-- | src/map/status.c | 24 |
1 files changed, 12 insertions, 12 deletions
diff --git a/src/map/status.c b/src/map/status.c index d64986eca..f2ff115b7 100644 --- a/src/map/status.c +++ b/src/map/status.c @@ -8880,18 +8880,18 @@ int status_change_start(struct block_list* bl,enum sc_type type,int rate,int val case SC_ITEMSCRIPT: if( sd ) { switch( val1 ) { - //case 4121://Phree - //case 4047://Ghostring - case 4302://Gunka + //case ITEMID_PHREEONI_CARD: + //case ITEMID_GHOSTRING_CARD: + case ITEMID_TAO_GUNKA_CARD: clif->status_change(bl,SI_MVPCARD_TAOGUNKA,1,tick,0,0,0); break; - case 4132://Mistress + case ITEMID_MISTRESS_CARD: clif->status_change(bl,SI_MVPCARD_MISTRESS,1,tick,0,0,0); break; - case 4143://Orc Hero + case ITEMID_ORC_HERO_CARD: clif->status_change(bl,SI_MVPCARD_ORCHERO,1,tick,0,0,0); break; - case 4135://Orc Lord + case ITEMID_ORC_LOAD_CARD: clif->status_change(bl,SI_MVPCARD_ORCLORD,1,tick,0,0,0); break; } @@ -9736,18 +9736,18 @@ int status_change_end_(struct block_list* bl, enum sc_type type, int tid, const case SC_ITEMSCRIPT: if( sd ) { switch( sce->val1 ) { - //case 4121://Phree - //case 4047://Ghostring - case 4302://Gunka + //case ITEMID_PHREEONI_CARD: + //case ITEMID_GHOSTRING_CARD: + case ITEMID_TAO_GUNKA_CARD: clif->sc_end(&sd->bl, sd->bl.id, SELF, SI_MVPCARD_TAOGUNKA); break; - case 4132://Mistress + case ITEMID_MISTRESS_CARD: clif->sc_end(&sd->bl, sd->bl.id, SELF, SI_MVPCARD_MISTRESS); break; - case 4143://Orc Hero + case ITEMID_ORC_HERO_CARD: clif->sc_end(&sd->bl, sd->bl.id, SELF, SI_MVPCARD_ORCHERO); break; - case 4135://Orc Lord + case ITEMID_ORC_LOAD_CARD: clif->sc_end(&sd->bl, sd->bl.id, SELF, SI_MVPCARD_ORCLORD); break; } |