summaryrefslogtreecommitdiff
path: root/src/map/skill.c
diff options
context:
space:
mode:
authorai4rei <ai4rei@54d463be-8e91-2dee-dedb-b68131a5f0ec>2010-12-02 22:33:32 +0000
committerai4rei <ai4rei@54d463be-8e91-2dee-dedb-b68131a5f0ec>2010-12-02 22:33:32 +0000
commitb4bcbd1a2dca417a61f70eb9d1524fa92b2e0aa9 (patch)
tree64e357255f2460a8c93fb46e315e606416f84583 /src/map/skill.c
parente6b8222bdb14b6e1e8b3cd12733ae1bce97a23fb (diff)
downloadhercules-b4bcbd1a2dca417a61f70eb9d1524fa92b2e0aa9.tar.gz
hercules-b4bcbd1a2dca417a61f70eb9d1524fa92b2e0aa9.tar.bz2
hercules-b4bcbd1a2dca417a61f70eb9d1524fa92b2e0aa9.tar.xz
hercules-b4bcbd1a2dca417a61f70eb9d1524fa92b2e0aa9.zip
* Various code tweaks and updates related to item types.
- Replaced item type literals with their appropriate constants. - Added itemdb_typename to replace the ugly "BUG!" filled array in @iteminfo (since r1741, follow up to r14550). - Made the item database parser verify item type for validity. - Added item type constants to const.txt for use in scripts (getiteminfo). git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@14551 54d463be-8e91-2dee-dedb-b68131a5f0ec
Diffstat (limited to 'src/map/skill.c')
-rw-r--r--src/map/skill.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/map/skill.c b/src/map/skill.c
index a6b008d5d..e77703e1f 100644
--- a/src/map/skill.c
+++ b/src/map/skill.c
@@ -9306,7 +9306,7 @@ void skill_repairweapon (struct map_session_data *sd, int idx)
return;
}
- if (itemdb_type(item->nameid)==4)
+ if (itemdb_type(item->nameid)==IT_WEAPON)
material = materials [itemdb_wlv(item->nameid)-1]; // Lv1/2/3/4 weapons consume 1 Iron Ore/Iron/Steel/Rough Oridecon
else
material = materials [2]; // Armors consume 1 Steel
@@ -9357,7 +9357,7 @@ void skill_weaponrefine (struct map_session_data *sd, int idx)
struct item_data *ditem = sd->inventory_data[idx];
item = &sd->status.inventory[idx];
- if(item->nameid > 0 && ditem->type == 4)
+ if(item->nameid > 0 && ditem->type == IT_WEAPON)
{
if( item->refine >= sd->menuskill_val
|| item->refine >= MAX_REFINE // if it's no longer refineable