summaryrefslogtreecommitdiff
path: root/src/map/mob.c
AgeCommit message (Collapse)AuthorFilesLines
2016-01-06Change all TBL_PET to struct pet_data as per style guidelineshemagx1-2/+2
Signed-off-by: Haru <haru@dotalux.com>
2016-01-06Change all TBL_MER to struct mercenary_data as per style guidelineshemagx1-2/+2
Signed-off-by: Haru <haru@dotalux.com>
2016-01-06Change all TBL_HOM to struct homun_data as per style guidelineshemagx1-2/+2
Signed-off-by: Haru <haru@dotalux.com>
2016-01-06Change all TBL_MOB to struct mob_data as per strly guidelineshemagx1-3/+3
Signed-off-by: Haru <haru@dotalux.com>
2016-01-06Change all TBL_PC to struct map_session_data as per style guidelineshemagx1-7/+7
Signed-off-by: Haru <haru@dotalux.com>
2015-12-28Added some missing item IDs to their enumHaru1-1/+1
2015-12-28Added Poring to the mob_id enumHaru1-1/+1
Signed-off-by: Haru <haru@dotalux.com>
2015-12-28Replaced some numeric mob IDs with the proper constants (MOBID_TREASURE_BOX*)Haru1-3/+5
Signed-off-by: Haru <haru@dotalux.com>
2015-12-28Added Splendide, Manuk and Mora mobs to the mob_id enumHaru1-3/+24
Signed-off-by: Haru <haru@dotalux.com>
2015-12-28Standardized (source) mob_id enumHaru1-5/+6
- MOBID_ constant names now follow the Mob DB spritenames. - The following names were changed: * MOBID_EMPERIUM => MOBID_EMPELIUM * MOBID_TREAS01 => MOBID_TREASURE_BOX1 * MOBID_TREAS40 => MOBID_TREASURE_BOX40 * MOBID_BARRICADE1 => MOBID_BARRICADE * MOBID_BARRICADE2 => MOBID_BARRICADE_ * MOBID_GUARIDAN_STONE1 => MOBID_S_EMPEL_1 * MOBID_GUARIDAN_STONE2 => MOBID_S_EMPEL_2 * MOBID_FOOD_STOR => MOBID_OBJ_A * MOBID_BLUE_CRYST => MOBID_OBJ_A2 * MOBID_PINK_CRYST => MOBID_OBJ_B2 * MOBID_TREAS41 => MOBID_TREASURE_BOX41 * MOBID_TREAS49 => MOBID_TREASURE_BOX49 - Added several missing items Signed-off-by: Haru <haru@dotalux.com>
2015-12-25Merge pull request #1009 from Jedzkie/ItemDB_UpdatesDastgir1-16/+16
ItemDB Updates
2015-12-25New Entity Packets Implemented (Thanks to Rytech)Dastgir1-2/+13
2015-12-23Update:Jedzkie1-16/+16
- Rename BLUE_CRYST and PINK_CRYST to BLUE_CRYSTAL and PINK_CRYSTAL - Rename FOOD_STOR to FOOD_STORAGE - Rename TREAS01, TREAS40, TREAS41, TREAS49 to TREASURE_01, TREASURE_40, TREASURE_41, TREASURE_49
2015-12-15Added GPL-compliant header to all sources and build scriptsHaru1-4/+20
Signed-off-by: Haru <haru@dotalux.com>
2015-12-14Added official effect of Mora Berry.Jedzkie1-1/+4
Signed-off-by: Haru <haru@dotalux.com>
2015-12-13ItemDB Updates:Jedzkie1-1/+3
- Added 'Malang Cat Can' item. - Added 'Ru Blue Spear' item. - Change the item id of 'RWC Silver Brooch' from 2998 to 2999. - Follow up https://github.com/HerculesWS/Hercules/commit/e511dcf5940cee7a6e43744543a5ca96bc23cf84, thanks to zackdreaver. - item_db.conf renewal minor clean-up xD
2015-12-06Refactored/fixed race handling for bonuses that store it as a bitmaskHaru1-2/+2
- The following bonuses now work correctly with RC_DemiPlayer, RC_NonDemiPlayer, RC_NonDemiHuman, RC_Nonplayer: * bIgnoreDefRace * bIgnoreMdefRace * bDefRatioAtkRace * bAddMonsterDropChainItem (bonus3) * bAddMonsterDropItem (bonus3) - A new function (map->race_id2mask) is provided, to easily and efficiently generate a bitmask from a race ID. - The RC_ALL race ID is mapped to RC_BOSS and RC_NONBOSS, for backwards compatibility. Signed-off-by: Haru <haru@dotalux.com>
2015-11-12Added subtype initializer to npc_create_npcHaru1-3/+1
Signed-off-by: Haru <haru@dotalux.com>
2015-11-12Moved class and dir initializers to npc_create_npcHaru1-6/+1
Signed-off-by: Haru <haru@dotalux.com>
2015-10-22Removed support for the deprecated SQL item, mob, mob_skill databases.Haru1-60/+1
Follow-up to 84e02ac28fbb15c58d0a0f8a916b49663198b05b Signed-off-by: Haru <haru@dotalux.com>
2015-10-20Fixed an issue preventing the mob_db2 from being loadedHaru1-8/+5
Follow-up to 3feef93 (thanks to kyeme) Signed-off-by: Haru <haru@dotalux.com>
2015-10-19Add support for mob_db in conf format.Andrei Karas1-239/+539
2015-10-19rename malloc.c/h to memmgr.Andrei Karas1-1/+1
2015-10-11Cleanup of the HPluginData implementation (second part)Haru1-2/+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-10/+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-25More aggressive whitespace cleanup. Follow up to 51329e6Haru1-16/+15
Signed-off-by: Haru <haru@dotalux.com>
2015-09-24Add bl parameter to map_searchrandfreecell and map_addflooritem.Andrei Karas1-2/+2
2015-09-24Add bl parameter to getcell functions.Andrei Karas1-3/+3
2015-09-18Clarified the intent of several assignments inside conditional expressionsHaru1-3/+4
Signed-off-by: Haru <haru@dotalux.com>
2015-09-17Added Configuration in enabling/disabling monster hp bar on new clients.Frost1-10/+10
Closes #558 Signed-off-by: Haru <haru@dotalux.com>
2015-09-10Add to path search functions source bl for plugins usage.Andrei Karas1-1/+1
2015-08-15HPM compatibility improvementsHaru1-0/+1
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 skill.cAndrei Karas1-4/+4
2015-06-19Removed ".." from include directivesHaru1-35/+35
- 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-15/+15
- 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-02-23Extend official_cell_stack_limit option.Andrei Karas1-1/+1
Now if this option is zero server will not count objects before comparing with official_cell_stack_limit. If set official_cell_stack_limit to zero it will heavy reduce CPU usage.
2015-02-13Fixed alchemist marine sphere causing double deletion on renewalshennetsind1-5/+5
Special Thanks to Haruna, Michieru.
2015-01-22Removed name distinction between (sql) mob/item/mob_skill db and db_re variantsHaru1-12/+6
- 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-20Minor fixes and tweaks suggested by cppcheckHaru1-32/+29
- 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>
2015-01-18Replacing rand leftovers with the mt19937arshennetsind1-1/+1
Signed-off-by: shennetsind <ind@henn.et>
2015-01-1727 Fixesshennetsind1-1/+1
Addressing out of bounds read/write, pointless null checks on already deferenced variables. Special Thanks to 4144 and Haruna! Signed-off-by: shennetsind <ind@henn.et>
2015-01-11Convert pcdb_checkid into function in pc interface.Andrei Karas1-4/+4
2014-12-31Add some missing null pointer checks after automatic checks.Andrei Karas1-6/+8
2014-12-31Fix possible memory overflows and underflows.Andrei Karas1-1/+1
2014-12-28Split mob sql database into mob_db and mob_db_re.malufett1-2/+14
-http://hercules.ws/board/topic/8084-separate-the-mob-db-and-mob-db-re/
2014-12-21Remove plugin data in mob_db destruction.Andrei Karas1-1/+12
2014-12-21Move mob_db deletion into separate function.Andrei Karas1-6/+10
2014-12-14Fixed Bug#8456malufett1-1/+7
-http://hercules.ws/board/tracker/issue-8456-map-crash-skill-cell-overlap/?gopid=24193 Signed-off-by: malufett <malufett.eat.my.binaries@gmail.com>
2014-11-28Add function for create npc.Andrei Karas1-7/+2
2014-11-24* 1st Transcendent Spirit, monster position lag fixesMichieru1-0/+10
- 1st Transcendent Spirit will now work as on official servers (#116) * The max total stat that is granted by the skill is now BaseLevel-10 with a maximum of 50 instead of always 50 * It will now work as Marionette Control and calculate the bonus at cast time rather than overwrite all existing bonuses * Agi Up and Blessing will now cancel the soul link - Fixed various problems that caused position lags on the client (#118) * Added a define ACTIVEPATHSEARCH in mob.c; if active (default and official), monsters will only grab targets if the walk path to the target is shorter or equal their search range; search range depends on whether the monster is moving or not (range2 for standing monsters and range3 for walking monsters); this requires a lot of CPU load, if it causes trouble, just comment the define for old behavior * Fixed a bug that made monsters display "irregular movement with position lag" continuously when a status change ended that changed their walk speed * OFFICIAL_WALKPATH now also applies to monsters * If the path search fails while a unit is already moving, we will now issue of fixpos packet so that the unit does not only stop moving on the server, but also on the client * Direction fixes - Updated the config setting attack_direction_change from 15 to 0 (official value); that means that a unit's direction will no longer change when it attacks; knock-back effects from e.g. Firewall will depend on the last direction the target walked into instead (bugreport:1322) - Ensured that the default direction of a monster is always "north", so that immobile monsters will now always be knocked back to the south by e.g. Firewall on default settings, unless a skill like e.g. Backstab changes their direction (bugreport:1322) - Fixed a bug that stopped characters server-sided and caused position lag when closing a skill menu * Magnum Break damage fixed - Targets two cells away will now only take 100%+10%*level damage (#108)