summaryrefslogtreecommitdiff
path: root/src/char/inter.c
AgeCommit message (Collapse)AuthorFilesLines
2012-01-20Merged TXT removal branch back to trunk.gepard19841-378/+384
* TXT save engine is removed and no longer supported. * See also tid:53926, tid:57717. git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@15503 54d463be-8e91-2dee-dedb-b68131a5f0ec
2011-10-09* Rework some party code.flaviojs1-1/+1
- add leader argument to party_fill_member - add party_getmemberid - add requester char_id to packets 0x3021 and 0x3821 (party info) - diff members when replacing party info - remove fixup all-player-iteration when receiving a party for the first time - send 'party info' before 'party created' - send 'party info' before 'party member added' - update empty party_id when checking the player of a party git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@14968 54d463be-8e91-2dee-dedb-b68131a5f0ec
2010-12-07* Reverted r14563, due to multiple issues which render the source ↵ai4rei1-2/+2
malfunctioning or uncompilable. To be redone later (bugreport:4627). git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@14567 54d463be-8e91-2dee-dedb-b68131a5f0ec
2010-12-07Changed almost all instances of sprintf() to snprintf().Paradox924X1-2/+2
git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@14563 54d463be-8e91-2dee-dedb-b68131a5f0ec
2010-12-01* Fixed using main chat nick longer than 15 characters would cause a buffer ↵ai4rei1-1/+1
overflow (bugreport:2671, since r5013). git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@14537 54d463be-8e91-2dee-dedb-b68131a5f0ec
2009-11-03Extended broadcast implementation:Gepard1-11/+17
- support for font formatting, like font-size - `bc_woe` flag to allow client-side filtering of WoE announcements - new broadcast packet 0x40C git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@14120 54d463be-8e91-2dee-dedb-b68131a5f0ec
2009-06-16Fixed an exploit that makes guild skill get higher level than the max ↵Inkfish1-1/+1
defined in guild_skill_tree. (bugreport:3241) git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@13894 54d463be-8e91-2dee-dedb-b68131a5f0ec
2008-07-26Merged the /loginmerge branch (topic:192754)ultramage1-15/+19
* the login server storage, ipban and logging systems have been abstracted and now provide a common interface; the rest has been merged into a single login server core (no more login/login_sql duplicity) * storage systems are now added via compiler options (WITH_SQL / WITH_TXT) * multiple storage engines can be compiled in at the same time, and the config option account.engine defines which one will be used. * due to MySQL autoincrement limitations, accounts with id '0' will not be supported; account IDs from this point on should start from '1'. * login_log() functions now again record IP addresses in dotted format, not as 4-byte integers (undo from r6868). * removed config options that defined column names in the login table * removed `memo` and `error message` columns from login db/savefile * moved `loginlog` table to the logs database * added sql files upgrade_svn12975.sql and upgrade_svn12975_log.sql * due to changes to the login table layout, I added an !optional! sql file (upgrade_svn12975_view.sql) that will provide a certain degree of backwards compatibility with existing software; read the instructions inside carefully! * moved third-party includes/libs to a separate directory * updated project files / makefiles Changed the way GM levels are handled * removed conf/gm_account.txt * added the gm level column to the txt savefile (after 'email' column) * gm level information is now transferred along with account data For open problems see bugreport:1889. git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@13000 54d463be-8e91-2dee-dedb-b68131a5f0ec
2008-07-15Corrected wrong data loading order in txt storage code causing crashes at ↵ultramage1-1/+3
startup (followup to r12950). git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@12957 54d463be-8e91-2dee-dedb-b68131a5f0ec
2008-04-12TXT code has been re uploaded. Please note this does not change the fact ↵Kevin1-0/+711
that TXT support has been dropped. There is no guarantee the code base will be managed and it will in the near future be REMOVED. If there is in ANY way TXT support in the future, it will be abstracted through a sql interface so only the sql code has to be maintained. git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@12572 54d463be-8e91-2dee-dedb-b68131a5f0ec
2008-04-12I live in a giant bucket.Kevin1-711/+0
git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@12570 54d463be-8e91-2dee-dedb-b68131a5f0ec
2008-04-11The max_account_id packetver detection mechanism will never cause any ↵ultramage1-11/+0
connection problems ever again. (bugreport:388) git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@12563 54d463be-8e91-2dee-dedb-b68131a5f0ec
2008-04-10Modified the charservers to use a DBMap instead of a cyclic array for auth data.ultramage1-5/+5
Merged the auth fix from r12473 to TXT as well. Removed the no-op from r12547. git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@12551 54d463be-8e91-2dee-dedb-b68131a5f0ec
2008-03-26Adjusted eAthena code to compile cleanly in C++ mode.ultramage1-26/+22
git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@12436 54d463be-8e91-2dee-dedb-b68131a5f0ec
2008-02-21- Fixed new guilds displaying online-connect member count at 0 rather than ↵skotlex1-1/+1
1, and the guild master not knowing it is one (eg: it cannot edit the guild notice of a newly created guild until relogging). - Fixed acc_reg2 parsing screwing up the char_id and subtracting 2 from it rather than passing it as it is. - Extended the auth_node/auth_db system in chrif.c to handle log in/out and mapserver-change procedures. This way players are not in the main dbs when they are not "active", which blocks potential invalid accesses to them. - Replaced states auth, waiting_disconnect and finalsave with active. - Cleaned some the party/guild login and creation procedures, removed the party_sent/guild_sent states. - Removed a redundant guild_check_member call which is beyond not-needed and into the realm of wasting resources. - clif_parse will no longer process packets from !sd->state.active players, this also makes checking for finalsave uneccessary (since players re already removed from the maps and dbs by this point, so you can't access them in any other way) - Separated the roles of unit_free and map_quit, the former will handle cleaning structures from the player so it can be free'd safely, while the latter performs additional routines which are unique to characters logging out normally (map-server changes will invoke unit_free and bypass map_quit). - Removed pc_isplaying, quit_db, map_knowsaccount, MAPIT_PCISPLAYING among other functions/defines which are no longer needed due to the new login scheme. - Cleand up a bit some code in the clif_send(_sub) functions. git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@12223 54d463be-8e91-2dee-dedb-b68131a5f0ec
2008-01-06Modified showmsg code to not attach a timestamp to MSG_NONE-type messages, ↵ultramage1-4/+0
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-11-08* Changed EXIT_SUCCESS back to 0 in console.c to avoid an unnecessary include.FlavioJS1-4/+4
* 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-10-24* Cleaned up some messy guild code (more to come)ultramage1-5/+5
* 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-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-17Using predefined constants as parameters to the exit() function.ultramage1-1/+1
git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@11501 54d463be-8e91-2dee-dedb-b68131a5f0ec
2007-09-20* Merged the tmpsql branch:FlavioJS1-5/+4
- 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.ultramage1-1/+1
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-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-05-25Corrected some weird fgets() statements, plus reformatted themultramage1-5/+4
git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@10616 54d463be-8e91-2dee-dedb-b68131a5f0ec
2007-05-19Reformatting @_@ultramage1-10/+1
git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@10581 54d463be-8e91-2dee-dedb-b68131a5f0ec
2007-03-22Some generic typo fixes (src and npc)ultramage1-1/+1
git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@10054 54d463be-8e91-2dee-dedb-b68131a5f0ec
2007-02-07Cleaning up of the socket codeultramage1-0/+1
- Shuffled includes around for files that were leeching off of socket.h - Added code that enforces standard shutdown behavior for sockets git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@9817 54d463be-8e91-2dee-dedb-b68131a5f0ec
2007-01-27Fixed a C language restriction preventing compilationultramage1-5/+8
git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@9729 54d463be-8e91-2dee-dedb-b68131a5f0ec
2007-01-27- Moved the pet rename code from int_pet.c to inter.c and normalized it so ↵skotlex1-2/+46
it can be used for any object. - Made homunculus renaming go through the char-server so it can be validated against the allowed characters setting. - Added battle config hom_rename so you can enable renaming multiple times your homunc. - Updated the hardcoded defaults for gvg-damage to what they should be. git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@9720 54d463be-8e91-2dee-dedb-b68131a5f0ec
2007-01-21Typo huntultramage1-1/+1
git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@9684 54d463be-8e91-2dee-dedb-b68131a5f0ec
2006-12-05- Massive EOL normalization & 'svn:eol-style native' flag setting for all ↵FlavioJS1-692/+692
txt/conf/h/c files. git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@9410 54d463be-8e91-2dee-dedb-b68131a5f0ec
2006-11-23- Made WFIFOHEAD() check for available buffer size remaining on the ↵skotlex1-1/+2
connection, and when there's not enough space, it will increase it. - Added define TURBO to the Makefile. It enables MouseJstr's socket access optimization which should speed up the code when accessing the write/read buffers repeatedly within a function. - Fixed the functions where the RFIFOHEAD/WFIFOHEAD functions were used incorrectly (prevents TURBO enabled compilations from finishing) git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@9297 54d463be-8e91-2dee-dedb-b68131a5f0ec
2006-10-20- Fixed Charge Atk being able to go through chasm/pits.skotlex1-1/+1
- Moved the homunculus DB information from the player structure to the homun structure. Modified the homunculus creation packets to hold this information during creation, also, all initial values are handled by the map-server, the char server only assigns it a homun ID. - Removed target_id/attacked_id from homun_data as it wasn't really used. - Codes cleanup (removing of commented code mostly) git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@9031 54d463be-8e91-2dee-dedb-b68131a5f0ec
2006-09-30- Rewrote the txt->sql converter. It now links directly to the char server ↵skotlex1-24/+22
files so that it should get auto-updated with any code changes in the later. - The converter will now also convert: account-wide variables, parties, guilds, guild storage and guild castles. At this point the only two things not converted are login-server-wide account variables (##, they belong to the login converter) and homunculus (the SQL save function is messy and doesn't lends itself to be integrated with the converter the way all the other functions are). - Modified the char servers so they are compatible with the converter, the define TXT_SQL_CONVERT identifies sections unique to each char-server mode (this would had been a hella lot easier if both char servers where the same code-base instead of duplicated code <.<) - Updated the Makefiles as per the new compiling requirements for the converter. - misceffect2 will no longer cause the effect on top of the source object when it is the fake npc. - Added check so that Frost Nova doesn't hides hitting animation on targets. - Added the missing brackets around the trade logs condition check, thanks to Coltaro. git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@8908 54d463be-8e91-2dee-dedb-b68131a5f0ec
2006-09-13- Modified the char-server TXT whisper system to use the online_db to know ↵skotlex1-43/+75
to which map server forward whispers, instead of just sending the whisper to every map server. - Added char-server functions search_character_byname() and search_character_online() required for the previous update. git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@8732 54d463be-8e91-2dee-dedb-b68131a5f0ec
2006-08-16- Spirit of Wizard will now consume an item 7321 each time it blocks ↵skotlex1-1/+1
reflected magic. - Added script command jobname, retrieves a given's class name as per the appropiate msg_athena.txt entry (this command should had been added years ago) git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@8320 54d463be-8e91-2dee-dedb-b68131a5f0ec
2006-08-15- Applied multiple fixes which should take care of making homun save/load ↵skotlex1-3/+8
work on TXT now. - Added Gatling Fever's batk bonus. - Some cleaning in status_damage which should prevent trying to free already free'd pointers when unit_remove_map invokes unit_free (when status_damage was going to invoke unit_free anyway) git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@8308 54d463be-8e91-2dee-dedb-b68131a5f0ec
2006-08-15- Some cleanup of int_homun.cskotlex1-0/+5
- Added homun saving/loading support to char-TXT. Note that this is completely untested, so it may be as good as broken. git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@8299 54d463be-8e91-2dee-dedb-b68131a5f0ec
2006-07-10- Added login-char packet 0x2737. Sets all characters offline (login-server ↵skotlex1-3/+0
side). - Cleaned up char server "set all offline" implementation to remove only characters from the map-server from which the packet was invoked. It will also now correctly kick/set-character offline from the map-server if they are connected. - Cleaned up the char-sql reconnect code. It no longer sets everyone to offline. - Removed setting "kick_on_disconnect", servers will no longer kick characters out when there's a disconnection. Instead, it'll use the most logical approach: Set characters into a "lost" state when there's a disconnection, on reconnect, resent the list of online-characters, do a sync, and let the difference be characters to be removed. Also, the map-server won't release character data until it's saved and the ack returns from the char-server to prevent data loss (all this data is resent on reconnect for saving anyway). git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@7600 54d463be-8e91-2dee-dedb-b68131a5f0ec
2006-07-07- Fixed signed/unsigned comparison issues in the char txt/sql server.skotlex1-4/+2
- Fixed the cooking success chances. Thanks to Ishizu Chan. git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@7560 54d463be-8e91-2dee-dedb-b68131a5f0ec
2006-07-06- Modified the party_data structure on the map server to remove some ↵skotlex1-1/+1
redundant data. Added a party_data structure on the char-server to hold a more complete set of information about parties. Added to the party_member structure the class of each member so that the map server can do the appropiate checks even if the character is on another mapserver/offline. Due to the format changes in the party structure, txt servers will have to wipe their party file... (sql save format has not been changed) - Added function char_family to check if there's a family state given the three character ids, instead of doing individual checks all the time. git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@7553 54d463be-8e91-2dee-dedb-b68131a5f0ec
2006-06-16- Merged Adam's patch to let the char-server handle validation of ↵skotlex1-2/+2
pet-name-change requests through the allowed char letters config. git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@7192 54d463be-8e91-2dee-dedb-b68131a5f0ec
2006-01-29AS OF SVN REV. 5901, WE ARE NOW USING TRUNK. ALL UNTESTED BUGFIXES/FEATURES ↵Valaris1-0/+656
GO INTO TRUNK. IF YOU HAVE A WORKING AND TESTED BUGFIX PUT IT INTO STABLE AS WELL AS TRUNK. EVERYTHING ELSE GOES INTO TRUNK AND WILL BE MERGED INTO STABLE BY VALARIS AND WIZPUTER. -- VALARIS git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@5094 54d463be-8e91-2dee-dedb-b68131a5f0ec
2006-01-29Clearing trunk.Valaris1-586/+0
git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@5091 54d463be-8e91-2dee-dedb-b68131a5f0ec
2005-03-30eAthena VC7 solution and support added for native builds [MouseJstr]amber1-4/+4
git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/branches/stable@1347 54d463be-8e91-2dee-dedb-b68131a5f0ec
2005-03-30More ANSI C++/C conformance fixes [SVN 1341: MouseJstr]amber1-2/+2
git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/branches/stable@1341 54d463be-8e91-2dee-dedb-b68131a5f0ec
2005-03-23* Fixed alot of memory leakscelest1-0/+23
* Added stray memory cleaning routine to db.c git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/branches/stable@1275 54d463be-8e91-2dee-dedb-b68131a5f0ec
2005-01-28* Added DUMP_ALL_PACKETS and moved dump packets code in clif_parse a bit to ↵(no author)1-1/+1
support it * Added base code for Party Item Sharing git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/branches/stable@1009 54d463be-8e91-2dee-dedb-b68131a5f0ec
2005-01-24A lot of changes. login and char server compile under both TXT and SQL under ↵(no author)1-9/+9
g++. Same for the convertors (login and char). One change that I felt iffy about, but it worked, was the char* buf -> unsinged char* bug in clif.c git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/branches/stable@975 54d463be-8e91-2dee-dedb-b68131a5f0ec
2005-01-23update(no author)1-6/+6
git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/branches/stable@968 54d463be-8e91-2dee-dedb-b68131a5f0ec