From aea2b9fa2dab244ac74668c2f832d0383737ac91 Mon Sep 17 00:00:00 2001 From: Asheraf Date: Fri, 27 Jul 2018 02:35:05 +0100 Subject: Add support for doram restriction in stylist shop --- src/map/clif.c | 6 ++++++ src/map/clif.h | 1 + 2 files changed, 7 insertions(+) (limited to 'src/map') diff --git a/src/map/clif.c b/src/map/clif.c index 82507a84a..6805fa778 100644 --- a/src/map/clif.c +++ b/src/map/clif.c @@ -21220,6 +21220,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; @@ -21236,6 +21239,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 0077566b5..8d967e6fd 100644 --- a/src/map/clif.h +++ b/src/map/clif.h @@ -645,6 +645,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]; -- cgit v1.2.3-60-g2f50