summaryrefslogtreecommitdiff
path: root/src/map/unit.c
AgeCommit message (Collapse)AuthorFilesLines
2018-02-10Clean up trailing whitespace and non-indent tabsHaru1-1/+1
Signed-off-by: Haru <haru@dotalux.com>
2018-01-25Implementation of Official Clan SystemMurilo Pereti Tavares1-0/+2
All official features work including the autokick for inactive members And the system is completely customizable.
2017-08-20Ignore hidden units in the cell stack limit checksHaru1-1/+1
- This improves the Dancer Quest experience as well as other cases of hidden NPCs blocking off certain cells - Fixes #1135 Signed-off-by: Haru <haru@dotalux.com>
2017-05-22Add storage_data reception, parsing and sending to/from the map-server.Smokexyz1-0/+2
Remove loading and saving of storage_data through char.c Re-declaration of structure storage_data as a vector. Re-code of portions in the map-server using storage_data. A new approach is taken by saving the loaded storage data from sql into memory for the duration of the session, thereby removing the need of querying the database to re-load all items everytime a storage save routine is issued from the map-server. Saving of storage items is done through a new function that significantly reduces the number of queries compared to char_memitemdata_tosql(), and therefore run-time speed. This method potentially reduces the number of update and delete queries from MAX_STORAGE (which could be >= 600) times to literally 1. Storage items are stored in a dynamically allocated array and handled accordingly. struct mmo_charstatus size reduces by 34,800 bytes. Update pc_checkitem() with masks for item checks. `sd->state.itemcheck` has been changed to `sd->itemcheck` of type `enum pc_checkitem_types` `battle/items.conf` has been updated to reflect configuration changes. Further updates to assert a successful reception of storage data in related functions.
2017-04-20Made prevent_logout effect on log-in optionalJedzkie1-0/+10
kRO does not prevent players from logging out after connecting to its zone servers. Credits to @secretdataz of rAthena
2017-03-10Merge pull request #1509 from 4144/fixwarnsmokexyz1-4/+5
Fix assert in unit_resume_running.
2017-02-19Merge pull request #1457 from Ridley8819/unitIbrahem Hossam1-1/+1
Fixes Range Exploit
2017-01-14Fix assert in unit_resume_running.Andrei Karas1-4/+5
Fix issue from http://herc.ws/board/topic/13719-map-error-need-help-here/
2016-10-28Fixed copyright year for 2016Lemongrass31101-1/+1
2016-10-22Implemented SU_SV_ROOTTWIST Skill.Dastgir Pojee1-0/+1
Duration: (5+(2*SkillLv)) seconds. Cannot be used on Boss Monsters. Effect is cancelled when Heaven's Drive or Trample is used. Enemies trapped on roots receive poison property damage.
2016-10-22Implemented SU_LOPE Skill.Dastgir Pojee1-1/+1
Skill Cannot be Used on GvG/Battlegrounds. Cast time of Emergency Call doubles. Moves to Another Position by performing High Jump: Lv 1: Move 6 cells Lv 2: Move 10 cells Lv 3: Move 14 cells
2016-10-22Implemented SU_HIDE Skill.Dastgir Pojee1-0/+2
Transforms into Bush.
2016-10-03Fixes Range ExploitRidley1-1/+1
issue#841 Original Commit by Playtester on rAthena, https://github.com/rathena/rathena/commit/6f74f67da060a063183e1147dfc893c9454af853 * Players will no longer get +2 range server-sided when using a target spell * This will prevent players from modifying the client to get extra range
2016-09-21Fixed a wrong check in the SA_FREECAST handling codeHaru1-2/+2
- Don't skip the check for Free Cast's absence unless the cast skill's INF2_FREE_CAST_* flags aren't unset. - Follow-up to 19a06cae9a03ae7c390db18ca95b74bd6033dc4e - Fixes #1439 Signed-off-by: Haru <haru@dotalux.com>
2016-09-19Add missing checks into unit.cAndrei Karas1-31/+69
2016-09-13Corrected a wrong check that allowed walking while casting guild skillsHaru1-3/+11
- The check was originally meant to have guild skills ignore SA_FREECAST (and always block movements) - Since 8953417 - Fixes #1428 Signed-off-by: Haru <haru@dotalux.com>
2016-07-19Add skill atributes for allow moving while casting skill.Andrei Karas1-6/+8
New SkillInfo attributes: FreeCastReduced - allow move while casting with slowdown FreeCastNormal - allow move while casting with normal speed
2016-07-14Simplify clif_skillcasting and rename to clif_useskill.Andrei Karas1-2/+2
2016-04-27Fix unit_data unitialisation.Andrei Karas1-4/+13
Introduce method unit->init_ud.
2016-04-23Changed map_session_data::chatID to int (and renamed to chat_id)Haru1-1/+1
- Chat IDs are signed integers. - Resolves various warnings, depending on the compiler settings. Signed-off-by: Haru <haru@dotalux.com>
2016-02-19Fix all known warnings from compiler flags -Wformat*Andrei Karas1-2/+2
Add all missing -Wformat flags into configure.
2016-01-17Merge pull request #1077 from csnv/masterHaru1-1/+15
Fixes monsters not taking rude attack when OFFICIAL_WALKPATH is used.
2016-01-12Whitespace cleanup (removed alignment tabs or trailing whitespace at line end)Haru1-1/+1
Signed-off-by: Haru <haru@dotalux.com>
2016-01-09Fixes monsters not taking rude attack when OFFICIAL_WALKPATH is used.Jorge C1-1/+15
Rude attack was not checking for this setting.
2016-01-06Replaced the remaining explicit casts with BL_CAST/BL_UCASTHaru1-5/+10
Signed-off-by: Haru <haru@dotalux.com>
2016-01-06Replaced some explicit casts with BL_UCASTHaru1-53/+61
- Replaced safe casts (bl type already checked) Signed-off-by: Haru <haru@dotalux.com>
2016-01-06Change all TBL_NPC to struct npc_data as per style guidelineshemagx1-2/+2
Signed-off-by: Haru <haru@dotalux.com>
2016-01-06Change all TBL_ELEM to struct elemental_data as per style guidelineshemagx1-1/+1
Signed-off-by: Haru <haru@dotalux.com>
2016-01-06Change all TBL_PET to struct pet_data as per style guidelineshemagx1-1/+1
Signed-off-by: Haru <haru@dotalux.com>
2016-01-06Change all TBL_MER to struct mercenary_data as per style guidelineshemagx1-1/+1
Signed-off-by: Haru <haru@dotalux.com>
2016-01-06Change all TBL_HOM to struct homun_data as per style guidelineshemagx1-1/+1
Signed-off-by: Haru <haru@dotalux.com>
2016-01-06Change all TBL_MOB to struct mob_data as per strly guidelineshemagx1-9/+10
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-15Added GPL-compliant header to all sources and build scriptsHaru1-4/+20
Signed-off-by: Haru <haru@dotalux.com>
2015-12-04Merge pull request #910 from dastgir/idleAndrei Karas1-2/+2
Added a function to update idle time
2015-12-04Added a function to update idle timeDastgir1-2/+2
2015-11-14Changed struct map_session_data::queues into a VECTOR and renamed to ↵Haru1-4/+1
::script_queues Signed-off-by: Haru <haru@dotalux.com>
2015-10-19rename malloc.c/h to memmgr.Andrei Karas1-1/+1
2015-10-11Cleanup of the HPluginData implementation (second part)Haru1-7/+2
- 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-21/+6
- 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-24Add bl parameter to closest_freecell.Andrei Karas1-1/+1
2015-09-24Add bl parameter to getcell functions.Andrei Karas1-18/+18
2015-09-18Clarified the intent of several assignments inside conditional expressionsHaru1-5/+5
Signed-off-by: Haru <haru@dotalux.com>
2015-09-10Add to path search functions source bl for plugins usage.Andrei Karas1-10/+10
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-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-32/+25
- 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-24Corrected distance check on homunculus skillsHaru1-9/+12
- Distance check on offensive skills was being done against the homunculus' master instead of the actual target, because of a variable accidentally overwritten in 8faef4ff. - Please don't reuse variables for unrelated things. You don't have to pay extra if you use one more variable, I promise. - Special thanks to MordekaiserGod. Signed-off-by: Haru <haru@dotalux.com>
2015-05-03Fixed Bug#8650malufett1-0/+2
-http://hercules.ws/board/tracker/issue-8650-minstrel-poem-of-netherworld-or-despair-song-skillleffect/?gopid=25083#entry25083 Signed-off-by: malufett <malufett.eat.my.binaries@gmail.com>
2015-03-27Hercules 'job_db1.txt' Redesignmalufett1-4/+5
-Initial and for review Signed-off-by: malufett <malufett.eat.my.binaries@gmail.com>