diff options
author | shennetsind <ind@henn.et> | 2013-03-27 16:17:48 -0300 |
---|---|---|
committer | shennetsind <ind@henn.et> | 2013-03-27 16:17:48 -0300 |
commit | 9aded8a259e39b49698cb50111e8e5306f77dd52 (patch) | |
tree | cdc35f64b44f55e9da4211bf8540dc6300017726 /src/map/pc.c | |
parent | 9b5ec24b69d4ae517f07ffa7a9b2730adbe998d4 (diff) | |
download | hercules-9aded8a259e39b49698cb50111e8e5306f77dd52.tar.gz hercules-9aded8a259e39b49698cb50111e8e5306f77dd52.tar.bz2 hercules-9aded8a259e39b49698cb50111e8e5306f77dd52.tar.xz hercules-9aded8a259e39b49698cb50111e8e5306f77dd52.zip |
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 <ind@henn.et>
Diffstat (limited to 'src/map/pc.c')
-rw-r--r-- | src/map/pc.c | 23 |
1 files changed, 17 insertions, 6 deletions
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) && |