summaryrefslogtreecommitdiff
path: root/src/plugins/sample.c
AgeCommit message (Collapse)AuthorFilesLines
2015-12-15Added GPL-compliant header to all sources and build scriptsHaru1-3/+21
Signed-off-by: Haru <haru@dotalux.com>
2015-12-13- Fixed #723 now it's possible to retrieve Battle Config Settings from ↵Your Name1-4/+27
plugins into scripts - Fixed Possible Crash when null parse function pointer passed to HPMi->addConf - Now it's possible to use same parse function for all config entries - Now Battle Config entries must have a return function
2015-12-12Added server type checks to the sample plugin, to avoid hooking errors on ↵Haru1-16/+25
login/char servers Related to issue #909 Signed-off-by: Haru <haru@dotalux.com>
2015-10-19rename malloc.c/h to memmgr.Andrei Karas1-1/+1
2015-08-15Added core HPM interfaceHaru1-12/+5
Signed-off-by: Haru <haru@dotalux.com>
2015-08-15HPM compatibility improvementsHaru1-13/+4
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>
2015-08-15Moved session array into the socket interfaceHaru1-11/+8
Signed-off-by: Haru <haru@dotalux.com>
2015-06-19Removed ".." from include directivesHaru1-11/+11
- Include directives are now directory-independent. - This will allow building plugins from other directories in future. Signed-off-by: Haru <haru@dotalux.com>
2015-06-02Re-implemented clif->colormes to accept arbitrary colorsHaru1-1/+1
- 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>
2014-11-16Whitespace cleanup (no code changes)Haru1-22/+20
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>
2014-11-15Enable build HPM hooking plugin for char server.Andrei Karas1-1/+1
Enable char server in sample plugin.
2014-10-28Added preliminary support for login and char server in the HPMDataCheckHaru1-1/+1
- Special thanks to Ind Signed-off-by: Haru <haru@dotalux.com>
2014-05-16Follow-up to b6b3f58795288701d0e162d43fa6f0a47af913b3Haru1-5/+5
- Includes in some files weren't sorted alphabetically. Special thanks to KeiKun. Signed-off-by: Haru <haru@dotalux.com>
2014-03-11Fixed Bug 8067shennetsind1-1/+3
Sample plugin compiler error on msvc, credits to AnnieRuru (Thank you!) http://hercules.ws/board/tracker/issue-8067-pluginsamplec-throws-error-on-microsoft-compiler/ Signed-off-by: shennetsind <ind@henn.et>
2014-02-03Wrap up on HPMDCshennetsind1-0/+2
http://hercules.ws/board/topic/4283-introducing-hpm-datacheck/ Signed-off-by: shennetsind <ind@henn.et>
2013-12-16Introducing HPM Support for custom battle confsshennetsind1-1/+12
Special Thanks to Mhalicot. Signed-off-by: shennetsind <ind@henn.et>
2013-11-22Minor HPMi Sub Modificationsshennetsind1-13/+19
- HPMi->addCommand is now addAtcommand, dropped usage of ACMD_A() - HPMi->addScript is now addScriptCommand, dropped usage of BUILDIN_A() - HPMi->addCPCommand is now addCPCommand, dropped necessity of CPCMD_A() - HPMi->addPacket is now addPacket, 5th param (HPMi->pid) is now automatically filled by the macro, therefore param count drops to 4 (packetID,packetLength,packetFunction,packetIncomingPoint). There is no longer necessity to check for the availability of the commands, the macros will do it on their own and drop a warning about it upon failure. These changes won't affect pre-compiled plugins. Signed-off-by: shennetsind <ind@henn.et>
2013-11-13HPM Custom Data Struct Makeover!shennetsind1-7/+7
- Modified how the core handles it, making it easier to add new points. - Modified how plugins call it, calls were made shorter, e.g. 'HPMi->getFromSession(session[fd],HPMi->pid,0)' => 'getFromSession(session[fd],0)' -- check src/common/HPMi.h #defines for all the options - Added support for npc_data (getFromNPCD and so on) as requested in http://hercules.ws/board/topic/2923-hpm-custom-struct-npcs/ Signed-off-by: shennetsind <ind@henn.et>
2013-10-04HPM: Hooking!shennetsind1-1/+31
http://hercules.ws/board/topic/2399-hpm-hooking-now-available/ Signed-off-by: shennetsind <ind@henn.et>
2013-09-16Corrected line endings and BOM issues with several filesHaru1-1/+1
- Ensured final end-of-line character in every file. - Corrected cases of mixed line endings (mostly CR and CRLF within the same file.) - Removed extra BOM from some scripts, since it causes a parsing error. Signed-off-by: Haru <haru@dotalux.com>
2013-08-08HPM Updateshennetsind1-4/+78
- Custom Packet Support - Custom Data Struct Support (currently append-able to map_session_data and socket_data) - Char Server Support - Login Server Support http://hercules.ws/board/topic/1934-hercules-plugin-manager-update/ Documentation will soon be updated in http://hercules.ws/wiki/HPM Signed-off-by: shennetsind <ind@henn.et>
2013-05-02Follow up a2c45a8db6d724b98ab41fe9e75e1f7ea7523d5dshennetsind1-5/+1
Missing CMakeLists.txt edit, removed unnecessary check on the sample plugin Signed-off-by: shennetsind <ind@henn.et>
2013-05-02Introducing Hercules Plugin Manangershennetsind1-0/+74
http://hercules.ws/board/topic/549-introducing-hercules-plugin-manager/ Signed-off-by: shennetsind <ind@henn.et>