summaryrefslogtreecommitdiff
path: root/src/map/status.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/map/status.c')
-rw-r--r--src/map/status.c27
1 files changed, 27 insertions, 0 deletions
diff --git a/src/map/status.c b/src/map/status.c
index d88d163f0..e96b881dd 100644
--- a/src/map/status.c
+++ b/src/map/status.c
@@ -6525,6 +6525,7 @@ void status_set_viewdata(struct block_list *bl, int class_)
sd->vd.hair_color = cap_value(sd->status.hair_color,0,battle_config.max_hair_color);
sd->vd.cloth_color = cap_value(sd->status.clothes_color,0,battle_config.max_cloth_color);
sd->vd.robe = sd->status.robe;
+ sd->vd.body_style = sd->status.body;
sd->vd.sex = sd->status.sex;
if ( sd->vd.cloth_color ) {
@@ -6539,6 +6540,11 @@ void status_set_viewdata(struct block_list *bl, int class_)
if( sd->sc.option&OPTION_OKTOBERFEST /* TODO: config? */ )
sd->vd.cloth_color = 0;
}
+ if ( sd->vd.body_style && (
+ sd->sc.option&OPTION_WEDDING || sd->sc.option&OPTION_XMAS ||
+ sd->sc.option&OPTION_SUMMER || sd->sc.option&OPTION_HANBOK ||
+ sd->sc.option&OPTION_OKTOBERFEST))
+ sd->vd.body_style = 0;
} else if (vd)
memcpy(&sd->vd, vd, sizeof(struct view_data));
else
@@ -9464,6 +9470,7 @@ int status_change_start(struct block_list *src, struct block_list *bl, enum sc_t
clif->changelook(bl,LOOK_WEAPON,0);
clif->changelook(bl,LOOK_SHIELD,0);
clif->changelook(bl,LOOK_CLOTHES_COLOR,vd->cloth_color);
+ clif->changelook(bl,LOOK_BODY2,0);
break;
case SC_KAAHI:
val4 = INVALID_TIMER;
@@ -9869,6 +9876,17 @@ int status_change_start(struct block_list *src, struct block_list *bl, enum sc_t
calc_flag&=~SCB_DYE;
}
+#if 0 //Currently No SC's use this
+ if (calc_flag&SCB_BODY) {
+ //Reset Body Style
+ if (vd && vd->body_style) {
+ val4 = vd->body_style;
+ clif->changelook(bl,LOOK_BODY2,0);
+ }
+ calc_flag&=~SCB_BODY;
+ }
+#endif
+
if(!(flag&SCFLAG_NOICON) && !(flag&SCFLAG_LOADED && status->dbs->DisplayType[type]))
clif->status_change(bl,status->dbs->IconChangeTable[type],1,tick,(val_flag&1)?val1:1,(val_flag&2)?val2:0,(val_flag&4)?val3:0);
@@ -10752,6 +10770,14 @@ int status_change_end_(struct block_list* bl, enum sc_type type, int tid, const
calc_flag&=~SCB_DYE;
}
+#if 0 // Currently No SC's use this
+ if (calc_flag&SCB_BODY) { // Restore Body color
+ if (vd && !vd->body_style && sce->val4)
+ clif->changelook(bl,LOOK_BODY2,sce->val4);
+ calc_flag&=~SCB_BODY;
+ }
+#endif
+
//On Aegis, when turning off a status change, first goes the sc packet, then the option packet.
clif->sc_end(bl,bl->id,AREA,status->dbs->IconChangeTable[type]);
@@ -10765,6 +10791,7 @@ int status_change_end_(struct block_list* bl, enum sc_type type, int tid, const
clif->changelook(bl,LOOK_WEAPON,sd->vd.weapon);
clif->changelook(bl,LOOK_SHIELD,sd->vd.shield);
clif->changelook(bl,LOOK_CLOTHES_COLOR,cap_value(sd->status.clothes_color,0,battle_config.max_cloth_color));
+ clif->changelook(bl,LOOK_BODY2,cap_value(sd->status.body,0,battle_config.max_body_style));
}
}