summaryrefslogtreecommitdiff
path: root/src/map/skill.c
diff options
context:
space:
mode:
authorshennetsind <shennetsind@54d463be-8e91-2dee-dedb-b68131a5f0ec>2012-07-26 01:42:10 +0000
committershennetsind <shennetsind@54d463be-8e91-2dee-dedb-b68131a5f0ec>2012-07-26 01:42:10 +0000
commit0f59bb06f026537c6527b7b9e18528f15e49be3b (patch)
tree857f132a3432cb97ae791449e3b4251fb9d90cf5 /src/map/skill.c
parentc270812e8cf450eb53c03bd018e943cf04abbf11 (diff)
downloadhercules-0f59bb06f026537c6527b7b9e18528f15e49be3b.tar.gz
hercules-0f59bb06f026537c6527b7b9e18528f15e49be3b.tar.bz2
hercules-0f59bb06f026537c6527b7b9e18528f15e49be3b.tar.xz
hercules-0f59bb06f026537c6527b7b9e18528f15e49be3b.zip
Added the merges proposed in evilpuncker's list of suggestions: http://rathena.org/board/topic/63001-my-rathena-suggestions/page__st__20#entry124218
git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@16500 54d463be-8e91-2dee-dedb-b68131a5f0ec
Diffstat (limited to 'src/map/skill.c')
-rw-r--r--src/map/skill.c10
1 files changed, 5 insertions, 5 deletions
diff --git a/src/map/skill.c b/src/map/skill.c
index d601bd8b8..8eab672c7 100644
--- a/src/map/skill.c
+++ b/src/map/skill.c
@@ -13442,16 +13442,16 @@ void skill_repairweapon (struct map_session_data *sd, int idx)
if(idx < 0 || idx >= MAX_INVENTORY)
return; //Invalid index??
- item = &target_sd->status.inventory[idx];
+ item = &target_sd->status.inventory[idx];
if(item->nameid <= 0 || item->attribute == 0)
return; //Again invalid item....
if(sd!=target_sd && !battle_check_range(&sd->bl,&target_sd->bl,skill_get_range2(&sd->bl, sd->menuskill_id,pc_checkskill(sd, sd->menuskill_id)))){
- clif_item_repaireffect(sd,item->nameid,1);
+ clif_item_repaireffect(sd,idx,1);
return;
}
- if (itemdb_type(item->nameid)==IT_WEAPON)
+ if ( sd->inventory_data[idx]->type == 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
@@ -13463,9 +13463,9 @@ void skill_repairweapon (struct map_session_data *sd, int idx)
item->attribute=0;
clif_equiplist(target_sd);
pc_delitem(sd,pc_search_inventory(sd,material),1,0,0,LOG_TYPE_CONSUME);
- clif_item_repaireffect(sd,item->nameid,0);
+ clif_item_repaireffect(sd,idx,0);
if(sd!=target_sd)
- clif_item_repaireffect(target_sd,item->nameid,0);
+ clif_item_repaireffect(target_sd,idx,0);
}
/*==========================================