summaryrefslogtreecommitdiff
path: root/src/char/char.c
AgeCommit message (Collapse)AuthorFilesLines
2015-07-12Add missing check and NONNULL attributes to char.c.Andrei Karas1-0/+17
2015-06-19Cleaned up some #includesHaru1-2/+1
Signed-off-by: Haru <haru@dotalux.com>
2015-06-19Removed ".." from include directivesHaru1-34/+34
- 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-02Follow up to 712812bMysteries1-1/+1
- More link changes - Added proper link to Roulette topic
2015-06-01Replaced some of the hardcoded values with constants (char)Haru1-58/+56
- 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-17Fixed some issues detected by coverity scanHaru1-1/+1
Signed-off-by: Haru <haru@dotalux.com>
2015-04-25Fixed @changesex issues on PACKETVERs that don't support per-character sex.Haru1-125/+190
- Fixes bugreport:8504 http://hercules.ws/board/tracker/issue-8504-changesex/ - Existing database entries with an incorrect per-character sex will be fixed automatically when the character logs in to match the account's sex, if the PACKETVER doesn't support per-character sex. Signed-off-by: Haru <haru@dotalux.com>
2015-04-09Add checks to char.cAndrei Karas1-29/+79
2015-04-01Fix reading character from db.Andrei Karas1-1/+1
2015-01-20Minor fixes and tweaks suggested by cppcheckHaru1-26/+23
- 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-18Command line arguments handling overhaulHaru1-27/+63
- 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-18Merge branch 'master' of github.com:HerculesWS/Herculesshennetsind1-1/+1
2015-01-18Fixing 38 issuesshennetsind1-2/+2
Addressing out of bounds read/write, pointless null checks on already deferenced variables, dead code. Special Thanks to 4144 and Haruna! Signed-off-by: shennetsind <ind@henn.et>
2015-01-18Add some fixes to char server.Andrei Karas1-1/+1
Found by coverity scan.
2015-01-17Stat server submission logic updateshennetsind1-1/+12
to ensure report is submit in full. Signed-off-by: shennetsind <ind@henn.et>
2015-01-07Fixed char-server crash for clients >= 20141022, Thanks to Yommy and Inddastgirpojee1-5/+4
2014-12-31Fix wrong useless cycle added in commit ↵Andrei Karas1-1/+1
c47d8e4b8f9d63ab6b4e7e286e91cd50a5bdd151.
2014-12-31Add some missing null pointer checks after automatic checks.Andrei Karas1-2/+1
2014-12-26Save char sex in db.Andrei Karas1-3/+19
2014-12-06share mapindex in char server.Andrei Karas1-0/+1
2014-12-06into mapindex add variable with default map and position.Andrei Karas1-6/+6
2014-11-17Fixed char.c compilation error in MSVC <= 2012TungSinpei1-17/+26
Signed-off-by: TungSinpei <TungSinpei@hotmail.com>
2014-11-16Whitespace cleanup (no code changes)Haru1-526/+519
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-16Moved pincode settings into the interfaceHaru1-3/+3
Signed-off-by: Haru <haru@dotalux.com>
2014-11-16Moved loginif-related functions to loginif.cHaru1-273/+125
Signed-off-by: Haru <haru@dotalux.com>
2014-11-15In char server move config options handling by plugins into ↵Andrei Karas1-2/+2
char_config_dispatch.
2014-11-15Add support for plugin options in char server config (inter-server.conf).Andrei Karas1-1/+2
2014-11-15Add support for plugin options in char server config.Andrei Karas1-0/+2
2014-11-15Allow use all char server interfaces from plugins.Andrei Karas1-1/+17
2014-11-15Move global variable into interface in inter.cAndrei Karas1-280/+280
2014-11-15Move global variable into interface in char.cAndrei Karas1-170/+172
Other variables better move to future char_config.
2014-11-15Add missing interface methods initialisation in char.c.Andrei Karas1-0/+7
2014-11-15Create geoip interface.Andrei Karas1-0/+2
2014-11-15Add most functions from inter.c to interfaces.Andrei Karas1-12/+13
2014-11-15Add most functions from int_storage.c to interfaces.Andrei Karas1-1/+2
2014-11-15Add most functions from int_quest.c to interfaces.Andrei Karas1-0/+2
2014-11-15Add most functions from int_pet.c to interfaces.Andrei Karas1-0/+2
2014-11-15Add most functions from int_party.c to interfaces.Andrei Karas1-1/+2
2014-11-15Add most functions from int_mercenary.c to interfaces.Andrei Karas1-3/+4
2014-11-15Add most functions from int_mail.c to interfaces.Andrei Karas1-0/+2
2014-11-15Add most functions from int_homun.c to interfaces.Andrei Karas1-1/+2
2014-11-15Add most functions from int_guild.c to interfaces.Andrei Karas1-7/+8
2014-11-15Add most functions from int_elemental.c to interfaces.Andrei Karas1-1/+2
2014-11-15Add most functions from int_auction.c to interfaces.Andrei Karas1-0/+2
2014-11-15Add most functions from char.c to interfaces.Andrei Karas1-359/+493
Introduced interfaces: chr, mapif, loginif.
2014-11-15Split functions in char.c.Andrei Karas1-1543/+1974
2014-11-15Add prefix inter_storage_ to most functions in int_storage.cAndrei Karas1-1/+1
2014-11-15Add prefix inter_mercenary_ to most functions in int_mercenary.cAndrei Karas1-3/+3
2014-11-15Add prefix char_ to most functions in char.cAndrei Karas1-180/+179
2014-11-03Fixed mmo_char_tobuf for < 20141022shennetsind1-1/+1
Follow up 239d480487e24294975f35ed55f210837ad1088e Special Thanks to Valo! Signed-off-by: shennetsind <ind@henn.et>