summaryrefslogtreecommitdiff
path: root/src/char_sql/char.c
AgeCommit message (Collapse)AuthorFilesLines
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-16/+14
- 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-0/+1
parameter list". git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@10953 54d463be-8e91-2dee-dedb-b68131a5f0ec
2007-07-25* Added support for character rename packet (only dummy code for now)ultramage1-104/+106
* 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-9/+10
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-01Cleaned up some parts of the code.ultramage1-181/+157
Removed obsolete script function 'hasitems'. git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@10838 54d463be-8e91-2dee-dedb-b68131a5f0ec
2007-07-01* TXT->SQL converter fixupultramage1-4/+7
- Added missing char_id insert which totally messed up the conversion - Fixed login converter ignoring many columns (although it had the data) - Pointed out that Login-stored account variable conversion is MISSING! - Pointed out that Status, Homunculus and Mapreg conversion is MISSING! - Blocked the config functions from exiting server when file not found - Finally added VS8 project files for this thing git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@10835 54d463be-8e91-2dee-dedb-b68131a5f0ec
2007-06-06git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@10706 ↵FlavioJS1-2/+2
54d463be-8e91-2dee-dedb-b68131a5f0ec
2007-06-03- Fixed missing client update when 'return to savepoint' failsultramage1-1/+1
- Fixed a bad copy-paste from r10028 letting players escape jail (char was dead on login, so statuses (SC_JAILED) couln't be applied) - Added clif_standing() to clif_sitting(), and used them in clif.c - Cleaned up clif.c a bit - clif_clearchar->clif_clearunit_area, clif_clearchar_id->clif_clearunit_single git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@10668 54d463be-8e91-2dee-dedb-b68131a5f0ec
2007-06-02* Displaying op names instead of numbers in script engine errors.FlavioJS1-46/+25
* Fixed a bug introduced in the last rework of the fame ranking. * Created safestrncpy that ensures the string is nul-terminated. git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@10667 54d463be-8e91-2dee-dedb-b68131a5f0ec
2007-06-01Some typo fixing / cleaningultramage1-12/+12
git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@10658 54d463be-8e91-2dee-dedb-b68131a5f0ec
2007-05-28- Fixed an infinite char-server loop on the map connectionultramage1-17/+18
- Cleaned up the charserver a bit git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@10641 54d463be-8e91-2dee-dedb-b68131a5f0ec
2007-05-28* RFIFOREST returns 0 when the session is eof (input data is implicitly ↵FlavioJS1-44/+53
discarted). * Reworked the player fame update: - would crash if an invalid pos was received - the wrong player could be updated on certain conditions git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@10640 54d463be-8e91-2dee-dedb-b68131a5f0ec
2007-05-25Corrected some weird fgets() statements, plus reformatted themultramage1-6/+6
git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@10616 54d463be-8e91-2dee-dedb-b68131a5f0ec
2007-05-23- Added new flag to skill_castnodex.txt, to allow per-skill tweaking of cast ↵ultramage1-27/+27
time and delay reducibility by item scripts (cards and such) - Fixed Martyr's Reckoning never triggering for gms with all skills - Added MO_TRIPLEATTACK and RG_SNATCHER to @skillall's skill filter - Made gm_skill_unconditional bypass skill blocking (guild timer, etc) - Reverted the weird delay_dependon_agi thing (r8923, r9055, r9059) - Changed a few memsets to strncpy (reading past buffer is a bad idea) - Sped up some memset operations (multiples of 4 are faster) git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@10613 54d463be-8e91-2dee-dedb-b68131a5f0ec
2007-05-21- Removed the TURBO socket mechanism - it was in fact just using a variable ↵ultramage1-376/+393
to cache a few arithmetic operations (premature optimization) - Since the fifohead mess is gone, fixed leftover bad code structuring git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@10599 54d463be-8e91-2dee-dedb-b68131a5f0ec
2007-05-19Removed the wtf-y mmo_char_fromsql_short() from r2527ultramage1-210/+84
git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@10578 54d463be-8e91-2dee-dedb-b68131a5f0ec
2007-05-10Replaced a few missed set_eof()-sultramage1-2/+2
git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@10518 54d463be-8e91-2dee-dedb-b68131a5f0ec
2007-05-09* Added Buuyo-Tama's shortlist for send/eof sockets (defined out for now). FlavioJS1-20/+20
* Replaced toupper/tolower in ladmin by TOUPPER/TOLOWER defines. Shortlist: It's a list of sockets that have data to send and/or are ready for eof processing. It aims to reduce the amount of time spent on do_sendrecv, where it was spending ~13.5% of execution time on a server with 1k users at WoE. thanks to Buuyo-tama for the profile info and code git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@10506 54d463be-8e91-2dee-dedb-b68131a5f0ec
2007-04-23- Fixed a compilation problem with the pid pluginultramage1-1/+1
- Some minor cleanups git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@10322 54d463be-8e91-2dee-dedb-b68131a5f0ec
2007-04-20- Added ntows() to properly handle that client port number deficiencyultramage1-2/+2
- Adjusted the packet_db array for a more consistent look - Reorganized some entries in packet_db.txt - Fixed a small scripts_custom.conf typo git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@10296 54d463be-8e91-2dee-dedb-b68131a5f0ec
2007-04-19- fixed a few include lines.skotlex1-2/+2
git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@10293 54d463be-8e91-2dee-dedb-b68131a5f0ec
2007-04-16* Finally fixed mingw problems, managed to build both TXT and SQLultramage1-6/+6
* Fixed the uint32 platform problem (Microsoft failed so I removed it :) * Removed the cbasetypes.h dependency from the mapcache generator * Removed some random compilation warnings git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@10270 54d463be-8e91-2dee-dedb-b68131a5f0ec
2007-04-09* Recoded and renamed the trim function in strlib to normalize_name. (didn't ↵FlavioJS1-1/+1
behave like a standard trim function, see function comment for what it does) * Added a proper trim function to strlib. * Other minor cleanups. git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@10199 54d463be-8e91-2dee-dedb-b68131a5f0ec
2007-04-07- Moved e_mail_check() and config_switch() to strlib.hultramage1-81/+68
- Synchronized the login servers a bit git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@10174 54d463be-8e91-2dee-dedb-b68131a5f0ec
2007-04-06- Fixed the start_point setting smashing t3h stack in some situationsultramage1-1/+1
- Fixed some over/under-dimensioned arrays (the map length defines already reserve space for the string terminator) - Fixed an unupdated define making Warp Portal fail with an error - Fixed some skill entries of the Galion mob git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@10168 54d463be-8e91-2dee-dedb-b68131a5f0ec
2007-04-06I'm still here!DracoRPG1-12/+9
Rewrote fame ranking lists- changed MAP_NAME_LENGTH to 12, now there's MAP_NAME_LENGTH_EXT at 16 for uses where there is / may be the .gat extension, code adjusted accordingly - moved map_normalize_name to mapindex_normalize_name so that everything handling map names uses the same extension-removing function - greatly enhanced the map cache generator, complete documentation on the tool and the map cache format can be found in doc/ - the map cache format changed a bit as a consequence, but of course a new valid one is included (contains latest Nameless Island maps) - fixed a duplicate entry in map index git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@10167 54d463be-8e91-2dee-dedb-b68131a5f0ec
2007-04-05Fixing several compilation & runtime problemsultramage1-8/+5
git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@10164 54d463be-8e91-2dee-dedb-b68131a5f0ec
2007-04-05* Made a crazy attempt to at least partially synchronize login&char codeultramage1-310/+278
* Major edit to the way the servers handle ip addresses, making them obey the "host byte order inside, network byte order outside" rule - hopefully covered all entry- and exit-points for IP address data - discovered several places where Gravity's client breaks the convention, will need to come up with a suitable countermeasure for that - other than that, the code should be portable, except for printing and ipban mask testing (those still assume a specific byte order) - tested both txt and sql in all usual situations; tested single- and multi-server setups, all seems to work (but watch out for hidden bugs!) git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@10162 54d463be-8e91-2dee-dedb-b68131a5f0ec
2007-04-02* Some source code cleaningultramage1-11/+11
- Fixed the badly worded messages during mapserver startup - Cleaned up socket config reading - Split resolve_hostbyname() into 2 separate functions for clarity - Moved the probably obsolete LOWER/UPPER macros to db.c (TODO: remove) - Moved the badly placed compare_item() function to storage.c (see r779) git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@10119 54d463be-8e91-2dee-dedb-b68131a5f0ec
2007-03-29- Added "do_abort" function to the core. It is invoked when the server has ↵skotlex1-0/+8
received a Segmentation Fault or Floating Point Exception signal. Currently the only one that uses it is the map-server, which then attempts to save all online characters before aborting. - Note that due to the current coding of the sig plugin, do_abort will not be invoked if you use it! This plugin needs to be updated... - Cleaned up a bit the change element code. val1 is the elemental level, val2 is the element now. - Hardcoded the element and elemental level of SC_CHANGEUNDEAD. git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@10089 54d463be-8e91-2dee-dedb-b68131a5f0ec
2007-03-27- Removed a missing file reference in the athena-start scriptultramage1-1/+1
- Fixed a #error "<malloc.h> has been replaced by <stdlib.h>" problem - Fixed the msg_silent setting not being announced every time git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@10077 54d463be-8e91-2dee-dedb-b68131a5f0ec
2007-03-23- Made waiting_disconnect on the char server be an int to hold the timer ID ↵skotlex1-13/+22
of the timeout timer. It is now deleted when a player is successfully set offline/online. - Corrected @unjail having the GM level check backwards. - chrif_authok will now reject to store the newly received status data when the player it was received from is still online, should prevent losing data in certain situations. git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@10060 54d463be-8e91-2dee-dedb-b68131a5f0ec
2007-03-21- Added define MAX_CHARS so you can easily mod the server to support a ↵skotlex1-9/+9
different amount of characters per account (however, there is still the issue of hexing the client to support this change) - Updated msg_athena.conf so it no longer uses broken english on several entries. Thanks to Scerez for the updated file. git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@10044 54d463be-8e91-2dee-dedb-b68131a5f0ec
2007-03-16committing my work on the login server (mostly SQL)ultramage1-12/+3
- removed the check_ip_flag from login&char (there since r1) - removed the CMP_AUTHFIFO_IP and CMP_AUTHFIFO_LOGIN2 defines (also r1) - removed dynamic_account_ban, gm_db settings, weren't doing anything at all - modified the date_format setting to take the format string directly - removed overly verbose config loading messages - removed/simplified many more useless actions - renamed the dynamic_pass_failure_ban_ settings to make more sense - collected relevant config settings into a login_config structure and documented their purpose - allowed usage of yes/no instead of the user-unfriendly 1/0 method in config settings (and added 1/0 as a possible option) - fixed dnsbl which was always taking only the first entry into account git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@10021 54d463be-8e91-2dee-dedb-b68131a5f0ec
2007-03-13Mapcache update, should polish off remaining bugsDracoRPG1-1/+3
git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@10003 54d463be-8e91-2dee-dedb-b68131a5f0ec
2007-03-06- Corrected the define for NK no cardfix (def).skotlex1-4/+5
- Updated skills that shouldn't ignore the target's cards: Smoking, Fling, Zenynage - Fixed the char sql server not escaping the server name before inserting it on the ragsrvinfo table. - Corrected @lvup not doing the party even share check. - Corrected breaker's misc part not ignoring element. git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@9969 54d463be-8e91-2dee-dedb-b68131a5f0ec
2007-03-04- Removed delete_session from socket.h since it shouldn't be used by them.skotlex1-2/+4
git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@9955 54d463be-8e91-2dee-dedb-b68131a5f0ec
2007-03-04More tweaks to socket.c to simplify the codeultramage1-1/+1
- many generic cleanups - reformatting, useless code removal, etc - made the mode_neg setting a compile-time decision, not a run-time one - removed the silly frame_size setting (there since r1) - added some TODOs to http://www.eathena.ws/board/index.php?showtopic=127988 git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@9954 54d463be-8e91-2dee-dedb-b68131a5f0ec
2007-03-02- Modified set_reg so that it returns whether it succeeded or not in setting ↵skotlex1-1/+1
the requested variable. - Externalized battle skill range and blewcount bonus into their own static functions (battle_range_type & battle_blewcount_bonus). - Sped up the skill range flag setting code. - Added automatic support of damagesplit. This means that if a skill's nk value includes damage split among targets, it will do a divide by the number of targets (whereas before the list of skills where this worked was hardcoded) git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@9950 54d463be-8e91-2dee-dedb-b68131a5f0ec
2007-02-28- Made it possible to modify the server packet version from the Makefile.skotlex1-1/+11
- Merged packet 2b22 (from my server) to handle quick fame updates whenever someone's fame in the ranking changes, but no position swaps take place (prevents having to resend the whole fame list in such events, you lazy Draco <.<) git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@9936 54d463be-8e91-2dee-dedb-b68131a5f0ec
2007-02-28- Added a check to prevent trades from being commited if either character is ↵skotlex1-92/+79
in final-save state. - Checked and cleaned up the online_check code in the char-server. Further connections to the char-server are rejected when the account already has a connection (previously this would happen only if there was already another character IN game, not just waiting on the char-select screen). git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@9934 54d463be-8e91-2dee-dedb-b68131a5f0ec
2007-02-28- Simplified a bit mmo_char_tobuf (at least it looks cleaner to me now)skotlex1-18/+9
git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@9932 54d463be-8e91-2dee-dedb-b68131a5f0ec
2007-02-23- Updated Box of thunder to use "agi up" effect for 30 secs instead of NPC ↵skotlex1-1/+0
Agi Up for 20. - Guild expulsion now will fail when the character to be kicked is in a guild castle (rather than checking for the character doing the expulsion) - pk damage reduction settings now will take effect only on Player VS player damage. - Fixed produce_db2.txt entries overwriting produce_db.txt ones. - Fixed item-granted/plagiarized skills unlocking skill trees when only your real learned level should. git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@9899 54d463be-8e91-2dee-dedb-b68131a5f0ec
2007-02-17- Reviewed the client and the shorts at 104 and 106 are part of the char ↵FlavioJS1-48/+34
structure. And a correction on what i said: 0x6d is the packet that sends the new char data, 0x67 is the request to create the new char. (updated code accordingly) git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@9874 54d463be-8e91-2dee-dedb-b68131a5f0ec
2007-02-17- Fixed the structure of packet 0x67 (new char info). It's the same as the ↵FlavioJS1-73/+56
one used for packet 0x6b (chars info). Info based on the 1218 client and on experiments with 'orchish' skin. git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@9873 54d463be-8e91-2dee-dedb-b68131a5f0ec
2007-02-08- Added code for SQL that will automatically detect the ping interval at ↵ultramage1-3/+0
startup, and copy-pasted it around the code - Removed the conf setting as it is not needed anymore git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@9830 54d463be-8e91-2dee-dedb-b68131a5f0ec
2007-02-07- Removed function inter_party_logged, which after some testing and ↵skotlex1-2/+0
thinking, has been concluded is no longer necessary. git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@9818 54d463be-8e91-2dee-dedb-b68131a5f0ec
2007-02-07- Removed deprecated console code.FlavioJS1-4/+3
git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@9815 54d463be-8e91-2dee-dedb-b68131a5f0ec