Jump to content
  • 0

Skill Armor/Weapon Refine


M4karov

Question


  • Group:  Members
  • Topic Count:  30
  • Topics Per Day:  0.01
  • Content Count:  149
  • Reputation:   35
  • Joined:  04/01/13
  • Last Seen:  

Hello guys. I'm trying to modify the Weapon Refine ability to refine armor. I tried the following modification but it did not work.
Modification:

 

diff --git a/src/map/clif.c b/src/map/clif.c
index af7eb0e..2804043 100644
--- a/src/map/clif.c
+++ b/src/map/clif.c
@@ -6711,7 +6711,7 @@ void clif_item_refine_list(struct map_session_data *sd)
 
 	fd=sd->fd;
 
-	refine_item[0] = -1;
+	refine_item[0] = pc_search_inventory(sd,ITEMID_ELUNIUM);
 	refine_item[1] = pc_search_inventory(sd,ITEMID_PHRACON);
 	refine_item[2] = pc_search_inventory(sd,ITEMID_EMVERETARCON);
 	refine_item[3] = refine_item[4] = pc_search_inventory(sd,ITEMID_ORIDECON);
@@ -6722,7 +6722,7 @@ void clif_item_refine_list(struct map_session_data *sd)
 		unsigned char wlv;
 		if(sd->inventory.u.items_inventory[i].nameid > 0 && sd->inventory.u.items_inventory[i].refine < skill_lv &&
 			sd->inventory.u.items_inventory[i].identify && (wlv = itemdb_wlv(sd->inventory.u.items_inventory[i].nameid)) >=1 &&
-			refine_item[wlv] != -1 && !(sd->inventory.u.items_inventory[i].equip&EQP_ARMS)){
+			refine_item[wlv] != -1){
 			WFIFOW(fd,c*13+ 4)=i+2;
 			WFIFOW(fd,c*13+ 6) = sd->inventory.u.items_inventory[i].nameid;
 			WFIFOB(fd,c*13+ 8) = sd->inventory.u.items_inventory[i].refine;
diff --git a/src/map/itemdb.h b/src/map/itemdb.h
index a95236f..dd0e665 100644
--- a/src/map/itemdb.h
+++ b/src/map/itemdb.h
@@ -62,6 +62,7 @@ enum item_itemid
 	ITEMID_ORIDECON_STONE				= 756,
 	ITEMID_ALCOHOL						= 970,
 	ITEMID_ORIDECON						= 984,
+	ITEMID_ELUNIUM						= 985,
 	ITEMID_ANVIL						= 986,
 	ITEMID_ORIDECON_ANVIL				= 987,
 	ITEMID_GOLDEN_ANVIL					= 988,
diff --git a/src/map/skill.c b/src/map/skill.c
index fbc15d4..3ec44f5 100644
--- a/src/map/skill.c
+++ b/src/map/skill.c
@@ -16739,9 +16739,9 @@ void skill_weaponrefine(struct map_session_data *sd, int idx)
 		struct item_data *ditem = sd->inventory_data[idx];
 		item = &sd->inventory.u.items_inventory[idx];
 
-		if(item->nameid > 0 && ditem->type == IT_WEAPON) {
+		if(item->nameid > 0) {
 			int i = 0, per;
-			unsigned short material[5] = { 0, ITEMID_PHRACON, ITEMID_EMVERETARCON, ITEMID_ORIDECON, ITEMID_ORIDECON };
+			unsigned short material[5] = { ITEMID_ELUNIUM, 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;

 

Link to comment
Share on other sites

0 answers to this question

Recommended Posts

There have been no answers to this question yet

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Answer this question...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...