summaryrefslogtreecommitdiff
path: root/src/char_sql/char.c
AgeCommit message (Collapse)AuthorFilesLines
2011-12-22Minstrel/Wanderer changesex bugfix, bugreport:5147shennetsind1-1/+7
git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@15214 54d463be-8e91-2dee-dedb-b68131a5f0ec
2011-12-22Fixed character delayed deletion method, bugreport:5136shennetsind1-0/+5
git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@15205 54d463be-8e91-2dee-dedb-b68131a5f0ec
2011-12-201/2/3-letter char name creation exploit fix.shennetsind1-1/+6
git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@15169 54d463be-8e91-2dee-dedb-b68131a5f0ec
2011-12-20fixed char server from creating character names with \255 and \xA0 ↵shennetsind1-1/+1
(exploitable characters). fix for bugreport:4166 git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@15168 54d463be-8e91-2dee-dedb-b68131a5f0ec
2011-12-18* Merged changes up to eAthena 15034.eathenabot1-1/+5
git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@15154 54d463be-8e91-2dee-dedb-b68131a5f0ec
2011-12-15few MySQL Optimizations to char-servershennetsind1-8/+8
git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@15125 54d463be-8e91-2dee-dedb-b68131a5f0ec
2011-12-14Removing a friend will also remove you from your friends friendlist, ↵shennetsind1-0/+16
bugreport:2977 git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@15119 54d463be-8e91-2dee-dedb-b68131a5f0ec
2011-12-13- Fixed char-server saving skills which have no level associated with themepoque111-1/+5
git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@15092 54d463be-8e91-2dee-dedb-b68131a5f0ec
2011-10-16* Added field for the change slot feature to character select list packet ↵ai4rei1-1/+5
for 2011-09-28aRagexeRE and newer. git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@14977 54d463be-8e91-2dee-dedb-b68131a5f0ec
2011-09-08* Fix C++ compilation issues.flaviojs1-1/+1
git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@14955 54d463be-8e91-2dee-dedb-b68131a5f0ec
2011-08-30- Updated mmo_char_tosql and memitemdata_to_sql to keep a count of errors ↵Skotlex1-24/+61
while saving a character. If there are any errors, the in-memory copy (cp) will not be updated. Should fix dupes that can happen when a intermediary save fails because of sql access being down. git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@14949 54d463be-8e91-2dee-dedb-b68131a5f0ec
2011-08-10- added sending a dummy 0x08b9 packet in the char-server, required to ↵Skotlex1-0/+10
support clients from this year. - added a fix to status_heal to take into account that -int_max == int_max in some architectures, which leads to an infinite loop (bugreport:3410) git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@14930 54d463be-8e91-2dee-dedb-b68131a5f0ec
2011-07-10* Changed limit definitions used in WBUF* and WFIFO* to the intended fixed ↵flaviojs1-14/+14
size alternatives. git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@14899 54d463be-8e91-2dee-dedb-b68131a5f0ec
2011-06-30Replaced custom type 'intptr' with standard 'intptr_t'.ultramage1-11/+11
git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@14873 54d463be-8e91-2dee-dedb-b68131a5f0ec
2011-06-22Added enum e_skill_flag to represent the values of struct s_skill's ↵ultramage1-3/+3
complicated 'flag' field. Reordered the enum values so SKILL_FLAG_REPLACED_LV_0 goes last and arithmetic can be done on it safely (for storing skill level values). This also adds support for skill levels higher than 10. Fixed several places where SKILL_FLAG_TEMPORARY was not handled properly, and instead was considered as one of the saved skill level values (resulting in skill level -1). git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@14861 54d463be-8e91-2dee-dedb-b68131a5f0ec
2011-06-16* Merges from charmerge:flaviojs1-103/+273
- Added DBMap::exists. (r14090) - Added sv_parse_next, a stepped version of sv_parse (delim-separated parser). (r14100 r14104) - Added missing fd check to do_close. (r14145) - Normalized, refactored and restructured some code (in preparation for shutdown/reconnect code). (r14145 r14150) - Changed the char select request code to allow the char-server to reject it. (player in map-server trying to go to char select) (r14150) - Added shutdown support to the servers. (incomplete) (r14152) git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@14851 54d463be-8e91-2dee-dedb-b68131a5f0ec
2011-04-17* Fixed char-server missing some WFIFOHEAD (partially due to r10909 being ↵ai4rei1-0/+4
reverted by r11245, follow up to r9307 and r14618). git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@14798 54d463be-8e91-2dee-dedb-b68131a5f0ec
2011-04-16* Added support for visible garments/robes.ai4rei1-5/+9
- For SQL apply upgrade_svn14797.sql to upgrade table `char`; for TXT no action is necessary, as it upgrades itself. - This also fixes NPCs not being visible with clients 2011-01-11aRagexeRE+ (bugreport:4865). git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@14797 54d463be-8e91-2dee-dedb-b68131a5f0ec
2011-04-10* Added support for clients 2010-11-23aRagexeRE+ and 2011-01-11aRagexeRE+.ai4rei1-1/+5
- Servers that used packet db version 'default' until now need to be updated to use version '25'. git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@14791 54d463be-8e91-2dee-dedb-b68131a5f0ec
2011-03-19Removed leftovers of old charcommand config (follow-up to r13403).Gepard1-1/+2
Added check to ensure character `rename` status will be saved if changed. Fixed Beast Strafing (HT_POWER) damage formula and SP requirement provided by Playtester (bugreport:4675, since r4392). git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@14748 54d463be-8e91-2dee-dedb-b68131a5f0ec
2011-02-19* Fixed gcc compile warnings in char-server and console plug-in ↵ai4rei1-2/+2
(bugreport:4771, topic:208746, since r9631 and r14700). git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@14716 54d463be-8e91-2dee-dedb-b68131a5f0ec
2011-02-08* Added support for new delayed character deletion.ai4rei1-7/+259
- Asks for birth date associated with the account and has a waiting time of 24 hours by default (setting). - For SQL apply upgrade_svn14700.sql to upgrade table `char`; for TXT no action is necessary, as it upgrades itself. - This completes support for clients 2010-08-03aRagexeRE and later. * Updated login sql engine version, missed during `birthdate` addition (follow up to r14672). git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@14700 54d463be-8e91-2dee-dedb-b68131a5f0ec
2011-01-14* Replaced remaining occurences of '-1' with 'INVALID_TIMER', where ↵ai4rei1-14/+14
appropriate (follow up to r12998). git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@14670 54d463be-8e91-2dee-dedb-b68131a5f0ec
2011-01-13* Removed ladmin (remote administration tool), all related support code and ↵ai4rei1-16/+0
the checkversion.pl tool with it's support code, which was shared with ladmin (topic:262934, related bugreport:1147, bugreport:1889, r9408 and r9610). git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@14667 54d463be-8e91-2dee-dedb-b68131a5f0ec
2011-01-13* Reformatting and minor cleanups to console-plugin related code.ai4rei1-19/+9
git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@14664 54d463be-8e91-2dee-dedb-b68131a5f0ec
2010-12-29* Fixed char-server making assumptions about RFIFO data length in character ↵ai4rei1-1/+1
deletion packet (since r10909). * Fixed login-server discarding RFIFO data, when the length is 1 byte; minimum packet size is 2 bytes (since r5027). - Fixed login-server not skipping packet 0x2728's data on failure (since r12043). git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@14637 54d463be-8e91-2dee-dedb-b68131a5f0ec
2010-12-25* Synchronized TXT/SQL char-server code a bit.ai4rei1-111/+112
git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@14619 54d463be-8e91-2dee-dedb-b68131a5f0ec
2010-12-24* Fixes to char-server.ai4rei1-58/+55
- Removed unnecessary #includes from TXT and synchronized them with SQL. - Fixed TXT having start Zeny of 500 instead of 0 by default (follow up to r4409 and r8420). - Fixed TXT using 1024 instead of NAME_LENGTH for 'unknown_char_name' (follow up to r2191). - Fixed SQL potentionally attempting to disconnect a player for account_id == 0 in changesex packet. - Fixed SQL looking for option 'db_path' in 'inter_athena.conf' instead of 'char_athena.conf'. - Fixed char select not sending a reply packet, when selected character was not found. - Made use of safestrncpy instead of strcpy, strncpy and memset for copying strings where appropriate. - Removed unused function 'chardb_final' in TXT (since r4878). - Removed unnecessary WFIFOHEAD in char deletion in SQL (since r11245, related r9307 and r10909). git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@14618 54d463be-8e91-2dee-dedb-b68131a5f0ec
2010-12-18* Updates to handling of hair color/style and cloth color of characters.ai4rei1-2/+0
- Moved limit shortcut defines from mmo.h to battle.h, as they are only required in files, which include battle.h (since pre-svn 2004/10/15). - Moved hair style/color validation from char-server to map-server. This enables use of non-default limits as specified in battle config, rather than being restricted to hard-coded ones (bugreport:150). - Cleaned up related capping of values in pc_changelook (related r1708). git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@14604 54d463be-8e91-2dee-dedb-b68131a5f0ec
2010-12-18* Fixed usage of literals for map name length in character list packet ↵ai4rei1-1/+1
(since r14368). git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@14603 54d463be-8e91-2dee-dedb-b68131a5f0ec
2010-12-12* Updates to dynamic server information `ragsrvinfo` on SQL.ai4rei1-9/+4
- Fixed exp and drop rates (int) getting truncated (short) when sent to char-server. - Removed `motd` from `ragsrvinfo` as it is not dynamically changed by the server and as such can be read by 3rd party applications directly from conf/motd.txt if required. git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@14579 54d463be-8e91-2dee-dedb-b68131a5f0ec
2010-11-19* Fixed WFIFOL being used instead of WFIFOW for a short field of packet ↵ai4rei1-1/+1
0x2710 (bugreport:2819). git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@14468 54d463be-8e91-2dee-dedb-b68131a5f0ec
2010-11-09Follow-up to r14368. Load last_map from SQL on char load so the information ↵Paradox924X1-2/+5
is available during char select for PACKETVER > 20100721. Patch based on Ai4rei's. (bugreport:4429) git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@14453 54d463be-8e91-2dee-dedb-b68131a5f0ec
2010-11-02Fixed an issue where two ushorts were being strcmp'd. Follow-up to r14442. ↵Paradox924X1-1/+1
(bugreport:4523) git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@14443 54d463be-8e91-2dee-dedb-b68131a5f0ec
2010-11-02Ensured character data is saved even when last map is the only value that ↵Paradox924X1-0/+1
has changed during save time. (bugreport:2218) git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@14442 54d463be-8e91-2dee-dedb-b68131a5f0ec
2010-11-02Applied fix by Ai4rei to reintroduce mapName within charinfo packet when ↵Paradox924X1-1/+1
PACKETVER >= 20100803. Follow-up to r14432. (bugreport:4413) git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@14440 54d463be-8e91-2dee-dedb-b68131a5f0ec
2010-10-17Fixed wrong char info packet size for clients after 2010-07-27 (follow-up to ↵Gepard1-1/+1
r14368). git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@14432 54d463be-8e91-2dee-dedb-b68131a5f0ec
2010-10-11Use `char_id` rather than `master` when checking if a guild needs to be ↵Paradox924X1-1/+1
deleted during character deletion. git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@14416 54d463be-8e91-2dee-dedb-b68131a5f0ec
2010-08-03- Merged a few minor bugfixesSkotlex1-0/+4
- Merged in a bunch of the eA renewal support patch. git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@14368 54d463be-8e91-2dee-dedb-b68131a5f0ec
2010-04-23Merged a few updates for supporting renewal clients (thanks to Diablo): ↵skotlex1-3/+11
[Skotlex] - Updated packet_db entries - Added slot info on packet 0x6b (PACKETVER > 20100413) - Trade add-item use packet 0x80f (PACKETVER > 20100223) - Guild storage add-item use packet 0x1c4 (PACKETVER > 20090603) - Vending list use packet 0x800 (PACKETVER > 20100105) - Allow client to change item-share party settings (PACKETVER > 20090603) git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@14286 54d463be-8e91-2dee-dedb-b68131a5f0ec
2009-12-03Prevented online user count from going negative. (bugreport:3913)Paradox924X1-2/+4
git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@14186 54d463be-8e91-2dee-dedb-b68131a5f0ec
2009-11-19- Applied the renewal client support patch from Diablo (eA forum topic 222623)skotlex1-10/+40
- Added support for strcharinfo(3) to retrieve the player's map - Added script command "searchitem" for name item searches. - Moved PACKETVER to src/common/mmo.h as it's needed by the char-server now - Changed the status valX from int to long so that it won't break for pointer-storage in other architectures. - Moved the change party leader code to party.c - A few bugfixes or packet field completions based on my past experience messing around with my server. git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@14155 54d463be-8e91-2dee-dedb-b68131a5f0ec
2009-10-18Removed the char_rename setting in favor of a PACKETVER define.ultramage1-14/+10
Inverted the way renames are counted: '0' now means 'no renames left' (the default). Please make sure your database matches this new behavior before starting the server. git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@14093 54d463be-8e91-2dee-dedb-b68131a5f0ec
2009-10-12Removed 'char_max_rename', extended 'char_rename', fixed compatibility issues.Inkfish1-28/+15
git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@14089 54d463be-8e91-2dee-dedb-b68131a5f0ec
2009-10-12Fixed an error when 'char_rename' is set to 'no'Inkfish1-6/+5
git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@14088 54d463be-8e91-2dee-dedb-b68131a5f0ec
2009-10-11Added character rename function.(topic:225576)(written by pakpil and fixed ↵Inkfish1-25/+162
by me) git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@14084 54d463be-8e91-2dee-dedb-b68131a5f0ec
2009-09-20Disabled ip checking during auth, since it lead to a lot of confusion.ultramage1-4/+4
This essentially reverts the default behavior to before r10021. Re-enabling should only be reconsidered after the subnet mechanism is made fully automatic. git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@14069 54d463be-8e91-2dee-dedb-b68131a5f0ec
2009-07-26* Some updates of Quest Log systemInkfish1-1/+1
- renamed table 'questlog' to 'quest' to avoid misunderstanding - updated main.sql - fixed the server can't load more than 16 quests - removed the MAX_QUEST limit. tests show the client can handle more than 100 quests. git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@13963 54d463be-8e91-2dee-dedb-b68131a5f0ec
2009-07-25Rewrote Quest Log system.Inkfish1-4/+1
git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@13959 54d463be-8e91-2dee-dedb-b68131a5f0ec
2009-06-30Fixed sql char deletion code using a broken pet deletion query (ran very ↵ultramage1-5/+3
slow, and had a typo in a binary shift operation) (bugreport:3304). Fixed change r13774 to the code responsible for deciding whether to move 1 extra cell when stopping walking; it had its logic inverted by mistake (bugreport:3312). Cleaned up the itemlist, cartlist and storagelist gm command code: - fixed buffer overflows in all three functions (bugreport:456). - merged all three atcommand functions into a single one; the appropriate behavior is detected from the command's name. - using the StringBuf class instead of static-size buffers and string operations for more efficient and safe processing. - using 'jname' (the one without underscores) as the primary item name in the list, and not using the aegis name for cards at all (since it's almost identical). - fixed forged item details never being displayed due to a missing strcat(). - extended item info (crafted/named items, pet eggs) will now be displayed for storage and cart list as well. git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@13920 54d463be-8e91-2dee-dedb-b68131a5f0ec