Skip to content

Releases: HerculesWS/Hercules

v2023.04.12

14 Apr 00:11
21b7f9e
Compare
Choose a tag to compare

Note: everything included in this release is part of PR #3198 which consists of 301 commits. To avoid extreme redundancy the PR link will not be repeated for each line of the changelog.

Added

  • Added a brand new fourth server (api-server) to support HTTP-based client features as well as, potentially, third party tools
    • The api-server listens by default on port 7121.
    • The server is a separate process and can be started in the same way as login, char and map servers.
    • Configuration can be found in conf/api/ and supports the same import mechanism as the other servers.
    • HPM plugins are supported in the same way as login, char and map servers and sample plugins are included.
    • The api-server can be customized (i.e. through HPM plugins) to provide an easily accessible HTTP API for use by third party tools that want to communicate with the Hercules server.
    • The server offers some built-in basic protection (limiting connections by IP, limiting request and headers size, trusted IPs, etc.), but as with any externally exposed service, caution is recommended, and a system administrator should decide whether it is necessary to use additional forms of filtering (such as a judiciously configured reverse proxy or web application firewall) for public deployments.
    • The connection interfaces are as follows:
      • client - api-server (aclif)
      • login-server (lapiif) - api-server (aloginif)
      • char-server (capiif) - api-server
      • map-server (mapiif) - api-server
    • The http parser library can be switched at compile time to llhttp (--with-http_parser=llhttp) and defaults to http-parser (--with-http_parser=http-parser)
    • Visual Studio solutions have been updated (as a best-effort approach, those files are unmaintainable and are looking to be replaced by a generator such as CMake in order to avoid repetition and desynchronization). Xcode project has not been updated at the current time.
    • Some parameters can be edited at compile time to alter various behaviors. See src/api/aclif.h, src/api/httpsender.h, src/api/mimepart.h, common/apipackets.h for a list of macros that can be redefined (undocumented and may have unexpected side-effects, edit after familiarizing with the code that uses them).
  • Added support for user configuration in clients that support the HTTP API at the /userconfig/load and /userconfig/save endpoints
    • emotes are persisted by the char server into the emotes table (SQL migration is included), default emotes can be edited in conf/emotes.conf
    • hotkeys (v1) are currently not supported
    • hotkeys (v2) are persisted by the char server into the hotkeys table (SQL migration is included)
  • Added support for character settings in clients that support the HTTP API at the /charconfig/load endpoint
  • Added support for guild emblems in clients that support the HTTP API at the /emblem/upload and /emblem/download endpoints
    • Supports BMP (static) and GIF (static or animated) emblems
    • The emblem_data field in the guild table has been changed to a mediumblob (SQL migration is included)
    • Validation parameters can be changed in conf/common/emblems.conf
  • Added support for party/adventurer agency functions in clients that support the HTTP API at the /party/list, /party/get, /party/add, /party/del endpoints
    • Search is currently not supported
    • Adventurer agency data is persisted by the char server into the adventurer_agency table (SQL migration is included)
    • A new module (int_adventurer_agency) has been added to the char server
  • Added the following third party libraries, used by the api-server:
    • http-handler from the node-js http-parser (3rdparty/http-parser)
    • multipart-parser (3rdparty/multipart-parser)
    • cJSON (3rdparty/cJSON)
    • llhttp (3rdparty/llhttp)
    • GIFLIB (3rdparty/libgif)
  • Extended the SQL interface with the SQL->QueryStrFetch() method, to execute a query and fetch a row.
  • Added support for sending/receiving chunked packets (for sending and receiving packets that would exceed the maximum packet size)
    • See related macros in src/common/chunked/rfifo.h and src/common/chunked/wfifo.h
    • Tests are included, in src/test/test_chunked.c
    • Chunked packets are usable for both server-server and client-server communication
  • Added extraconf interface (currently supporting conf/common/emblems.conf) for configuration files used by multiple servers

Changed

  • The create_session() function is now part of the socket interface and adds support for configurable connection and termination handlers.
  • The delete_session() function is now part of the socket interface.
  • Updated token generation in the login server to support communication with the API server.
  • Updated gitignore with temporary files from python and ccache.
  • Updated handling of packet CZ_REQ_GUILD_EMBLEM_IMG (now PACKET_CZ_REQ_GUILD_EMBLEM_IMG1) to use the struct format and added the PACKET_CZ_REQ_GUILD_EMBLEM_IMG2 and CZ_REQ_GUILD_EMBLEM_IMG3 variants.
  • Updated handling of packets ZC_CHANGE_GUILD, ZC_GUILD_EMBLEM_IMG, CHARMAP_GUILD_EMBLEM, CHARMAP_GUILD_INFO, CHARMAP_GUILD_INFO_EMPTY, MAPCHAR_GUILD_EMBLEM to use the struct format.
  • Updated packets ZC_CHANGE_GUILD, ZC_GUILD_EMBLEM_IMG.
  • Renamed clif->guild_emblem_area() into clif->guild_emblem_id_area().
  • Renamed DEFAULT_AUTOSAVE_INTERVAL to DEFAULT_CHAR_AUTOSAVE_INTERVAL and DEFAULT_MAP_AUTOSAVE_INTERVAL to avoid conflicting definitions of the same macro.
  • Extended the console.console_msg_log (conf/global/console.conf) setting to work on all servers instead of just the map server.
    • Log filenames will be named accordingly: log/login-msg_log.log, log/char-msg_log.log, log/map-msg_log.log, log/api-msg_log.log.
  • Changed emblem_data in struct guild to be a pointer instead of a fixed size array (this may require updates to any custom code copying or allocating/deallocating the struct).
  • Switched to python3 for all the debian/ubuntu jobs in Gitlab-CI
  • Enabled memory leak on exit checks to the address sanitizer configuration for CI builds

