From 9aded8a259e39b49698cb50111e8e5306f77dd52 Mon Sep 17 00:00:00 2001 From: shennetsind Date: Wed, 27 Mar 2013 16:17:48 -0300 Subject: Introducing Costume Garment Slot 8192 Special Thanks to jTynne for bringing the slot's support absence to my attention. Also updated getlook script command to support Robe/Garment (val 12 Look_Robe) Signed-off-by: shennetsind --- src/map/pc.c | 23 +++++++++++++++++------ 1 file changed, 17 insertions(+), 6 deletions(-) (limited to 'src/map/pc.c') diff --git a/src/map/pc.c b/src/map/pc.c index 1d8da86e2..6f8ba91fb 100644 --- a/src/map/pc.c +++ b/src/map/pc.c @@ -66,7 +66,7 @@ struct fame_list smith_fame_list[MAX_FAME_LIST]; struct fame_list chemist_fame_list[MAX_FAME_LIST]; struct fame_list taekwon_fame_list[MAX_FAME_LIST]; -static unsigned short equip_pos[EQI_MAX]={EQP_ACC_L,EQP_ACC_R,EQP_SHOES,EQP_GARMENT,EQP_HEAD_LOW,EQP_HEAD_MID,EQP_HEAD_TOP,EQP_ARMOR,EQP_HAND_L,EQP_HAND_R,EQP_COSTUME_HEAD_TOP,EQP_COSTUME_HEAD_MID,EQP_COSTUME_HEAD_LOW,EQP_AMMO}; +static unsigned short equip_pos[EQI_MAX]={EQP_ACC_L,EQP_ACC_R,EQP_SHOES,EQP_GARMENT,EQP_HEAD_LOW,EQP_HEAD_MID,EQP_HEAD_TOP,EQP_ARMOR,EQP_HAND_L,EQP_HAND_R,EQP_COSTUME_HEAD_TOP,EQP_COSTUME_HEAD_MID,EQP_COSTUME_HEAD_LOW,EQP_COSTUME_GARMENT,EQP_AMMO}; #define MOTD_LINE_SIZE 128 static char motd_text[MOTD_LINE_SIZE][CHAT_SIZE_MAX]; // Message of the day buffer [Valaris] @@ -7511,7 +7511,7 @@ int pc_equiplookall(struct map_session_data *sd) clif_changelook(&sd->bl,LOOK_HEAD_BOTTOM,sd->status.head_bottom); clif_changelook(&sd->bl,LOOK_HEAD_TOP,sd->status.head_top); clif_changelook(&sd->bl,LOOK_HEAD_MID,sd->status.head_mid); - clif_changelook(&sd->bl, LOOK_ROBE, sd->status.robe); + clif_changelook(&sd->bl,LOOK_ROBE, sd->status.robe); return 0; } @@ -8554,14 +8554,20 @@ int pc_equipitem(struct map_session_data *sd,int n,int req_pos) sd->status.head_bottom = 0; clif_changelook(&sd->bl,LOOK_HEAD_BOTTOM,sd->status.head_bottom); } + if(pos & EQP_SHOES) clif_changelook(&sd->bl,LOOK_SHOES,0); - if( pos&EQP_GARMENT ) - { + if( pos&EQP_GARMENT ) { sd->status.robe = id ? id->look : 0; clif_changelook(&sd->bl, LOOK_ROBE, sd->status.robe); } + if(pos & EQP_COSTUME_GARMENT) { + sd->status.robe = id ? id->look : 0; + clif_changelook(&sd->bl,LOOK_ROBE,sd->status.robe); + } + + pc_checkallowskill(sd); //Check if status changes should be halted. iflag = sd->npc_item_flag; @@ -8696,12 +8702,17 @@ int pc_unequipitem(struct map_session_data *sd,int n,int flag) { if(sd->status.inventory[n].equip & EQP_SHOES) clif_changelook(&sd->bl,LOOK_SHOES,0); - if( sd->status.inventory[n].equip&EQP_GARMENT ) - { + + if( sd->status.inventory[n].equip&EQP_GARMENT && pc_checkequip(sd,EQP_COSTUME_GARMENT) == -1 ) { sd->status.robe = 0; clif_changelook(&sd->bl, LOOK_ROBE, 0); } + if(sd->status.inventory[n].equip & EQP_COSTUME_GARMENT) { + sd->status.robe = ( pc_checkequip(sd,EQP_GARMENT) >= 0 ) ? sd->inventory_data[pc_checkequip(sd,EQP_GARMENT)]->look : 0; + clif_changelook(&sd->bl,LOOK_ROBE,sd->status.robe); + } + clif_unequipitemack(sd,n,sd->status.inventory[n].equip,1); if((sd->status.inventory[n].equip & EQP_ARMS) && -- cgit v1.2.3-70-g09d2