summaryrefslogtreecommitdiff
path: root/src/map/mob.c
AgeCommit message (Collapse)AuthorFilesLines
2014-05-13Removed trailing whitespace (sources)Haru1-1/+1
Signed-off-by: Haru <haru@dotalux.com>
2014-05-10Re-commit of "Fixed order of includes in all source files"Haru1-33/+36
This reverts commit 94657284973f4037596bae468ebfbee5c217e02b.
2014-05-10Revert "Fixed order of includes in all source files"panikon1-36/+33
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-33/+36
- 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-02-27Cleaned up messages.confHaru1-1/+1
- 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>
2014-02-22Changed function types related to SG days in date.cpanikon1-2/+2
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
2014-02-14sc sourcesshennetsind1-6/+6
Signed-off-by: shennetsind <ind@henn.et>
2014-02-14Renewal mechanics rebalance mega-updateMichieru1-3/+4
- More info on the forums, at http://hercules.ws/board/topic/4428-michierus-renewal-update/ Signed-off-by: Haru <haru@dotalux.com>
2014-02-11Fixed bug 7977 as in rAthena revf488861298d50afb41f8418700ae164e63bee070panikon1-1/+1
2014-02-09Improved script case check reports to include more accurate source info.Haru1-0/+6
- Fixes bugreport:8013, thanks to Dastgir Pojee http://hercules.ws/board/tracker/issue-8013-script-add-str-problem/ Signed-off-by: Haru <haru@dotalux.com>
2014-01-18Socket interfacedshennetsind1-1/+1
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>
2014-01-11Hercules 1st 2014 MegaPatchshennetsind1-2/+2
http://hercules.ws/board/topic/3886-hercules-1st-2014-megapatch/ Signed-off-by: shennetsind <ind@henn.et>
2013-12-17Speed up of several procedures that rely on ERS, _mreallocz ('z'ero)shennetsind1-2/+1
Made Possible Thanks to the Woonderful Haruna! <3 Commit also fixes an inconsistency in the ERS, where it'd start with clear memory but would use garbage upon resizing, also implements a new ERS option that clears entries as soon as pass by ers_free, so that they'll be all shinny for when ers_alloc reuses them. Signed-off-by: shennetsind <ind@henn.et>
2013-12-17Fixed several compiler warningsHaru1-9/+10
- 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-12-09Fixed some logic errorsshennetsind1-1/+1
Special Thanks to Haru Signed-off-by: shennetsind <ind@henn.et>
2013-12-04Follow-up to 6e9c385b8fa2fbca97ca23e35f0b8e5dabd13526Haru1-8/+14
- Case-sensitive AegisName and Sprite ID lookups are now optional, controlled by the case_sensitive_aegisnames battle config flag (you can set it to "no" to restore the case insensitive behavior.) - Special thanks to Ind. Signed-off-by: Haru <haru@dotalux.com>
2013-12-01Changed item Aegis ID and mob Sprite ID lookups to case sensitive.Haru1-3/+3
Signed-off-by: Haru <haru@dotalux.com>
2013-11-30Merge branch 'master' of https://github.com/HerculesWS/Herculesshennetsind1-1/+1
2013-11-29Minor improvementshennetsind1-30/+29
pc_checkitem is now triggered by @reloaditemdb to ensure modified conditions are respected, also a performance boost that causes the itemlist/cartlist/storagelist/gstoragelist lookups to only be triggered on demand instead of on every teleport. Closes #219 Fixed ancient monster ai bug that caused mobs to consider themselves elegible targets, which would waste status_check_skilluse and battle_check_target calls. Signed-off-by: shennetsind <ind@henn.et>
2013-11-29Corrected an uninitialized variable when adding an itemHaru1-1/+1
- The .favorite field of newly added inventory items wasn't correctly initialized to zero, potentially causing data loss (fixes bugreport:7854, thanks to Vincent, GrumpyPanda). Signed-off-by: Haru <haru@dotalux.com>
2013-11-27Fixed Bug 7858shennetsind1-0/+8
Official item drop announce support, currently hardcoded list -- we'll be following up shortly with a decent way of storing it. Special Thanks to Yommy, Beret, kyeme. http://hercules.ws/board/tracker/issue-7858-monster-rare-drop-announcement/ Signed-off-by: shennetsind <ind@henn.et>
2013-11-27Dropped emperium spawn restrictionsshennetsind1-3/+9
Thanks to kyeme for bringing it to our attention. Signed-off-by: shennetsind <ind@henn.et>
2013-11-26Fixed Bug 7794shennetsind1-0/+13
monster's healing now refreshes their hp bar accordingly. Special Thanks to Beret. http://hercules.ws/board/tracker/issue-7794-healing-in-monsters/ Signed-off-by: shennetsind <ind@henn.et>
2013-11-19Sanitized and improved several macros through the codeHaru1-1/+1
- 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>
2013-11-18Corrected size-related constant names and cleaned up comments (closes #222).Mumbles1-3/+3
2013-11-08Added support for monster spritename constantsHaru1-0/+11
- Follow-up to 124ab2a1cdb344f24170a4d91f7000ebabf39b40 - Replaced numeric IDs in NPC definitions and setnpcdisplay calls with the appropriate constants - Made possible thanks to Ind Signed-off-by: Haru <haru@dotalux.com>
2013-11-06Merge remote-tracking branch 'upstream/master'shennetsind1-9/+17
Signed-off-by: shennetsind <ind@henn.et> Conflicts: src/map/pc.c
2013-11-06Merge pull request #217 from HerculesWS/script-checkershennetsind1-6/+14
Introducing the Hercules Standalone Script Syntax Checker
2013-11-06Modified status_calc_shennetsind1-3/+3
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-6/+14
- 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-30Account-wide Exp/Drop/Death Modifiersshennetsind1-0/+6
Attempting to mimic the official as suggested in http://hercules.ws/board/topic/250-official-vip-system/ The variables can be read and modified thru scripting as well as sql, the patch introduces 3 new pc-arams 'ModExp','ModDrop' and 'ModDeath' for that purpose. The OnLogin modifier display is not the real deal though -- wasn't able to get it to output properly (though that might have been my client files failt) Up for review. Signed-off-by: shennetsind <ind@henn.et>
2013-10-26Changed 'tick' variables to 64 bitHaru1-45/+36
- 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-02HPM: Map.c Completedshennetsind1-44/+44
Fully Interfaced. Moved missing vars and declarations of interest into the interface, removed duplicate mentions of map within calls to shorten wherever it made sense to. Ladies and Gentleman its my pleasure to announce that with this commit we've revised all of map-server, we've learned a hell lot from this, improved many things on the go and have a number of features to be released thanks to this. *cough* hpm hooking *cough*. Signed-off-by: shennetsind <ind@henn.et>
2013-09-28Merge branch 'master' of https://github.com/HerculesWS/Herculesshennetsind1-1/+1
2013-09-28HPM: pc.c Completedshennetsind1-4/+4
Moved missing vars and declarations of interest into the interface. Signed-off-by: shennetsind <ind@henn.et>
2013-09-27Corrected mob_warpslave_sub call with CLR_TELEPORT instead of CLR_RESPAWN.cannelle1-1/+1
2013-09-27HPM: Skill.c Completedshennetsind1-4/+4
Moved missing vars and declarations of interest into the interface. Signed-off-by: shennetsind <ind@henn.et>
2013-09-27Renamed iMap interface to mapHaru1-155/+127
Signed-off-by: Haru <haru@dotalux.com>
2013-09-27Renamed iStatus interface to statusHaru1-56/+56
Signed-off-by: Haru <haru@dotalux.com>
2013-09-26Renamed variables that would conflict with a rename of iMap to mapHaru1-49/+43
Note to plugin developers: if you were importing the "map", you'll need to change it to "maplist" Signed-off-by: Haru <haru@dotalux.com>
2013-09-25Renamed local variables that would conflict with a rename of iStatus to statusHaru1-74/+71
Signed-off-by: Haru <haru@dotalux.com>
2013-09-25Merge branch 'master' of https://github.com/HerculesWS/Herculesshennetsind1-48/+32
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-30/+30
Also removed duplicate mentions of timer within calls to shorten.
2013-09-25Renamed more forgotten variables during interface conversionsHaru1-33/+21
(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-21Fixed a potentially negative array subscript causing a mapserver crashHaru1-15/+11
- Fixes bugreport:7717, special thanks to quesoph http://hercules.ws/board/tracker/issue-7717-map-crash-when-warping-on-a-floating-npc/ - Also changed various map[foo].index to the map_id2index(foo) macro. Signed-off-by: Haru <haru@dotalux.com>
2013-09-17HPM: Itemdb.c Interfaceshennetsind1-2/+2
Fully Integrated. Closes #110 Signed-off-by: shennetsind <ind@henn.et>
2013-09-16HPM: Quest.c Interfaceshennetsind1-2/+2
Fully Integrated Signed-off-by: shennetsind <ind@henn.et>
2013-09-16HPM: Path.c Interfaceshennetsind1-1/+1
Fully Integrated Signed-off-by: shennetsind <ind@henn.et>
2013-09-16HPM: Pet.c Interfaceshennetsind1-1/+1
Fully Integrated. Signed-off-by: shennetsind <ind@henn.et>
2013-09-16HPM: Npc.c Interfaceshennetsind1-6/+6
Fully Interfaced. Special Thanks to Haruna Signed-off-by: shennetsind <ind@henn.et>