summaryrefslogtreecommitdiff
path: root/src/char
AgeCommit message (Collapse)AuthorFilesLines
2008-01-10Another round of login server cleaningultramage1-5/+0
* fixed passwordencrypt on SQL not behaving correctly (since r10753) * corrected some column lengths in the login db (username, password,...) * fixed some places which used wfifo without first reallocating it * removed interserver packet 0x7532 (Request to end connection), as there was no code that actually sent this packet * moved RFIFOSKIP actions to execute as soon as possible git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@12043 54d463be-8e91-2dee-dedb-b68131a5f0ec
2008-01-08Added missing session auth checks to charserver.ultramage1-7/+15
Packets from non-authed clients will now be discarded. git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@12034 54d463be-8e91-2dee-dedb-b68131a5f0ec
2008-01-06Modified showmsg code to not attach a timestamp to MSG_NONE-type messages, ↵ultramage7-26/+9
generated by ShowMessage(). It now works exactly like printf(). Removed/replaced all printf calls in the code. Added a new flag to setting 'console_silent', for filtering debug messages. Silenced the "Broken pipe found" and "Server running in debug mode" messages. git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@12020 54d463be-8e91-2dee-dedb-b68131a5f0ec
2007-12-31* Fixed a crash in txt char-servers that the memory manager was hiding. ↵FlavioJS1-4/+4
online_char_db being used after being destroyed (since r4026) git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@11999 54d463be-8e91-2dee-dedb-b68131a5f0ec
2007-12-18Fixed a glitch where the TXT charserver would not unlock castle.txt after ↵ultramage1-2/+2
creating it, thus preventing it from being saved correctly. git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@11941 54d463be-8e91-2dee-dedb-b68131a5f0ec
2007-12-18minor code tweakingultramage1-1/+3
git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@11936 54d463be-8e91-2dee-dedb-b68131a5f0ec
2007-12-17* Added flag.server to indicate interserver socketsultramage1-8/+8
- replaces the previous way (setting 'client_addr' to 0) git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@11930 54d463be-8e91-2dee-dedb-b68131a5f0ec
2007-12-14Guardian hp handling code removal (see bugreport:342)ultramage1-100/+33
- removed guardian hp from the castle data structure, database, savefiles and various script functions (use upgrade_svn11914.sql) - removed guardian hp calculation and manipulation from the castle manager npc, now the hp values are updated by the server itself (glitch: when castle defense changes, all guardians are healed to full) - tweaked script function 'guardianinfo' to provide some data needed by the manager npc (currently available are hp, maxhp and visibility); also, it doesn't need a player attached to execute anymore The whole thing is experimental, use at your own risk (seems to work though...) git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@11915 54d463be-8e91-2dee-dedb-b68131a5f0ec
2007-12-12Some more tweaks to the guild codeultramage1-120/+171
- unrolling of foreach()/_sub() pairs using db iterators - usage of ARR_FIND instead of for()/break; - old function header adjustment git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@11896 54d463be-8e91-2dee-dedb-b68131a5f0ec
2007-12-12* Some preparations for the guild script updateultramage1-195/+256
- cleaned up npc event execution code - cleaned up guild data loading/saving code; to be improved later - removed dummy 'account name' expulsion list management code - removed columns 'rsv1' and 'rsv2' from guild member data - removed columns 'rsv1' 'rsv2' 'rsv3' and 'acc' from guild expulsion data - added upgrade_svn11895.sql for SQL git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@11895 54d463be-8e91-2dee-dedb-b68131a5f0ec
2007-12-12Removed the badly designed/unfinished guild_check_conflict() data integrity ↵ultramage1-35/+0
check (that wasn't actually being used up 'till now). git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@11894 54d463be-8e91-2dee-dedb-b68131a5f0ec
2007-12-11Fixed TXT charserver attempting to do a guild master change instead of an ↵ultramage1-1/+1
integrity check whenever a new guild member gets added. See revisions r3185 and r3719 on how the code arrived into such a state... git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@11890 54d463be-8e91-2dee-dedb-b68131a5f0ec
2007-11-30* Random cleanup/documentation.FlavioJS1-13/+13
* Made common/Makefile get the svn version from the src directory, not src/common. * Added a warning message to the install and uninstall targets. * Renamed all obj directories to obj_all, obj_txt or obj_sql in the makefiles (if an obj/ directory exists, BSD make enters it before reading the makefile) (run ./configure to update your makefiles, and don't forget to do 'make clean' before updating) git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@11844 54d463be-8e91-2dee-dedb-b68131a5f0ec
2007-11-27* TXT/SQL login server code synchronizationultramage2-36/+28
- exported several core structures to login.h - split off ladmin communication code from the TXT login server - removed all occurences of login_log(); a unified function should be added when SQL's loginlog_db logging code gets synced with TXT - removed conf setting login_log_filename - fixed ladmin getting timeouts since the ping system was changed - removed login/char server_fd[] arrays, added server[].fd instead git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@11826 54d463be-8e91-2dee-dedb-b68131a5f0ec
2007-11-27Removed some unneccessary charserver code.ultramage1-11/+11
git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@11825 54d463be-8e91-2dee-dedb-b68131a5f0ec
2007-11-27- Corrected the online_data_cleanup routine setting offline characters that ↵skotlex1-0/+2
are still connected to the char-server. - Added a check in script command sc_end to properly end infinte endure - ASC_BREAKER no longer triggers status effect cards. git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@11817 54d463be-8e91-2dee-dedb-b68131a5f0ec
2007-11-26* Normalized makefiles:FlavioJS1-14/+15
- 3 sections: variables, public targets, private/support targets - object files always in a *_OBJ variable - header files always in a *_H variable - object files always generated to an obj* subfolder - all Makefiles can be executed individually, calling other makefiles if necessary - generic object targets when possible git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@11812 54d463be-8e91-2dee-dedb-b68131a5f0ec
2007-11-26Fixed guild expulsion not working correctly.ultramage1-1/+1
Corrected explusion -> expulsion typo. Added packets from 2007-11-20a sakexe; there are some changes but can't test them yet, so they're left commented out. git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@11808 54d463be-8e91-2dee-dedb-b68131a5f0ec
2007-11-23Fixed a badly defined skill range in homunculus loading code (followup to ↵ultramage1-2/+2
r11731) git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@11789 54d463be-8e91-2dee-dedb-b68131a5f0ec
2007-11-18- setting npc cells will no longer work on non-walkable tiles (since you ↵skotlex1-1/+1
could do this to override cell types and make unwalkable cells walkable again, for example). - Small fix in the char-server accept code. git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@11755 54d463be-8e91-2dee-dedb-b68131a5f0ec
2007-11-14Fixed some homunculus skill offset calculation mistakes (bugreport:363)ultramage1-2/+2
git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@11731 54d463be-8e91-2dee-dedb-b68131a5f0ec
2007-11-11Fixed a missing include/export, and typos in the previous revision.ultramage1-1/+1
Corrected wrong length values in one charserver packet. git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@11714 54d463be-8e91-2dee-dedb-b68131a5f0ec
2007-11-10Fixed some more gcc incompatibilities...ultramage1-3/+3
git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@11706 54d463be-8e91-2dee-dedb-b68131a5f0ec
2007-11-09* Re-worked the login-char-map packet spam mechanismultramage1-45/+82
- mapserver no longer sends entire user list to charserver every 10 seconds; similar change done to the char-login connection - user count updates are only sent when the value actually changes instead of servers polling each other every few seconds - the servers now prevent interserver connection timeout explicitly by sending ping/ack packet pairs instead of relying on the usercount polling to do so; keepalive is sent every 'stall_time'-2 seconds - removed the @refreshonline command as refresh happens automatically every 5 seconds git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@11703 54d463be-8e91-2dee-dedb-b68131a5f0ec
2007-11-08* Changed EXIT_SUCCESS back to 0 in console.c to avoid an unnecessary include.FlavioJS8-22/+24
* Fixed gm_account_db not being deallocated in login-converter.c. * Refactoring names and documentation in db.h/db.c: - changed 'struct dbt' to 'struct DBMap' and 'DB' to 'DBMap*' - changed 'struct db' to 'struct DBMap_impl' and 'DB_impl' to 'DBMap_impl*' - changed COUNT to DB_COUNTSTAT and made it's existence not depend on DB_ENABLE_STATS - removed some @see links and corrected small typos in the documentation git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@11698 54d463be-8e91-2dee-dedb-b68131a5f0ec
2007-11-08Synced the charservers' init procedure.ultramage1-26/+27
git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@11697 54d463be-8e91-2dee-dedb-b68131a5f0ec
2007-11-08Synced charserver char creation creation codeultramage1-135/+32
* removed most of the creation failure messages printed to console * fixed sql charserver letting you use control chars in char names * new chars will not start with the 'Knife' and 'Cotton Shirt' equipped anymore (charserver blindly placed magic values into the equip field) Fixed a glitch where all packets immediately after the map->char login packet would get discarded and the mapserver disconnected. git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@11696 54d463be-8e91-2dee-dedb-b68131a5f0ec
2007-10-27* Fixed TXT charserver doing periodic random-sized memory allocation ↵ultramage1-31/+32
(bugreport:312) * Set 'Create Converter's produce success rate to 100% (bugreport:302) * Added check that verifies weapon/ammo/state requirements also when casting finishes (might have unwanted side-effects tho'!) (bugreport:228) * Fixed Firewall knocking back undead/fire element mobs (bug in r11578) * Added dummy 'openmail' to txt server to fix a script error message git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@11585 54d463be-8e91-2dee-dedb-b68131a5f0ec
2007-10-26* Removed confusing map_nick2sd_nocase(), let the charserver handle itultramage1-0/+1
* Added correct packet for attachment retrieval failure when overweight * Fixed one more mistake in r11571 (Sql->SqlStmt) git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@11579 54d463be-8e91-2dee-dedb-b68131a5f0ec
2007-10-24* Cleaned up some messy guild code (more to come)ultramage2-8/+6
* Cleaned up the mail code, no more pointless dynamic allocation * Added upgrade_svn11548.sql to convert the mail table to new format * Updated vs7 and vs6 project files * Increased the max. send buffer size to 5M since 1M is not enough * Please complain if something stops working ^^; git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@11571 54d463be-8e91-2dee-dedb-b68131a5f0ec
2007-10-20Fixed a nasty bug from r11410 which let people create chars with already ↵ultramage1-24/+22
taken char names, and (in TXT's case) even cause a crash. Closes bugreport:234. git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@11530 54d463be-8e91-2dee-dedb-b68131a5f0ec
2007-10-18Some code cleaning...ultramage1-1/+1
git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@11505 54d463be-8e91-2dee-dedb-b68131a5f0ec
2007-10-17* Merged do_sendrecv() and do_parse() into do_sockets()ultramage1-1/+3
* Fixed subnet check message displaying incorrect ip addresses * client_addr will now be properly set to 0 for server connections * Removed socket code that attempts to cope with code bugs at runtime * Removed outdated copyright and version number from startup logo git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@11503 54d463be-8e91-2dee-dedb-b68131a5f0ec
2007-10-17Using predefined constants as parameters to the exit() function.ultramage7-13/+13
git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@11501 54d463be-8e91-2dee-dedb-b68131a5f0ec
2007-10-14Fixed charsrever crashes, caused by r11410ultramage1-1/+1
git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@11466 54d463be-8e91-2dee-dedb-b68131a5f0ec
2007-10-12* Fixed wrong index calculation in TXT char creation code (ref: r11410)ultramage1-13/+14
* Fixed SQL itemdb loading crash on NULL columns (ref: 11398) git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@11434 54d463be-8e91-2dee-dedb-b68131a5f0ec
2007-10-11Charserver cleaning / code simplification.ultramage1-152/+142
Removed min. 4-letter restriction on char creation name length (but still must be longer than 0). git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@11410 54d463be-8e91-2dee-dedb-b68131a5f0ec
2007-10-04* Added MAX_HOTKEYS to supplement the HOTKEY_SAVING defineultramage1-4/+5
* Fixed a compile problem when hotkey saving is disabled (topic:167265) * Added script source error reporting to countitem() (topic:167165) * Removed integer mob skill state/target definition support (unused) git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@11353 54d463be-8e91-2dee-dedb-b68131a5f0ec
2007-09-30Removed redundant 'subnet' s_subnet structure variable.ultramage1-19/+13
Removed duplicate code from the sql charserver that somehow appeared after the tmpsql merge. git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@11333 54d463be-8e91-2dee-dedb-b68131a5f0ec
2007-09-20* Merged the tmpsql branch:FlavioJS17-52/+75
- Abstraction for the sql code (sql.c/h). - New configure script and makefiles. - Restored txt zeny logging code. (r10814) - Rewrote mapserver's sql code - itemdb, mobdb, mapreg, logs. (r10814) - Fixed a precedence issue (&& and ) in char_sql/char.c. (r10833) - Improved db reading code a bit for consistency. (r11077) - Added separate atcommand for mail deletion. (r11077) - Corrected a few messages that said "new" instead of "unread". (r11077) - Broadcast (*) messages now use "*" as the target's name (not ""). (r11077) - Moved StringBuf code from utils.c/h to strlib.c/h. (r11084 r11117) - Some misc login server cleanups (reformatting etc). (r11136) - Corrected/modified some header entries. (r11141 r11147 11148) - Adjusted VS project files. (r11147) - Adjusted the way the sql charserver does item saving. (r11192) - Corrected usage of reserved keyword 'friend' in mmo.h. (r11192) git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@11245 54d463be-8e91-2dee-dedb-b68131a5f0ec
2007-09-13Wiped out every mention of RETCODE from /src.ultramage8-62/+62
The servers no longer save data using CRCRLF as line terminator on Windows. Closes bugreport:45. git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@11187 54d463be-8e91-2dee-dedb-b68131a5f0ec
2007-08-15- Merged and completed Latio's work on server-side hot-key saving ↵skotlex1-2/+80
(http://www.eathena.ws/board/index.php?s=&showtopic=159388&view=findpost&p=884453) - Now hotkeys are stored server-side (table hotkey in SQL servers, file save/hotkeys.txt for TXT servers). You can disable this behaviour by commenting out the 'HOTKEY_SAVING' define in mmo.h - Fixed a few compilation warnings/errors. - Apply upgrade_svn11018.sql to create the hotkey table. git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@11019 54d463be-8e91-2dee-dedb-b68131a5f0ec
2007-08-09The new functions now clear junk from the output buffer, this simplifies the ↵ultramage1-1/+1
code a bit. Added a TODO for one emblem loading problem/crash. git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@10969 54d463be-8e91-2dee-dedb-b68131a5f0ec
2007-08-08* Cleaned up junk left in the code by the mapcache/mapindex updateultramage1-20/+16
- Added mapindex_getmapname(_ext) to help with ".gat" adding/removing - Moved related processing to the interface (prevents duplicity) git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@10963 54d463be-8e91-2dee-dedb-b68131a5f0ec
2007-08-07Some minor typo fixing.ultramage1-2/+1
git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@10960 54d463be-8e91-2dee-dedb-b68131a5f0ec
2007-08-05Fixed a missing charserver include causing "warning: struct declared inside ↵ultramage1-3/+1
parameter list". git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@10953 54d463be-8e91-2dee-dedb-b68131a5f0ec
2007-07-26* Cleaned up mob drop code, crashfix is still needed though...ultramage1-1/+2
* Reduced ignore-list length to 20, added proper reply packet * Cleaned up some very poorly written pm-ignore code (see r141) * Fixed a typo in Warp Portal code displaying an incorrect map name git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@10915 54d463be-8e91-2dee-dedb-b68131a5f0ec
2007-07-25* Added support for character rename packet (only dummy code for now)ultramage1-106/+74
* Added support for langtype-12 char deletion packet (tested, works) * Synchronized txt/sql charserver code a bit * Adjusted motd.txt to not crash new clients * Removed some dead code from the charserver (see r352) git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@10909 54d463be-8e91-2dee-dedb-b68131a5f0ec
2007-07-20* Corrected packet_db.txt. See topic:158382 for details. As a side-effect, ↵ultramage1-24/+18
the latest packet version is now 22 instead of 21. * Added a charserver config option for the character renaming flag, along with a detailed comment on what it's supposed to be. This eliminates all that "change PACKETVER to 8 and recompile" mess. * Moved PACKETVER back to clif.h, cleaned the related code a bit. git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@10888 54d463be-8e91-2dee-dedb-b68131a5f0ec
2007-07-18- Small update to the effects list (new exe's effects by Au{R}oN)ultramage1-2/+2
- No sending of the pet_equip packet when pet has no equip (thx to Skotlex) - Added back exp gain limiting for old formula to stop exploits (see r8177) - Now a message is printed when the packet_ver filter rejects someone - Renamed two structs using same name as variables (MSVC debugger issue) git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@10886 54d463be-8e91-2dee-dedb-b68131a5f0ec