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>
|
|
Signed-off-by: Haru <haru@dotalux.com>
|
|
- Replaced some macro calls with the proper interface syntax
- Removed useless macros and workarounds
API changes summary:
- WFIFOSET() can now be safely used both inside and outside socket.c
- RFIFOSKIP() can now be safely used both inside and outside socket.c
- do_close() is now sockt->close()
- flush_fifo() is now sockt->flush()
- flush_fifos() is now sockt->flush_fifos()
- getips() is now sockt->getips()
- host2ip() is now sockt->host2ip()
- ip2str() is now sockt->ip2str()
- ntows() is now sockt->ntows()
- make_connection() is now sockt->make_connection()
- make_listen_bind() is now sockt->make_listen_bind()
- realloc_fifo() is now sockt->realloc_fifo()
- realloc_writefifo() is now sockt->realloc_writefifo()
- session_isActive() is now sockt->session_is_active()
- session_isValid() is now sockt->session_is_valid()
- set_defaultparse() is now sockt->set_defaultparse()
- set_eof() is now sockt->eof()
- set_noblocking() is now sockt->set_noblocking()
- str2ip() is now sockt->str2ip()
Signed-off-by: Haru <haru@dotalux.com>
|
|
|
|
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>
|
|
- 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>
|
|
- 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>
|
|
- Fixes bugreport:8504
http://hercules.ws/board/tracker/issue-8504-changesex/
- Existing database entries with an incorrect per-character sex will be
fixed automatically when the character logs in to match the account's
sex, if the PACKETVER doesn't support per-character sex.
Signed-off-by: Haru <haru@dotalux.com>
|
|
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>
|
|
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>
|
|
Signed-off-by: HerculesWSAPI <Hercules@efficiently.awesome>
|
|
to Ind
- Service for you now work properly on all skill level.
- Fixed a problem that sometimes randomly a status change was removed on logout although it shouldn't. Special thanks to Playtester
|
|
- Please use the values from enum scstart_flag when calling
status_change_start or related functions.
- This also applies to the sc_start script commands.
Signed-off-by: Haru <haru@dotalux.com>
|
|
- Fixes bug report http://hercules.ws/board/tracker/issue-8337-ankle-snare/?gopid=23533#entry23533
|
|
Fixed devotion behaviour according to bug report 8292 http://hercules.ws/board/tracker/issue-8292-devotion (precast conditions pending)
Cleaned non existing flag from status->change_start calls.
Removed redundant condition in battle->check_range.
|
|
- 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>
|
|
|
|
Signed-off-by: Haru <haru@dotalux.com>
|
|
This reverts commit 94657284973f4037596bae468ebfbee5c217e02b.
|
|
This reverts commit b6b3f58795288701d0e162d43fa6f0a47af913b3.
Fixes issue 8184
http://hercules.ws/board/tracker/issue-8184-cart-related/
|
|
- Changed order according to the (upcoming) code style guidelines.
- Fixes several issues caused by missing headers when their include
order is changed or in plugins.
Signed-off-by: Haru <haru@dotalux.com>
|
|
- Sanitized some macros (they weren't going to cause problems, but
better being safe than sorry)
- Parenthesized an incorrect expression in 6f6a6b3.
- Inverted an if(foo); else bar; statement in 6f6a6b3 to get rid of the
empty expression (for legibility).
- Commented out some unnecessary lines as suggested by clang's static
analyzer.
Signed-off-by: Haru <haru@dotalux.com>
|
|
http://hercules.ws/board/tracker/issue-7939-change-sex/
Also cleaned a bit the change sex process
|
|
gms relogging while char server is on char_server_type will no longer get rejected.
Special Thanks to Beret.
http://hercules.ws/board/tracker/issue-8078-maintenance-mode-enabled/
Signed-off-by: shennetsind <ind@henn.et>
|
|
- Reorganized regs var/array DBMaps into a specific reg_db structure
Signed-off-by: Haru <haru@dotalux.com>
|
|
- Removed some unused messages.
- Re-mapped some duplicate IDs - fixes bugreport:8057, thanks to
AnnieRuru http://hercules.ws/board/tracker/issue-8057-jobname-with-invalid-id-return-tomb/
- Fixed some issues with the message range loaded by the char server.
- Reworded some messages, fixed typos in others.
Note for translation users: some messages have been remapped to new IDs.
You'll need to remap them in your custom translations as well. The list
of changes is as follows:
- Removed messages (you can safely remove them from your translations):
15, 26-27, 35, 48-52, 57-58, 65-69, 82-83, 86-87, 91, 101, 140-142,
164, 189-194, 199-200, 202-203, 209-211, 215-218, 267-268, 275,
289-290, 380-385, 387-388, 401, 497, 499, 535-537, 922, 995, 1063,
1079, 1291-1294
- New messages (you need to add them to your translations): 15
- Moved messages (you need to change their IDs in your translations file):
* [Unknown Job] 656 -> 620,
* [Job names] 681~693 -> 656~668
* [Tombstone related] 656~661 -> 856~861
* [Etc messages] 662~680 -> 862~880
* [@version] 1436 -> 1294
* [Hercules Chat] 1475 -> 1436
Signed-off-by: Haru <haru@dotalux.com>
|
|
Ensured same vars are also cleared upon shutdown.
Signed-off-by: shennetsind <ind@henn.et>
|
|
Player's var db was being cleared on unit free rather than on auth db clear, which'd cause map server to crash when trying to save already-disconnected (aka char logged out when char server was down) data.
Special Thanks to FeNixZ.
http://hercules.ws/board/tracker/issue-8037-map-crash-every-6-12/
Signed-off-by: shennetsind <ind@henn.et>
|
|
way to check for char server connection fixed
Special Thanks to FeNixZ!
http://hercules.ws/board/tracker/issue-8031-map-server-crash-save-scdata-single-del-scdata-single/
Signed-off-by: shennetsind <ind@henn.et>
|
|
Signed-off-by: shennetsind <ind@henn.et>
|
|
Fixed issue with "permanent" (durationless) status changes (such as carts) integrity caused on server shutdown.
Special Thanks to Haru!
http://hercules.ws/board/tracker/issue-7962-command-at/
Signed-off-by: shennetsind <ind@henn.et>
|
|
We designed this one with having as little changes required elsewhere in mind, thus the way most socket-related things are called has not changed.
Plugins may now take a greater advantage of the socket features.
Signed-off-by: shennetsind <ind@henn.et>
|
|
Function types behaviour
|
|
|
|
changemapserverack.
|
|
Altered many function types from int to bool(C99) and added meaningful return values.
Altered many function types from int to void as they didn't have any meaningful return value.
Replaced chrif_char_offline with a macro as this function did exactly the same as chrif_char_offline_nsd.
|
|
Signed-off-by: shennetsind <ind@henn.et>
|
|
From some notes I took while working on the megapatch:
- Dropped unused char_dat variable in chrif's auth_node
- Fixed DB/BB/PB Logging, which could create false logs due to where it was placed.
Signed-off-by: shennetsind <ind@henn.et>
|
|
http://hercules.ws/board/topic/3886-hercules-1st-2014-megapatch/
Signed-off-by: shennetsind <ind@henn.et>
|
|
Aka autotrading merchants survive server restarts.
Originally sekai's (aka me).
Special Thanks to Haruna, Michieru.
Signed-off-by: shennetsind <ind@henn.et>
|
|
- Sanitized all potentially unsafe macros (related eA:15259)
- Improved some function-like macros to evaluate their argument only
once and keep it in a temporary variable. This improves performance
in the damage calculation related code.
Signed-off-by: Haru <haru@dotalux.com>
|
|
Fixed glitch that'd occur in clients with login screen where even after logging out the client would still remember previously sent banned timestamps, keeping the char banned until client was reopened.
Also dropped a error message map server would show up when banning offline characters.
Special Thanks to Mvmbles for pointing it out, Haruna for testing and helping fix it.
Signed-off-by: shennetsind <ind@henn.et>
|
|
so that the char id is used instead of account id, thus not disconnecting the account id from map server unless the char id being banned is online, special thanks to haruna.
Signed-off-by: shennetsind <ind@henn.et>
|
|
@charban/@charunban, can temporarily block any accounts as opposed to the usual account-wide block.
Special Thanks to Haruna, Yommy!
Signed-off-by: shennetsind <ind@henn.et>
|
|
- Added a command line argument '--script-check' to check a script's
syntax without running the server (and without requiring a SQL
connection). Usage: ./map-server --script-check /path/to/the/script.txt
- For convenience, a script-checker bash script is provided, to set the
path correctly when called from a different directory. Usage:
/path/to/Hercules/script-checker /path/to/the/script/to/check.txt
- While the script checker will supposedly work under windows as well,
no convenience scripts are currently provided for platforms other than
UNIX (feel free to open a pull request with a .bat launcher or
whatever you like)
- Integration with IDEs or text editors is possible. In fact, I already
have a fully functional plugin for vim (through vim-syntastic), and if
there's enough interest, I'll publish it. - screenshot: http://d.pr/i/NOBD
- If you want an online checker, http://haru.ws/scriptchecker/ is
running this code, without modifications and will be kept up to date
(without any warranty though.)
- Special thanks to Ind, Yommy, Streusel, who helped making this
possible, in a way or another.
|