From 1a87f90aa9a9c8f40dec41517b6f2d749c73378e Mon Sep 17 00:00:00 2001 From: Atemo Date: Mon, 18 Apr 2016 16:48:54 +0200 Subject: [PATCH] Structure change of F_getpositionname --- npc/other/Global_Functions.txt | 30 +++++++++++++++++++++++++----- 1 file changed, 25 insertions(+), 5 deletions(-) diff --git a/npc/other/Global_Functions.txt b/npc/other/Global_Functions.txt index e36b7898aa..e386a4b550 100644 --- a/npc/other/Global_Functions.txt +++ b/npc/other/Global_Functions.txt @@ -614,9 +614,29 @@ function script F_CanChangeJob { // Return the position name of the EQI_* equipment slot. ////////////////////////////////////////////////////////////////////////////////// function script F_getpositionname { - setarray .@position$[0], - "Accessory 1", "Accessory 2", "Shoes", "Robe", "Head 3", "Head 2", "Head", "Body", "Left hand", "Right hand", - "Upper Costume Headgear", "Middle Costume Headgear", "Lower Costume Headgear", "Costume Garment", "Arrow/Ammunition", - "Shadow Armor", "Shadow Weapon", "Shadow Shield", "Shadow Shoes", "Shadow Accessory 2", "Shadow Accessory 1"; - return .@position$[ getarg(0) ]; + switch( getarg(0,999) ) { + case EQI_ACC_L: return "Accessory 1"; + case EQI_ACC_R: return "Accessory 2"; + case EQI_SHOES: return "Shoes"; + case EQI_GARMENT: return "Robe"; + case EQI_HEAD_LOW: return "Head 3"; + case EQI_HEAD_MID: return "Head 2"; + case EQI_HEAD_TOP: return "Head"; + case EQI_ARMOR: return "Body"; + case EQI_HAND_L: return "Left hand"; + case EQI_HAND_R: return "Right hand"; + case EQI_COSTUME_HEAD_TOP: return "Upper Costume Headgear"; + case EQI_COSTUME_HEAD_MID: return "Middle Costume Headgear"; + case EQI_COSTUME_HEAD_LOW: return "Lower Costume Headgear"; + case EQI_COSTUME_GARMENT: return "Costume Garment"; + case EQI_AMMO: return "Arrow/Ammunition"; + case EQI_SHADOW_ARMOR: return "Shadow Armor"; + case EQI_SHADOW_WEAPON: return "Shadow Weapon"; + case EQI_SHADOW_SHIELD: return "Shadow Shield"; + case EQI_SHADOW_SHOES: return "Shadow Shoes"; + case EQI_SHADOW_ACC_R: return "Shadow Accessory 2"; + case EQI_SHADOW_ACC_L: return "Shadow Accessory 1"; + default: + return "Unknown"; + } }