summaryrefslogtreecommitdiff
path: root/src/map/homunculus.c
AgeCommit message (Collapse)AuthorFilesLines
2016-12-03Remove the platform-dependent variables from struct status_dataHaru1-1/+1
`struct status_data::class_` was platform dependent since c30bb75ec50624429bff7b4106db4be0fda366d6 in order to silence some compile warnings (uint32 on 64 bit builds and uint16 on 32 bit builds). It's now been changed to the correct type, int32, on all platforms. Since the change has potential to silently break third party code, the variable was renamed to `class`. Signed-off-by: Haru <haru@dotalux.com>
2016-09-30Add different fixes for gcc 7 warnings.Andrei Karas1-1/+1
Some possible buffer overflows. Add attribute for mark fallthrough cases. Skipped libconfig warnings.
2016-07-12Interface random.chemagx1-25/+25
2016-04-23Removed the 'len' argument from clif_disp_onlyself() and clif->disp_message()Haru1-1/+1
- The argument was redundant, since the passed value is always the same as the passed string's length (it doesn't make sense otherwise). The argument is implicit now. Less typing and less errors. Signed-off-by: Haru <haru@dotalux.com>
2016-02-27Replaced various '-1' with the correct constantHaru1-5/+6
INFINITE_DURATION, INVALID_TIMER, SC_NONE, INDEX_NOT_FOUND, depending on context. Signed-off-by: Haru <haru@dotalux.com>
2016-02-24Updated homunculus_recv_data() to work better with const dataHaru1-18/+29
Now it no longer needs to memcpy data to a temporary buffer. Signed-off-by: Haru <haru@dotalux.com>
2016-02-24Added const qualifier to several variable/argument pointersHaru1-13/+23
- This is necessary for compatibility with a const RFIFOP. Signed-off-by: Haru <haru@dotalux.com>
2016-01-06Replaced the remaining explicit casts with BL_CAST/BL_UCASTHaru1-1/+2
Signed-off-by: Haru <haru@dotalux.com>
2016-01-06Change all TBL_PC to struct map_session_data as per style guidelineshemagx1-1/+1
Signed-off-by: Haru <haru@dotalux.com>
2016-01-03Corrected wrong use of MAX_PC_SKILL_REQUIRE instead of MAX_HOM_SKILL_REQUIREHaru1-4/+4
Signed-off-by: Haru <haru@dotalux.com>
2015-12-28Added homun_id enum, replaced numeric constants with enum membersHaru1-13/+21
Signed-off-by: Haru <haru@dotalux.com>
2015-12-15Added GPL-compliant header to all sources and build scriptsHaru1-4/+20
Signed-off-by: Haru <haru@dotalux.com>
2015-12-05Removed some unnecessary assertionsHaru1-5/+3
- Follow-up to 81e0257 Signed-off-by: Haru <haru@dotalux.com>
2015-12-04Add missing checks to homunculus.cAndrei Karas1-9/+46
2015-10-19rename malloc.c/h to memmgr.Andrei Karas1-1/+1
2015-09-25More aggressive whitespace cleanup. Follow up to 51329e6Haru1-14/+13
Signed-off-by: Haru <haru@dotalux.com>
2015-08-15HPM compatibility improvementsHaru1-0/+2
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-07-25Reduce memory usage in HPM in homunculus.cAndrei Karas1-41/+41
2015-06-19Removed ".." from include directivesHaru1-31/+31
- 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-01Replaced some of the hardcoded values with constants (map)Haru1-1/+1
- 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>
2015-05-17Fixed some issues detected by coverity scanHaru1-1/+1
Signed-off-by: Haru <haru@dotalux.com>
2015-02-23Hercules Ultimate Localization Designshennetsind1-1/+1
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>
2015-01-20Minor fixes and tweaks suggested by cppcheckHaru1-1/+1
- 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>
2014-12-10RENEWAL Updates:malufett1-0/+2
-Homunculus Official Statuses -Updated RE @mobinfo to show proper status data.(Follow up 28a8b0f7b06a6af86aff6ececf7d9541d457e297) -Some official behaviors. Signed-off-by: malufett <malufett.eat.my.binaries@gmail.com>
2014-11-16Whitespace cleanup (no code changes)Haru1-32/+32
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-09-19Update official Homunculus renewal stats (bug:6970) ↵Michieru1-1/+1
http://hercules.ws/board/tracker/issue-6970-homunculus-renewal-stats/ Follow up (bug 8348): https://github.com/HerculesWS/Hercules/commit/ddc52570a9bf694cdba6445bc02350a94856a583 Update official overbrand damage (special thanks to Rytech) The skill damage is no longer affected by your base level. It is now affected by the enemy's base level (special thanks to Rytech) Updated the list of skills usable while mounted on a mado. (special thanks to Rytech)
2014-08-20Follow-up to b294026e6614a652c23bb0cea8a0d4dc69d8b125Haru1-1/+1
- Added documentation for the pc->search_item function and formalized its return values. If the searched item is not found, now it returns the newly introduced constant INDEX_NOT_FOUND. - Updated pc->search_item checks to make use of INDEX_NOT_FOUND. - Fixed an issue with anvils not detected by the weapon forginc code, if they were in the first position of the inventory. - Added ITEMID constants for the four anvil types. Signed-off-by: Haru <haru@dotalux.com>
2014-05-30Fixed typos inside src/Shido1-2/+2
2014-05-10Re-commit of "Fixed order of includes in all source files"Haru1-27/+29
This reverts commit 94657284973f4037596bae468ebfbee5c217e02b.
2014-05-10Revert "Fixed order of includes in all source files"panikon1-29/+27
This reverts commit b6b3f58795288701d0e162d43fa6f0a47af913b3. Fixes issue 8184 http://hercules.ws/board/tracker/issue-8184-cart-related/
2014-05-09Fixed order of includes in all source filesHaru1-27/+29
- 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>
2014-05-08Homonculus S Updatemalufett1-0/+19
-Updated and fixed Eira skills to official behavior. Fixed Bug#8168 -http://hercules.ws/board/tracker/issue-8168-crush-strike/?gopid=22703#entry22703 Signed-off-by: malufett <malufett.eat.my.binaries@gmail.com>
2014-02-22Changed function types related to SG days in date.cpanikon1-1/+1
Changed types in clif.c: bool clif_setip -> map:ip_set, map: char_ip_set changed as well bool clif_setbindip bool clif_send bool clif_spawn void clif_homskillinfoblock bool clif_sub_guild_invite Note that return values of those types have changed, so if any modification uses their return values it should be changed. clif_disp_onlyself replaced as a macro clif_viewequip_fail replaced as a macro Merged clif_skillup and clif_guild_skillup as they were using the same packet Added packet_len() values in clif_updatestatus
2013-12-17Fixed several compiler warningsHaru1-1/+1
- Warnings detected thanks to Xcode's compiler settings (more strict by default) and clang, warnings mostly but not only related to data sizes on 64 bit systems, that were silenced until now by very lax compiler settings. - This also decreases by a great deal the amount of warnings produced by MSVC in x64 mode (for the adventurous ones who tried that) - Also fixed (or silenced in case of false positives) the potential issues pointed out by the (awesome) clang static analyzer. - Patch co-produced with Ind, I'm merging and committing in his place! Signed-off-by: Haru <haru@dotalux.com>
2013-11-08Fixed 5 Homun Bugsshennetsind1-1/+3
1. Homun cooldowns are no longer reset upon being vaporized. 2. Call Homun now displays the skill title above the char upon success. 3. Homuns that have been out of owners sight for over 3 seconds will now be teleport back to master. 4. pc_jobchange now correctly vaporizes the homun. 5. New homunculus now spawn with full health. Special Thanks to kyeme/Beret for all the information and official server testing. Signed-off-by: shennetsind <ind@henn.et>
2013-11-06Merge pull request #217 from HerculesWS/script-checkershennetsind1-1/+5
Introducing the Hercules Standalone Script Syntax Checker
2013-11-06Modified status_calc_shennetsind1-6/+6
Replaces the previous 'first' flag with a multi-option flag capable of selectively determining calls where the recalculation must not be hold by delayed damage, and therefore must take place immediately. This fixes issues caused by actions that require immediate recalculation e.g. on-level-up max_hp update, also modified @baselevel where status_calc was being called after the heal and not before, causing it not to be fully healed. Special Thanks to Haruna! <3 Signed-off-by: shennetsind <ind@henn.et>
2013-11-05Introducing the Hercules Standalone Script Syntax CheckerHaru1-1/+5
- 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.
2013-10-26Changed 'tick' variables to 64 bitHaru1-1/+1
- This fixes an issue with timers that stop working after about 24-49 days when the tick overflows (note that this may happen much earlier than that, and at hard to predict times, on some systems) - Updated the RDTSC help message in the configure script to also warn users about issues with SpeedStep enabled systems. - On Windows, tick() still has a resolution of 10~15ms (or even as low as 100ms on some systems). A TODO comment (thanks, Ai4rei) was added for a follow-up patch, as I want this one to be as small as possible) - Note: on Windows versions earlier than 6.x (Vista, Server 2008), the tick overflow issue is NOT fixed, since they don't support the function used to retrieve a 64 bit tick. This isn't a big issue, since those platforms are already - or going soon to be - out of their extended support period, and it's already advisable to upgrade, for other reasons. If you're the unfortunate user of such a system, it is recommended that you reboot your machine at least once every 49 days for Hercules to work reliably. - Note: To clear some doubts, since I've already been asked, this has absolutely NOTHING to do with 32/64 bit CPUs or OSes. It's all about a variable's size, not the size of registers of your CPU, and your 32bit CPU will be able to handle this just fine. Signed-off-by: Haru <haru@dotalux.com>
2013-10-10Homun-S Quest Updatedshennetsind1-11/+11
Partial Merge of 0b68607 Quest Changelog: - 1.2 Replaced with official script. [Euphy] Closes #177 Closes #178 Signed-off-by: shennetsind <ind@henn.et>
2013-09-27Renamed iMap interface to mapHaru1-12/+12
Signed-off-by: Haru <haru@dotalux.com>
2013-09-27Renamed iStatus interface to statusHaru1-6/+6
Signed-off-by: Haru <haru@dotalux.com>
2013-09-25Merge branch 'master' of https://github.com/HerculesWS/Herculesshennetsind1-8/+8
Conflicts: src/map/chrif.c src/map/clif.c src/map/homunculus.c src/map/pet.c src/map/script.c src/map/skill.c src/map/status.c All clear.
2013-09-25Renamed iTimer interface to timer.shennetsind1-6/+6
Also removed duplicate mentions of timer within calls to shorten.
2013-09-25Renamed more forgotten variables during interface conversionsHaru1-3/+3
(related: b9c8f57) Most renames are trivial (just to avoid shadowing global variables, even if they currently did no harm), but there were some cases of partly renamed variables that caused some NULL checks to always pass and who knows what could have been happened when they were too subtle to make the application crash. Also corrected some potentially unsafe macro definitions Signed-off-by: Haru <haru@dotalux.com>
2013-09-21Corrected invalid values assigned to enum homun_type variablesHaru1-6/+6
- Fixes a warning in clang-5.0.0 (and a potentially incorrect/undefined behavior of the related code) Signed-off-by: Haru <haru@dotalux.com>
2013-09-16HPM: Npc.c Interfaceshennetsind1-1/+1
Fully Interfaced. Special Thanks to Haruna Signed-off-by: shennetsind <ind@henn.et>
2013-09-16HPM: Unit.c Interfaceshennetsind1-8/+8
Fully Interfaced Signed-off-by: shennetsind <ind@henn.et>
2013-07-29Added intif interfaceSusu1-5/+5
2013-07-22Fixed the homun_skill_tree parser.Haru1-2/+2
- Follow-up to efbd5d0 (related: issue #4337) - Now all the fields are read as intended. Signed-off-by: Haru <haru@dotalux.com>