From ff6a7baa2a4ac1896980cadede3ed53dc091caee Mon Sep 17 00:00:00 2001 From: ultramage Date: Mon, 1 Sep 2008 08:06:46 +0000 Subject: Removed hardcoded equip position names from getequipname (bugreport:2156). Now it's the npc's responsibility to store and display the names. git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@13171 54d463be-8e91-2dee-dedb-b68131a5f0ec --- npc/merchants/refine.txt | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) (limited to 'npc/merchants/refine.txt') diff --git a/npc/merchants/refine.txt b/npc/merchants/refine.txt index 4fd5693c5..fd5bd24d6 100644 --- a/npc/merchants/refine.txt +++ b/npc/merchants/refine.txt @@ -362,9 +362,15 @@ function script refinemain { mes "I can refine all kinds of weapons, armor and equipment, so let me"; mes "know what you want me to refine."; next; + + setarray .@position$[1], "Head","Body","Left hand","Right hand","Robe","Shoes","Accessory 1","Accessory 2","Head 2","Head 3"; set .@menu$,""; - for( set .@i,1; .@i < 11; set .@i,.@i+1 ){ - set .@menu$,.@menu$+(getequipisequiped(.@i) ? getequipname(.@i) : "")+":"; + for( set .@i,1; .@i <= 10; set .@i,.@i+1 ) + { + if( getequipisequiped(.@i) ) + set .@menu$, .@menu$ + .@position$[.@i] + "-" + "[" + getequipname(.@i) + "]"; + + set .@menu$, .@menu$ + ":"; } set .@part,select(.@menu$); if(!getequipisequiped(.@part)) { -- cgit v1.2.3-60-g2f50