summaryrefslogtreecommitdiff
path: root/src
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
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')
-rw-r--r--src/map/clif.c6
-rw-r--r--src/map/clif.h1
2 files changed, 7 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)
diff --git a/src/map/clif.h b/src/map/clif.h
index 4467eb690..3ed9b96ae 100644
--- a/src/map/clif.h
+++ b/src/map/clif.h
@@ -646,6 +646,7 @@ struct stylist_data_entry {
int32 zeny;
int itemid;
int boxid;
+ bool allow_doram;
};
VECTOR_DECL(struct stylist_data_entry) stylist_data[MAX_STYLIST_TYPE];