summaryrefslogtreecommitdiff
path: root/src/map/clif.c
diff options
context:
space:
mode:
authorHaru <haru@dotalux.com>2018-07-28 04:57:54 +0200
committerGitHub <noreply@github.com>2018-07-28 04:57:54 +0200
commitb30f62468a5e923bf5d9533adec064ada1716459 (patch)
treea3af80ed5dce5a951b0d2b99838c3b25c313ad7c /src/map/clif.c
parent75c6eb16f8660eacd5d12e69237bea342c9c8352 (diff)
parent4113c65100f39250b2255c8b57e3607cf40e3fdc (diff)
downloadhercules-b30f62468a5e923bf5d9533adec064ada1716459.tar.gz
hercules-b30f62468a5e923bf5d9533adec064ada1716459.tar.bz2
hercules-b30f62468a5e923bf5d9533adec064ada1716459.tar.xz
hercules-b30f62468a5e923bf5d9533adec064ada1716459.zip
Merge pull request #2155 from Asheraf/stydoram
Add support for doram restriction in stylist shop
Diffstat (limited to 'src/map/clif.c')
-rw-r--r--src/map/clif.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/src/map/clif.c b/src/map/clif.c
index 50d6e00a7..cfbc3d252 100644
--- a/src/map/clif.c
+++ b/src/map/clif.c
@@ -21467,6 +21467,9 @@ static bool clif_stylist_read_db_libconfig_sub(struct config_setting_t *it, int
if (itemdb->lookup_const(it, "BoxItemID", &i32))
entry.boxid = i32;
+ if (libconfig->setting_lookup_bool(it, "AllowDoram", &i32))
+ entry.allow_doram = (i32 == 0) ? false : true;
+
VECTOR_ENSURE(stylist_data[type], 1, 1);
VECTOR_PUSH(stylist_data[type], entry);
return true;
@@ -21483,6 +21486,9 @@ static bool clif_style_change_validate_requirements(struct map_session_data *sd,
entry = &VECTOR_INDEX(stylist_data[type], idx);
+ if (sd->status.class == JOB_SUMMONER && (entry->allow_doram == false))
+ return false;
+
if (entry->id >= 0) {
if (entry->zeny != 0) {
if (sd->status.zeny < entry->zeny)