summaryrefslogtreecommitdiff
path: root/src/char/char.c
AgeCommit message (Collapse)AuthorFilesLines
2014-08-07Corrected several format-string errors through the codeHaru1-6/+5
- Functions that expect a printf-style format string are now marked as such, so that gcc/clang will emit a warning warn you if you mismatch format string and arguments. Signed-off-by: Haru <haru@dotalux.com>
2014-05-30Fixed typos inside src/Shido1-25/+25
2014-05-17Renamed incuvate of Pet System.Shido1-1/+1
2014-05-13Removed trailing whitespace (sources)Haru1-6/+6
Signed-off-by: Haru <haru@dotalux.com>
2014-05-10Re-commit of "Fixed order of includes in all source files"Haru1-20/+24
This reverts commit 94657284973f4037596bae468ebfbee5c217e02b.
2014-05-10Revert "Fixed order of includes in all source files"panikon1-24/+20
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 filesHaru1-20/+24
- 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-1/+2
- 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-19Merge pull request #272 from hemagx/masterHaruna1-10/+6
Rewritten NSI_UNIQUE_ID system
2014-04-18Rewritten NSI_UNIQUE_ID system to get rid of the cross-database interreg ↵Ibrahim Hossam1-10/+6
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-10Fixed issue: 7939panikon1-53/+64
http://hercules.ws/board/tracker/issue-7939-change-sex/ Also cleaned a bit the change sex process
2014-03-25Added new return values to make_new_char_sqlpanikon1-28/+47
Added char_id to charlog Corrected RE check in skill_magic_reflect (see commit c9310f3)
2014-03-22Fixed issue 7338 (added new char configuration char_aegis_delete)panikon1-15/+32
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 argumentHaru1-1/+1
Signed-off-by: Haru <haru@dotalux.com>
2014-03-14Fixed Bug 8078shennetsind1-2/+4
gms relogging while char server is on char_server_type will no longer get rejected. Special Thanks to Beret. http://hercules.ws/board/tracker/issue-8078-maintenance-mode-enabled/ Signed-off-by: shennetsind <ind@henn.et>
2014-03-06Minor whitespace fixHaru1-6/+6
(trying to trigger a HPM Hooks rebuild missing from my previous commit) Signed-off-by: Haru <haru@dotalux.com>
2014-02-19Follow up 9132878d911cfe720eaad94ad3d4a5dd11958f99shennetsind1-0/+4
Fixed issue (8023) with sc rows (only those of tick = -1, aka permanent scs) duplicating due to lack of primary index. Special Thanks to Flash, Haru. Note that the upgrade script will clear the permanent statuses from your sc_data table (e.g. lex aeterna, carts) to ensure no issues are left. Signed-off-by: shennetsind <ind@henn.et>
2014-02-13Fixed bug 7279panikon1-10/+35
http://hercules.ws/board/tracker/issue-7279-starting-items/
2014-02-10Merge pull request #256 from hemagx/masterHaruna1-0/+30
Merged~ Thank you for your contribution to Hercules!
2014-02-02Fixed Bug 7962shennetsind1-0/+34
Fixed issue with "permanent" (durationless) status changes (such as carts) integrity caused on server shutdown. Special Thanks to Haru! http://hercules.ws/board/tracker/issue-7962-command-at/ Signed-off-by: shennetsind <ind@henn.et>
2014-02-02Update inter server so ask login server for account information Instead of ↵Ibrahim Hossam1-0/+30
do query to login table. Thanks to Haruna to clean it up.
2014-01-18Socket interfacedshennetsind1-12/+12
We designed this one with having as little changes required elsewhere in mind, thus the way most socket-related things are called has not changed. Plugins may now take a greater advantage of the socket features. Signed-off-by: shennetsind <ind@henn.et>
2014-01-11Hercules 1st 2014 MegaPatchshennetsind1-25/+87
http://hercules.ws/board/topic/3886-hercules-1st-2014-megapatch/ Signed-off-by: shennetsind <ind@henn.et>
2014-01-08Introducing Hercules Autotrade Persistencyshennetsind1-5/+26
Aka autotrading merchants survive server restarts. Originally sekai's (aka me). Special Thanks to Haruna, Michieru. Signed-off-by: shennetsind <ind@henn.et>
2013-12-31Fixed issues pointed out in Report 7909shennetsind1-1/+1
Special Thanks to Vader. http://hercules.ws/board/tracker/issue-7909-some-code-errors-and-optimisations/ Signed-off-by: shennetsind <ind@henn.et>
2013-12-30Fixed account expiration timeshennetsind1-2/+20
Login server no longer insta-denies expired accounts, as there may be free to play (or non paying) char server modes in the list, also made sure type 3 is sent as normal mode to non-expired accounts (client has a hardcoded if type == 3 => "claim need to pay & deny message" Special Thanks to Beret. Signed-off-by: shennetsind <ind@henn.et>
2013-12-17Fixed several compiler warningsHaru1-26/+31
- Warnings detected thanks to Xcode's compiler settings (more strict by default) and clang, warnings mostly but not only related to data sizes on 64 bit systems, that were silenced until now by very lax compiler settings. - This also decreases by a great deal the amount of warnings produced by MSVC in x64 mode (for the adventurous ones who tried that) - Also fixed (or silenced in case of false positives) the potential issues pointed out by the (awesome) clang static analyzer. - Patch co-produced with Ind, I'm merging and committing in his place! Signed-off-by: Haru <haru@dotalux.com>
2013-12-06HPM: mapindex interfaceshennetsind1-21/+21
Signed-off-by: shennetsind <ind@henn.et>
2013-11-29Corrected an uninitialized variable when adding an itemHaru1-0/+1
- The .favorite field of newly added inventory items wasn't correctly initialized to zero, potentially causing data loss (fixes bugreport:7854, thanks to Vincent, GrumpyPanda). Signed-off-by: Haru <haru@dotalux.com>
2013-11-19Fixed Bug 7840shennetsind1-1/+1
Special Thanks to kyeme for all the debug information and help! http://hercules.ws/board/tracker/issue-7840-char-server-crash/ Signed-off-by: shennetsind <ind@henn.et>
2013-11-19Sanitized and improved several macros through the codeHaru1-1/+1
- Sanitized all potentially unsafe macros (related eA:15259) - Improved some function-like macros to evaluate their argument only once and keep it in a temporary variable. This improves performance in the damage calculation related code. Signed-off-by: Haru <haru@dotalux.com>
2013-11-18Follow up aee2f6317e1c927847993801b5973d7e2e27a418shennetsind1-8/+18
Fixed glitch that'd occur in clients with login screen where even after logging out the client would still remember previously sent banned timestamps, keeping the char banned until client was reopened. Also dropped a error message map server would show up when banning offline characters. Special Thanks to Mvmbles for pointing it out, Haruna for testing and helping fix it. Signed-off-by: shennetsind <ind@henn.et>
2013-11-16Introducing Character Ban Support.shennetsind1-56/+159
@charban/@charunban, can temporarily block any accounts as opposed to the usual account-wide block. Special Thanks to Haruna, Yommy! Signed-off-by: shennetsind <ind@henn.et>
2013-11-16Minor char server char list fixesshennetsind1-9/+5
the array was being erroneously modified in old client packets. Signed-off-by: shennetsind <ind@henn.et>
2013-11-16Updated char server's response to offline map servershennetsind1-4/+16
Previously attempting to log in while map server was unavailable or not yet ready would close the client, now the char select window shows up and attempting to select a character while the map server is unavailable will display a pop up "the map is not available", client will remain in char select window and won't close anymore. Special Thanks to Haruna. Signed-off-by: shennetsind <ind@henn.et>
2013-11-16Fixed char server's maintenance modeshennetsind1-17/+36
Enabling the maintenance mode will now restrict login based on group id (previously maintenance mode was merely cosmetic and would allow all accounts to access). Renamed char-server.conf setting char_maintenance to char_server_type, added char_maintenance_min_group_id to be used in conjunction with char_server_type:1 Signed-off-by: shennetsind <ind@henn.et>
2013-11-07Item Bound Fixes/Adjustments/Improvementsshennetsind1-16/+16
Special Thanks to Haruna Signed-off-by: shennetsind <ind@henn.et>
2013-11-06Merge remote-tracking branch 'origin/master'shennetsind1-44/+50
Signed-off-by: shennetsind <ind@henn.et> Conflicts: conf/messages.conf src/common/mmo.h src/map/pc_groups.c src/map/pc_groups.h
2013-11-02Merge remote-tracking branch 'upstream/master'shennetsind1-8/+9
Signed-off-by: shennetsind <ind@henn.et> Conflicts: sql-files/main.sql sql-files/upgrades/index.txt src/common/mmo.h
2013-10-31No error after compilation, but when logging in at map server it will crash.sevenzz231-44/+50
Im pretty sure its on the clif.c Signed-off-by: sevenzz23 <sevenzz23@yahoo.com>
2013-10-30Official Font Supportshennetsind1-8/+9
Fonts are now relog-persistent. Font items are now toggle-on/off, they no longer go away on use, they go away when their rental duration is over (and the font effect goes back to original). Special Thanks to Yommy for all the data! Signed-off-by: shennetsind <ind@henn.et>
2013-10-30Account-wide Exp/Drop/Death Modifiersshennetsind1-7/+13
Attempting to mimic the official as suggested in http://hercules.ws/board/topic/250-official-vip-system/ The variables can be read and modified thru scripting as well as sql, the patch introduces 3 new pc-arams 'ModExp','ModDrop' and 'ModDeath' for that purpose. The OnLogin modifier display is not the real deal though -- wasn't able to get it to output properly (though that might have been my client files failt) Up for review. Signed-off-by: shennetsind <ind@henn.et>
2013-10-27Fixed Bug #7418shennetsind1-4/+10
Item rentals now take place after status changes arrive, guaranteeing that items that expired cancel their effects properly. Thanks to kyeme, malufett. http://hercules.ws/board/tracker/issue-7418-setmount-boarding-hatler/ Signed-off-by: shennetsind <ind@henn.et>
2013-10-27Merge branch 'master' of https://github.com/HerculesWS/Herculesshennetsind1-14/+8
2013-10-27Shadows System Baseshennetsind1-4/+4
http://hercules.ws/board/topic/581-implement-the-shadows-system/ Special Thanks to Yommy for all the client data, Haru for making it possible to get it out and rosfus for the details on the feature. Shadows Feature requires packetver 20120925 or newer. ---------- Also: Updated all packets related to the shadows system, improved memory/processing of inventory/cart/storage/viewequip packets Signed-off-by: shennetsind <ind@henn.et>
2013-10-26Changed 'tick' variables to 64 bitHaru1-14/+8
- This fixes an issue with timers that stop working after about 24-49 days when the tick overflows (note that this may happen much earlier than that, and at hard to predict times, on some systems) - Updated the RDTSC help message in the configure script to also warn users about issues with SpeedStep enabled systems. - On Windows, tick() still has a resolution of 10~15ms (or even as low as 100ms on some systems). A TODO comment (thanks, Ai4rei) was added for a follow-up patch, as I want this one to be as small as possible) - Note: on Windows versions earlier than 6.x (Vista, Server 2008), the tick overflow issue is NOT fixed, since they don't support the function used to retrieve a 64 bit tick. This isn't a big issue, since those platforms are already - or going soon to be - out of their extended support period, and it's already advisable to upgrade, for other reasons. If you're the unfortunate user of such a system, it is recommended that you reboot your machine at least once every 49 days for Hercules to work reliably. - Note: To clear some doubts, since I've already been asked, this has absolutely NOTHING to do with 32/64 bit CPUs or OSes. It's all about a variable's size, not the size of registers of your CPU, and your 32bit CPU will be able to handle this just fine. Signed-off-by: Haru <haru@dotalux.com>
2013-10-23Fixed char deletion on latest clients freezingshennetsind1-0/+8
Newer clients freeze unless the char select list is resent, Haru and I confirmed official servers re-send the list upon deletion (we were not able to identify when this started though, its currently set to 2013 onwards -- if you have info on this please contact us so we can fix the range :D). Special Thanks to LuLu, Haruna. Signed-off-by: shennetsind <ind@henn.et>
2013-10-11Fixed char.c msvc compiler warningsshennetsind1-3/+3
Thanks to LuLu for bringing it up. Signed-off-by: shennetsind <ind@henn.et>
2013-10-11Fixed Char Deletion Bug on 2013++ Clientsshennetsind1-2/+7
Thanks to LuLu who pointed us in the right direction, http://hercules.ws/board/topic/2453-help-open-pull-request-fixing-char-deletion-time-in-2013-client/ Signed-off-by: shennetsind <ind@henn.et>
2013-10-10Introducing Bank Supportshennetsind1-0/+25
http://hercules.ws/board/topic/2455-introducing-bank-support/ Thanks to Yommy, Haru! Signed-off-by: shennetsind <ind@henn.et>