summaryrefslogtreecommitdiff
path: root/src/common
AgeCommit message (Collapse)AuthorFilesLines
2014-07-11Explicitly specify 'void' when a function expects no argumentsHaru5-15/+15
- See CERT DCL20-C. Signed-off-by: Haru <haru@dotalux.com>
2014-07-11Removed some c++ compatibility definitionsHaru2-39/+3
- Neither our code nor 3rdparty code is, (or will compile as) C++, regardless of those checks. - Special thanks to panikon. Signed-off-by: Haru <haru@dotalux.com>
2014-07-11Fixed reserved __identifier violationsHaru35-216/+211
- Complies with CERT DCL37-C - Fixes issue #293 (special thanks to elfring) Signed-off-by: Haru <haru@dotalux.com>
2014-07-11Removed unsafe pointer typedefsHaru9-115/+115
- If a variable doesn't look like a pointer... Maybe it might be a pointer after all. Please, give me back my '*' sign. - See CERT DCL05-C. Signed-off-by: Haru <haru@dotalux.com>
2014-07-10Follow up to 3c24fb656f3b3370b7152d6f1d2cc9dbc6fbae5dpanikon1-3/+2
Moved 'count' declaration in order to fit MSVC c89-c99 standard
2014-07-10Re-added revision info to the memory leak logHaru2-7/+9
- Information was missing because sysinfo->final() was freeing the data before iMalloc->final() could log it. Signed-off-by: Haru <haru@dotalux.com>
2014-07-09Corrected compile errors in case DB_ENABLE_STATS is definedHaru1-4/+4
Signed-off-by: Haru <haru@dotalux.com>
2014-07-09Corrected issue with bce716fa908584f435dcf97904fb37ada6dd90b7 forgot to ↵panikon2-3/+3
removed a couple of parenthesis, sorry guys
2014-07-08reversed portion of 7cd967f812ab741c41c416fb9f7c2a921c36e947 that would ↵Streusel1-2/+2
point to nothing.
2014-07-09Fixed status_calc_regen crash ↵panikon1-0/+4
issue:http://hercules.ws/board/tracker/issue-1298-mapserver-crashed-item-check/ Follow up to 7cd967f812ab741c41c416fb9f7c2a921c36e947
2014-07-08Extracted method to obtain SYSTEM_INFO from functions in sysinfo.cpanikon3-18/+41
Added proper method to obtain page size in windows
2014-07-08HPM Hooks UpdateHercules.ws1-0/+1
Signed-off-by: HerculesWSAPI <Hercules@efficiently.awesome>
2014-07-07Follow up to 2e6016fdastgir1-2/+2
Increased MAX_SKILL_TREE to comply with WE_CALLPARENT and WE_BABY in Extended Super Novice. issue: 8250 http://hercules.ws/board/tracker/issue-8250-latest-rev-warning/
2014-07-06Fixed issue with getlookpanikon1-3/+2
Follow up to 2e6016f, increased MAX_SKILL_TREE in order to fit WE_BABY in Expanded Super Novice
2014-05-30Merge pull request #282 from MrKeiKun/fix_typoHaruna26-111/+111
Fixed some typo
2014-05-30Fixed typos inside src/Shido26-111/+111
2014-05-30Removed CMakeLists.txt (Thanks to Haruna)Shido1-166/+0
2014-05-25Improved CFLAGS/CPPFLAGS handlingHaru2-11/+6
- Language extensions, such as _GNU_SOURCE are now enabled through CPPFLAGS by the configure script, rather than within the source code. - Moved some configure-time CFLAGS to CPPFLAGS, where appropriate. - Fixes bugreport:8211, thanks to Neoth http://hercules.ws/board/tracker/issue-8211-compiling-warning-in-linux Signed-off-by: Haru <haru@dotalux.com>
2014-05-17Renamed incuvate of Pet System.Shido1-1/+1
2014-05-16Follow-up to b6b3f58795288701d0e162d43fa6f0a47af913b3Haru4-9/+12
- Includes in some files weren't sorted alphabetically. Special thanks to KeiKun. Signed-off-by: Haru <haru@dotalux.com>
2014-05-13Removed trailing whitespace (sources)Haru23-175/+159
Signed-off-by: Haru <haru@dotalux.com>
2014-05-13Fixed some charset issuesHaru1-1/+1
- Fixed files with mixed character set or invalid CP949 characters. - Uncommented '#music' script in the_sign_quest.txt (now the soundeffect filename should be fixed). - Added a note to the header of CP949 files not to read or save them as UTF8, since it'd break their encoding. It should be safe enough to read them as EUC-KR if your text editor doesn't offer CP949 as an option. - Added FIXME notes about untranslated strings in assassin_skills.txt and WolfchevLaboratory.txt. Signed-off-by: Haru <haru@dotalux.com>
2014-05-10Moved MAX_CARTS and NEW_CARTS defines into common/mmo.hHaru1-0/+8
- Fixes bugreport:8184, allowing re-commit of 94657284973f4037596bae468ebfbee5c217e02b Signed-off-by: Haru <haru@dotalux.com>
2014-05-10Re-commit of "Fixed order of includes in all source files"Haru39-335/+434
This reverts commit 94657284973f4037596bae468ebfbee5c217e02b.
2014-05-10Revert "Fixed order of includes in all source files"panikon39-434/+335
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 filesHaru39-335/+434
- 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-09Removed some unused source filesHaru11-3266/+0
- I don't believe there's a need to keep them if we're not using them. If and when we will ever need them again, this commit can be easily reverted. Signed-off-by: Haru <haru@dotalux.com>
2014-05-09Added support to return a different exit status to the OS.Haru2-3/+4
- 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-05-06Bug fixes and other changespanikon3-2/+74
#Fixed issue where a corrupted map cache would lead to a crash *Moved Big-endian compatibility functions to common/utils.h #Fixed issue 8162 *http://hercules.ws/board/tracker/issue-8162-loadnpc-doesnt-trigger-oninit-of-duplicate-npcs/ *Added options to npc_parse_duplicate #Fixed issue 8169 *http://hercules.ws/board/tracker/issue-8169-script-command-guildskill-skill-idlevel-not-working-as-intended/ *Changed *guildskill behavior, now it behaves exactly as depicted in the documentation *Updated *guildskill documentation #Added missing GBI types to mapif_parse_GuildBasicInfoChange now it's possible to change guild exp, lv, skill point and skill information #GeoIP revamp *GeoIP module was partially rewritten *Added several data checks to prevent corruption and crashes *Updated GeoIP database *See https://github.com/maxmind/geoip-api-c/blob/master/libGeoIP/GeoIP.c for more information #Added packetver checks regarding NST_MARKET *Now *tradertype warns if user is trying to use this feature with older clients
2014-04-19Merge pull request #272 from hemagx/masterHaruna1-0/+2
Rewritten NSI_UNIQUE_ID system
2014-04-19Added sysinfo to the exported HPM symbolsHaru1-0/+3
Signed-off-by: Haru <haru@dotalux.com>
2014-04-18Rewritten NSI_UNIQUE_ID system to get rid of the cross-database interreg ↵Ibrahim Hossam1-0/+2
dependency - Removes the need for map-server to access the interreg table to store the last used ID. - Login, char and map databases can now be hosted separately. - Note: the unique_id structure has changed, and it now contains the generator character ID in its upper 32 bits. - Now NSI_UNIQUE_ID System is enabled always Special thanks to Haruna.
2014-04-18HPM Hooks UpdateHercules.ws1-0/+5
Signed-off-by: HerculesWSAPI <Hercules@efficiently.awesome>
2014-04-17Whitespace cleanupHaru9-82/+83
Replaced some tabs in the middle of the line with spaces. Thanks to KeiKun for pointing out #ifdef<tab>_COMMON_SYSINFO_H_ and making me realize how many of them were there. Signed-off-by: Haru <haru@dotalux.com>
2014-04-17Added sysinfo (System Information) functionalitiesHaru8-155/+1131
- More informative messages are displayed during startup, to make it easier to identify what system and environment Hercules is running. - Git/SVN revision detection is improved, separating the source version (cached at compile time) from the runtime version, in case the user updated their working copy without recompiling the server. Git version detection is also more reliable, in case a non-default branch is used. - The get_revision script command has been removed (as it was useless to begin with, after the switch to git). An alternative will be provided later, for feature-probing purposes. - The patch was tested under Linux (Gentoo / gcc 4.7 on i686 and x86_64, Debian 6 / gcc 4.4 on i686, Raspbian / gcc 4.6 on armv6l, CentOS 5 / gcc 4.1 on i686, CentOS 6 / gcc 4.4 on x86_64, Linux Mint 15 / gcc 4.7 on x86_64, OS X Mountain Lion / clang 5.0 and gcc 4.8 on x86_64, Cygwin-NT-5.1/gcc 4.8 on i686, FreeBSD 8 / gcc 4.2 on i386, FreeBSD 9 / gcc 4.2 on amd64, FreeBSD 10 / clang 3.3 on amd64, NetBSD 5 / gcc 4.1 on i386, NetBSD 6 / gcc 4.5 on amd64, OpenBSD 5 / gcc 4.2 on amd64, Solaris 11 / gcc 4.5 on i86pc, Windows 7 / Visual Studio 2012 on x86, Windows 8 / Visual Studio 2010 on WOW64, Windows 8.1 / Visual Studio 2013 on WOW64. Signed-off-by: Haru <haru@dotalux.com>
2014-04-10Fixed issue: 7936panikon1-0/+26
http://hercules.ws/board/tracker/issue-7936-guildparty-item-bounded/
2014-04-04Fixed issue: 8131panikon1-1/+1
http://hercules.ws/board/tracker/issue-8131-sc-chat/ -Documented SC_NOCHAT -Corrected the way that pc_setparam was handling SP_MANNER -Added documentation on *sc_status regarding SC_NOCHAT, to mute a user via script you should set Manner
2014-03-31Updated documentation for pc_statusup2 and pc_statusuppanikon2-9/+86
(fixed issue: 7916 http://hercules.ws/board/tracker/issue-7916-wrong-comment-in-pc-statusup2/) Now pc_statusup2 returns stat increase amount as stated in previous documentation Updated *statusup documentation it was wrong Added last update in upgrade index @console.c/.h Documented partially Now two different parsing categories can have functions with same name e.g. - server exit - sql exit
2014-03-22Fixed issue 7338 (added new char configuration char_aegis_delete)panikon1-0/+2
http://hercules.ws/board/tracker/issue-7338-deleting-character/ As @jaBote requested in 26f2ada, renamed "rathena-logs-database-upgrade" to "rAthena-logs-upgrade.sql" and updated 'last revision'. Added a 'FIXME' in db_obj_put
2014-03-16Added --load-plugin commandline argumentHaru2-3/+8
Signed-off-by: Haru <haru@dotalux.com>
2014-03-16Improved ERS memory handlingshennetsind3-24/+21
On shutdown the ERS will loop thru leftover managers and clear them according to each manager's settings, while also printing errors according to each manager's settings. Will also help pinpoint the causes of http://hercules.ws/board/tracker/issue-8093-memory-leak-after-stop-server-cant-fix/ and similar issues. Signed-off-by: shennetsind <ind@henn.et>
2014-03-10Merge pull request #262 from Baalberith6/masterHaruna1-0/+0
MH_LIGHT_OF_REGENE resetting intimacy to 0.25% and checking for 0.75% when used (instead of 25% and 75%)
2014-03-09fixing permission from commit 7dd4dafMatej Pristak1-0/+0
2014-03-08Merge pull request #261 from Baalberith6/mastershennetsind1-1/+1
wrong HPM parsing of packets of variable length, when the size is not equal declared size.
2014-03-07Fixed some warnings on ARMHaru2-17/+16
Now Hercules is officially able to compile and run on a Raspberry Pi. Signed-off-by: Haru <haru@dotalux.com>
2014-03-07Tweaked a platform check to support ARMv6+Haru2-1/+15
Signed-off-by: Haru <haru@dotalux.com>
2014-03-06When working with packets with variable length (defined with -1 length) in HPM,Matej Pristak1-1/+1
we are leaving these in stack when the size of packet exceeds declared size due to this line. This was probably meant as if( packet_declared_size > packet_actual_size ) do_not_parse_it_yet, but was doing the opposite.
2014-03-06HPM Hooks UpdateHercules.ws1-0/+6
Signed-off-by: HerculesWSAPI <Hercules@efficiently.awesome>
2014-02-24Fixed console parse gm command crash on select commandsshennetsind1-2/+2
Also fixed an issue with socket flushing Signed-off-by: shennetsind <ind@henn.et>
2014-02-06HPM Hooks UpdateHercules.ws1-2/+2
Signed-off-by: HerculesWSAPI <Hercules@efficiently.awesome>