Age | Commit message (Collapse) | Author | Files | Lines |
|
|
|
Signed-off-by: Haru <haru@dotalux.com>
|
|
Improved compatibility, portability and standards conformance.
- Since it is not possible to portably and reliably re-use the core's
symbols in plugins, symbols are no longer exported unless explicitly
required, in the UNIX builds. This mimics the Windows behavior and
adds HPM compatibility to OSes such as FreeBSD. Credits to Andrei Karas
for making this possible.
- For convenience, it is no longer necessary to call GET_SYMBOL, since
the plugin will automatically import all the available symbols when
it's loaded, depending on the included headers.
- Plugins are now supposed to include the "common/hercules.h" header
before including anything else. Incluing common/HPMi.h,
common/cbasetypes.h or conf/core.h is no longer necessary, as those
are guaranteed to be automatically included by hercules.h.
- HPM API version bumped to 1.1.
Signed-off-by: Haru <haru@dotalux.com>
|
|
|
|
- xs, ys, delay1, delay2 and event are now required, as described in
the documentation.
Signed-off-by: Haru <haru@dotalux.com>
|
|
Signed-off-by: Haru <haru@dotalux.com>
|
|
Signed-off-by: Haru <haru@dotalux.com>
|
|
@sold[] return named item values.
|
|
Signed-off-by: Haru <haru@dotalux.com>
|
|
- Include directives are now directory-independent.
- This will allow building plugins from other directories in future.
Signed-off-by: Haru <haru@dotalux.com>
|
|
- Due to the backward-incompatible change, clif->colormes was renamed to
clif->messagecolor_self (for similarity with clif->messagecolor). The
'color' argument is now a 0xRRGGBB color rather than a color_table
index.
- enum clif_colors is no longer needed, but 0xRRGGBB-based constants
are now provided to replace the old COLOR_* values.
Signed-off-by: Haru <haru@dotalux.com>
|
|
- Replaced several hardcoded values with the appropriate enums.
- Added documentation for some hardcoded values that haven't been
replaced by enums (yet)
- Minor code legibility improvements.
Signed-off-by: Haru <haru@dotalux.com>
|
|
- Corrected some NPC ID range checks
Signed-off-by: Haru <haru@dotalux.com>
|
|
Signed-off-by: Haru <haru@dotalux.com>
|
|
Signed-off-by: Haru <haru@dotalux.com>
|
|
Fixed an issue caused by unescaped characters being written and read out of the .pot unproperly.
This commit also causes map server to print the file it wrote to when terminating
Signed-off-by: shennetsind <ind@henn.et>
|
|
Servers can now run on any number of languages, without editing npc files.
Designed by Haruna and Ind
http://hercules.ws/board/topic/8687-hercules-ultimate-localization-design/
Signed-off-by: shennetsind <ind@henn.et>
|
|
- Variable scopes reduced
- Parenthesized ambiguous expressions
- Removed or added NULL checks where (un)necessary
- Corrected format strings
- Fixed typos potentially leading to bugs
Signed-off-by: Haru <haru@dotalux.com>
|
|
Addressing out of bounds read/write, pointless null checks on already deferenced variables, dead code.
Special Thanks to 4144 and Haruna!
Signed-off-by: shennetsind <ind@henn.et>
|
|
Addressing out of bounds read/write, pointless null checks on already deferenced variables.
Special Thanks to 4144 and Haruna!
Signed-off-by: shennetsind <ind@henn.et>
|
|
Addressing out of bounds read/write.
Special Thanks to 4144 and Haruna!
Signed-off-by: shennetsind <ind@henn.et>
|
|
|
|
Different fixes after automatic checks
|
|
|
|
|
|
|
|
|
|
|
|
|
|
far npc.
Note for Haruna: possible it may add side effects. Need check.
|
|
|
|
|
|
|
|
|
|
|
|
This includes, and is not limited to: mixed or wrong indentation, excess
whitespace (horizontal and vertical), misalignment, trailing spaces.
Signed-off-by: Haru <haru@dotalux.com>
|
|
- Control flow statements (break, case, continue, default, do, for, if,
switch, whilei, else) and sub-function declarations (function) will no
longer show a custom error message when they are incorrectly
capitalized.
- Note: This does not mean that they are no longer case-sensitive. This
only means that no special message will be shown in case such an error
is detected. The script engine will throw a normal error, as it would
with any other kind of typo, rather than treating this as a special
case. Enough time was given to update third party scripts, and it is
now time to clean up our parsing code and get rid of these special
warnings.
- Variables, labels and commands will still show a warning for the time
being, since the side-effects of silently ignoring it could be quite
dangerous. An alternative approach to the case-check will be presented
in future. For now, those who want to disable it (and save a bit on
execution time and memory use), can simply comment out the #define
ENABLE_CASE_CHECK line in script.h, as usual.
Signed-off-by: Haru <haru@dotalux.com>
|
|
- Top level commands (function, warp, shop, cashshop, script, trader,
duplicate, monster, boss_monster, mapflag) will no longer show a
custom error message when they are incorrectly capitalized.
- Note: This does not mean that the commands are no longer
case-sensitive. This only means that no special message will be shown
in case such an error is detected. The script engine will throw a
normal error, as it would with any other kind of typo, rather than
treating this as a special case. Enough time was given to update third
party scripts, and it is now time to clean up our parsing code and get
rid of these special warnings.
Signed-off-by: Haru <haru@dotalux.com>
|
|
- The issue was caused by memcmp failing because of garbage in structs
padding.
- Fixes bugreport:8410, special thanks (and credits for the fix) to Garr
http://hercules.ws/board/tracker/issue-8410-autotradeat-issue/
- Also reduced scope of some variables, where appropriate.
- Thanks to Ind.
Signed-off-by: Haru <haru@dotalux.com>
|
|
- Parameters passed to bindatcmd-invoked labels are now properly
space-delimited.
- This is in order to support strings containing multiple spaces or
containing a trailing space. Previously it was impossible to create a
bindatcmd command that could accept a player name such as
'This name has two spaces' or 'Sir Trailingspace '.
- Added documentation and usage examples, especially wrt space handling.
See doc/script_commands.txt for details.
- NOTE: Your custom atcommand labels may need edits, as we're no longer
trimming multiple sequantial spaces or trailing spaces, in order to
gain more flexibility. It is your care to do that.
- Special thanks to Dastgir, jaBote.
Signed-off-by: Haru <haru@dotalux.com>
|
|
is about.
Signed-off-by: Haru <haru@dotalux.com>
|
|
Fixed issue where 'pvp off' mapflag would assign the map the pk zone (this would not affect the pvp status of the map, only the disabled_ settings).
Special Thanks to kyeme
http://hercules.ws/board/tracker/issue-8272-map-zone-db-mapflags/
Signed-off-by: shennetsind <ind@henn.et>
|
|
reloadscript now clears npc-spawned (by warpportal script command) warps properly.
Special Thanks to Emistry, Cydh
http://hercules.ws/board/tracker/issue-8301-warpportal-reloadscript-map-server-error/
Signed-off-by: shennetsind <ind@henn.et>
|
|
Checks after using --enable-sanitize.
|
|
- Functions that expect a printf-style format string are now marked as
such, so that gcc/clang will emit a warning warn you if you mismatch
format string and arguments.
Signed-off-by: Haru <haru@dotalux.com>
|
|
- Complies with CERT DCL37-C
- Fixes issue #293 (special thanks to elfring)
Signed-off-by: Haru <haru@dotalux.com>
|
|
unlimited item amount is supported in SHOP/CASHSHOP NPC objects and when value is a negative value other than -1 a warning is shown
|
|
to strcmp
Fixed issue that different header syntax would lead to a deprecation warning instead of the proper error
|
|
|
|
Signed-off-by: Haru <haru@dotalux.com>
|