summaryrefslogtreecommitdiff
path: root/src/map/pc.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/map/pc.c')
-rw-r--r--src/map/pc.c7
1 files changed, 5 insertions, 2 deletions
diff --git a/src/map/pc.c b/src/map/pc.c
index 13d1914c8..118104b9d 100644
--- a/src/map/pc.c
+++ b/src/map/pc.c
@@ -3464,9 +3464,11 @@ int pc_item_repair(struct map_session_data *sd,int idx)
{
int flag=1, material;
int materials[5] = { 0, 1002, 998, 999, 756 };
+ struct item *item;
nullpo_retr(0, sd);
- struct item *item = &sd->status.inventory[idx];
+
+ item = &sd->status.inventory[idx];
if(idx >= 0 && idx < MAX_INVENTORY) {
if(item->nameid > 0 && item->attribute == 1 ) {
@@ -3501,9 +3503,10 @@ int pc_item_refine(struct map_session_data *sd,int idx)
{
int flag = 1, i = 0, count = 0, ep = 0, per, refine;
int material[5] = { 0, 1010, 1011, 984, 984 };
+ struct item *item;
nullpo_retr(0, sd);
- struct item *item = &sd->status.inventory[idx];
+ item = &sd->status.inventory[idx];
if(idx >= 0 && idx < MAX_INVENTORY) {
if(item->nameid > 0 && itemdb_type(item->nameid)==4) {