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 | |
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')
-rw-r--r-- | src/map/battle.c | 20 | ||||
-rw-r--r-- | src/map/itemdb.h | 337 | ||||
-rw-r--r-- | src/map/pc.c | 81 | ||||
-rw-r--r-- | src/map/skill.c | 192 | ||||
-rw-r--r-- | src/map/skill.h | 11 | ||||
-rw-r--r-- | src/map/status.c | 24 |
6 files changed, 448 insertions, 217 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 ); diff --git a/src/map/itemdb.h b/src/map/itemdb.h index 4ee6637c1..1030035ea 100644 --- a/src/map/itemdb.h +++ b/src/map/itemdb.h @@ -34,69 +34,286 @@ struct item_package; #define UNKNOWN_ITEM_ID 512 enum item_itemid { - ITEMID_HOLY_WATER = 523, - ITEMID_EMPERIUM = 714, - ITEMID_YELLOW_GEMSTONE = 715, - ITEMID_RED_GEMSTONE = 716, - ITEMID_BLUE_GEMSTONE = 717, - ITEMID_TRAP = 1065, - ITEMID_STRANGE_EMBRYO = 6415, - ITEMID_FACE_PAINT = 6120, - ITEMID_STONE = 7049, - ITEMID_SKULL_ = 7420, - ITEMID_TOKEN_OF_SIEGFRIED = 7621, - ITEMID_TRAP_ALLOY = 7940, - ITEMID_ANCILLA = 12333, - ITEMID_REINS_OF_MOUNT = 12622, - ITEMID_LOVE_ANGEL = 12287, - ITEMID_SQUIRREL = 12288, - ITEMID_GOGO = 12289, - ITEMID_PICTURE_DIARY = 12304, - ITEMID_MINI_HEART = 12305, - ITEMID_NEWCOMER = 12306, - ITEMID_KID = 12307, - ITEMID_MAGIC_CASTLE = 12308, - ITEMID_BULGING_HEAD = 12309, + ITEMID_RED_POTION = 501, + ITEMID_YELLOW_POTION = 503, + ITEMID_WHITE_POTION = 504, + ITEMID_BLUE_POTION = 505, + ITEMID_HOLY_WATER = 523, + ITEMID_RED_SLIM_POTION = 545, + ITEMID_YELLOW_SLIM_POTION = 546, + ITEMID_WHITE_SLIM_POTION = 547, + ITEMID_WING_OF_FLY = 601, + ITEMID_WING_OF_BUTTERFLY = 602, + ITEMID_BRANCH_OF_DEAD_TREE = 604, + ITEMID_ANODYNE = 605, + ITEMID_ALOEBERA = 606, + ITEMID_EMPTY_BOTTLE = 713, + ITEMID_EMPERIUM = 714, + ITEMID_YELLOW_GEMSTONE = 715, + ITEMID_RED_GEMSTONE = 716, + ITEMID_BLUE_GEMSTONE = 717, + ITEMID_ORIDECON_STONE = 756, + ITEMID_ALCHOL = 970, + ITEMID_ORIDECON = 984, + ITEMID_BOODY_RED = 990, + ITEMID_CRYSTAL_BLUE = 991, + ITEMID_WIND_OF_VERDURE = 992, + ITEMID_YELLOW_LIVE = 993, + ITEMID_FLAME_HEART = 994, + ITEMID_MISTIC_FROZEN = 995, + ITEMID_ROUGH_WIND = 996, + ITEMID_GREAT_NATURE = 997, + ITEMID_IRON = 998, + ITEMID_STEEL = 999, + ITEMID_STAR_CRUMB = 1000, + ITEMID_IRON_ORE = 1002, + ITEMID_PHRACON = 1010, + ITEMID_EMVERETARCON = 1011, + ITEMID_TRAP = 1065, + ITEMID_STRANGE_EMBRYO = 6415, + ITEMID_FACE_PAINT = 6120, + ITEMID_STONE = 7049, + ITEMID_FIRE_BOTTLE = 7135, + ITEMID_ACID_BOTTLE = 7136, + ITEMID_MENEATER_PLANT_BOTTLE = 7137, + ITEMID_MINI_BOTTLE = 7138, + ITEMID_COATING_BOTTLE = 7139, + ITEMID_FRAGMENT_OF_CRYSTAL = 7321, + ITEMID_SKULL_ = 7420, + ITEMID_TOKEN_OF_SIEGFRIED = 7621, + ITEMID_TRAP_ALLOY = 7940, + ITEMID_RED_POUCH_OF_SURPRISE = 12024, + ITEMID_BLOODY_DEAD_BRANCH = 12103, + ITEMID_PORING_BOX = 12109, + ITEMID_MERCENARY_RED_POTION = 12184, + ITEMID_MERCENARY_BLUE_POTION = 12185, + ITEMID_BATTLE_MANUAL = 12208, + ITEMID_BUBBLE_GUM = 12210, + ITEMID_GIANT_FLY_WING = 12212, + ITEMID_NEURALIZER = 12213, + ITEMID_M_CENTER_POTION = 12241, + ITEMID_M_AWAKENING_POTION = 12242, + ITEMID_M_BERSERK_POTION = 12243, + ITEMID_COMP_BATTLE_MANUAL = 12263, + ITEMID_COMP_BUBBLE_GUM = 12264, + ITEMID_LOVE_ANGEL = 12287, + ITEMID_SQUIRREL = 12288, + ITEMID_GOGO = 12289, + ITEMID_PICTURE_DIARY = 12304, + ITEMID_MINI_HEART = 12305, + ITEMID_NEWCOMER = 12306, + ITEMID_KID = 12307, + ITEMID_MAGIC_CASTLE = 12308, + ITEMID_BULGING_HEAD = 12309, + ITEMID_THICK_MANUAL50 = 12312, + ITEMID_ANCILLA = 12333, + ITEMID_BLACK_THING = 12435, + ITEMID_REINS_OF_MOUNT = 12622, + ITEMID_NOBLE_NAMEPLATE = 12705, + ITEMID_DUN_TELE_SCROLL1 = 14527, + ITEMID_BATTLE_MANUAL25 = 14532, + ITEMIDBATTLE_MANUAL100 = 14533, + ITEMID_BATTLE_MANUAL_X3 = 14545, + ITEMID_DUN_TELE_SCROLL2 = 14581, + ITEMID_WOB_RUNE = 14582, + ITEMID_WOB_SCHWALTZ = 14583, + ITEMID_WOB_RACHEL = 14584, + ITEMID_WOB_LOCAL = 14585, + ITEMID_SIEGE_TELEPORT_SCROLL = 14591, + ITEMID_JOB_MANUAL50 = 14592, +}; + +enum cards_item_list { + ITEMID_GHOSTRING_CARD = 4047, + ITEMID_PHREEONI_CARD = 4121, + ITEMID_MISTRESS_CARD = 4132, + ITEMID_ORC_LOAD_CARD = 4135, + ITEMID_ORC_HERO_CARD = 4143, + ITEMID_TAO_GUNKA_CARD = 4302, }; /** - * Rune Knight + * Mechanic **/ +enum mechanic_item_list { + ITEMID_ACCELERATOR = 2800, + ITEMID_HOVERING_BOOSTER, // 2801 + ITEMID_SUICIDAL_DEVICE, // 2802 + ITEMID_SHAPE_SHIFTER, // 2803 + ITEMID_COOLING_DEVICE, // 2804 + ITEMID_MAGNETIC_FIELD_GENERATOR, // 2805 + ITEMID_BARRIER_BUILDER, // 2806 + ITEMID_REPAIR_KIT, // 2807 + ITEMID_CAMOUFLAGE_GENERATOR, // 2808 + ITEMID_HIGH_QUALITY_COOLER, // 2809 + ITEMID_SPECIAL_COOLER, // 2810 + ITEMID_MONKEY_SPANNER = 6186, +}; -enum { - ITEMID_NAUTHIZ = 12725, - ITEMID_RAIDO, - ITEMID_BERKANA, - ITEMID_ISA, - ITEMID_OTHILA, - ITEMID_URUZ, - ITEMID_THURISAZ, - ITEMID_WYRD, - ITEMID_HAGALAZ, - ITEMID_LUX_ANIMA = 22540, -} rune_list; +/** + * Spell Books + */ +enum spell_book_item_list { + ITEMID_MAGIC_BOOK_FB = 6189, + ITEMID_MAGIC_BOOK_CB, // 6190 + ITEMID_MAGIC_BOOK_LB, // 6191 + ITEMID_MAGIC_BOOK_SG, // 6192 + ITEMID_MAGIC_BOOK_LOV, // 6193 + ITEMID_MAGIC_BOOK_MS, // 6194 + ITEMID_MAGIC_BOOK_CM, // 6195 + ITEMID_MAGIC_BOOK_TV, // 6196 + ITEMID_MAGIC_BOOK_TS, // 6197 + ITEMID_MAGIC_BOOK_JT, // 6198 + ITEMID_MAGIC_BOOK_WB, // 6199 + ITEMID_MAGIC_BOOK_HD, // 6200 + ITEMID_MAGIC_BOOK_ES, // 6201 + ITEMID_MAGIC_BOOK_ES_, // 6202 + ITEMID_MAGIC_BOOK_CL, // 6203 + ITEMID_MAGIC_BOOK_CR, // 6204 + ITEMID_MAGIC_BOOK_DL, // 6205 +}; /** - * Mechanic + * Mercenary Scrolls + */ +enum mercenary_scroll_item_list { + ITEMID_BOW_MERCENARY_SCROLL1 = 12153, + ITEMID_BOW_MERCENARY_SCROLL2, // 12154 + ITEMID_BOW_MERCENARY_SCROLL3, // 12155 + ITEMID_BOW_MERCENARY_SCROLL4, // 12156 + ITEMID_BOW_MERCENARY_SCROLL5, // 12157 + ITEMID_BOW_MERCENARY_SCROLL6, // 12158 + ITEMID_BOW_MERCENARY_SCROLL7, // 12159 + ITEMID_BOW_MERCENARY_SCROLL8, // 12160 + ITEMID_BOW_MERCENARY_SCROLL9, // 12161 + ITEMID_BOW_MERCENARY_SCROLL10, // 12162 + ITEMID_SWORDMERCENARY_SCROLL1, // 12163 + ITEMID_SWORDMERCENARY_SCROLL2, // 12164 + ITEMID_SWORDMERCENARY_SCROLL3, // 12165 + ITEMID_SWORDMERCENARY_SCROLL4, // 12166 + ITEMID_SWORDMERCENARY_SCROLL5, // 12167 + ITEMID_SWORDMERCENARY_SCROLL6, // 12168 + ITEMID_SWORDMERCENARY_SCROLL7, // 12169 + ITEMID_SWORDMERCENARY_SCROLL8, // 12170 + ITEMID_SWORDMERCENARY_SCROLL9, // 12171 + ITEMID_SWORDMERCENARY_SCROLL10, // 12172 + ITEMID_SPEARMERCENARY_SCROLL1, // 12173 + ITEMID_SPEARMERCENARY_SCROLL2, // 12174 + ITEMID_SPEARMERCENARY_SCROLL3, // 12175 + ITEMID_SPEARMERCENARY_SCROLL4, // 12176 + ITEMID_SPEARMERCENARY_SCROLL5, // 12177 + ITEMID_SPEARMERCENARY_SCROLL6, // 12178 + ITEMID_SPEARMERCENARY_SCROLL7, // 12179 + ITEMID_SPEARMERCENARY_SCROLL8, // 12180 + ITEMID_SPEARMERCENARY_SCROLL9, // 12181 + ITEMID_SPEARMERCENARY_SCROLL10, // 12182 +}; + +/** + * Cash Food + */ +enum cash_food_item_list { + ITEMID_STR_DISH10_ = 12202, + ITEMID_AGI_DISH10_, // 12203 + ITEMID_INT_DISH10_, // 12204 + ITEMID_DEX_DISH10_, // 12205 + ITEMID_LUK_DISH10_, // 12206 + ITEMID_VIT_DISH10_, // 12207 +}; + +/** + * GC Poison + */ +enum poison_item_list { + ITEMID_POISON_PARALYSIS = 12717, + ITEMID_POISON_LEECH, // 12718 + ITEMID_POISON_OBLIVION, // 12719 + ITEMID_POISON_CONTAMINATION, // 12720 + ITEMID_POISON_NUMB, // 12721 + ITEMID_POISON_FEVER, // 12722 + ITEMID_POISON_LAUGHING, // 12723 + ITEMID_POISON_FATIGUE, // 12724 +}; + + +/** + * Rune Knight **/ -enum { - ITEMID_ACCELERATOR = 2800, - ITEMID_HOVERING_BOOSTER, - ITEMID_SUICIDAL_DEVICE, - ITEMID_SHAPE_SHIFTER, - ITEMID_COOLING_DEVICE, - ITEMID_MAGNETIC_FIELD_GENERATOR, - ITEMID_BARRIER_BUILDER, - ITEMID_REPAIR_KIT, - ITEMID_CAMOUFLAGE_GENERATOR, - ITEMID_HIGH_QUALITY_COOLER, - ITEMID_SPECIAL_COOLER, - ITEMID_MONKEY_SPANNER = 6186, -} mecha_item_list; - -enum { +enum rune_item_list { + ITEMID_NAUTHIZ = 12725, + ITEMID_RAIDO, // 12726 + ITEMID_BERKANA, // 12727 + ITEMID_ISA, // 12728 + ITEMID_OTHILA, // 12729 + ITEMID_URUZ, // 12730 + ITEMID_THURISAZ, // 12731 + ITEMID_WYRD, // 12732 + ITEMID_HAGALAZ, // 12733 + ITEMID_LUX_ANIMA = 22540, +}; + +/** + * Geneticist + */ +enum geneticist_item_list { + /// Pharmacy / Cooking + ITEMID_SEED_OF_HORNY_PLANT = 6210, + ITEMID_BLOODSUCK_PLANT_SEED, // 6211 + ITEMID_BOMB_MUSHROOM_SPORE, // 6212 + ITEMID_HP_INCREASE_POTIONS = 12422, + ITEMID_HP_INCREASE_POTIONM, // 12423 + ITEMID_HP_INCREASE_POTIONL, // 12424 + ITEMID_SP_INCREASE_POTIONS, // 12425 + ITEMID_SP_INCREASE_POTIONM, // 12426 + ITEMID_SP_INCREASE_POTIONL, // 12427 + ITEMID_ENRICH_WHITE_POTIONZ, // 12428 + ITEMID_SAVAGE_BBQ, // 12429 + ITEMID_WUG_BLOOD_COCKTAIL, // 12430 + ITEMID_MINOR_BRISKET, // 12431 + ITEMID_SIROMA_ICETEA, // 12432 + ITEMID_DROCERA_HERB_STEW, // 12433 + ITEMID_PETTI_TAIL_NOODLE, // 12434 + ITEMID_VITATA500, // 12436 + ITEMID_ENRICH_CELERMINE_JUICE, // 12437 + ITEMID_CURE_FREE, // 12475 + /// Bombs + ITEMID_APPLE_BOMB = 13260, + ITEMID_COCONUT_BOMB, // 13261 + ITEMID_MELON_BOMB, // 13262 + ITEMID_PINEAPPLE_BOMB, // 13263 + ITEMID_BANANA_BOMB, // 13264 + ITEMID_BLACK_LUMP, // 13265 + ITEMID_BLACK_HARD_LUMP, // 13266 + ITEMID_VERY_HARD_LUMP, // 13267 + /// Throwables + ITEMID_MYSTERIOUS_POWDER, // 13268 + ITEMID_BOOST500_TO_THROW, // 13269 + ITEMID_FULL_SWINGK_TO_THROW, // 13270 + ITEMID_MANA_PLUS_TO_THROW, // 13271 + ITEMID_CURE_FREE_TO_THROW, // 13272 + ITEMID_STAMINA_UP_M_TO_THROW, // 13273 + ITEMID_DIGESTIVE_F_TO_THROW, // 13274 + ITEMID_HP_INC_POTS_TO_THROW, // 13275 + ITEMID_HP_INC_POTM_TO_THROW, // 13276 + ITEMID_HP_INC_POTL_TO_THROW, // 13277 + ITEMID_SP_INC_POTS_TO_THROW, // 13278 + ITEMID_SP_INC_POTM_TO_THROW, // 13279 + ITEMID_SP_INC_POTL_TO_THROW, // 13280 + ITEMID_EN_WHITE_POTZ_TO_THROW, // 13281 + ITEMID_VITATA500_TO_THROW, // 13282 + ITEMID_EN_CEL_JUICE_TO_THROW, // 13283 + ITEMID_SAVAGE_BBQ_TO_THROW, // 13284 + ITEMID_WUG_COCKTAIL_TO_THROW, // 13285 + ITEMID_M_BRISKET_TO_THROW, // 13286 + ITEMID_SIROMA_ICETEA_TO_THROW, // 13287 + ITEMID_DROCERA_STEW_TO_THROW, // 13288 + ITEMID_PETTI_NOODLE_TO_THROW, // 13289 + ITEMID_BLACK_THING_TO_THROW, // 13290 +}; + +enum item_nouse_list { NOUSE_SITTING = 0x01, -} item_nouse_list; +}; // enum e_chain_cache { @@ -257,13 +474,13 @@ struct item_package { #define itemdb_canrefine(n) (!itemdb->search(n)->flag.no_refine) #define itemdb_is_rune(n) (((n) >= ITEMID_NAUTHIZ && (n) <= ITEMID_HAGALAZ) || (n) == ITEMID_LUX_ANIMA) -#define itemdb_is_element(n) ((n) >= 990 && (n) <= 993) -#define itemdb_is_spellbook(n) ((n) >= 6188 && (n) <= 6205) -#define itemdb_is_poison(n) ((n) >= 12717 && (n) <= 12724) +#define itemdb_is_element(n) ((n) >= ITEMID_BOODY_RED && (n) <= ITEMID_YELLOW_LIVE) +#define itemdb_is_spellbook(n) ((n) >= ITEMID_MAGIC_BOOK_FB && (n) <= ITEMID_MAGIC_BOOK_DL) +#define itemdb_is_poison(n) ((n) >= ITEMID_POISON_PARALYSIS && (n) <= ITEMID_POISON_FATIGUE) #define itemid_isgemstone(n) ((n) >= ITEMID_YELLOW_GEMSTONE && (n) <= ITEMID_BLUE_GEMSTONE) -#define itemdb_iscashfood(n) ((n) >= 12202 && (n) <= 12207) -#define itemdb_is_GNbomb(n) ((n) >= 13260 && (n) <= 13267) -#define itemdb_is_GNthrowable(n) ((n) >= 13268 && (n) <= 13290) +#define itemdb_iscashfood(n) ((n) >= ITEMID_STR_DISH10_ && (n) <= ITEMID_VIT_DISH10_) +#define itemdb_is_GNbomb(n) ((n) >= ITEMID_APPLE_BOMB && (n) <= ITEMID_VERY_HARD_LUMP) +#define itemdb_is_GNthrowable(n) ((n) >= ITEMID_MYSTERIOUS_POWDER && (n) <= ITEMID_BLACK_THING_TO_THROW) //Item trade restrictions [Skotlex] #define itemdb_isdropable(item, gmlv) (itemdb->isrestricted((item), (gmlv), 0, itemdb->isdropable_sub)) diff --git a/src/map/pc.c b/src/map/pc.c index b930ffaad..a7cee80ee 100644 --- a/src/map/pc.c +++ b/src/map/pc.c @@ -4209,89 +4209,87 @@ int pc_isUseitem(struct map_session_data *sd,int n) return 0; // You cannot use this item while sitting. } - switch( nameid ) //@TODO, lot oh harcoded nameid here - { - case 605: // Anodyne + switch( nameid ) { // TODO: Is there no better way to handle this, other than hardcoding item IDs? + case ITEMID_ANODYNE: if( map_flag_gvg2(sd->bl.m) ) return 0; - case 606: + case ITEMID_ALOEBERA: if( pc_issit(sd) ) return 0; break; - case 601: // Fly Wing - case 12212: // Giant Fly Wing + case ITEMID_WING_OF_FLY: + case ITEMID_GIANT_FLY_WING: if( map->list[sd->bl.m].flag.noteleport || map_flag_gvg2(sd->bl.m) ) { clif->skill_mapinfomessage(sd,0); return 0; } - case 602: // ButterFly Wing - case 14527: // Dungeon Teleport Scroll - case 14581: // Dungeon Teleport Scroll - case 14582: // Yellow Butterfly Wing - case 14583: // Green Butterfly Wing - case 14584: // Red Butterfly Wing - case 14585: // Blue Butterfly Wing - case 14591: // Siege Teleport Scroll + case ITEMID_WING_OF_BUTTERFLY: + case ITEMID_DUN_TELE_SCROLL1: + case ITEMID_DUN_TELE_SCROLL2: + case ITEMID_WOB_RUNE: // Yellow Butterfly Wing + case ITEMID_WOB_SCHWALTZ: // Green Butterfly Wing + case ITEMID_WOB_RACHEL: // Red Butterfly Wing + case ITEMID_WOB_LOCAL: // Blue Butterfly Wing + case ITEMID_SIEGE_TELEPORT_SCROLL: if( sd->duel_group && !battle_config.duel_allow_teleport ) { clif->message(sd->fd, msg_txt(663)); return 0; } - if( nameid != 601 && nameid != 12212 && map->list[sd->bl.m].flag.noreturn ) + if( nameid != ITEMID_WING_OF_FLY && nameid != ITEMID_GIANT_FLY_WING && map->list[sd->bl.m].flag.noreturn ) return 0; break; - case 604: // Dead Branch - case 12024: // Red Pouch - case 12103: // Bloody Branch - case 12109: // Poring Box + case ITEMID_BRANCH_OF_DEAD_TREE: + case ITEMID_RED_POUCH_OF_SURPRISE: + case ITEMID_BLOODY_DEAD_BRANCH: + case ITEMID_PORING_BOX: if( map->list[sd->bl.m].flag.nobranch || map_flag_gvg2(sd->bl.m) ) return 0; break; - case 12210: // Bubble Gum - case 12264: // Comp Bubble Gum + case ITEMID_BUBBLE_GUM: + case ITEMID_COMP_BUBBLE_GUM: if( sd->sc.data[SC_CASH_RECEIVEITEM] ) return 0; break; - case 12208: // Battle Manual - case 12263: // Comp Battle Manual - case 12312: // Thick Battle Manual - case 12705: // Noble Nameplate - case 14532: // Battle_Manual25 - case 14533: // Battle_Manual100 - case 14545: // Battle_Manual300 + case ITEMID_BATTLE_MANUAL: + case ITEMID_COMP_BATTLE_MANUAL: + case ITEMID_THICK_MANUAL50: + case ITEMID_NOBLE_NAMEPLATE: + case ITEMID_BATTLE_MANUAL25: + case ITEMIDBATTLE_MANUAL100: + case ITEMID_BATTLE_MANUAL_X3: if( sd->sc.data[SC_CASH_PLUSEXP] ) return 0; break; - case 14592: // JOB_Battle_Manual + case ITEMID_JOB_MANUAL50: if( sd->sc.data[SC_CASH_PLUSONLYJOBEXP] ) return 0; break; // Mercenary Items - - case 12184: // Mercenary's Red Potion - case 12185: // Mercenary's Blue Potion - case 12241: // Mercenary's Concentration Potion - case 12242: // Mercenary's Awakening Potion - case 12243: // Mercenary's Berserk Potion + case ITEMID_MERCENARY_RED_POTION: + case ITEMID_MERCENARY_BLUE_POTION: + case ITEMID_M_CENTER_POTION: + case ITEMID_M_AWAKENING_POTION: + case ITEMID_M_BERSERK_POTION: if( sd->md == NULL || sd->md->db == NULL ) return 0; if (sd->md->sc.data[SC_BERSERK] || sd->md->sc.data[SC_SATURDAY_NIGHT_FEVER]) return 0; - if( nameid == 12242 && sd->md->db->lv < 40 ) + if( nameid == ITEMID_M_AWAKENING_POTION && sd->md->db->lv < 40 ) return 0; - if( nameid == 12243 && sd->md->db->lv < 80 ) + if( nameid == ITEMID_M_BERSERK_POTION && sd->md->db->lv < 80 ) return 0; break; - case 12213: //Neuralizer + case ITEMID_NEURALIZER: if( !map->list[sd->bl.m].flag.reset ) return 0; break; } - if( nameid >= 12153 && nameid <= 12182 && sd->md != NULL ) - return 0; // Mercenary Scrolls + if( nameid >= ITEMID_BOW_MERCENARY_SCROLL1 && nameid <= ITEMID_SPEARMERCENARY_SCROLL10 && sd->md != NULL ) // Mercenary Scrolls + return 0; /** * Only Rune Knights may use runes @@ -4356,8 +4354,7 @@ int pc_isUseitem(struct map_session_data *sd,int n) } //Dead Branch & Bloody Branch & Porings Box - // FIXME: outdated, use constants or database - if( nameid == 604 || nameid == 12103 || nameid == 12109 ) + if( nameid == ITEMID_BRANCH_OF_DEAD_TREE || nameid == ITEMID_BLOODY_DEAD_BRANCH || nameid == ITEMID_PORING_BOX ) logs->branch(sd); return 1; diff --git a/src/map/skill.c b/src/map/skill.c index c38363ef3..dcb29701f 100644 --- a/src/map/skill.c +++ b/src/map/skill.c @@ -1296,14 +1296,14 @@ int skill_additional_effect(struct block_list* src, struct block_list *bl, uint1 case GN_SLINGITEM_RANGEMELEEATK: if( sd ) { switch( sd->itemid ) { // Starting SCs here instead of do it in skill->additional_effect to simplify the code. - case 13261: + case ITEMID_COCONUT_BOMB: sc_start(bl, SC_STUN, 100, skill_lv, skill->get_time2(GN_SLINGITEM, skill_lv)); sc_start2(bl, SC_BLOODING, 100, skill_lv, src->id, skill->get_time2(GN_SLINGITEM, skill_lv)); break; - case 13262: + case ITEMID_MELON_BOMB: sc_start(bl, SC_MELON_BOMB, 100, skill_lv, skill->get_time(GN_SLINGITEM, skill_lv)); // Reduces ASPD and moviment speed break; - case 13264: + case ITEMID_BANANA_BOMB: sc_start(bl, SC_BANANA_BOMB, 100, skill_lv, skill->get_time(GN_SLINGITEM, skill_lv)); // Reduces LUK ??Needed confirm it, may be it's bugged in kRORE? sc_start(bl, SC_BANANA_BOMB_SITDOWN_POSTDELAY, 75, skill_lv, skill->get_time(GN_SLINGITEM_RANGEMELEEATK,skill_lv)); // Sitdown for 3 seconds. break; @@ -2188,7 +2188,7 @@ int skill_attack(int attack_type, struct block_list* src, struct block_list *dsr //Spirit of Wizard blocks Kaite's reflection if( type == 2 && sc && sc->data[SC_SOULLINK] && sc->data[SC_SOULLINK]->val2 == SL_WIZARD ) { //Consume one Fragment per hit of the casted skill? [Skotlex] - type = tsd?pc->search_inventory (tsd, 7321):0; + type = tsd?pc->search_inventory(tsd, ITEMID_FRAGMENT_OF_CRYSTAL):0; if (type >= 0) { if ( tsd ) pc->delitem(tsd, type, 1, 0, 1, LOG_TYPE_CONSUME); dmg.damage = dmg.damage2 = 0; @@ -6568,7 +6568,7 @@ int skill_castend_nodamage_id(struct block_list *src, struct block_list *bl, uin if (sd) { clif->skill_nodamage(src,bl,skill_id,skill_lv,1); //Prepare 200 White Potions. - if (!skill->produce_mix(sd, skill_id, 504, 0, 0, 0, 200)) + if (!skill->produce_mix(sd, skill_id, ITEMID_WHITE_POTION, 0, 0, 0, 200)) clif->skill_fail(sd,skill_id,USESKILL_FAIL_LEVEL,0); } break; @@ -6576,28 +6576,28 @@ int skill_castend_nodamage_id(struct block_list *src, struct block_list *bl, uin if (sd) { clif->skill_nodamage(src,bl,skill_id,skill_lv,1); //Prepare 200 Slim White Potions. - if (!skill->produce_mix(sd, skill_id, 547, 0, 0, 0, 200)) + if (!skill->produce_mix(sd, skill_id, ITEMID_WHITE_SLIM_POTION, 0, 0, 0, 200)) clif->skill_fail(sd,skill_id,USESKILL_FAIL_LEVEL,0); } break; case AM_TWILIGHT3: if (sd) { - int ebottle = pc->search_inventory(sd,713); + int ebottle = pc->search_inventory(sd,ITEMID_EMPTY_BOTTLE); if( ebottle >= 0 ) ebottle = sd->status.inventory[ebottle].amount; //check if you can produce all three, if not, then fail: - if (!skill->can_produce_mix(sd,970,-1, 100) //100 Alcohol - || !skill->can_produce_mix(sd,7136,-1, 50) //50 Acid Bottle - || !skill->can_produce_mix(sd,7135,-1, 50) //50 Flame Bottle + if (!skill->can_produce_mix(sd,ITEMID_ALCHOL,-1, 100) //100 Alcohol + || !skill->can_produce_mix(sd,ITEMID_ACID_BOTTLE,-1, 50) //50 Acid Bottle + || !skill->can_produce_mix(sd,ITEMID_FIRE_BOTTLE,-1, 50) //50 Flame Bottle || ebottle < 200 //200 empty bottle are required at total. ) { clif->skill_fail(sd,skill_id,USESKILL_FAIL_LEVEL,0); break; } clif->skill_nodamage(src,bl,skill_id,skill_lv,1); - skill->produce_mix(sd, skill_id, 970, 0, 0, 0, 100); - skill->produce_mix(sd, skill_id, 7136, 0, 0, 0, 50); - skill->produce_mix(sd, skill_id, 7135, 0, 0, 0, 50); + skill->produce_mix(sd, skill_id, ITEMID_ALCHOL, 0, 0, 0, 100); + skill->produce_mix(sd, skill_id, ITEMID_ACID_BOTTLE, 0, 0, 0, 50); + skill->produce_mix(sd, skill_id, ITEMID_FIRE_BOTTLE, 0, 0, 0, 50); } break; case SA_DISPELL: @@ -8995,7 +8995,7 @@ int skill_castend_nodamage_id(struct block_list *src, struct block_list *bl, uin sd->itemid = ammo_id; if( itemdb_is_GNbomb(ammo_id) ) { if(battle->check_target(src,bl,BCT_ENEMY) > 0) {// Only attack if the target is an enemy. - if( ammo_id == 13263 ) + if( ammo_id == ITEMID_PINEAPPLE_BOMB ) map->foreachincell(skill->area_sub,bl->m,bl->x,bl->y,BL_CHAR,src,GN_SLINGITEM_RANGEMELEEATK,skill_lv,tick,flag|BCT_ENEMY|1,skill->castend_damage_id); else skill->attack(BF_WEAPON,src,src,bl,GN_SLINGITEM_RANGEMELEEATK,skill_lv,tick,flag); @@ -14237,7 +14237,12 @@ void skill_brandishspear(struct block_list* src, struct block_list* bl, uint16 s *------------------------------------------*/ void skill_repairweapon (struct map_session_data *sd, int idx) { int material; - int materials[4] = { 1002, 998, 999, 756 }; + int materials[4] = { + ITEMID_IRON_ORE, + ITEMID_IRON, + ITEMID_STEEL, + ITEMID_ORIDECON_STONE, + }; struct item *item; struct map_session_data *target_sd; @@ -14261,9 +14266,9 @@ void skill_repairweapon (struct map_session_data *sd, int idx) { } if ( target_sd->inventory_data[idx]->type == IT_WEAPON ) - material = materials [ target_sd->inventory_data[idx]->wlv - 1 ]; // Lv1/2/3/4 weapons consume 1 Iron Ore/Iron/Steel/Rough Oridecon + material = materials[ target_sd->inventory_data[idx]->wlv - 1 ]; // Lv1/2/3/4 weapons consume 1 Iron Ore/Iron/Steel/Rough Oridecon else - material = materials [2]; // Armors consume 1 Steel + material = materials[2]; // Armors consume 1 Steel if ( pc->search_inventory(sd,material) < 0 ) { clif->skill_fail(sd,sd->menuskill_id,USESKILL_FAIL_LEVEL,0); return; @@ -14311,7 +14316,13 @@ void skill_weaponrefine (struct map_session_data *sd, int idx) if (idx >= 0 && idx < MAX_INVENTORY) { int i = 0, ep = 0, per; - int material[5] = { 0, 1010, 1011, 984, 984 }; + int material[5] = { + 0, + ITEMID_PHRACON, + ITEMID_EMVERETARCON, + ITEMID_ORIDECON, + ITEMID_ORIDECON, + }; struct item *item; struct item_data *ditem = sd->inventory_data[idx]; item = &sd->status.inventory[idx]; @@ -14326,8 +14337,8 @@ void skill_weaponrefine (struct map_session_data *sd, int idx) clif->upgrademessage(sd->fd, 2, item->nameid); return; } - if( (i = pc->search_inventory(sd, material [ditem->wlv])) < 0 ){ - clif->upgrademessage(sd->fd, 3, material [ditem->wlv]); + if( (i = pc->search_inventory(sd, material[ditem->wlv])) < 0 ){ + clif->upgrademessage(sd->fd, 3, material[ditem->wlv]); return; } @@ -16079,11 +16090,11 @@ int skill_produce_mix(struct map_session_data *sd, uint16 skill_id, int nameid, j = pc->search_inventory(sd,slot[i]); if(j < 0) continue; - if(slot[i]==1000){ /* Star Crumb */ + if( slot[i]==ITEMID_STAR_CRUMB ) { pc->delitem(sd,j,1,1,0,LOG_TYPE_PRODUCE); sc++; } - if(slot[i]>=994 && slot[i]<=997 && ele==0){ /* Flame Heart . . . Great Nature */ + if( slot[i] >= ITEMID_FLAME_HEART && slot[i] <= ITEMID_GREAT_NATURE && ele == 0 ) { static const int ele_table[4]={3,1,4,2}; pc->delitem(sd,j,1,1,0,LOG_TYPE_PRODUCE); ele=ele_table[slot[i]-994]; @@ -16150,13 +16161,13 @@ int skill_produce_mix(struct map_session_data *sd, uint16 skill_id, int nameid, i = pc->checkskill(sd,skill_id); make_per = sd->status.job_level*20 + st->dex*10 + st->luk*10; //Base chance switch(nameid){ - case 998: // Iron + case ITEMID_IRON: make_per += 4000+i*500; // Temper Iron bonus: +26/+32/+38/+44/+50 break; - case 999: // Steel + case ITEMID_STEEL: make_per += 3000+i*500; // Temper Steel bonus: +35/+40/+45/+50/+55 break; - case 1000: //Star Crumb + case ITEMID_STAR_CRUMB: make_per = 100000; // Star Crumbs are 100% success crafting rate? (made 1000% so it succeeds even after penalties) [Skotlex] break; default: // Enchanted Stones @@ -16187,32 +16198,32 @@ int skill_produce_mix(struct map_session_data *sd, uint16 skill_id, int nameid, make_per += skill2_lv*100; //+1% bonus per level } switch(nameid){ - case 501: // Red Potion - case 503: // Yellow Potion - case 504: // White Potion + case ITEMID_RED_POTION: + case ITEMID_YELLOW_POTION: + case ITEMID_WHITE_POTION: make_per += (1+rnd()%100)*10 + 2000; break; - case 970: // Alcohol + case ITEMID_ALCHOL: make_per += (1+rnd()%100)*10 + 1000; break; - case 7135: // Bottle Grenade - case 7136: // Acid Bottle - case 7137: // Plant Bottle - case 7138: // Marine Sphere Bottle + case ITEMID_FIRE_BOTTLE: + case ITEMID_ACID_BOTTLE: + case ITEMID_MENEATER_PLANT_BOTTLE: + case ITEMID_MINI_BOTTLE: make_per += (1+rnd()%100)*10; break; - case 546: // Condensed Yellow Potion + case ITEMID_YELLOW_SLIM_POTION: make_per -= (1+rnd()%50)*10; break; - case 547: // Condensed White Potion - case 7139: // Glistening Coat + case ITEMID_WHITE_SLIM_POTION: + case ITEMID_COATING_BOTTLE: make_per -= (1+rnd()%100)*10; break; //Common items, recieve no bonus or penalty, listed just because they are commonly produced - case 505: // Blue Potion - case 545: // Condensed Red Potion - case 605: // Anodyne - case 606: // Aloevera + case ITEMID_BLUE_POTION: + case ITEMID_RED_SLIM_POTION: + case ITEMID_ANODYNE: + case ITEMID_ALOEBERA: default: break; } @@ -16232,18 +16243,18 @@ int skill_produce_mix(struct map_session_data *sd, uint16 skill_id, int nameid, int C = 100 * cap_value(sd->itemid,0,100); //itemid depend on makerune() int D = 2500; switch (nameid) { //rune rank it_diff 9 craftable rune - case ITEMID_RAIDO: - case ITEMID_THURISAZ: - case ITEMID_HAGALAZ: - case ITEMID_OTHILA: + case ITEMID_RAIDO: + case ITEMID_THURISAZ: + case ITEMID_HAGALAZ: + case ITEMID_OTHILA: D -= 500; //Rank C - case ITEMID_ISA: - case ITEMID_WYRD: + case ITEMID_ISA: + case ITEMID_WYRD: D -= 500; //Rank B - case ITEMID_NAUTHIZ: - case ITEMID_URUZ: + case ITEMID_NAUTHIZ: + case ITEMID_URUZ: D -= 500; //Rank A - case ITEMID_BERKANA: + case ITEMID_BERKANA: case ITEMID_LUX_ANIMA: D -= 500; //Rank S } @@ -16279,22 +16290,28 @@ int skill_produce_mix(struct map_session_data *sd, uint16 skill_id, int nameid, (sd->status.base_level-100) + pc->checkskill(sd, AM_LEARNINGPOTION) + pc->checkskill(sd, CR_FULLPROTECTION)*(4+rnd()%6); // (Caster?s Base Level - 100) + (Potion Research x 5) + (Full Chemical Protection Skill Level) x (Random number between 4 ~ 10) switch(nameid){// difficulty factor - case 12422: case 12425: - case 12428: + case ITEMID_HP_INCREASE_POTIONS: + case ITEMID_SP_INCREASE_POTIONS: + case ITEMID_ENRICH_WHITE_POTIONZ: difficulty += 10; break; - case 6212: case 12426: + case ITEMID_BOMB_MUSHROOM_SPORE: + case ITEMID_SP_INCREASE_POTIONM: difficulty += 15; break; - case 13264: case 12423: - case 12427: case 12436: + case ITEMID_BANANA_BOMB: + case ITEMID_HP_INCREASE_POTIONM: + case ITEMID_SP_INCREASE_POTIONL: + case ITEMID_VITATA500: difficulty += 20; break; - case 6210: case 6211: - case 12437: + case ITEMID_SEED_OF_HORNY_PLANT: + case ITEMID_BLOODSUCK_PLANT_SEED: + case ITEMID_ENRICH_CELERMINE_JUICE: difficulty += 30; break; - case 12424: case 12475: + case ITEMID_HP_INCREASE_POTIONL: + case ITEMID_CURE_FREE: difficulty += 40; break; } @@ -16321,18 +16338,23 @@ int skill_produce_mix(struct map_session_data *sd, uint16 skill_id, int nameid, qty = ~(5 + rnd()%5) + 1; switch(nameid){// difficulty factor - case 13260: + case ITEMID_APPLE_BOMB: difficulty += 5; break; - case 13261: case 13262: + case ITEMID_COCONUT_BOMB: + case ITEMID_MELON_BOMB: difficulty += 10; break; - case 12429: case 12430: case 12431: - case 12432: case 12433: case 12434: - case 13263: + case ITEMID_SAVAGE_BBQ: + case ITEMID_WUG_BLOOD_COCKTAIL: + case ITEMID_MINOR_BRISKET: + case ITEMID_SIROMA_ICETEA: + case ITEMID_DROCERA_HERB_STEW: + case ITEMID_PETTI_TAIL_NOODLE: + case ITEMID_PINEAPPLE_BOMB: difficulty += 15; break; - case 13264: + case ITEMID_BANANA_BOMB: difficulty += 20; break; } @@ -16466,7 +16488,7 @@ int skill_produce_mix(struct map_session_data *sd, uint16 skill_id, int nameid, } if (rnd()%10000 < make_per || qty == 1) { //Success tmp_item.amount++; - if(nameid < 545 || nameid > 547) + if(nameid < ITEMID_RED_SLIM_POTION || nameid > ITEMID_WHITE_SLIM_POTION) continue; if( skill_id != AM_PHARMACY && skill_id != AM_TWILIGHT1 && @@ -16589,7 +16611,13 @@ int skill_produce_mix(struct map_session_data *sd, uint16 skill_id, int nameid, break; case GN_MIX_COOKING: { struct item tmp_item; - const int compensation[5] = {13265, 13266, 13267, 12435, 13268}; + const int compensation[5] = { + ITEMID_BLACK_LUMP, + ITEMID_BLACK_HARD_LUMP, + ITEMID_VERY_HARD_LUMP, + ITEMID_BLACK_THING, + ITEMID_MYSTERIOUS_POWDER, + }; int rate = rnd()%500; memset(&tmp_item,0,sizeof(tmp_item)); if( rate < 50) i = 4; @@ -16674,14 +16702,14 @@ int skill_poisoningweapon( struct map_session_data *sd, int nameid) { } switch( nameid ) { // t_lv used to take duration from skill->get_time2 - case PO_PARALYSE: type = SC_PARALYSE; break; - case PO_PYREXIA: type = SC_PYREXIA; break; - case PO_DEATHHURT: type = SC_DEATHHURT; break; - case PO_LEECHESEND: type = SC_LEECHESEND; break; - case PO_VENOMBLEED: type = SC_VENOMBLEED; break; - case PO_TOXIN: type = SC_TOXIN; break; - case PO_MAGICMUSHROOM: type = SC_MAGICMUSHROOM; break; - case PO_OBLIVIONCURSE: type = SC_OBLIVIONCURSE; break; + case ITEMID_POISON_PARALYSIS: type = SC_PARALYSE; break; + case ITEMID_POISON_FEVER: type = SC_PYREXIA; break; + case ITEMID_POISON_CONTAMINATION: type = SC_DEATHHURT; break; + case ITEMID_POISON_LEECH: type = SC_LEECHESEND; break; + case ITEMID_POISON_FATIGUE: type = SC_VENOMBLEED; break; + case ITEMID_POISON_NUMB: type = SC_TOXIN; break; + case ITEMID_POISON_LAUGHING: type = SC_MAGICMUSHROOM; break; + case ITEMID_POISON_OBLIVION: type = SC_OBLIVIONCURSE; break; default: clif->skill_fail(sd,GC_POISONINGWEAPON,USESKILL_FAIL_LEVEL,0); return 0; @@ -16737,7 +16765,7 @@ int skill_magicdecoy(struct map_session_data *sd, int nameid) { sd->sc.comet_x = sd->sc.comet_y = 0; sd->menuskill_val = 0; - class_ = (nameid == 990 || nameid == 991) ? 2043 + nameid - 990 : (nameid == 992) ? 2046 : 2045; + class_ = (nameid == ITEMID_BOODY_RED || nameid == ITEMID_CRYSTAL_BLUE) ? 2043 + nameid - ITEMID_BOODY_RED : (nameid == ITEMID_WIND_OF_VERDURE) ? 2046 : 2045; md = mob->once_spawn_sub(&sd->bl, sd->bl.m, x, y, sd->status.name, class_, "", SZ_MEDIUM, AI_NONE); @@ -16853,15 +16881,15 @@ int skill_elementalanalysis(struct map_session_data* sd, int n, uint16 skill_lv, switch( nameid ) { // Level 1 - case 994: product = 990; break; // Flame Heart -> Red Blood. - case 995: product = 991; break; // Mystic Frozen -> Crystal Blue. - case 996: product = 992; break; // Rough Wind -> Wind of Verdure. - case 997: product = 993; break; // Great Nature -> Green Live. + case ITEMID_FLAME_HEART: product = ITEMID_BOODY_RED; break; + case ITEMID_MISTIC_FROZEN: product = ITEMID_CRYSTAL_BLUE; break; + case ITEMID_ROUGH_WIND: product = ITEMID_WIND_OF_VERDURE; break; + case ITEMID_GREAT_NATURE: product = ITEMID_YELLOW_LIVE; break; // Level 2 - case 990: product = 994; break; // Red Blood -> Flame Heart. - case 991: product = 995; break; // Crystal Blue -> Mystic Frozen. - case 992: product = 996; break; // Wind of Verdure -> Rough Wind. - case 993: product = 997; break; // Green Live -> Great Nature. + case ITEMID_BOODY_RED: product = ITEMID_FLAME_HEART; break; + case ITEMID_CRYSTAL_BLUE: product = ITEMID_MISTIC_FROZEN; break; + case ITEMID_WIND_OF_VERDURE: product = ITEMID_ROUGH_WIND; break; + case ITEMID_YELLOW_LIVE: product = ITEMID_GREAT_NATURE; break; default: clif->skill_fail(sd,SO_EL_ANALYSIS,USESKILL_FAIL_LEVEL,0); return 1; diff --git a/src/map/skill.h b/src/map/skill.h index 918216e8a..1b6f1e24c 100644 --- a/src/map/skill.h +++ b/src/map/skill.h @@ -1613,17 +1613,6 @@ enum { UNT_MAX = 0x190 }; -enum gx_poison { - PO_PARALYSE = 12717, - PO_LEECHESEND, - PO_OBLIVIONCURSE, - PO_DEATHHURT, - PO_TOXIN, - PO_PYREXIA, - PO_MAGICMUSHROOM, - PO_VENOMBLEED -}; - /** * Structures **/ 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; } |