summaryrefslogtreecommitdiff
path: root/src/map/clif.c
diff options
context:
space:
mode:
authorHaru <haru@dotalux.com>2018-07-25 03:25:54 +0200
committerGitHub <noreply@github.com>2018-07-25 03:25:54 +0200
commita57601ad534481e29e4d9746c0442a780e13ba7e (patch)
tree8dd7ceb9939d142eda50e7482370b221d76c8b46 /src/map/clif.c
parented988911d28ddfa64e1340389a818e94785f2cba (diff)
parentf1ce1f48d541b8b574d2fbc2bc03ea92e816d71e (diff)
downloadhercules-a57601ad534481e29e4d9746c0442a780e13ba7e.tar.gz
hercules-a57601ad534481e29e4d9746c0442a780e13ba7e.tar.bz2
hercules-a57601ad534481e29e4d9746c0442a780e13ba7e.tar.xz
hercules-a57601ad534481e29e4d9746c0442a780e13ba7e.zip
Merge pull request #2138 from Asheraf/stylistupdate
Add support for bodystyle in stylist shop ui
Diffstat (limited to 'src/map/clif.c')
-rw-r--r--src/map/clif.c12
1 files changed, 9 insertions, 3 deletions
diff --git a/src/map/clif.c b/src/map/clif.c
index f222240e4..82507a84a 100644
--- a/src/map/clif.c
+++ b/src/map/clif.c
@@ -21199,7 +21199,7 @@ static bool clif_stylist_read_db_libconfig_sub(struct config_setting_t *it, int
ShowWarning("clif_stylist_read_db_libconfig_sub: Invalid or missing Type (%d) in \"%s\", entry #%d, skipping.\n", type, source, idx);
return false;
}
- if (!itemdb->lookup_const(it, "Id", &i32) || i32 <= 0) {
+ if (!itemdb->lookup_const(it, "Id", &i32) || i32 < 0) {
ShowWarning("clif_stylist_read_db_libconfig_sub: Invalid or missing Id (%d) in \"%s\", entry #%d, skipping.\n", i32, source, idx);
return false;
}
@@ -21236,7 +21236,7 @@ static bool clif_style_change_validate_requirements(struct map_session_data *sd,
entry = &VECTOR_INDEX(stylist_data[type], idx);
- if (entry->id != 0) {
+ if (entry->id >= 0) {
if (entry->zeny != 0) {
if (sd->status.zeny < entry->zeny)
return false;
@@ -21294,7 +21294,13 @@ static void clif_parse_cz_req_style_change(int fd, struct map_session_data *sd)
clif->cz_req_style_change_sub(sd, LOOK_HEAD_MID, p->MidAccessory, true);
if (p->BottomAccessory > 0)
clif->cz_req_style_change_sub(sd, LOOK_HEAD_BOTTOM, p->BottomAccessory, true);
-
+#if PACKETVER_RE_NUM >= 20180718
+ if (p->BodyStyle > 0) {
+ if (pc->has_second_costume(sd)) {
+ clif->cz_req_style_change_sub(sd, LOOK_BODY2, p->BodyStyle, false);
+ }
+ }
+#endif
clif->style_change_response(sd, STYLIST_SHOP_SUCCESS);
return;
}