Fixed

  • Fixed a compilation error with ccache.
  • Fixed packetvers in clif_friendslist_send().

v2023.03.08

10 Mar 03:27
b50a0de
Compare
Choose a tag to compare

Added

  • Added documentation for include overrides in configuration files (#3191)
  • Implemented the DynamicNPC Create request packets and the related script command dynamicnpcresult(). An example can be found in npc/other/dynamicnpc_create.txt. (#3192)
  • Implemented support for the GoldPC UI (a.k.a. Mileage), disabled by default, which can be enabled from conf/map/battle/feature.conf for packetver 20140611 and newer. (#3192)
    • The initial implementation includes two modes (single and double), configurable in db/goldpc_db.conf, and selectable in feature.conf.
    • An example NPC can be found in doc/sample/goldpc.txt, demonstrating the use of the GoldPC system script commands (setgoldpcmode()).
    • A custom GoldNPC NPC is spawned by players upon clicking the GoldPC button, see npc/other/goldpc.txt.
    • Further documentation of the system is available in doc/goldpc.md.

Changed

  • Added paths for include overrides to .gitignore so that they won't show up as untracked in git status or risk getting committed by accident. Those that wish to commit them to their fork are still free to do so by issuing a git add command. (#3191)

Fixed

  • Fixed the RA_WUGBITE immobile status (#2813)
  • Fixed the SC_FEINTBOMB cloak status not working (#2813)
  • Fixed an UnknownStatusChange error triggered by SC__BLOODYLUST (#2813)

v2023.01.11

14 Jan 01:32
491048a
Compare
Choose a tag to compare

Added

  • Added a skeleton function for generating an auth token. This doesn't add actual token generation capabilities at this time, but allows plugins to hook into it to implement custom behavior. (#3183)
  • Added the missing effects of Fire Expansion level 3 and 4 (#2920)

Changed

  • Changed validateinterfaces.py to run on python3. (#3185)
  • Changed the CI builds to use python3 instead of python2, as it's getting removed by linux distributions including debian unstable. (part of #3185)
  • Changed the show_monster_hp_bar option to show the HP bar on WoE guardians when it's enabled for Emperium (flag '2', disabled by default) instead of when it's enabled for MvPs/bosses (flag '4', also disabled by default.) (#2931, related to #2008, #2912)

Fixed

  • Fixed a missing package php-dom in CI builds. (part of #3185)

Other

  • Updated copyright headers for year 2023.

v2022.12.07

09 Dec 00:00
9003a6c
Compare
Choose a tag to compare

Added

  • Added the nosendmail mapflag, adding the ability to prevent players from sending emails (RODEX and classic) from a map. (#2962)
  • Added the item_drop_bonus_max_threshold configuration flag in conf/map/battle/drops.conf, making the item bonus rate cap configurable. (#3136)

Changed

  • Updated script_commands.txt, fixing typos and incorrect file names, adding documentation for missing checkoption() flags and updating some external URLs. (#3177)

Fixed

  • Added some missing checks for null in sd->inventory_data pointers to prevent crashes. (#3176)
  • Fixed the item bonus rate cap getting applied to the base item drop rates and the server's drop rate modifiers, making their real values different from what @mi shows. The cap now only applies to drop-time bonuses (cash shop SCs, race-specific drop rate modifiers, luk or size custom influence, renewal level modifiers, etc). (part of #3136)

v2022.11.02+1

04 Nov 19:07
f663f63
Compare
Choose a tag to compare

Added

  • Added support for newer packetvers/encryption keys/client messages (up to 20221019). (#3174)
  • Added support for packet ZC_SPECIALPOPUP related to the Special Popup messages. (part of #3174)
  • Implemented script command specialpopup() to open a popup and/or show a chat text message from the spopup.lub file. An example script has been provided in npc/custom/specialpopup.txt. (#3174)
  • Implemented the specialpopup mapflag, to automatically show the popup text configured clientside. All GvG maps have been configured to show popup with type 1. (#3174)

Changed

  • Updated many packets with the correct Zero client packetver checks. (part of #3174)
  • Updated GitHub Actions workflows to use the latest packetver. (part of #3174)
  • Updated GitHub Actions workflow to include a gcc-12 build. (part of #3174)

Fixed

  • Fixed a conflicting variable name pinfo, causing warnings about shadowed variables when building plugins. (part of #3174)

Removed

  • Removed the unused value vendinglistType from enum packet_headers. (part of #3174)

v2022.11.02

02 Nov 22:34
054b9d0
Compare
Choose a tag to compare

Added

  • Updated the map cache and map list with new maps. (#3156)
  • Updated the NPC ID constants and Hat effect constants with new IDs. (part of #3156)
  • Implemented the package item selection UI for recent clients that support it. (#3158)
    • A new item type, IT_SELECTPACKAGE is defined for this purpose (see the Select_Example1 item).
  • Added support for constants and bitmask arrays in mob_skill_db.conf, for the ConditionData, val<n> and Emotion fields. (#3164, issue #2768)
  • Exposed monster modes (MD_* constants) to the script engine. (part of #3164)
  • Implemented the @quest atcommand, to manipulate a character's quest log. (#3166)
  • Implemented the Rebuilding the Destroyed Morroc quests from episode 14.3. Note: the quests (except the reward NPCs) are disabled by default. (#3167)
  • Implemented the Enchant User Interface for clients that support it. (#3159)
    • The enchantments are defined in the newly introduced db/*/enchant_db.conf database.

Changed

  • Refactored status->get_sc_def() and its call chain (including status->change_start() and the sc_start*() macros to include the skill ID, used for SC immunity checks. (part of #3155)
  • Updated the CodeQL GitHub workflow to follow the latest upstream templates. (part of #3169)
  • Removed duplication and consolidated the functions of the itemdb->lookup_const() / mob->lookup_const() functions as map->setting_lookup_const(). (part of #3164)
  • Moved the function itemdb->lookup_const_mask() into the map interface as map->setting_lookup_const_mask(). (part of #3164)
  • Renamed the BA_FROSTJOKER skill and related constant to the official name BA_FROSTJOKE. The old name is left behind as a deprecated constant, to ease migration of custom code. (#3170)
  • Split constants.md into constants_re.md and constants_pre-re.md, since there are large variations in the available constants and their values between modes. The generator plugin and related CI script have been updated accordingly. (#3171)
  • Refactored and simplified some code after the removal of the multi-zone leftovers. (part of #3173)
    • Cheatsheet for updating custom code:
      • MAX_MAP_SERVERS has been removed, and any code that used it in a loop needs to be refactored to remove the loop that is no longer necessary.
      • chr->server[] has become chr->map_server (and it's a single object rather than an array of one element).
      • packet H->Z 0x2b04 (chrif->recvmap()) has been removed without a replacement as it was never sent.
      • many functions that took a map_id / server_id argument no longer need it (since it would be always zero). Code that used it likely needs to be refactored or removed.
      • packet H->Z 0x2b20 (chrif->removemap()) has been removed without a replacement as it was never sent.
      • mapif->sendallwos() has been removed without a replacement as it never sent anything since there couldn't be more than one map server connected at any given time.
      • mapif->sendall() is replaced by mapif->send() (but mind the different return value).
      • mapif->send() no longer requires a server id argument since there can only be one (and its return value changed).
      • several pieces of code have been completely removed since they were not reachable through any code path: any custom code part of them was likely never called and can be safely removed.
      • map->map_db and any related functions have been removed, as it could never get populated.
      • chrif->other_mapserver_count and any related functions have been removed, as it could never become nonzero.
      • packets Z->H 0x2b05 and H->Z 0x2b06 have been removed as they could never be sent.
      • chr->search_mapserver() and chr->search_default_maps_mapserver() have been completely overhauled and their purpose is now fulfilled by chr->mapserver_has_map() and chr->find_available_map_fallback(), with different return values and arguments.
      • the map_fd argument has been removed from several non-mapif functions that should have no business with it. The map server's fd can be retrieved through chr->map_server.fd, but in most cases it shouldn't be necessary and could be a code smell.
      • the chrif->changemapserver() function has been removed with no replacement as it was never called.
      • the server field of struct online_char_data has been replaced with an enum and renamed to mapserver_connection. It no longer encodes the server ID (since it could only be zero) but only the connection state. The old -2 special value maps to OCS_UNKNOWN, -1 to OCS_NOT_CONNECTED and >= 0 to OCS_CONNECTED.
  • Moved the chrif packet documentation to packets_chrif_len.h, where the packet lengths are defined. (part of #3173)

Fixed

  • Fixed/implemented Official behavior for the Golden Thief Bug Card, blocking SCs caused by magic-type skills, regardless of the SC type. (#3155)
    • Exceptions apply: Magnificat, Gloria and Angelus are blocked, even if they aren't magic-type skills.
    • Some skills that would be broken now have temporary workarounds to apply the right behavior if it doesn't match what their type dictates.
    • The NoMagicBlocked flag has been removed from skills that no longer require it.
  • Fixed the AttackType for many skills to match the official value. (part of #3155)
  • Fixed the zeny payments through the Stylist UI to be properly logged and count toward achievements. (#3157)
    • This includes a potentially very long running database migration for the logs database (adding the picklog type '5').
  • Fixed PF_SOULCHANGE to match the official behavior, preventing its use against characters in the Berserk state and against boss monsters and allowing it to disregard SC_FOGWALL. (#3160)
  • Fixed a case of the Doctor Quest taking items and not rewarding in return, as well as some delitem() that aren't executed in the same run loop as countitem(). (#3162)
  • Fixed some possible exploits in the Pickocked Quest, allowing only one instance of the NPC to be available at any time. (#3162)
  • Fixed the Dual Monster Race logic to disregard the relative order of the winning monsters and simplified the script logic. (#3162)
  • Fixed Kihop wrongly counting the bearer Taekwon for the bonus calculation. (#3161)
  • Fixed the interaction of Lex Aetherna with Freeze and Stone Curse. (#3161)
  • Fixed the SP cost behavior for Tarot Card of Fate when under the effect of Service for You. (#3161)
  • Fixed the duration of Super Novice's Steel Body when dying at 99% experience. (#3161)
  • Fixed the cast time and after cast delay of Napalm Beat. (#3161)
  • Fixed CH_CHAINCRUSH not working after MO_COMBOFINISH. (#3161)
  • Fixed several security issues (including a number of false positives) reported by CodeQL (overflows, misleading implicit type conversions, ambiguous regular expressions, etc) and refactored some related code to reduce dangerous variable reuses. (#3169)
  • Fixed some cases of movement notifications sent to the client after a monster dies, causing visual glitches such as mobs not cleared and still standing or moving after their death. (#3163, issues #2047, #2109)
  • Fixed an integer overflow in the image size for the Macro interface. (#3165)
  • Fixed a failed assertion when a quest has 3 objectives. (#3166)
  • Fixed various quest related packets sent to the client. (#3166)
    • Fixed the labelling for quests that use monster size, race or element as conditions.
    • Fixed swapped values for the mob size.
    • Fixed the mob ID not being sent for special cases (with map names, races, sizes or elements) and requiring a new log in to see the correct quest objectives.
  • Fixed the Zeny retrieval process from RoDEX, causing potential loss of Zeny. (#3168)
  • Fixed output character encoding in the setup_mariadb.ps1 script. (#3172)
  • Fixed a buffer overflow in mapif->rodex_getitemsack(). (part of #3173)

Deprecated

  • Deprecated the BA_FROSTJOKER skill ID and constant, renamed to the official name BA_FROSTJOKE. (part of #3170)

Removed

  • Removed the itemdb->lookup_const() and mob->lookup_const() functions, replaced by map->setting_lookup_const(). (part of #3164)
  • Removed the itemdb->lookup_const_mask() function, replaced by map->setting_lookup_const_mask(). (part of #3164)
  • Removed support for the deprecated View field in the item DB, replaced in 2016 by ViewSprite and SubType with #1828. (#3170)
  • Removed the deprecated constants Job_Alchem and Job_Baby_Alchem, replaced in 2016 by Job_Alchemist and Job_Baby_Alchemist with #1088. (#3170)
  • Removed the old VAR_* setlook constants, deprecated since 2016 with #908. (#3170)
  • Removed the useatcmd() script command, deprecated in 2017 with #1841. (#3170)
  • Removed code (mostly dead code) related to the long unsupported and long broken multi-zone functionality. (#3173)

v2022.10.05

06 Oct 22:14
9b756b9
Compare
Choose a tag to compare

Hello, I'm back, somehow. A few releases were skipped due to some unfortunate circumstances. Everything should be returning to the normal more or less monthly-plus-one-day-or-two cadence now.

On a brighter note, it's October Hacktober again. For anyone wishing to participate in the event, we'll be marking any valid PRs submitted during the month as accepted for Hacktoberfest, even if we end up merging them in the November release, as usual.

[v2022.10.05] October 05 2022

Added

  • Added support for UDT_OPTIONS to getunitdata() and setunitdata(), allowing to interact with mobs that are using job sprites. (#3146)
  • Implemented the AllowPlagiarism SkillInfo flag in the skill DB and the INF2_ALLOW_PLAGIARIZE source code counterpart, allowing separate per-skill settings for Plagiarize and Reproduce. (#2948)
  • Added support for newer packetvers/encryption keys/client messages (up to 20220831). (#3152)
  • Added support for preview in the old cash shop packet. This is disabled by default and can be enabled by defining ENABLE_OLD_CASHSHOP_PREVIEW_PATCH or through the configure flag --enable-old-cashshop-preview-patch. A client patch is necessary, available at http://nemo.herc.ws/patches/ExtendOldCashShopPreview (part of #3152)
  • Implemented the Item Reform user interface on supported clients (2020 and newer). The feature can be configured through the item_reform_info.conf and item_reform_list.conf db files. (#3150)

Changed

  • Replaced use of safesnprintf() with the C99 standard snprintf(). (part of #3148)
  • Improved detection of the usability of -Wformat-truncation, disabling it on older gcc versions where it doesn't produce useful warnings. (part of #3148)
  • Refactored and fixed some Plagiarize/Reproduce related code. (part of #2948, issue #989)
  • Updated the list of third job skills that can be plagiarized. (part of #2948)

Fixed

  • Fixed the gcc version specific GitHub CI builds that were running Ubuntu 21.10, which is EOL. LTS versions are now preferentially used, where possible. (#3147)
  • Fixed HWSAPI run failures caused by a missing XML::Parser perl module (872aebe)
  • Fixed the UDT_CLASS option of setunitdata() to set the view data's class if a mob uses a job class ID. (part of #3146)
  • Fixed some improper use of safesnprintf()/snprintf(), potentially causing truncation at the wrong position or buffer overruns. (part of #3148)
  • Fixed text in old clients in packet ZC_NOTIFY_CHAT_PARTY. (#3149)
  • Code style fixes. (part of #3149)
  • Fixed an interaction issue between copied (Plagiarize/Reproduce) skills and ones already present in the character's skill list. (part of #2948, issue 2940)

Removed

  • Removed the safesnprintf() function, superseded by the C99 standard function snprintf(). Note: in case of truncation, snprintf() returns the amount of characters that would have been written if the buffer wasn't limited, while safesnprintf() returns a negative value. Care should be used when replacing the function in third party code. (#3148)
  • Removed the copyskill_restrict battle config setting, superseded by the configurable per-skill restrictions. (part of #2948)

v2022.06.01

02 Jun 15:29
7bbdb7b
Compare
Choose a tag to compare

Added

  • Added support for newer packetvers/encryption keys/client messages (up to 20220518). (#3142)
  • Added the mes2(), mes2f(), next2() script commands and related packets. (part of #3142)
    • This family of commands is only supported by main clients starting from 20220504, client implementation may be incomplete.
    • The commands work similarly to their respective counterparts without 2, but will display the window with the NPC messages on the bottom of the screen.
  • Added the setdialogsize(), setdialogpos(), setdialogpospercent() script commands, allowing control over the NPC dialog size and position (supported by main clients starting from 20220504). Example scripts are provided in the custom folder. (part of #3142)
  • Added the playbgmall2() script command as an extended version of playbgmall() providing looping control (supported by main clients starting from 20220504). (part of #3142)
  • Added the soundeffectall2() script command as an extended version of soundeffectall() providing more precise looping control (supported by main clients starting from 20220504). (part of #3142)
  • Added the PLAY_SOUND_* constants to be used for the type parameter of soundeffect() and soundeffectall(). (part of #3142)
  • Added pc->bonus_addele() and pc->bonus_subele() to the pc interface. (#3139)
  • Added enum instance_window_info_type to specify the instance destruction reason. (part of #3141)
  • Added the GETHOMINFO_* constants to be used for the type parameter of gethominfo(). (#3137, issue #3133)
  • Implemented Dynamic NPCs, allowing a script to summon an NPC, only visible to a certain player and automatically despawn it after a certain time.
    • See the dynamicnpc() script command as well as the dynamic_npc_timeout and dynamic_npc_range settings in conf/map/battle/misc.conf for details.
    • Example script is provided in the doc/sample folder.

Changed

  • Refactored clif_soulball() and clif_spiritball() into a single function. (#3128)
  • Updated handling of various packets (PACKET_ZC_SPIRITS, ZC_SAY_DIALOG, ZC_WAIT_DIALOG, ZC_PLAY_NPC_BGM, CZ_MOVE_ITEM_FROM_BODY_TO_CART, ZC_SOUND, ZC_BROADCASTING_SPECIAL_ITEM_OBTAIN_item, ZC_BUYING_STORE_ENTRY, ZC_STORE_ENTRY, CZ_PC_PURCHASE_ITEMLIST_FROMMC, CZ_PC_PURCHASE_ITEMLIST_FROMMC2, ZC_DISAPPEAR_BUYING_STORE_ENTRY) to use the struct format. (#3128, #3131, #3142)
  • Reimplemented the "HWSAPI" build bot functionality (automatic HPM hooks updates, SQL item/mob/mobskill database generation, constants documentation generation) as a GitHub Actions workflow, migrating away from a legacy self-hosted homebrewed buildbot. (#3144)
  • Updated CodeQL GitHub Action to v2. (part of #3144)
  • Extended the playbgm() command with a new type parameter providing looping control (supported by main clients starting from 20220504). Example scripts are provided in the npc/custom folder. (part of #3142)
  • Extended the soundeffect() command with a new term parameter providing more precise looping control (supported by main clients starting from 20220504). Example scripts are provided in the npc/custom folder. (part of #3142)
  • Updated packetver in the CI builds to the most recent one. (part of #3142)
  • Updated libbacktrace. (part of #3142)
  • Replaced clang-13 with clang-15 in the GitHub Actions CI builds. (part of #3142)
  • Suppressed some warnings in libconfig when compiling with clang-15. (part of #3142)
  • Renamed the CZ_SEE_GUILD_MEMBERS packet into its official name CZ_APPROXIMATE_ACTOR. (part of #3142)
  • Updated clif->package_announce() (and the ZC_BROADCASTING_SPECIAL_ITEM_OBTAIN_item packet) to include the item refine level when supported by the client. (part of #3142)
  • Improved type safety of vending->purchase(). (part of #3131)

Fixed

  • Fixed an issue where the item is changed/deleted before the status update is sent to the grade enchant UI, resulting in wrong or missing information. (#3140)
  • Fixed a missing include preventing compilation or loading of HPM plugins. (#3129)
  • Fixed mercenaries showing with the "Unknown" name when idling, spawning or walking. (#3143)
  • Fixed clif->item_movefailed() (and the ZC_MOVE_ITEM_FAILED packet) to send the correct item amount. (part of #3142)
  • Fixed soundeffect() and soundeffectall()'s PLAY_SOUND_REPEAT mode not working as intended. (part of #3142)
  • Changed many scripts that were incorrectly using the PLAY_SOUND_REPEAT mode of soundeffect() to PLAY_SOUND_ONCE, as their behavior was equivalent before. (part of #3142)
  • Fixed a missing linebreak in the nullpo callback console error message. (part of #3142)
  • Fixed some issues around instance destruction, causing visual glitches and assertion failures. (#3141)
    • When characters were moved out of an instance at its expiration, they were receiving information that the instance went idle rather than destroyed.
    • When a character had a Player type instance attached, it would still receive instance info on login even after the instance was destroyed.
    • When reloading scripts after playing an instance, an assertion was failing.
    • When shutting down the server after playing an instance, an assertion was failing.
    • In some cases, the wrong reason code was provided on instance destruction.

v2022.04.07

07 Apr 22:26
9d0de90
Compare
Choose a tag to compare

Added

  • Added support for newer packetvers/encryption keys/client messages (up to 20220316). (#3123)
  • Added support for REMOVE_MOUNT_WUG in PACKET_CZ_UNINSTALLATION. (part of #3123)
  • Added the openbank() script command to open the Bank UI on packetver 20150128 and newer. (part of #3123)
  • Added support for the Item skill type to the skill database. (part of #3123)
  • Fixed clif->wis_message() for packetvers starting from 20131204. (part of #3123)
  • Fixed clif->equipitemack() for some 2010 and 2012 packetvers. (part of #3123)

Changed

  • Split the intif, inter and chrif packet lengths to separate files, removing the hand-written packet length arrays. (#3122)
  • Moved the packet related macros from packetsstatic_len.h to a dedicated header, packetsmacro.h. (part of #3122)
  • Updated handling of various packets (CZ_CONTACTNPC, ZC_ATTACK_FAILURE_FOR_DISTANCE, ZC_START_CAPTURE, ZC_TRYCAPTURE_MONSTER, ZC_PROPERTY_PET, ZC_CHANGESTATE_PET) to use the struct format. (#3126 and part of #2123)
  • Updated/added some packet and enum values. (part of #1234)
    • Renamed:
      • Many client message IDs were renamed in commit (too many to list them here, see commit 37771a8).
      • ZC_USESKILL_ACK::unknown -> ZC_USESKILL_ACK::attackMT
      • PACKET_CZ_UNINSTALLATION::packetType -> PACKET_CZ_UNINSTALLATION::PacketType
      • PACKET_CZ_UNINSTALLATION::action -> PACKET_CZ_UNINSTALLATION::InstallationKind
      • REMOVE_MOUNT_2 -> REMOVE_MOUNT_WUG
      • PACKET_ZC_WHISPER::name -> PACKET_ZC_WHISPER::sender
    • Added:
      • Missing values in enum useskill_fail_cause
      • Missing values in enum map_type
      • CZ_CONFIG_STORE_ASSISTANT_FEE in enum CZ_CONFIG
      • CZ_BANK_UI and CZ_ZENY_LOTTO_UI in enum cz_ui_types
      • Missing values in enum delitem_reason
      • INF_ITEM_SKILL and INF_UNKNOWN in enum e_skill_inf
      • OPT1_NONE and OPT2_NORMAL as empty values for enum e_opt1 and enum e_opt2 respectively
      • INVTYPE_WORLD_STORAGE in enum inventory_type
      • OPT3_ELEMENTAL_VEIL in enum e_opt3
      • Missing values in enum emotion_type
      • ACT_ATTACK_MULTIPLE_CRITICAL and ACT_SPLASH_NOMOTION in enum action_type
  • Updated main Readme file. Replaced TravisCI build badge with GitHub Actions badge and added Discord invitation link. (#3124)

Fixed

  • Fixed the sample plugin failing to compile in Visual Studio. (part of #3123)
  • Added the SQL script checks to the GitHub actions CI (restored functionality previously present in TravisCI). Updated the SQL analyzer tool and switched to open composer. (part of #3123)

v2022.03.02

03 Mar 20:16
13cae56
Compare
Choose a tag to compare

Added

  • Added support for custom compiler flags in each plugin individually, specified within the .c file and tagged with #PLUGINFLAGS. See the example in the sample plugin for more details. (#3110)
  • Added support for newer packetvers/encryption keys/client messages (up to 20220216). (#3112)
    • Added packet CZ_SEE_GUILD_MEMBERS
  • Extended the itemdb2sql generator to include the gradeable, keepafteruse, dropannounce, showdropeffect, dropeffectmode, ignorediscount, ignoreovercharge, rental_start_script, rental_end_script columns (#3117)
  • Added GitHub CI builds with some old gcc and clang versions. (part of #3118)
  • Added support for loading maps with RSW format 2.6. (#3119)
  • Added several new maps to the index and mapcache. (part of #3119)
  • Added new NPC sprite and hat effect IDs to the constants database. (part of #3119)
  • Added common/packet_struct.h for inter-server packet definitions. (#3120)

Changed

  • Added a missing nullpo check in clif.c. (#3114)
  • Fixed some packet header and field names and added the struct definition for some missing ones. (#3107 and #3112)
    • Symbol renames cheatsheet:
      • ZC_PAR_CHANGE1 -> ZC_PAR_CHANGE
      • ZC_LONGPAR_CHANGE -> ZC_LONGLONGPAR_CHANGE
      • packet_npc_market_purchase -> PACKET_CZ_NPC_MARKET_PURCHASE
      • ZC_OPEN_UI -> ZC_UI_OPEN
      • clif->zc_say_dialog_zero1() -> clif->zc_quest_dialog()
      • clif->zc_say_dialog_zero2() -> clif->zc_monolog_dialog()
      • clif->zc_menu_list_zero() -> clif->zc_quest_dialog_menu_list()
      • ZC_ACK_REQNAME_TITLE -> ZC_ACK_REQNAMEALL_NPC
      • ZC_CAMERA_INFO -> ZC_VIEW_CAMERAINFO
      • ZC_ITEM_PREVIEW -> ZC_CHANGE_ITEM_OPTION
      • ZC_ENCHANT_EQUIPMENT -> ZC_UPDATE_CARDSLOT
      • ZC_SERVICE_MESSAGE_COLOR -> ZC_DEBUGMSG
      • CZ_START_USE_SKILL -> CZ_USE_SKILL_START
      • CZ_STOP_USE_SKILL -> CZ_USE_SKILL_END
      • ZC_INVENTORY_EXPANSION_INFO -> ZC_EXTEND_BODYITEM_SIZE
      • ZC_ACK_INVENTORY_EXPAND -> ZC_ACK_OPEN_MSGBOX_EXTEND_BODYITEM_SIZE
      • ZC_ACK_INVENTORY_EXPAND_RESULT -> ZC_ACK_EXTEND_BODYITEM_SIZE
      • CZ_INVENTORY_EXPAND -> CZ_REQ_OPEN_MSGBOX_EXTEND_BODYITEM_SIZE
      • CZ_INVENTORY_EXPAND_CONFIRMED -> CZ_REQ_EXTEND_BODYITEM_SIZE
      • CZ_INVENTORY_EXPAND_REJECTED -> CZ_CLOSE_MSGBOX_EXTEND_BODYITEM_SIZE
      • ZC_NPC_BARTER_OPEN -> ZC_NPC_BARTER_MARKET_ITEMINFO
      • CZ_NPC_BARTER_CLOSE -> CZ_NPC_BARTER_MARKET_CLOSE
      • CZ_NPC_BARTER_PURCHASE -> CZ_NPC_BARTER_MARKET_PURCHASE
      • CZ_PING -> CZ_PING_LIVE
      • CZ_COOLDOWN_RESET -> CZ_CMD_RESETCOOLTIME
      • CZ_STYLE_CLOSE -> CZ_CLOSE_UI_STYLINGSHOP
      • ZC_LOAD_CONFIRM -> ZC_NOTIFY_ACTORINIT
      • ZC_REFINE_OPEN_WINDOW -> ZC_OPEN_REFINING_UI
      • CZ_REFINE_ADD_ITEM -> CZ_REFINING_SELECT_ITEM
      • ZC_REFINE_ADD_ITEM -> ZC_REFINING_MATERIAL_LIST
      • CZ_REFINE_ITEM_REQUEST -> CZ_REQ_REFINING
      • CZ_REFINE_WINDOW_CLOSE -> CZ_CLOSE_REFINING_UI
      • ZC_REFINE_STATUS -> ZC_BROADCAST_ITEMREFINING_RESULT
      • ZC_HAT_EFFECT -> ZC_EQUIPMENT_EFFECT
      • ZC_GUILD_CASTLE_LIST -> ZC_GUILD_AGIT_INFO
      • CZ_CASTLE_TELEPORT_REQUEST -> CZ_REQ_MOVE_GUILD_AGIT
      • ZC_CASTLE_TELEPORT_RESPONSE -> ZC_REQ_ACK_MOVE_GUILD_AGIT
      • ZC_CASTLE_INFO -> ZC_REQ_ACK_AGIT_INVESTMENT
      • CZ_CASTLE_INFO_REQUEST -> CZ_REQ_AGIT_INVESTMENT
      • ZC_LAPINEDDUKDDAK_OPEN -> ZC_RANDOM_COMBINE_ITEM_UI_OPEN
      • CZ_LAPINEDDUKDDAK_CLOSE -> CZ_RANDOM_COMBINE_ITEM_UI_CLOSE
      • CZ_LAPINEDDUKDDAK_ACK -> CZ_REQ_RANDOM_COMBINE_ITEM
      • ZC_LAPINEDDUKDDAK_RESULT -> ZC_ACK_RANDOM_COMBINE_ITEM
      • CZ_REQ_MOUNTOFF -> CZ_UNINSTALLATION
      • CZ_SE_CASHSHOP_LIMITED_REQ -> CZ_GET_ACCOUNT_LIMTIED_SALE_LIST
      • CZ_NPC_EXPANDED_BARTER_CLOSE -> CZ_NPC_EXPANDED_BARTER_MARKET_CLOSE
      • ZC_NPC_EXPANDED_BARTER_OPEN -> ZC_NPC_EXPANDED_BARTER_MARKET_ITEMINFO
      • CZ_NPC_EXPANDED_BARTER_PURCHASE -> CZ_NPC_EXPANDED_BARTER_MARKET_PURCHASE
      • ZC_LAPINEUPGRADE_OPEN -> ZC_RANDOM_UPGRADE_ITEM_UI_OPEN
      • ZC_LAPINEUPGRADE_RESULT -> ZC_ACK_RANDOM_UPGRADE_ITEM
      • CZ_LAPINEUPGRADE_CLOSE -> CZ_RANDOM_UPGRADE_ITEM_UI_CLOSE
      • CZ_LAPINEUPGRADE_MAKE_ITEM -> CZ_REQ_RANDOM_UPGRADE_ITEM
      • CZ_CAPTCHA_REGISTER -> CZ_REQ_UPLOAD_MACRO_DETECTOR
      • ZC_CAPTCHA_UPLOAD_REQUEST -> ZC_ACK_UPLOAD_MACRO_DETECTOR
      • CZ_CAPTCHA_UPLOAD_REQUEST_ACK -> CZ_UPLOAD_MACRO_DETECTOR_CAPTCHA
      • ZC_CAPTCHA_UPLOAD_REQUEST_STATUS -> ZC_COMPLETE_UPLOAD_MACRO_DETECTOR_CAPTCHA
      • CZ_MACRO_REPORTER_ACK -> CZ_REQ_APPLY_MACRO_DETECTOR
      • ZC_MACRO_REPORTER_STATUS -> ZC_ACK_APPLY_MACRO_DETECTOR
      • ZC_MACRO_DETECTOR_REQUEST -> ZC_APPLY_MACRO_DETECTOR
      • ZC_MACRO_DETECTOR_REQUEST_DOWNLOAD -> ZC_APPLY_MACRO_DETECTOR_CAPTCHA
      • CZ_MACRO_DETECTOR_DOWNLOAD -> CZ_COMPLETE_APPLY_MACRO_DETECTOR_CAPTCHA
      • ZC_MACRO_DETECTOR_SHOW -> ZC_REQ_ANSWER_MACRO_DETECTOR
      • CZ_MACRO_DETECTOR_ANSWER -> CZ_ACK_ANSWER_MACRO_DETECTOR
      • ZC_MACRO_DETECTOR_STATUS -> ZC_CLOSE_MACRO_DETECTOR
      • CZ_CAPTCHA_PREVIEW_REQUEST -> CZ_REQ_PREVIEW_MACRO_DETECTOR
      • ZC_CAPTCHA_PREVIEW_REQUEST -> ZC_ACK_PREVIEW_MACRO_DETECTOR
      • ZC_CAPTCHA_PREVIEW_REQUEST_DOWNLOAD -> ZC_PREVIEW_MACRO_DETECTOR_CAPTCHA
      • CZ_MACRO_REPORTER_SELECT -> CZ_REQ_PLAYER_AID_IN_RANGE
      • ZC_MACRO_REPORTER_SELECT -> ZC_ACK_PLAYER_AID_IN_RANGE
      • ZC_PARTY_MEMBER_JOB_LEVEL -> ZC_NOTIFY_MEMBERINFO_TO_GROUPM
      • ZC_TAKEOFF_EQUIP_ALL_ACK -> ZC_ACK_TAKEOFF_EQUIP_ALL
      • ZC_SAY_DIALOG_ZERO1 -> ZC_QUEST_DIALOG
      • ZC_SAY_DIALOG_ZERO2 -> ZC_MONOLOG_DIALOG
      • ZC_MENU_LIST_ZERO -> ZC_QUEST_DIALOG_MENU_LIST
      • ZC_SAY_DIALOG_ALIGN -> ZC_DIALOG_TEXT_ALIGN
      • CZ_GRADE_ENCHANT_ADD_ITEM -> CZ_GRADE_ENCHANT_SELECT_EQUIPMENT
      • ZC_GRADE_ENCHANT_ADD_ITEM_RESULT -> ZC_GRADE_ENCHANT_MATERIAL_LIST
      • CZ_GRADE_ENCHANT_START -> CZ_GRADE_ENCHANT_REQUEST
      • CZ_GRADE_ENCHANT_CLOSE -> CZ_GRADE_ENCHANT_CLOSE_UI
      • ZC_GRADE_ENCHANT_RESULT -> ZC_GRADE_ENCHANT_ACK
      • ZC_GRADE_STATUS -> ZC_GRADE_ENCHANT_BROADCAST_RESULT
  • Updated handling of various packets (ZC_PC_PURCHASE_ITEMLIST_FROMMC, ZC_SHOW_IMAGE, PACKET_ZC_WHISPER, ZC_UPDATE_GDID) to use the struct format. (part of #3112)
  • Improved support of the ZC_SE_CASHSHOP_OPEN for clients between 2014 and 2022. (part of #3112)
  • Improved handling of customized MAX_MVP_DROP and MAX_MOB_DROP values in the modbb2sql generator. (part of #3117)
  • Split the mapinit interface setup into a separate mapit_defaults() function. (part of #3118)
  • Renamed struct irc_bot_interface into ircbot_interface (part of #3118)
  • Improved the interface validation script to better detect errors and missing interface methods. (#3118)
  • Updated the inter-server packet INTER_CREATE_PET to use the struct format. (part of #3120)

Fixed

  • Updated the address sanitizer library version for gcc-snapshot ci builds. (#3113)
  • Fixed the item grade information lost from mail attachments when using the old mail system. (#3116)
  • Fixed an uninitialized send buffer in PACKET_ZC_ADD_EXCHANGE_ITEM causing memory garbage to be sent to the client. (part of #3116)
  • Limited the maximum string length in the script command gettimestr() to 1023 characters, preventing a rogue script from allocating gigabytes of memory with a single command. (part of #3116)
  • Fixed some missing methods from interfaces or direct calls that bypassed the interfaces. (part of #3118)
  • Fixed possible buffer overflows in clif.c and pc.c (part of #3118)
  • Fixed some visual options (such as SC_BLIND) not getting re-sent to the client after using @refresh. (#3121, issue #2706)