Releases: HerculesWS/Hercules
Releases · HerculesWS/Hercules
v2020.05.31+1
Fixed
- Fixed a crash in the db2sql plugin with the MariaDB client library. (#2748)
- Fixed the job level stat bonuses for the Novice class to match the official servers. (#2747)
- Fixed an issue that caused the walk-path check to be never executed for skills that require the caster to be able to move. (#2761)
- Fixed an issue that caused "Unknown Skill" errors to appear while casting skills. The default value for the skill damage type field of the skill database is now
NK_NONE
instead ofNK_NO_DAMAGE
. (#2761, issue #2760)
v2020.05.31
Added
- Added the possibility to declare local NPC functions as public or private. (#2142)
- Functions declared as public can be called from other scripts with the syntax
"npc name"::function_name()
. - The configuration option
script_configuration.functions_private_by_default
controls whether functions are public or private when not specified.
- Functions declared as public can be called from other scripts with the syntax
- Added a new cast condition
MSC_MAGICATTACKED
to the mob skill database, allowing mobs to react to magical attacks. (#2733, issue #2578) - Added support for level-specific values in the skill database fields
Hit
,AttackType
,InterruptCast
,CastDefRate
,Requirement.State
,Unit.Id
,Unit.Interval
,Unit.Target
,Requirements.Items.Amount
(part of #2731)- Removed hardcoded required item amounts for various skills, moving them to the skill database.
- Added support for
Requirements.Items.Any
in the skill database, allowing skills that require any one of their item conditions to be verified (as opposed to all). (part of #2731, issue #1250) - Added support for
Requirements.Equip
in the skill database, allowing to specify a required equipment to cast a skill. (part of #2731)- Removed hardcoded equip requirements for various skills, moving them to the skill database.
- Added support for
Requirements.MaxSPTrigger
in the skill database, allowing to specify a maximum SP percentage that allows to cast a skill. (part of #2731) - Added/updated packets, encryption keys and message tables for clients up to 2020-05-20. (#2713)
- Added support for the gcc sanitizer flags
address-use-after-scope
,pointer-overflow
,builtin
,pointer-compare
,pointer-subtract
,shift-exponent
,shift-base
,sanitize-address-use-after-scope
. (part of #2713) - Added support for binary and octal number literals in scripts and libconfig configuration files, using the syntax 0b000 / 0o000. (#2671)
- Added support for number separators in number literals in scripts and libconfig configuration files. The symbol
_
can be used as grouping separator (1_000_000
,0x_ffff_ffff
, etc). (part of #2671) - Added support for overriding
ENABLE_SC_SAVING
,MAX_CARTS
,MAX_SLOTS
,MAX_AMOUNT
,MAX_ZENY
,MAX_BANK_ZENY
,MAX_FAME
,MAX_CART
through CFLAGS. (#2220) - Added a
skill_enabled_npc
battle flag allowing to specify whether self-targeted or targeted skills can be used while interacting with NPCs. (part of #2718, issue #862) - Added the
loudhailer()
script command, as used by theMegaphone_
item. (#2758, issue #2751)
Changed
- Added validation for the maximum length of permanent string variables and consolidated it to 255 characters. This requires a database migration. (#2705, issue #1037)
- Split the
mapreg
SQL table into separate tables for integer and string variables. This requires a database migration. (#2720) - Updated the AUTHORS file to include names and emails from every commit so far. A helper script
tools/authors.sh
to extract them has been added. (#2729, issue #245) - Updated the drop chance of the Black and White Wing Suits. (#2739, issue #562)
- Improved validation and bounds checking in the skill database loader. (#2731)
- Extended the
item_enabled_npc
battle flag and theenable_items()
/disable_items()
script commands with finer grained options to allow the use of usable items or equipment while interacting with NPCs. (#2718) - Changed the default setting of
player_warp_keep_direction
to match the official servers' setting. (#2752) - Replaced the (failing) gitlab-ci centos6 builds with centos8 (released in september 2019). (#2759)
Fixed
- Fixed the logic and interaction between the (element)proof Potions and Undead Scrolls and their status icons. (#2708)
- Fixed an issue in the Lost Puppies quest causing the dogs to be unable to reappear. (#2698)
- Fixed a possible data corruption caused by gender mismatch after a changesex/changecharsex operation. (#2714, issue #985)
- Fixed a warning and name truncation when receiving a whisper message with a recipient name with a length of 24 characters. This allows to whisper to scripts with a name length up to 20 (through the
NPC:name
syntax). (#2721, issue #718) - Fixed interaction between
itemskill()
other item/skill uses, including otheritemskill()
. The autocast code has been changed to use a vector, to allow multiple concurrent skills. (#2699)- It's now possible to use multiple
itemskill()
calls in the same item, as long there is at most one targeted skill, and it's the last one used. - It's now possible to use items while the target cursor for a previously activated skill is visible, without aborting it. (issue #816)
- It's now possible to use a scroll while casting another skill (and the provided skill will be cast after the current one finishes). (issue #1026)
- It's now possible to use multiple
- Fixed use of Fly Wing/Butterfly Wing while riding a cash shop mount (Boarding Halter) and having a falcon. (part of #2699, issue #2750)
- Fixed the
Requirements.MaxHPTrigger
conditions for mercenary skills. (part of #2731) - Fixed a possible memory corruption or crash in the mob delayed removal function. (part of #2713, issue #2719)
- Fixed a crash in the
npcshopdelitem()
script command. (part of #2713) - Fixed a crash in the achievement progress update code. (part of #2713)
- Fixed a possible crash in the RODEX check name function. (part of #2713)
- Added null pointer checks for missing view data in clif and status code. (part of #2713)
- Added a check for the current map in mob and map code. (part of #2713)
- Fixed an error or possible crash when a mob dies on an invalid map. (part of #2713)
- Fixed an incorrect npc ID for the MOTD script after reloading or unloading scripts. (part of #2713)
- Fixed an use after free in
party->broken()
. (part of #7213) - Fixed a possible crash in
mapif->guild_withdraw()
. (part of #2713) - Fixed a null pointer error in
unit->steptimer()
. (#2723, issue #2707) - Fixed the left-shift of a negative value in
GN_CRAZYWEED_ATK
. (#2734, issue #1151) - Fixed a missing "Beloved" attribute on the eggs of renamed pets. (#2744, issue #2743)
- Fixed an inverted logic in the
storage_use_item
battle flag. (#2746) - Fixed the mineffect map property flag so that it's not affected by the character's minimized effects but only by the map type. It's enabled on all the guild castles, regardless of whether WoE is running. (#2754, issue #803)
- Fixed a crash in the equip check code if a character logs wearing an item that was previously, but is no longer, equippable. (#2745)
- Fixed a compiler warnings in 32 bit builds. (#2759)
Deprecated
- Deprecated the (unintended and undocumented) possibility of calling local NPC functions as event labels if their name started with
On
. (part of #2142, issue #2137)- The functionality is now disabled by default, and can be enabled by changing the
script_configuration.functions_as_events
setting.
- The functionality is now disabled by default, and can be enabled by changing the
Removed
v2020.05.03
Added
- Added the new pets (including the jRO exclusive ones) and their related items/monsters to the renewal database. (#2689)
- Added constants
ALL_MOBS_NONBOSS
,ALL_MOBS_BOSS
,ALL_MOBS
for the special mob IDs for global skill assignment in the mob skill database. (part of #2691) - Added support for
__func__
on Windows, since it's now available in every supported compiler. (part of #2691) - Added documentation for the mob skill database. See
doc/mob_skill_db.conf
. (#2680) - Added missing functions for the name ack packets for
BL_ITEM
andBL_SKILL
. (part of #2695) - Added/updated packets and encryption keys for clients up to 2020-04-14. (#2695)
- Added support for packets
ZC_LAPINEUPGRADE_OPEN
,CZ_LAPINEUPGRADE_CLOSE
andZC_LAPINEUPGRADE_RESULT
and a placeholder forCZ_LAPINEUPGRADE_MAKE_ITEM
. (part of #2695) - Added a new cell type
cell_noskill
, to block skill usage. (#2188)
Changed
- Removed warning messages about missing elements in the mob db, since it's an optional field. (part of #2689)
- Updated the renewal pet database with the correct values and bonuses. (part of #2689, issue #2435)
- Changed
mob_getfriendstatus()
to consider character as friends of their support monsters, for consistency withmob_getfriendhprate()
. (part of #2691) - Changed
MSC_AFTERSKILL
to trigger on any skill when itsConditionData
is 0, for consistency withMSC_SKILLUSED
. (part of #2691) - Improved data validation and error reporting in the mob skill database. (part of #2691)
- Changed return values of
mob_skill_use()
andmobskill_event()
. Any third party code that uses them needs to be updated. (part of #2691) - Changed the battle configuration flag
manner_system
to be applied immediately to any existingSC_NOCHAT
. (#2696, issue #227) - Changed the
atcommand()
command to ignorePCBLOCK_COMMANDS
. (#2062)
Fixed
- Fixed
SC_AUTOTRADE
,SC_KSPROTECTED
andSC_NO_SWITCH_EQUIP
incorrectly recognized as unknown status changes. (#2686, issue #2684) - Prevented
SC_KSPROTECTED
from starting on dead monsters. (part of #2686) - Fixed character unhiding while disguised or when using
@option 0
. (#2687, issues #1556 and #2104) - Fixed an incorrect order of operations causing results too small in various calculations related to free cell search, mob skill chances/delays, exp penalty, pet hunger and friendly rates, cast duration. (#2690)
- Fixed errors caused by
pet_ai_sub_hard()
called for monsters that haven't been added to a map yet. (#2693) - Fixed a wrong packet error displayed when using an incorrect password for the char-login connection. (part of #2695)
- Fixed a security check in the lapine ack packet handler. (part of #2695)
- Fixed some incorrect assumptions about the skill index values, causing the Bard/Dancer soul link to grant the wrong skills. (#2710, issue #2670)
- Fixed some conditions that could cause a skill to be attempted to save to the database with a negative skill level, resulting in query errors and data loss. (part of #2710)
- Fixed the skill type of
RK_DRAGONBREATH
andRK_DRAGONBREATH_WATER
to beBF_WEAPON
and support thebLongAtkRate
bonus. (#1304) - Fixed
SC_TELEKINESIS_INTENSE
to add percent MATK instead of fixed MATK. (part of #1304)
v2020.04.05+1
v2020.04.05
Added
- Added/updated packets, encryption keys and message tables for clients up to 2020-04-01. (#2663)
- The
setpcblock()
andcheckpcblock()
can now be used on another character by passing the account id. (#2668) - Added new StatusChange types (
SC_POPECOOKIE
,SC_VITALIZE_POTION
,SC_SKF_MATK
,SC_SKF_ATK
,SC_SKF_ASPD
,SC_SKF_CAST
,SC_ALMIGHTY
) and updated relevant items. (#2658, related to #1177) - Added libbacktrace support (currently Linux-only) for better error call stack logging. (#2581)
Changed
- Extended the atcommand
@fakename
with a newoptions
parameter, to select which names will be displayed. (#2637, related to issue #1966 and #2168) - Refactored the pet system code. (#2600, issues #2434 and #303)
- Added enumerations for pet hunger/intimacy levels
- Added value capping to
pet_set_intimate()
function. - Adjusted pet catch rate calculation. The old, custom, calculation can be restored by setting the
pet_catch_rate_official_formula
battle config flag to false. - Adjusted pet intimacy calculation when feeding.
- Improved validation of the Pet DB fields and of the input of various pet related functions.
- Removed the redundant
SpriteName
field from pet DB. - Changed
EggItem
field in pet DB to be mandatory. - Added new field
HungerDecrement
to pet DB. This replaces thepet_hungry_friendly_decrease
battle config setting. - Added new field
Intimacy.StarvingDelay
to pet DB. - Added new field
Intimacy.StarvingDecrement
to pet DB. - Increased
MAX_MOB_DB
to 22000. - Added pet DB documentation file. (
doc/pet_db.txt
) - Removed fields from pet DB where default values can be used.
- Added intimacy validation to pet DB
EquipScript
fields. This replaces thepet_equip_min_friendly
battle config setting. - Adjusted
inter_pet_tosql()
andinter_pet_fromsql()
functions to use prepared statements. - Refactored and/or updated code style of various functions that were touched by this pull request.
- Added a backtrace to the error message of
clif_unknownname_ack()
. (part of #2663) - Added a
UNIQUE
constraint to theuserid
column of thelogin
SQL table to prevent having multiple accounts with the same name. (#2666, related to #2169) - Increased the column size of
list
for theipbanlist
SQL table to accomodate for non-wildcard IPv4 and for IPv6 compatiblity. (#2665, issue #2631)
Fixed
- Fixed memory violations and incorrect handling of
npc_data
in the quest info code. (#2682) - Fixed an issue that prevented the fake name to show up when using
@fakename
in RE clients. (part of #2637) - Fixed a compiler error in
PACKET_ZC_SE_CASHSHOP_OPEN
. (part of #2663, issue #2669) - Added missing libraries into the plugins Makefile, causing a linking error when a plugin uses MySQL or other libraries. (part of #2663)
- Fixed a bug causing failed assertions that appeared when attacking a skill unit (such as Ice Wall). (#2678)
- Fixed a bug causing failed assertions in
timer_do_delete()
, related toud->walktimer
. (#2676) - Fixed a bug allowing to equip bullets and grenades regardless of the weapon type. (#2660, issue #2661, related to #2579)
- Fixed a memory leak in barter NPCs. (#2655)
- Fixed a pointer overflow in the script command
getiteminfo()
. (#2656) - Refactored and fixed several bugs in the skill auto-cast system. (#2657, issue #1211)
Removed
- Removed the
pet_hungry_friendly_decrease
battle config setting, superseded by theHungerDecrement
field of the Pet DB. (part of #2600) - Removed the
pet_equip_min_friendly
battle config setting, superseded by the code inside the Pet DBEquipScript
fields. (part of #2600) - Removed the redundant
SpriteName
field from pet DB. (part of #2600)
v2020.03.08+2
Fixed
- Fixed an incorrect return value in
unit->walktobl()
causing mobs to get stuck when they try to loot. (#2664)
v2020.03.08+1
Fixed
- Fixed an incorrect return value in
unit->walktobl()
causing mobs to be unable to walk to their target. (#2659)
v2020.03.08 [DO NOT USE]
Added
- Added/updated packets, encryption keys and message tables for clients up to 2020-03-04. (#2645)
- Exposed the item bound type (
IBT_*
) constants to the script engine. (#2650) - Added item scripts for item IDs 12459 through 12465 and corrected their name in the pre-renewal DB. (#2634, issue #1196)
- Added the
unitiswalking()
script command, to check whether an unit is walking at a given time. (#2628)
Changed
- Changed the default
PACKETVER
to 2019-05-30. (part of #2645) - Major refactoring of the functions in
unit.c
, adding code documentation and following the code style guidelines. Functions have been renamed when backward compatible changes to the arguments or return values were made. (#2546)- A new header
unitdefines.h
has been added. enum unit_dir
is now provided, to standardize handling of facing/walking directions.- The macros
unit_get_opposite_dir()
,unit_is_diagonal_dir()
,unit_is_dir_or_opposite()
,unit_get_ccw90_dir()
,unit_get_rnd_diagonal_dir()
have been added. unit->walktoxy_timer()
has been renamed tounit->walk_toxy_timer()
and its return values have been changed and documented.unit->walktoxy_sub()
has been renamed tounit->walk_toxy_sub()
and its return values have been changed and documented.unit->delay_walktoxy_timer()
has been renamed tounit->delay_walk_toxy_timer()
and its return values have been changed and documented.unit->walktoxy()
has been renamed tounit->walk_toxy()
and its return values have been changed and documented.unit->walktobl_sub()
has been renamed tounit->walk_tobl_timer()
and its return values have been changed and documented.unit->setdir()
has been renamed tounit->set_dir()
and its return value and arguments have been changed and documented.unit->getdir()
has been renamed tounit->get_dir()
and its return type and constness of the arguments have been changed.unit->warpto_master()
has been added.unit->sleep_timer()
has been renamed tounit->sleeptimer()
and its return values have been changed and documented.unit->calc_pos()
now acceptsenum unit_dir
.map->check_dir()
now acceptsenum unit_dir
.map->calc_dir()
now returnsenum unit_dir
and accepts a const bl.npc->create_npc()
now acceptsenum unit_dir
.skill->blown()
now acceptsenum unit_dir
.skill->brandishspear_first()
now acceptsenum unit_dir
.skill->brandishspear_dir()
now acceptsenum unit_dir
.skill->attack_blow_unknown()
now acceptsenum unit_dir
.- The remaining unit functions have been documented.
- A new header
- New return values have been added to
pc->setpos()
, for better error handling. (#2633, issue #2632) - Increased the
MAX_MOB_LIST_PER_MAP
value to 115 in pre-renewal builds, to fit all the default spawns. (#2638, issue #1915) - Extended the
getiteminfo()
command to also accept item names, and added the typesITEMINFO_ID
,ITEMINFO_AEGISNAME
,ITEMINFO_NAME
. (#2639) - Changed
itemskill()
to ignore conditions by default. TheISF_CHECKCONDITIONS
needs to be explicitly passed if conditions should be checked/consumed. (part of #2648) - Changed the NPC shop behavior to prevent selling items from the favorites tab of the inventory. (#2651)
- Updated Doxygen configuration to speed up generation and fix compatibility warnings. (0d74789)
- Updated the Travis-CI configuration file according to the validation warnings and notices. (eb97973)
Fixed
- Fixed a missing
get_index()
call inSkill2SCTable
, causing some skills to activate the wrong status. (#2643, issue #2636) - Fixed a compilation error C2233 in Visual Studio. (part of #2645)
- Fixed Basilica unintentionally restraining boss mobs. (#2612, issue #1276, related to issue #2420)
- Fixed the handling of unequip scripts in zones where an item is restricted. The
OnUnequip
script is now never executed when unequipping in a restricted zone, but it is always executed when entering such zones, regardless of theunequip_restricted_equipment
battle flag. (#2642, issue #2180) - Fixed the handling of skill requirements and conditions by the
itemskill()
command. (#2648, issue #2646) - Added missing requirements to
CASH_INCAGI
andRK_CRUSHSTRIKE
. (part of #2648)
Removed
- Removed the
ISF_IGNORECONDITIONS
flag previously used byitemskill()
, now the default behavior. (#2648)
v2020.02.09
Added
- Added/updated packets, encryption keys and message tables for clients up to 2020-02-06. (#2625)
- Added support for the expanded barter shop, see example script in
npc/custom/expandedbartershop.txt
and the related script commandssellitem()
,startsellitem()
,sellitemcurrency()
,endsellitem()
. Note: this includes a database migration. (part of #2625) - Added the new script commands
cloakonnpc()
andcloakoffnpc()
. (part of #2615) - Added the new script command
achievement_iscompleted()
to check for achievement completion. (part of #2615) - Added Exploration Achievement NPCs. (#2615)
- Added support for an
OnNPCUnload
label, where a script can perform its cleanup before being unloaded (such as removing mapflags, etc). (part of #2590) - Added the Rebellion jobchange quest and its related mobs and items. (#2621)
- Added support for switching madogear type. See the documentation for
setmount()
and the relatedMADO_ROBOT
andMADO_SUITE
constants. (#2586)
Changed
- Changed the logic of
skill_get_index
to make it easier to add new skills, custom or official. (#2596) - Refactored
int_party
code related to exp sharing calculations. (part of #2601) - Updated the Duel system cooldown to be configurable with seconds granularity. The
duel_time_interval
setting can be safely updated and with@reloadbattleconf
, applying to any existing cooldowns. (#1495) - Converted
PACKET_ZC_STATE_CHANGE
to use its struct format and added a function to send it to a single target. (part of #2615) - Changed the behavior of
@unloadnpc
,@reloadnpc
,@unloadnpcfile
to kill the monsters that were spawned by the unloaded script (non-permanent spawns). (#2590, issue #2530) - Updated the
mobdbconverter.py
tool to support Race, Size and Element constants. The script now requires Python 3. (#2620) - Cleaned up a duplicate definition of
SP_VARCASTRATE
inpc_readparam()
. (#2624, issue #1311) - Extended
itemskill()
with a newISF_INSTANTCAST
flag to be able to cast a skill without cast time. (part of #2616) - Extended
itemskill()
with a newISF_CASTONSELF
flag to be able to forcefully cast a skill on the invoking character. (part of #2616) - Converted
ZC_AUTORUN_SKILL
to use its struct format. (part of #2616)
Fixed
- Fixed some signed/unsigned mismatch compiler warnings. (#2601, issue #1434)
- Fixed some cases where the family exp sharing state wasn't correctly detected. (part of #2601)
- Fixed a duplicate "Skill Failed" message when using Asura Strike. (part of #2248, issue #1239)
- Fixed an issue that made a character turn to face its target after casting Asura Strike. (#2248, issue #1239)
- Fixed the position of a character after a failed Asura Strike cast, to be 3 cells from its original position instead of 2. (part of #2248, issue #1239)
- Fixed the status icon from the Elemental Resistance Potions and the Undead Element Scroll not disappearing when the status changes end. (#2614, issue #2593)
- Fixed a crash when using
@loadnpc
,@reloadnpc
or@unloadnpcfile
on a directory. (part of #2590, issue #1279) - Fixed
PR_STRECOVERY
to only cure status effects if the target's element isn't Undead. (#2618, issue #2558) - Fixed the mobs spawned by
mob_clone_spawn()
(clone()
,@evilclone
) being invulnerable because of an uninitializeddmg_taken_rate
taking the value of 0. (#2617, issue #2607) - Fixed a crash when the script function
getunits()
was called with an invalid mapindex. Now an error message is added when the mapindex validation fails. (#2619) - Fixed a crash when
map_forcountinmap()
was called with an invalid mapindex. Now the function will return 0 instead. (part of #2619) - Fixed clientside errors when using a
ViewData
block in the mob database without specifying aHairStyleId
. The hair style will now default to 1 when aViewData
block is specified. (#2622) - Fixed the damage calculation being too low when using weapons of type
W_RIFLE
(in pre-renewal). (#2623) - Fixed an issue that could cause homunculi to be in an unexpected partially-vaporized state (i.e. when a Vanilmirth kills its own master through
HVAN_EXPLOSION
). (#2626) - Fixed NPC ID validation when
SECURE_NPCTIMEOUT
is defined, causing scripts to abort with an "Unknown NPC" error on the console. (#2627, issue #2073) - Fixed the skill condition checks and the
flag
parameter ofitemskill()
. The constantsISF_NONE
andISF_IGNORECONDITIONS
are now available. (part of #2616) - Fixed the
itemskill()
items to provide their proper Aegis behavior, in their requirement checks, self-targeting and item consumption. (#2616, issue #819) - Fixed the Earth Spike Scroll to consume 10 SP when
SC_EARTHSCROLL
is active. (part of #2616) - Fixed warnings in the HPMHookGenerator. (1000b10)
v2020.01.12
Added
- Added/updated packets, encryption keys and message tables for clients up to 2020-01-08. (#2599)
- Added support for auto exp insurance items. (#2603)
- Added the script commands
resetfeel()
andresethate()
. (#2285) - Added the atcommand
@hatereset
. (part of #2285)
Changed
- Extracted packet
ZC_SE_CASHSHOP_OPEN
to a separate function. (part of #2599) - Renamed the functions
clif_parse_CashShop*
intoclif_parse_cashShop*
. (part of #2599) - Converted
clif_partytickack()
to use the struct version of packetZC_PARTY_CONFIG
. (part of #2599) - Extended
setpcblock()
with a newPCBLOCK_NPC
functionality to prevent players interacting with NPCs (e.g. During some npctalk dialogue). (#2606) - Extended
warpparty()
andwarpguild()
with an option to disregard thenowarp
andnowarpto
mapflags. (#2604, issue #1861) - Updated copyright header for year 2020.
Fixed
- Fixed reading water level from RSW version 2.2 and newer. (part of #2599)
- Fixed
pc_have_item_chain()
to retrieve the chain ID from the chain cache. (part of #2603) - Fixed an overflow in a zeny check condition in RODEX, causing code to never be executed. (#2266)
- Fixed a re-definition of HPM related symbols in plugins with multiple compilation units. (#2608)