summaryrefslogtreecommitdiff
path: root/src/common
AgeCommit message (Collapse)AuthorFilesLines
2006-12-05- Moved START_ACCOUNT_NUM and END_ACCOUNT_NUM from login.h to mmo.h and ↵FlavioJS1-531/+535
changed clif_guess_PacketVer to use that. - Made the script engine big-endian compatible. (i know it's pointless because of the move to eApp, but just couldn't resist :S) - Commented out the remnants of ladmin packet parsing in map-server. - Added a warning when a player has an invalid packet version (shouldn't happen) PS- also added info on clif_guild_basicinfo packet fields, if anyone is interested git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@9408 54d463be-8e91-2dee-dedb-b68131a5f0ec
2006-12-03- Made ers double frees report as missing entries on destruction.FlavioJS1-532/+532
- Only one swap function (in cbasetypes.h) is used. git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@9396 54d463be-8e91-2dee-dedb-b68131a5f0ec
2006-12-02- Added missing min/max definitions to cbasetypes.h, needed for the @send ↵FlavioJS1-266/+274
change. git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@9388 54d463be-8e91-2dee-dedb-b68131a5f0ec
2006-12-02- Replaced @send with the version I use for testing packets.FlavioJS1-0/+4
Can display the packet length. Supports dynamic packets, quoted strings with escaped characters and fixed/variable length, and normal/hex byte/word/long data types. The number of fields is not limited, but it automatically stops parsing when the packet is full. git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@9387 54d463be-8e91-2dee-dedb-b68131a5f0ec
2006-11-29- Probably fixed the Segmentation Faults we've been having.FlavioJS3-1730/+1730
Description: A player quits and it's session is freed and set to NULL, but the char server already sent a packet with player information (registers, storage, ...). If a message is sent in consequence of updating that info, a segmentation fault happens because session[sd->fd] is already NULL. Fix: make shure the session of the target player is valid before processing the rest of the char server's message. - Some minor cleanups. git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@9366 54d463be-8e91-2dee-dedb-b68131a5f0ec
2006-11-28- Fixed a possible crash due to the recent core.c upgrade.skotlex1-3/+7
- Changing setting the Guild Master from pc_authok to clif_parse_LoadEndAck so that it will not fail to set the gmaster flag when the first person of a guild to log on is the guild master. git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@9347 54d463be-8e91-2dee-dedb-b68131a5f0ec
2006-11-28- Changed write to send as suggested by TheUltraMage in:FlavioJS4-119/+94
http://www.eathena.ws/board/index.php?showtopic=105417 Hopefully that will take care of the SIGPIPE problem in Debian and cygwin. - Server name in core.c skipping '\\' characters. - Memory allocation functions using file,line,func from the invoking functions. - Other minor changes in malloc git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@9344 54d463be-8e91-2dee-dedb-b68131a5f0ec
2006-11-27- Updated the status change field "option" to an int rather than short. This ↵skotlex1-1/+1
fixes the option values for xmas/sightblaster not getting set, which could explain why some people crash when equipping weapons while in xmas suit. - Also did the same to opt3 since the new packet version uses LONG to store the opt3 values. - Made the clif weapon view function use the EQI constants instead of ints. git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@9337 54d463be-8e91-2dee-dedb-b68131a5f0ec
2006-11-24- Added all the missing FIFOHEADs in the login/sql servers (required for ↵skotlex2-5/+4
TURBO support) - Fixed the fact that the TURBO code breaks when you attempt to handle more than one connection at a time within the same function. However this broke map-server compilation, therefore, don't use TURBO yet! It needs more fixing (and I need more time to fix it) - While at it, cleaned a few packet implementations in the char/login servers which were not only ugly, but had some really stupid flaws within (stuff like escaping a string, and then using the non-escaped variable to insert to SQL? T_T) And will someone explain me why the TXT servers are coded much more cleanly, and without such horribly broken code as I find in the SQL ones? T_T; git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@9307 54d463be-8e91-2dee-dedb-b68131a5f0ec
2006-11-23- Made WFIFOHEAD() check for available buffer size remaining on the ↵skotlex2-2/+4
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-11-20- Removed grfio include from core.c as it's totally unneededskotlex1-1/+0
git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@9264 54d463be-8e91-2dee-dedb-b68131a5f0ec
2006-11-17- Corrected use of the party invitation reply packet, thanks to FlavioJS.skotlex1-1/+1
- Removed requirement of "Changelog-Trunk" in the common/Makefile, why was it even there?? - Minor cleanups git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@9251 54d463be-8e91-2dee-dedb-b68131a5f0ec
2006-11-07- Applied FlavioJs's patch which enables colored console output for Windows ↵skotlex2-109/+724
systems. It also includes a config setting called "stdout_with_ansisequence" with which you can turn off the color codes (in case you are logging all output) - Added error reporting when the max number of ground unit cells has been reached (this may be the reason why sometimes it fails to recognize when you step out of a song/dance/encore) - Added passing the Endure effect to other devoted people. Note that the "hit count" is individual for each character, and only when it ends on the Crusader himself will that force it to end on everyone else. It also will not transfer on gvg grounds, but it does transfer in pvp. - Fixed Reflect-Shield triggering Auto-Guard instead on devoted chars. git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@9168 54d463be-8e91-2dee-dedb-b68131a5f0ec
2006-11-06- Ganbantein's delay is now 2 secs.skotlex1-1/+1
- Removed the time2 value of NJ_NEN since it has no use. - Removed the return code entry when logging GM reload-GM requests (login-sql),it'll just be stored as zero. - Added a fix on socket.c to not pick INADDR_ANY when choosing our own IP. - Applied the correction on maprespawnguildid so that it parses ALL players and not just those on a map. - TK_JUMPKICK now dispels normal aspd/speed potions (not berserk pitched ones) and Preserve will be unable to block this. - Soul Linkers are now inmune to SA_DISPEL - You can now place everything (except magic skills) on top of LPs. - Corrected Ganbantein to not touch song/dance/ensembles. - Status_calc_pc will refuse to execute if the player is still tagged as a "new connection" and the invocation is not meant to be the first one. - Swapped the order of checks in status_isimmune so that Wand of Hermod skill blocking takes precedence over GTB's - Client packets will all be ignored while a player is not on a map until the LoadEndAck packet is received. git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@9152 54d463be-8e91-2dee-dedb-b68131a5f0ec
2006-09-30- Rewrote the txt->sql converter. It now links directly to the char server ↵skotlex1-0/+7
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-22- Probably fixed a signed/unsigned mismatch warning on the new socket code.skotlex1-2/+2
git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@8848 54d463be-8e91-2dee-dedb-b68131a5f0ec
2006-09-21- Improved a bit RFIFOFLUSH as suggested by Harbin.skotlex2-3/+10
git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@8838 54d463be-8e91-2dee-dedb-b68131a5f0ec
2006-09-19Fixed some gcc4 warnings (oops ^^)toms1-1/+3
git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@8809 54d463be-8e91-2dee-dedb-b68131a5f0ec
2006-09-19Fixed some gcc4 warningstoms1-1/+1
git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@8808 54d463be-8e91-2dee-dedb-b68131a5f0ec
2006-09-19Fixed some gcc4 warningstoms5-6/+7
git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@8807 54d463be-8e91-2dee-dedb-b68131a5f0ec
2006-09-19- Fixed Spider Web fire damage bonus.skotlex1-3/+4
- Made Global chat always reply back to you even on @/# commands, this prevents the client from muting yourself due to "hack". However, this same fix isn't easily applicable to @ commands invoked from whispers or party/guild messages, those are still pending. - Some fixes in socket.c git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@8801 54d463be-8e91-2dee-dedb-b68131a5f0ec
2006-09-18- Merged Meruru's update to socket.c, which includes a rewritten parse ↵skotlex1-213/+168
function, which should hopefully be more efficient than the previous code. - The new code includes support for two config settings (packet_athena.txt): frame_size, which can be used to alter the logic packet-size allowed by the code, and mode_neg, which when set to yes, sets TCP_NODELAY on all connections (defaults to yes). git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@8799 54d463be-8e91-2dee-dedb-b68131a5f0ec
2006-09-13- Fixed compilation for native windows builds.skotlex1-1/+1
git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@8734 54d463be-8e91-2dee-dedb-b68131a5f0ec
2006-09-13- Readded the setting TCP_NODELAY on socket.c to see if it fixes the ↵skotlex1-4/+4
walk-lag issue. git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@8731 54d463be-8e91-2dee-dedb-b68131a5f0ec
2006-09-12- Moved the packet_len variable in login.c to the login parse case, since ↵skotlex3-3/+4
it's used nowhere else. - timestamp check speed-up in showmsg.c - Swapped the blank ShowMessage on server startup to a printf - Homunculus intimacy will go back to 500 on evolution. git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@8719 54d463be-8e91-2dee-dedb-b68131a5f0ec
2006-09-11- Modified set_nonblocking and setsocketoptions in socket.c, using eApp's ↵skotlex2-27/+21
code as reference. Hopefully should improve performance somewhat. git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@8710 54d463be-8e91-2dee-dedb-b68131a5f0ec
2006-09-06- Updated skill_require_db's entry for Abracadabra, it requires yellow 2 ↵skotlex1-1/+1
gemstones (there's no such hardcoded yellow gemstone requirement anymore) - Corrected db/const.txt entry bMagicSubRace -> bMagicAddSize - Fixed Aex Aeterna ending on Soul Breaker's first half. git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@8651 54d463be-8e91-2dee-dedb-b68131a5f0ec
2006-09-01The "delete_timer error/no such timer" report will now print the related ↵toms1-1/+1
function git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@8586 54d463be-8e91-2dee-dedb-b68131a5f0ec
2006-08-28- The memory leak reports will now print out in the logs also the revision ↵skotlex1-1/+1
they belong to. - Cleaned up the scriptable npc-shop code, it should be crash-proof now. git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@8525 54d463be-8e91-2dee-dedb-b68131a5f0ec
2006-08-27And a minor typo. Sorry.Lance2-2/+2
git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@8506 54d463be-8e91-2dee-dedb-b68131a5f0ec
2006-08-27Tweaked MEMSET_TURBO abit, temperory disabled GCC version.Lance2-63/+35
git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@8505 54d463be-8e91-2dee-dedb-b68131a5f0ec
2006-08-27- Updated svn-revision reading, now it can read the new svn file systemtoms1-10/+35
- Fixed a bug with homunc which could spawn on a non-walkable cell git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@8500 54d463be-8e91-2dee-dedb-b68131a5f0ec
2006-08-27* Optional macro MEMSET_TURBO for faster low-level memory initializations.Lance10-23/+120
git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@8499 54d463be-8e91-2dee-dedb-b68131a5f0ec
2006-08-24- Cleanup/typo on homunc's codetoms1-0/+2
- Modified @reloadmobdb & @reloadskilldb to reload homunc's db too git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@8476 54d463be-8e91-2dee-dedb-b68131a5f0ec
2006-08-20Fixed "int format, long unsigned int arg" warningtoms1-2/+2
git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@8391 54d463be-8e91-2dee-dedb-b68131a5f0ec
2006-08-15- Updated the char save structure for char-TXT servers so that the homun id ↵skotlex1-2/+1
will be saved, now also the map info (last point, save point, memo maps) are now saved using the mapindex rather than the string. BACKUP BEFORE UPDATING since this code isn't yet tested. - Cleaned up a bit the char-saving code, added overflow crash prevention in case there are more memos than the max-allowed saved. - AM_CALLHOMUN can now be used to recall vaporized homuns. - AM_RESURRECTHOMUN will now fail when the homun is vaporized. git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@8295 54d463be-8e91-2dee-dedb-b68131a5f0ec
2006-08-02Code cleanup & optimization on guild part of char-servertoms1-4/+6
git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@8059 54d463be-8e91-2dee-dedb-b68131a5f0ec
2006-07-28Fixed "warning: redefinition of [ushort/uint/ulong]"toms1-7/+10
git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@7938 54d463be-8e91-2dee-dedb-b68131a5f0ec
2006-07-27* Fix homunc & code cleanup [Toms] toms1-1/+1
- Timer problems on delete_timer - Intimacy problem (overflow & new values) - Homunc deleted if intimacy < 0 - base exp is now given to master - Homunc sometimes not saved git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@7913 54d463be-8e91-2dee-dedb-b68131a5f0ec
2006-07-24Random Homunculus cleanupDracoRPG1-1/+1
git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@7857 54d463be-8e91-2dee-dedb-b68131a5f0ec
2006-07-18- Added a proper check to make aggressive mobs never override homun targets ↵skotlex1-1/+0
regardless of distance. - Removed a bunch of homun-related variables that are not needed at all. The alive condition is removed, now the code checks for the hp value to know if the homun is alive or not. - Cleaned up a bit the skill-id function, homun skill checks (such as delay and skill-lv learned) should be correct now. git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@7727 54d463be-8e91-2dee-dedb-b68131a5f0ec
2006-07-17Orn's and Albator's Homunculus system, finally, YAY!!DracoRPG1-3/+29
git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@7706 54d463be-8e91-2dee-dedb-b68131a5f0ec
2006-07-06- Modified the party_data structure on the map server to remove some ↵skotlex1-0/+2
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-22- Tested and fixed resolve_hostbyname.skotlex2-3/+10
- Applied said function around most of the code where needed. Removed includes for the OS/network system pretty much from every file (our socket.c file should handle this) - Added clif_getip_long, which returns the ip as a long. Prevents having to include the files to define the int_addr structure in all files that include clif.h - Made the GM mute request bypass the manner_system setting. git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@7285 54d463be-8e91-2dee-dedb-b68131a5f0ec
2006-06-21- Whoops, somehow socket.h wasn't udpated correctly -.-skotlex1-1/+1
git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@7282 54d463be-8e91-2dee-dedb-b68131a5f0ec
2006-06-21- Added function parse_hostbyname() which takes a hostname and a char[4]. ↵skotlex2-1/+21
The hostname is resolved to an ip, whose individual components are stored in char[], the return value of the function is the inet_addr result of the lookup (or returns 0 when failed). Meant to be used in the rest of the code without the need to do socket/network related includes. - Applied use of parse_hostbyname() in chrif.c to fix compilation errors. - status_percent_change will now account for when the target's max hp/sp is above INT_MAX. git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@7281 54d463be-8e91-2dee-dedb-b68131a5f0ec
2006-06-13- Added HM_SKILLBASE, MAX_HOMUNSKILL to specify the skill level range of ↵skotlex1-0/+4
Homunculus. - Added support for reading correctly status change data from Guild and Homun skills. - Added support for reading Homun skill data (which means the HM skills are now safe to add to skill_db, skill_require_db, etc) - Moved StatusSkillChangeTable to StatusSkillChangeTableArray and made a function called StatusSkillChangeTable to do the conversions taking into account HM/GD skills. git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@7128 54d463be-8e91-2dee-dedb-b68131a5f0ec
2006-06-12- Made guild member exp an unsigned int.skotlex1-1/+2
- Modified npc_click to receive the bl that was clicked directly. Also cleaned it up so it isn't as easy to crash the server with invalid ids <.< - Moved npc_checknear to npc_checknear2 and added npc_checknear. The near version receives a bl, checks it's validity, and returns a TBL_NPC object, near2 does the same but doesn't checks for type NPC. The first returns a pointer, the second returns 1 on fail, 0 success. - Also uncommented various npc_checknear calls in the code, who's idea was to comment them out so you could exploit npcs from afar with custom packets? - Added overflow checks for bonus settings mdef_rate/def_rate. - Added missing update of INT after a buf. - Small cleanup of how SC_BLEEDING works. - Fixed party_foreach_samemap invoking the function on the CASTER instead of on the party members. - Added clif_parse_ActionRequest_sub to handle player commands, is used from npc_click or any other function that needs to "re-route" a player's request. - Modified clif_parse_NpcClicked to handle the different situations with different bl-objects (attack on players/mobs, click on npcs or mobs with npc attached) git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@7103 54d463be-8e91-2dee-dedb-b68131a5f0ec
2006-06-10- Added structure party_data and party_member_data to the map server to hold ↵skotlex1-2/+0
party-specific required information about parties including Monk/TK/SG/SN states and party member count. - party Hp updates are no longer done each time the Hp is modified, but together with the party xy timer. git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@7083 54d463be-8e91-2dee-dedb-b68131a5f0ec
2006-06-09- Modified guild exp to be an unsigned int rather than a signed one.skotlex1-1/+2
git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@7059 54d463be-8e91-2dee-dedb-b68131a5f0ec