diff options
author | Haru <haru@dotalux.com> | 2018-07-28 04:57:54 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2018-07-28 04:57:54 +0200 |
commit | b30f62468a5e923bf5d9533adec064ada1716459 (patch) | |
tree | a3af80ed5dce5a951b0d2b99838c3b25c313ad7c /src | |
parent | 75c6eb16f8660eacd5d12e69237bea342c9c8352 (diff) | |
parent | 4113c65100f39250b2255c8b57e3607cf40e3fdc (diff) | |
download | hercules-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.c | 6 | ||||
-rw-r--r-- | src/map/clif.h | 1 |
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]; |