From 9c0dfd161b2d2192118e49895ff768fac0551a92 Mon Sep 17 00:00:00 2001 From: jasonch <31005928+jasonch35@users.noreply.github.com> Date: Wed, 15 May 2024 18:12:36 +0800 Subject: [PATCH 1/4] Fix warning when SECURE_NPCTIMEOUT enabled --- src/map/npc.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/map/npc.c b/src/map/npc.c index 59501209e..0ea39b855 100644 --- a/src/map/npc.c +++ b/src/map/npc.c @@ -313,7 +313,8 @@ static int npc_rr_secure_timeout_timer(int tid, int64 tick, int id, intptr_t dat case NPCT_MENU: timeout = NPC_SECURE_TIMEOUT_MENU; break; - //case NPCT_WAIT: var starts with this value + case NPCT_WAIT: //var starts with this value + break; } if( DIFF_TICK(tick,sd->npc_idle_tick) > (timeout*1000) ) { From 2ba21bac253ec95e8a936a580fd6193f2b77373d Mon Sep 17 00:00:00 2001 From: jasonch <31005928+jasonch35@users.noreply.github.com> Date: Wed, 15 May 2024 15:27:15 +0800 Subject: [PATCH 2/4] Reload status_type on @reloadskilldb Moved comment to function Removed unwanted lines --- src/map/atcommand.c | 1 + src/map/status.c | 39 +++++++++++++++++++++++---------------- src/map/status.h | 1 + 3 files changed, 25 insertions(+), 16 deletions(-) diff --git a/src/map/atcommand.c b/src/map/atcommand.c index 10528e797..e3fc633d8 100644 --- a/src/map/atcommand.c +++ b/src/map/atcommand.c @@ -3903,6 +3903,7 @@ ACMD(reloadmobdb) ACMD(reloadskilldb) { skill->reload(); + status->load_sc_type(); homun->reload_skill(); elemental->reload_skilldb(); mercenary->read_skilldb(); diff --git a/src/map/status.c b/src/map/status.c index 1a9e79e97..7da479e1b 100644 --- a/src/map/status.c +++ b/src/map/status.c @@ -134,22 +134,8 @@ static void initChangeTables(void) memset(status->dbs->ChangeFlagTable, 0, sizeof(status->dbs->ChangeFlagTable)); memset(status->dbs->DisplayType, 0, sizeof(status->dbs->DisplayType)); - // Storing the target job rather than simply SC_SOULLINK simplifies code later on. - skill->dbs->db[skill->get_index(SL_ALCHEMIST)].status_type = (sc_type)MAPID_ALCHEMIST; - skill->dbs->db[skill->get_index(SL_MONK)].status_type = (sc_type)MAPID_MONK; - skill->dbs->db[skill->get_index(SL_STAR)].status_type = (sc_type)MAPID_STAR_GLADIATOR; - skill->dbs->db[skill->get_index(SL_SAGE)].status_type = (sc_type)MAPID_SAGE; - skill->dbs->db[skill->get_index(SL_CRUSADER)].status_type = (sc_type)MAPID_CRUSADER; - skill->dbs->db[skill->get_index(SL_SUPERNOVICE)].status_type = (sc_type)MAPID_SUPER_NOVICE; - skill->dbs->db[skill->get_index(SL_KNIGHT)].status_type = (sc_type)MAPID_KNIGHT; - skill->dbs->db[skill->get_index(SL_WIZARD)].status_type = (sc_type)MAPID_WIZARD; - skill->dbs->db[skill->get_index(SL_PRIEST)].status_type = (sc_type)MAPID_PRIEST; - skill->dbs->db[skill->get_index(SL_BARDDANCER)].status_type = (sc_type)MAPID_BARDDANCER; - skill->dbs->db[skill->get_index(SL_ROGUE)].status_type = (sc_type)MAPID_ROGUE; - skill->dbs->db[skill->get_index(SL_ASSASIN)].status_type = (sc_type)MAPID_ASSASSIN; - skill->dbs->db[skill->get_index(SL_BLACKSMITH)].status_type = (sc_type)MAPID_BLACKSMITH; - skill->dbs->db[skill->get_index(SL_HUNTER)].status_type = (sc_type)MAPID_HUNTER; - skill->dbs->db[skill->get_index(SL_SOULLINKER)].status_type = (sc_type)MAPID_SOUL_LINKER; + status->load_sc_type(); + #undef set_sc_with_vfx } @@ -13985,6 +13971,26 @@ static void status_check_job_bonus(int idx, const char *name, int class) } } +static void status_load_sc_type(void) +{ + // Storing the target job rather than simply SC_SOULLINK simplifies code later on. + skill->dbs->db[skill->get_index(SL_ALCHEMIST)].status_type = (sc_type)MAPID_ALCHEMIST; + skill->dbs->db[skill->get_index(SL_MONK)].status_type = (sc_type)MAPID_MONK; + skill->dbs->db[skill->get_index(SL_STAR)].status_type = (sc_type)MAPID_STAR_GLADIATOR; + skill->dbs->db[skill->get_index(SL_SAGE)].status_type = (sc_type)MAPID_SAGE; + skill->dbs->db[skill->get_index(SL_CRUSADER)].status_type = (sc_type)MAPID_CRUSADER; + skill->dbs->db[skill->get_index(SL_SUPERNOVICE)].status_type = (sc_type)MAPID_SUPER_NOVICE; + skill->dbs->db[skill->get_index(SL_KNIGHT)].status_type = (sc_type)MAPID_KNIGHT; + skill->dbs->db[skill->get_index(SL_WIZARD)].status_type = (sc_type)MAPID_WIZARD; + skill->dbs->db[skill->get_index(SL_PRIEST)].status_type = (sc_type)MAPID_PRIEST; + skill->dbs->db[skill->get_index(SL_BARDDANCER)].status_type = (sc_type)MAPID_BARDDANCER; + skill->dbs->db[skill->get_index(SL_ROGUE)].status_type = (sc_type)MAPID_ROGUE; + skill->dbs->db[skill->get_index(SL_ASSASIN)].status_type = (sc_type)MAPID_ASSASSIN; + skill->dbs->db[skill->get_index(SL_BLACKSMITH)].status_type = (sc_type)MAPID_BLACKSMITH; + skill->dbs->db[skill->get_index(SL_HUNTER)].status_type = (sc_type)MAPID_HUNTER; + skill->dbs->db[skill->get_index(SL_SOULLINKER)].status_type = (sc_type)MAPID_SOUL_LINKER; +} + static bool status_readdb_job2(char *fields[], int columns, int current) { int idx, class, i; @@ -14750,6 +14756,7 @@ void status_defaults(void) status->change_start_unknown_sc = status_change_start_unknown_sc; status->display_remove = status_display_remove; status->natural_heal = status_natural_heal; + status->load_sc_type = status_load_sc_type; status->natural_heal_timer = status_natural_heal_timer; status->readdb_job2 = status_readdb_job2; status->readdb_sizefix = status_readdb_sizefix; diff --git a/src/map/status.h b/src/map/status.h index fb78c543a..a426a71d7 100644 --- a/src/map/status.h +++ b/src/map/status.h @@ -1512,6 +1512,7 @@ struct status_interface { void (*display_remove) (struct map_session_data *sd, enum sc_type type); int (*natural_heal) (struct block_list *bl, va_list args); int (*natural_heal_timer) (int tid, int64 tick, int id, intptr_t data); + void (*load_sc_type) (void); bool (*readdb_job2) (char *fields[], int columns, int current); bool (*readdb_sizefix) (char *fields[], int columns, int current); bool (*read_scdb_libconfig) (void); From 9c716848301cedc68cfc0ffc595246cd067daaa8 Mon Sep 17 00:00:00 2001 From: hwsapibot Date: Fri, 24 May 2024 12:18:02 +0000 Subject: [PATCH 3/4] Update HPM hooks Signed-off-by: hwsapibot --- src/plugins/HPMHooking/HPMHooking.Defs.inc | 2 ++ .../HPMHooking_map.HPMHooksCore.inc | 4 +++ .../HPMHooking_map.HookingPoints.inc | 1 + .../HPMHooking/HPMHooking_map.Hooks.inc | 26 +++++++++++++++++++ 4 files changed, 33 insertions(+) diff --git a/src/plugins/HPMHooking/HPMHooking.Defs.inc b/src/plugins/HPMHooking/HPMHooking.Defs.inc index fabba2380..9f05793b4 100644 --- a/src/plugins/HPMHooking/HPMHooking.Defs.inc +++ b/src/plugins/HPMHooking/HPMHooking.Defs.inc @@ -9296,6 +9296,8 @@ typedef int (*HPMHOOK_pre_status_natural_heal) (struct block_list **bl, va_list typedef int (*HPMHOOK_post_status_natural_heal) (int retVal___, struct block_list *bl, va_list args); typedef int (*HPMHOOK_pre_status_natural_heal_timer) (int *tid, int64 *tick, int *id, intptr_t *data); typedef int (*HPMHOOK_post_status_natural_heal_timer) (int retVal___, int tid, int64 tick, int id, intptr_t data); +typedef void (*HPMHOOK_pre_status_load_sc_type) (void); +typedef void (*HPMHOOK_post_status_load_sc_type) (void); typedef bool (*HPMHOOK_pre_status_readdb_job2) (char **fields[], int *columns, int *current); typedef bool (*HPMHOOK_post_status_readdb_job2) (bool retVal___, char *fields[], int columns, int current); typedef bool (*HPMHOOK_pre_status_readdb_sizefix) (char **fields[], int *columns, int *current); diff --git a/src/plugins/HPMHooking/HPMHooking_map.HPMHooksCore.inc b/src/plugins/HPMHooking/HPMHooking_map.HPMHooksCore.inc index 9acc5bc79..eaba4419a 100644 --- a/src/plugins/HPMHooking/HPMHooking_map.HPMHooksCore.inc +++ b/src/plugins/HPMHooking/HPMHooking_map.HPMHooksCore.inc @@ -7212,6 +7212,8 @@ struct { struct HPMHookPoint *HP_status_natural_heal_post; struct HPMHookPoint *HP_status_natural_heal_timer_pre; struct HPMHookPoint *HP_status_natural_heal_timer_post; + struct HPMHookPoint *HP_status_load_sc_type_pre; + struct HPMHookPoint *HP_status_load_sc_type_post; struct HPMHookPoint *HP_status_readdb_job2_pre; struct HPMHookPoint *HP_status_readdb_job2_post; struct HPMHookPoint *HP_status_readdb_sizefix_pre; @@ -14787,6 +14789,8 @@ struct { int HP_status_natural_heal_post; int HP_status_natural_heal_timer_pre; int HP_status_natural_heal_timer_post; + int HP_status_load_sc_type_pre; + int HP_status_load_sc_type_post; int HP_status_readdb_job2_pre; int HP_status_readdb_job2_post; int HP_status_readdb_sizefix_pre; diff --git a/src/plugins/HPMHooking/HPMHooking_map.HookingPoints.inc b/src/plugins/HPMHooking/HPMHooking_map.HookingPoints.inc index a33b78111..b6b47879c 100644 --- a/src/plugins/HPMHooking/HPMHooking_map.HookingPoints.inc +++ b/src/plugins/HPMHooking/HPMHooking_map.HookingPoints.inc @@ -3685,6 +3685,7 @@ struct HookingPointData HookingPoints[] = { { HP_POP(status->display_remove, HP_status_display_remove) }, { HP_POP(status->natural_heal, HP_status_natural_heal) }, { HP_POP(status->natural_heal_timer, HP_status_natural_heal_timer) }, + { HP_POP(status->load_sc_type, HP_status_load_sc_type) }, { HP_POP(status->readdb_job2, HP_status_readdb_job2) }, { HP_POP(status->readdb_sizefix, HP_status_readdb_sizefix) }, { HP_POP(status->read_scdb_libconfig, HP_status_read_scdb_libconfig) }, diff --git a/src/plugins/HPMHooking/HPMHooking_map.Hooks.inc b/src/plugins/HPMHooking/HPMHooking_map.Hooks.inc index 6357501e4..9861cbe91 100644 --- a/src/plugins/HPMHooking/HPMHooking_map.Hooks.inc +++ b/src/plugins/HPMHooking/HPMHooking_map.Hooks.inc @@ -96405,6 +96405,32 @@ int HP_status_natural_heal_timer(int tid, int64 tick, int id, intptr_t data) { } return retVal___; } +void HP_status_load_sc_type(void) { + int hIndex = 0; + if (HPMHooks.count.HP_status_load_sc_type_pre > 0) { + void (*preHookFunc) (void); + *HPMforce_return = false; + for (hIndex = 0; hIndex < HPMHooks.count.HP_status_load_sc_type_pre; hIndex++) { + preHookFunc = HPMHooks.list.HP_status_load_sc_type_pre[hIndex].func; + preHookFunc(); + } + if (*HPMforce_return) { + *HPMforce_return = false; + return; + } + } + { + HPMHooks.source.status.load_sc_type(); + } + if (HPMHooks.count.HP_status_load_sc_type_post > 0) { + void (*postHookFunc) (void); + for (hIndex = 0; hIndex < HPMHooks.count.HP_status_load_sc_type_post; hIndex++) { + postHookFunc = HPMHooks.list.HP_status_load_sc_type_post[hIndex].func; + postHookFunc(); + } + } + return; +} bool HP_status_readdb_job2(char *fields[], int columns, int current) { int hIndex = 0; bool retVal___ = false; From 7312ec2a768a8457b48593890b63fa59bb0c4b70 Mon Sep 17 00:00:00 2001 From: Haru Date: Sat, 25 May 2024 17:01:26 +0200 Subject: [PATCH 4/4] Release v2024.05 Signed-off-by: Haru --- AUTHORS | 1 + CHANGELOG.md | 13 +++++++++++++ doc/constants_pre-re.md | 2 +- doc/constants_re.md | 2 +- src/config/core.h | 2 +- 5 files changed, 17 insertions(+), 3 deletions(-) diff --git a/AUTHORS b/AUTHORS index 863ae8379..6091cd9f5 100644 --- a/AUTHORS +++ b/AUTHORS @@ -71,6 +71,7 @@ jaBote jaBote jaBote Jackson +jasonch <31005928+jasonch35@users.noreply.github.com> Jedzkie Jenkijo Jesusaves diff --git a/CHANGELOG.md b/CHANGELOG.md index b9cf603f1..c64bd75b6 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -22,6 +22,19 @@ If you are reading this in a text editor, simply ignore this section ### Removed --> +## [v2024.05] `May 2024` + +### Changed + +- Implemented official ATK % calculation for `BS_OVERTHRUST` in pre-renewal. Party members only receive 5% ATK bonus. (#3293) + +### Fixed + +- Fixed a missing initialization of the (m)atk/(m)def modifiers, resulting into 0 or 1 damage. (#3293, related to #3290) +- Fixed an incorrect call of `clif->updatestatus()` to non-player objects in relation to atk/def percent bonuses. (#3294, related to #3290) +- Fixed a failure on SCs from skills that don't have a `StatusChange` entry in their skill db entries after a `@reloadskilldb`, such as the spirit skills. (#3296, issue #3295) +- Fixed a compiler warning due to a missing case label when `SECURE_NPCTIMEOUT` is enabled. (#3297, issue #3197) + ## [v2024.04] `April 2024` ### Added diff --git a/doc/constants_pre-re.md b/doc/constants_pre-re.md index 175f3d333..0c6e9e092 100644 --- a/doc/constants_pre-re.md +++ b/doc/constants_pre-re.md @@ -4878,7 +4878,7 @@ ### Server defines - `PACKETVER`: 20190530 -- `HERCULES_VERSION`: 202404000 +- `HERCULES_VERSION`: 202405000 - `MAX_LEVEL`: 175 - `MAX_STORAGE`: 600 - `MAX_GUILD_STORAGE`: 500 diff --git a/doc/constants_re.md b/doc/constants_re.md index 1df151f05..90b732950 100644 --- a/doc/constants_re.md +++ b/doc/constants_re.md @@ -4878,7 +4878,7 @@ ### Server defines - `PACKETVER`: 20190530 -- `HERCULES_VERSION`: 202404000 +- `HERCULES_VERSION`: 202405000 - `MAX_LEVEL`: 175 - `MAX_STORAGE`: 600 - `MAX_GUILD_STORAGE`: 500 diff --git a/src/config/core.h b/src/config/core.h index 30e62a20f..844549af1 100644 --- a/src/config/core.h +++ b/src/config/core.h @@ -22,7 +22,7 @@ #define CONFIG_CORE_H /// Hercules version. From tag vYYYY.MM(+PPP) -> YYYYMMPPP -#define HERCULES_VERSION 202404000 +#define HERCULES_VERSION 202405000 /// Max number of items on @autolootid list #define AUTOLOOTITEM_SIZE 10