summaryrefslogtreecommitdiff
path: root/src/map/map.h
AgeCommit message (Collapse)AuthorFilesLines
2015-10-22Removed support for the deprecated SQL item, mob, mob_skill databases.Haru1-10/+0
Follow-up to 84e02ac28fbb15c58d0a0f8a916b49663198b05b Signed-off-by: Haru <haru@dotalux.com>
2015-10-11Cleanup of the HPluginData implementation (second part)Haru1-3/+1
- Changed the hplugin_data_store's array into a VECTOR. Signed-off-by: Haru <haru@dotalux.com>
2015-10-11Cleanup of the HPluginData implementation (First part)Haru1-2/+2
- Several explicit casts are removed, to have a slightly better type-checking at compile time. - A destructor function is provided, to remove code duplication. Signed-off-by: Haru <haru@dotalux.com>
2015-09-28Fixed merge behaviour of map zones. Fixes #572Kpy!1-1/+8
- Both "Normal" and "PK Mode" default zones will now be overwritten (instead of merged) by "GvG", "PvP" and "Battlegrounds" zones. - Refactored some code to clarify intent.
2015-09-24Add bl parameter to map_searchrandfreecell and map_addflooritem.Andrei Karas1-2/+2
2015-09-24Add bl parameter to closest_freecell.Andrei Karas1-1/+1
2015-09-24Add bl parameter to getcell functions.Andrei Karas1-4/+4
2015-08-15HPM compatibility improvementsHaru1-8/+11
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-09Removed unused tables sstatus and interregHaru1-1/+0
Signed-off-by: Haru <haru@dotalux.com>
2015-06-19Cleaned up some #includesHaru1-0/+1
Signed-off-by: Haru <haru@dotalux.com>
2015-06-19Removed ".." from include directivesHaru1-9/+9
- 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-12Merge pull request #526 from zackdreaver/masterDastgir1-0/+2
Several Bugs Fixed. Added Many new items, Fixed some ItemScripts, Added 2 New Race Groups: Scraba and Turtle.
2015-06-12Updated Item Scriptszackdreaver1-0/+2
Changes AegisName to Official. Added 2 New Race Group: Scaraba,Turtle Fix bug#8717 http://herc.ws/board/tracker/issue-8717-9-glorious-holy-avenger-auto-lex-aeterna/ Signed-off-by: zackdreaver <zackdreaver@gmail.com>
2015-06-12RC_Player, RC_DemiPlayer, RC_NonPlayer, RC_NonDemiPlayer, RC_All and Ele_All ↵Dastgir1-2/+8
implemented (ref:Herc@9d1fe3cd3855bb973c55bdf98909c25bb80ee97a)
2015-06-01Replaced some of the hardcoded values with constants (char)Haru1-10/+0
- 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-19Fixed some issues reported by coverity scan [3/3]Haru1-2/+2
- Automatically zeroed variables are now zeroed in the correct size, regardless of padding. - Special thanks to Ind. Signed-off-by: Haru <haru@dotalux.com>
2015-03-11RENEWAL Updates:malufett1-0/+1
-Fixed card bonuses related to to ATK.(Added 'bRaceTolerance'). Thanks Michi for the support. -Fixed Renewal EDP. Special thanks to Awesome Yommy <3 -Enabled 'display_skill_fail' since '/skillfail' is already available in the client Signed-off-by: malufett <malufett.eat.my.binaries@gmail.com>
2015-02-23Hercules Ultimate Localization Designshennetsind1-0/+2
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-24Fixed Bug 8395shennetsind1-0/+3
Adjusted zone merging logic to not merge items the main zone originally intended to enable (i.e. normal zone disables Velum_Jamadhar, gvg zone sets Velum_Jamadhar: false) Special Thanks to Ancyker, Michieru http://hercules.ws/board/tracker/issue-8395-map-zone-db-stacking-incorrectly-siege-gears-not-working/ Signed-off-by: shennetsind <ind@henn.et>
2015-01-24Moved the Hercules Channel System to its own file/interfaceHaru1-2/+2
Signed-off-by: Haru <haru@dotalux.com>
2015-01-23Cleaned up spirit charms implementation (optimized memory and CPU usage)Haru1-9/+12
Signed-off-by: Haru <haru@dotalux.com>
2015-01-22Removed name distinction between (sql) mob/item/mob_skill db and db_re variantsHaru1-3/+0
- Since there (currently and in future) is no difference between the table structure for renewal and pre-renewal databases, it makes no sense to have extra code that makes a distinction between their names. A server will always use either one or the other, never both at the same time. - If you have a mob_db_re, mob_skill_db_re and/or item_db_re table, please rename it to mob_db, mob_skill_db and/or item_db_re, respectively. - No upgrade script provided. I'd like to remind everyone that these tables are optional (and deprecated), and they are only offered for convenience for those who need them for web control panels and similar software. Signed-off-by: Haru <haru@dotalux.com>
2015-01-18Command line arguments handling overhaulHaru1-5/+8
- login_server, char_server, map_server as well as the tools (mapcache) now have a common command line arguments handling mechanism. - All of them now accept `--help` (`-h`), `--version` (`-v`) and `--load-plugin`. - login_server now accepts `--login-config` and `--lan-config` instead of relying on positional arguments to override those files. The old syntax will no longer work, please update your custom startup scripts. - char_server now accepts `--char-config`, `--inter-config`, `--lan-config` instead of relying on positional arguments. The old syntax will no longer work, please update your custom startup scripts. - mapcache now accepts `--grf-list`, `--map-list`, `--map-cache`, `--rebuild` in place of, respectively, `-grf`, `-list`, `-cache`, `-rebuild`. - A new macro `CMDLINEARG()` is provided, to help defining new command line argument handlers (i.e. in plugins). the `addArg()` call is still required, but its syntax has changed. The `help` argument is now of type `const char *` rather than a function pointer, and it is supposed to contain the message to show in the `--help` screen. Pass `NULL` if no help message is desired. Signed-off-by: Haru <haru@dotalux.com>
2015-01-18Fixed Bug Report 8438shennetsind1-0/+2
Addresses instances crashing when running with the CELL_NOSTACK define enabled. Caused by the define not being readily available to all areas that played with mapcell (now with it being included from map.h this no longer is the case) http://hercules.ws/board/tracker/issue-8438-cell-nostack-and-instances-crash/ Signed-off-by: shennetsind <ind@henn.et>
2015-01-12Blocked compilation of plugins that use unavailable functionsHaru1-0/+2
- Rather than failing at runtime, plugins that try to access non-interfaced, unavailable functions or variables, will now show an error at compile-time. Signed-off-by: Haru <haru@dotalux.com>
2014-12-28Split mob sql database into mob_db and mob_db_re.malufett1-0/+2
-http://hercules.ws/board/topic/8084-separate-the-mob-db-and-mob-db-re/
2014-12-26Fix compilation errors and possible server crash from previous commits.Andrei Karas1-1/+2
2014-12-26Updated KG/OB Spirit Charms to official behaviormalufett1-0/+9
-http://hercules.ws/board/tracker/issue-8170-oborokagerou-charm/ -http://hercules.ws/board/tracker/issue-8274-ninja-charms-not-giving-proper-bonuses/ Signed-off-by: malufett <malufett.eat.my.binaries@gmail.com>
2014-11-16Whitespace cleanup (no code changes)Haru1-58/+57
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-03* No cell stacking implemented (official version)Michieru1-1/+2
- Split config cell_stack_limit into custom_cell_stack_limit (previous feature) and official_cell_stack_limit (see below) - Expanded map_count_oncell by a flag parameter, currently only one flag is supported: only count standing units (needed for official cell stack feature) - Added a new function map_closest_freecell that will return the closest free cell using the same order that official servers use - Monsters will now actively search for a free cell when starting to walk randomly and when unlocking target - When any unit finishes walking (regularly) and is not on a free cell, it will now actively search for a free cell - Step actions will be delayed until a suitable cell was found, they will even be executed when the player walked slightly out of attack range - Monsters will now stop instantly if their target is completely non-existent * This is mainly for looters that had their loot taken * Hide and most other situations still use the configuration setting monster_chase_refresh Mega Thanks to Playtester
2014-10-30Merge pull request #369 from 4144/sqlpasswordsizeHaruna1-1/+1
Increase sql password field size from 32 to 100 chars.
2014-10-26- Can't cast icewall more than once on the same center cell. Special thanks ↵Michieru1-1/+4
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
2014-10-18Fix bug:7454Michieru1-7/+1
* Official Icewall implementation and other fixes - Reverted all the icewall-related changes done in SVN r15777 and following as testing shows they aren't official and are actually pretty exploitable (bugreport:7412) - Instead implemented the official icewall characteristic that monsters can only leave an icewall cell to the west or south, the changes include: * The "sight" path check no longer checks for the current cell so standing on an icewall allows you to see/attack into any direction * The path finding will still ignore the current cell as before but the walk routine will not allow to walk east or north while standing on an icewall cell * This leads monsters in the situation where they go through an AI loop not allowing them to escape the icewall (if their target is north or east of them) * Monster in this situation will use idle skills and if they get attacked will use their rudeattacked skills if available, similar to traps like Spiderweb * Added a configuration icewall_walk_block that allows to configure how long a monster should go through the AI loop before the server allows it any movement, this "safety" system is official and seems to equal about 75 AI loops; if you want to disable the whole icewall system so that monsters don't get stuck in icewall at all, just set this to 0 * Here are videos from jRO showing how this system works: http://ragdo.blog56.fc2.com/blog-entry-763.html - Implemented the official calculation for "direction"; now you will be considered horizontal/vertical/diagonally aligned with a target cell in the exact same way as on official servers, this is for example used to determine whether an icewall or a firewall should be horizontal, vertical or diagonal; the only thing that is still unofficial is the default direction (officially always "west"); effectively now there are more situations considered diagonal than before - Further cleanups on the idle skill use code for immobile monsters and monsters near a player but without a target (now skill using will always go via mob_unlocktarget) * This also fixes that monsters switched to idle mode and start to use idle skills one second too late Mega thanks to Playtester (rathena 5540d89cb0e)
2014-10-18Increase sql password field size from 32 to 100 chars.Andrei Karas1-1/+1
32 chars is very small for password.
2014-08-06- Fix 3rd class skills on pre-renewal.Michieru1-0/+1
- When under Mind Break Matk Effect and Mdef reduction should not show on ALT Q(bug:7915) - Plagiarism should not copy New 3rd class skills. Thanks to OmegaRed (bug:8118) - Update Runstone Lux Anima to official formula (bug:8285) - Add official formula for Demonic Fire - Update damage formula for Unlimit, apply Def and Mdef to 1 during the skill and adjust the cooldown to official. (bug:8227) - Flash Combo should not consume hp-sp and the skill not ignore the distance. - Fix a bug with Full Throttle that not consuming sp correctly and adjust the cooldown to official. - All WoE items are inactive outside WoE or PVP - Add bonus3 bSPVanishRate for Vellum Items. - Script Vellum Items. - Add 2 new bonus bSetDefRace and bSetMDefRace for the Vellum Items. (rAthena c046668034) - Fixed Bowling Bash, Brandish Spear, Grand Darkness and Meteor Assault reducing def during cast; the only skill that does this officially is Grand Cross (rAthena 694719048e) - Implemented official Bowling Bash with all its special behaviors including the gutter line * As many servers probably want to remove the gutter line problem, it is configurable; just adjust the bowling_bash_area setting in skill.conf (Bug:4209) - Sonic Blow now has a fixed range of 1, even for monsters; a monster can't use this skill if you tank it from farther away (rAthena a15cee063d)
2014-07-22Fixed some issues with CELL_NOSTACKpanikon1-3/+2
- Crashing issue when loading maps using map cache (issue: 8270) http://hercules.ws/board/tracker/issue-8270-enable-cell-nostack-crash/ - Counter was not being decrease correctly when leaving a cell Merged map_addblcell and map_delblcell
2014-07-11Fixed reserved __identifier violationsHaru1-5/+5
- Complies with CERT DCL37-C - Fixes issue #293 (special thanks to elfring) Signed-off-by: Haru <haru@dotalux.com>
2014-05-30Fixed typos inside src/Shido1-4/+4
2014-05-16Follow-up to b6b3f58795288701d0e162d43fa6f0a47af913b3Haru1-2/+2
- Includes in some files weren't sorted alphabetically. Special thanks to KeiKun. Signed-off-by: Haru <haru@dotalux.com>
2014-05-16Changed battle_config definition to extern to avoid mistakes in pluginsHaru1-1/+1
- This avoids plugins incorrectly using battle_config (with unreliable results) instead of using the proper interface, battle->bc. - Edited various #defines to use battle->bc instead of battle_config so that they can work perperly in plugins as well. Signed-off-by: Haru <haru@dotalux.com>
2014-05-13Removed trailing whitespace (sources)Haru1-3/+3
Signed-off-by: Haru <haru@dotalux.com>
2014-05-10Re-commit of "Fixed order of includes in all source files"Haru1-5/+4
This reverts commit 94657284973f4037596bae468ebfbee5c217e02b.
2014-05-10Revert "Fixed order of includes in all source files"panikon1-4/+5
This reverts commit b6b3f58795288701d0e162d43fa6f0a47af913b3. Fixes issue 8184 http://hercules.ws/board/tracker/issue-8184-cart-related/
2014-05-10Optimized THQS_TTShop.txt and corrected a minor mistakepanikon1-0/+1
Added npc_market_data_db to inter-server.conf Added shop message to messages.conf Fixed small typo in clif_GM_kickack
2014-05-09Fixed order of includes in all source filesHaru1-5/+4
- 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-09Added support to return a different exit status to the OS.Haru1-0/+1
- This can be easily used by plugins. - See an example at http://github.com/HerculesWS/StaffPlugins/Haru/script_mapquit Signed-off-by: Haru <haru@dotalux.com>
2014-04-19Add official support for lvl 175Michieru1-1/+1
- Add official Job stats bonus and fix old class (pre-re and re got same stats bonus) - Add official stats points for lvl 150 to 175 - Add new max_parameter for Extend Classes max stats 125 - Change max stats points for the 3rd classes to 130 - Add official Experience table for all classes Add Star Gladiator official renewal exp table Special thanks to Yommy and Muad_Dib for official info
2014-03-16Added --load-script commandline argumentHaru1-1/+1
Signed-off-by: Haru <haru@dotalux.com>
2014-02-24MEMORY SLAHER IS IN TOWNshennetsind1-4/+5
And 19mb of memory goes down (32bit users should get a ~8.5mb memory reduction) Special Thanks to pan! Signed-off-by: shennetsind <ind@henn.et>
2014-02-24Fixed console parse gm command crash on select commandsshennetsind1-0/+2
Also fixed an issue with socket flushing Signed-off-by: shennetsind <ind@henn.et>