From e771472042e1d83fefe4581b51ecdf554d8276bc Mon Sep 17 00:00:00 2001 From: aleos89 Date: Thu, 14 Jul 2016 13:51:00 -0400 Subject: [PATCH] Constant cleanup * Adjusted some IDs to constant values. --- src/map/itemdb.h | 2 ++ src/map/skill.c | 7 +++---- 2 files changed, 5 insertions(+), 4 deletions(-) diff --git a/src/map/itemdb.h b/src/map/itemdb.h index 256c6e0392..418416f888 100644 --- a/src/map/itemdb.h +++ b/src/map/itemdb.h @@ -60,6 +60,7 @@ enum item_itemid ITEMID_YELLOW_GEMSTONE = 715, ITEMID_RED_GEMSTONE = 716, ITEMID_BLUE_GEMSTONE = 717, + ITEMID_ORIDECON_STONE = 756, ITEMID_ALCOHOL = 970, ITEMID_ORIDECON = 984, ITEMID_ANVIL = 986, @@ -77,6 +78,7 @@ enum item_itemid ITEMID_IRON = 998, ITEMID_STEEL = 999, ITEMID_STAR_CRUMB = 1000, + ITEMID_IRON_ORE = 1002, ITEMID_PHRACON = 1010, ITEMID_EMVERETARCON = 1011, ITEMID_TRAP = 1065, diff --git a/src/map/skill.c b/src/map/skill.c index 20c446dd2c..8b9c71e3f3 100755 --- a/src/map/skill.c +++ b/src/map/skill.c @@ -16453,8 +16453,7 @@ int skill_delayfix(struct block_list *bl, uint16 skill_id, uint16 skill_lv) * Weapon Repair [Celest/DracoRPG] *------------------------------------------*/ void skill_repairweapon(struct map_session_data *sd, int idx) { - int material; - int materials[4] = { 1002, 998, 999, 756 }; + unsigned short material, materials[4] = { ITEMID_IRON_ORE, ITEMID_IRON, ITEMID_STEEL, ITEMID_ORIDECON_STONE }; struct item *item; struct map_session_data *target_sd; @@ -16533,7 +16532,7 @@ void skill_weaponrefine(struct map_session_data *sd, int idx) if(item->nameid > 0 && ditem->type == IT_WEAPON) { int i = 0, per; - int material[5] = { 0, ITEMID_PHRACON, ITEMID_EMVERETARCON, ITEMID_ORIDECON, ITEMID_ORIDECON, }; + unsigned short material[5] = { 0, ITEMID_PHRACON, ITEMID_EMVERETARCON, ITEMID_ORIDECON, ITEMID_ORIDECON }; if( ditem->flag.no_refine ) { // if the item isn't refinable clif_skill_fail(sd,sd->menuskill_id,USESKILL_FAIL_LEVEL,0); return; @@ -18696,7 +18695,7 @@ bool skill_produce_mix(struct map_session_data *sd, uint16 skill_id, unsigned sh sc++; } if (slot[i] >= ITEMID_FLAME_HEART && slot[i] <= ITEMID_GREAT_NATURE && ele == 0) { - static const int ele_table[4] = { 3, 1, 4, 2 }; + static const int ele_table[4] = { ELE_FIRE, ELE_WATER, ELE_WIND, ELE_EARTH }; pc_delitem(sd,j,1,1,0,LOG_TYPE_PRODUCE); ele = ele_table[slot[i]-ITEMID_FLAME_HEART]; }