From 4ca91a13de5ea2d9c7636db9ac22434f2986bd02 Mon Sep 17 00:00:00 2001 From: "Guilherme G. Menaldo" Date: Sat, 19 Aug 2023 21:13:00 -0300 Subject: [PATCH] add alternative list of skills for Auto Spell this applies the list of skills from Pre-RE into RE, and is offered as an alternative for RE servers that doesn't support more than 7 skills at once. --- src/config/classes/general.h | 11 +++++++++++ src/map/skill.c | 18 +++++++++++++++++- 2 files changed, 28 insertions(+), 1 deletion(-) diff --git a/src/config/classes/general.h b/src/config/classes/general.h index 052980fb241..d318b5731af 100644 --- a/src/config/classes/general.h +++ b/src/config/classes/general.h @@ -64,6 +64,17 @@ **/ //#define DEVOTION_REFLECT_DAMAGE +/** + * When enabled, the list of usable skills in Auto Spell (Hindsight) for renewal servers follows + * the list from Pre-RE servers. + * + * This only applies for the "unlocked" skills. The used level and other effects still follows + * Renewal. + * + * You may want to enable this if you have a client that can't support the list with more than 7 skills. + */ +//#define CLASSIC_AUTOSPELL_LIST + /** * No settings past this point **/ diff --git a/src/map/skill.c b/src/map/skill.c index 8e7d2381946..2d268abbfc2 100644 --- a/src/map/skill.c +++ b/src/map/skill.c @@ -17921,6 +17921,22 @@ static int skill_autospell_list(const struct autospell_skill **list) { 8, MG_FIREBALL, { 0, 0, 0, 0, 0, 0, 0, 1, 2, 2 } }, { 10, MG_FROSTDIVER, { 0, 0, 0, 0, 0, 0, 0, 0, 0, 1 } }, }; +#elif defined(CLASSIC_AUTOSPELL_LIST) + /* Renewal structure/effect with pre-re skill list. + * This is a custom alternative for RENEWAL servers that doesn't support more than 7 skills + * but can't migrate to a newer client right now. + */ + + // MUST be sorted by autospell_level (first field) + static const struct autospell_skill skills_list[] = { + { 1, MG_NAPALMBEAT }, + { 2, MG_COLDBOLT }, + { 2, MG_FIREBOLT }, + { 2, MG_LIGHTNINGBOLT }, + { 5, MG_SOULSTRIKE }, + { 8, MG_FIREBALL }, + { 10, MG_FROSTDIVER }, + }; #else // MUST be sorted by autospell_level (first field) static const struct autospell_skill skills_list[] = { @@ -17939,7 +17955,7 @@ static int skill_autospell_list(const struct autospell_skill **list) #if PACKETVER_MAIN_NUM < 20181128 && PACKETVER_RE_NUM < 20181031 STATIC_ASSERT(ARRAYLENGTH(skills_list) <= 7, - "Older clients only supports AutoSpell list with up to 7 skills. Customize the list above or update your client."); + "Older clients only supports AutoSpell list with up to 7 skills. Customize the list above, update your client or consider using CLASSIC_AUTOSPELL_LIST."); #endif *list = skills_list;