summaryrefslogtreecommitdiff
path: root/src/char/char.c
AgeCommit message (Collapse)AuthorFilesLines
2006-09-30- Rewrote the txt->sql converter. It now links directly to the char server ↵skotlex1-13/+25
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- Fixed the "map server claims to have char online, but this other map ↵skotlex1-3/+7
server also has it tagged as online" message triggering in some cases where it shouldn't. git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@8846 54d463be-8e91-2dee-dedb-b68131a5f0ec
2006-09-14- Added deleting of saved Status changes on character delete for the ↵skotlex1-0/+3
Char-TXT server. git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@8759 54d463be-8e91-2dee-dedb-b68131a5f0ec
2006-09-13- Modified the char-server TXT whisper system to use the online_db to know ↵skotlex1-0/+20
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-15- Some cleanup of int_homun.cskotlex1-0/+3
- 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-08-15- Updated the char save structure for char-TXT servers so that the homun id ↵skotlex1-112/+136
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-14- Fixed script engine allowing scripts to set a player's zeny to negative ↵skotlex1-1/+3
values. - Fixed setting hide_woe_damage making even "miss" attacks seem to connect. - Cleaned up pc_getzeny to not require doubles. - When readjusting the fame-list, the last entry's id is also reset (may fix characters appearing more than once on it?) - Some sign/unsigned comparison warning fixes. - Some 'may be used unitialized' warning fixes. git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@8273 54d463be-8e91-2dee-dedb-b68131a5f0ec
2006-08-08- Fixed the login-sql server replying to the change-sex packet with the ↵skotlex1-0/+1
wrong gender, causing the char-server to screw-up job-change updates. git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@8180 54d463be-8e91-2dee-dedb-b68131a5f0ec
2006-08-01- Fixed the subnet 0 mask being reset to 0 when someone goes up on the fame ↵skotlex1-4/+3
rankings. git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@8021 54d463be-8e91-2dee-dedb-b68131a5f0ec
2006-07-28Fixed "warning: `list' might be used uninitialized in this function" in ↵toms1-1/+1
char/char.c@3032 git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@7944 54d463be-8e91-2dee-dedb-b68131a5f0ec
2006-07-21- Now when the char-txt server does not finds a requested party, it will ↵skotlex1-0/+14
clear out said party id of all characters (will help prevent massive spamming/overhead when for some reason the party file needs to be deleted). - Combo skills (inf = self, inf2 = no target self) no longer check range if you use them while your attack-timer is still active. git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@7806 54d463be-8e91-2dee-dedb-b68131a5f0ec
2006-07-19- Corrected Trim chars to block 'enter', as explained by the Ultra mage.skotlex1-1/+1
- When the client passes account version 0, the login server will set it to 1 now. - Corrected the HP bar scaling when HP is above Short Max. It should display fine for any HP value now. - Added a check when the mob's adelay is shorter than the amotion, in which case the adelay will be changed to the amotion value. git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@7742 54d463be-8e91-2dee-dedb-b68131a5f0ec
2006-07-18- Added character 013 (enter) to the list of characters that are always ↵skotlex1-1/+1
removed from new character names. git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@7732 54d463be-8e91-2dee-dedb-b68131a5f0ec
2006-07-10- Added login-char packet 0x2737. Sets all characters offline (login-server ↵skotlex1-55/+63
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- Okay, added a chrif_save_ack packet to the char-server so now the map ↵skotlex1-1/+7
server will know once a character was "final saved", and only then the character will be removed from memory. On char-server reconnection, all chars that are in final-save state are resent to save (if they are still in memory, it's because the ack hasn't gotten here from the char-server). This should effectively block all dupe problems due to heavy inter-server lag, however as it's untested, it currently prints some debug messages when people are saved and then removed from memory. Need testers so this can be debugged and merged to stable! git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@7568 54d463be-8e91-2dee-dedb-b68131a5f0ec
2006-07-07- Now, when the login-char connection is cut, the char-server won't set ↵skotlex1-2/+11
everyone offline on reconnect, instead it will send the list of online accounts to the login server. git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@7563 54d463be-8e91-2dee-dedb-b68131a5f0ec
2006-07-06- Modified the party_data structure on the map server to remove some ↵skotlex1-5/+42
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-07-04- Fixed code using i instead of id in a few instances when updating char/map ↵skotlex1-1/+1
server IP. git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@7510 54d463be-8e91-2dee-dedb-b68131a5f0ec
2006-07-03- Char-server SQL won't perform the reconnect cleanup routines when ↵skotlex1-2/+2
kick_on_disconnect is disabled. - Renamed summons_inherit_effects to summons_trigger_autospells as the setting now only makes the attacks of the slaves trigger the autospells of the master (as it should be). - Corrected code capping no_spawn_on_player to 50 when the max should be 100. git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@7459 54d463be-8e91-2dee-dedb-b68131a5f0ec
2006-06-27- Cleaned up the IP sync code to...skotlex1-39/+42
- Use charif_sendallwos rather than manually altering the buffers of each server. - Use the id variable for identifying current char-server instead of scanning the connected servers for it (it's doing the same work twice) - Added config setting sync_ip_interval to specify how long to go before updating ip. Defaults to 0 (disabled) - Sending ip update packets will only be done when the ip changed now. - Removed dns_str variables, and now char_ip_str/login_ip_str/map_ip_str will hold the unresolved dns address (as these variables have no use otherwise) git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@7360 54d463be-8e91-2dee-dedb-b68131a5f0ec
2006-06-22Typos resolving login-DNS instead of char-DNS -.-Lance1-7/+7
git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@7291 54d463be-8e91-2dee-dedb-b68131a5f0ec
2006-06-22* [Fixed]: Lance1-2/+2
- Compilation warnings and errors. [Improved]: - Changed and moved IP sync status messages to elaborate more. git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@7290 54d463be-8e91-2dee-dedb-b68131a5f0ec
2006-06-22- Tested and fixed resolve_hostbyname.skotlex1-55/+36
- 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- Added function parse_hostbyname() which takes a hostname and a char[4]. ↵skotlex1-1/+0
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-21* [Added]: Lance1-0/+35
- DNS (WAN) sync for those pesky disconnections (dynamic ip renewal). git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@7275 54d463be-8e91-2dee-dedb-b68131a5f0ec
2006-06-16* [Improved]: Lance1-1/+1
- Cleaned up Custom Mob Script Callback codes. Looks much better now :B. git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@7202 54d463be-8e91-2dee-dedb-b68131a5f0ec
2006-06-16- Merged Adam's patch to let the char-server handle validation of ↵skotlex1-1/+1
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-06-14- Fixed main.sql adding a key on char_id rather than account_id for the char ↵skotlex1-2/+1
table. - Cleaned up character saving in char-sql, it no longer needs to query the database to see if the player exists on each char-save, instead it checks the received data against the online-players db. - Added an error message on the char-server when the received player data size does not matches with the expected size (should avoid the crash that happens on such a memcpy). git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@7160 54d463be-8e91-2dee-dedb-b68131a5f0ec
2006-06-09- Fixed @mapinfo displaying incorrectly maps with nosave which send you back ↵skotlex1-0/+3
to your last savepoint. - Moved guild_exp_rate from a mapserver battle config setting to a char server config. It no longer modifies the total taxed exp as seen on the guild information window, but directly modifies the exp that the guild earns. git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@7074 54d463be-8e91-2dee-dedb-b68131a5f0ec
2006-06-01[Fixed]:Lance1-0/+1
- Guys can't go across map-servers :( Thanks to Buuyo^ git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@6905 54d463be-8e91-2dee-dedb-b68131a5f0ec
2006-05-31- Moved the JOB_* defines from map.h to mmo.h, update char.c to use them.skotlex1-165/+178
- Added function char_read_fame_list for famelist reading. Invoked it on init, and made it be sent automatically to connecting map servers. - Removed request to reload fame list when map server connects. - Some cleaning of the fame-list reading code. git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@6895 54d463be-8e91-2dee-dedb-b68131a5f0ec
2006-05-31- Some cleaning of the fame-update code, fixing a logic bug which made the ↵skotlex1-22/+33
ranking list fail to display the correct ranker names. git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@6891 54d463be-8e91-2dee-dedb-b68131a5f0ec
2006-05-29- Cleaned up friend list saving and fixed loading of friends.txt file (char-txt)skotlex1-51/+11
git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@6830 54d463be-8e91-2dee-dedb-b68131a5f0ec
2006-05-26* Change scripting engine's NPC scope vars to dot (.) style.Lance1-1/+2
* Improved and (should be fully) fixed the mob control engine. git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@6769 54d463be-8e91-2dee-dedb-b68131a5f0ec
2006-05-26I'm still here!DracoRPG1-47/+118
Rewrote fame ranking lists git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@6764 54d463be-8e91-2dee-dedb-b68131a5f0ec
2006-04-26- Updated item_db.sql to current.skotlex1-1/+0
- Some small code-cleanups. git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@6298 54d463be-8e91-2dee-dedb-b68131a5f0ec
2006-04-22- Added SC_KEEPING/SC_BARRIER to calc_flag in status_change_endskotlex1-2/+2
- Added Option constants for Carts, fixed OPTION_FLYING (it conflicts with OPTION_XMAS?) - Updated clif.c to check for OPTION_WEDDING|OPTION_XMAS instead of view class to block attacks and skill usage. - Removed struct pc_base_job and functions pc_calc_base_job/pc_calc_base_job2 which are no longer used anywhere (were long ago deprecated infavor of the new jobid system) - Cleaned up change-cart code. - Modified SC_XMAS to not change your view anymore and only set the proper option value (OPTION_XMAS) - Cleaned up the code regarding char_gm reading. - Changed the option field to unsigned short to make room for the higher values. git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@6229 54d463be-8e91-2dee-dedb-b68131a5f0ec
2006-04-21- Char server will now ignore packet 0x65 for already authentified accounts.skotlex1-2/+7
git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@6206 54d463be-8e91-2dee-dedb-b68131a5f0ec
2006-04-10- Updated the subnet support to not require specifying the subnet mask, it ↵skotlex1-9/+12
is auto-acquired from the char/map IP and the subnet-mask. - skill_wall_check defaults to yes now. git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@5976 54d463be-8e91-2dee-dedb-b68131a5f0ec
2006-04-05- Added inter config connection_ping_interval which specifies interval in ↵skotlex1-8/+26
hours at which mysql_ping's must be done on all connection handles to keep the mysql connection alive. Defaults to 0 (disabled) - Removed login sql handle from the map server as it isn't used for anything. - Made the login sql handle on the char-sql server be used only when gm_read_method 1 is enabled. - Small fixes to npc_enable, added BL_NPC handling on status_get_sc. - Added a path_search check in map_random_dir, so that the random direction picked up doesn't goes through walls and all that. - Some changes to close-confine, status start will fail when the source is not found or it doesn't has sc-data. - pc_setoption no longer changes the character's class when mounting/dismounting, it only changes the view-class. - The peco-crash-fix from the char servers is still needed. This packet must be wrong! We likely need to sniff it. - Modified the char-txt server to modify the class of mounted characters to their non-mounted version. Added an upgrade_svn file to handle the class update on the sql tables. git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@5902 54d463be-8e91-2dee-dedb-b68131a5f0ec
2006-03-27- Changed status_point/skill_point to unsigned short. Adjusted the code as ↵skotlex1-21/+28
necessary to prevent overflows. git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@5762 54d463be-8e91-2dee-dedb-b68131a5f0ec
2006-03-21warning msg typos fixLupus1-1/+1
git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@5692 54d463be-8e91-2dee-dedb-b68131a5f0ec
2006-03-17- Fixed handling of the char_gm_read config for packet 0x2af7 (reloadgmdb)skotlex1-1/+1
- Added battle_config debuff_on_logout which removes Asura's SP regen delay and Strip-Equip effects on logout when set to yes (default). git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@5644 54d463be-8e91-2dee-dedb-b68131a5f0ec
2006-03-13- Corrected char-server parameters so that the subnet config file is the ↵skotlex1-1/+1
third parameter, not the second (which was conflicting with inter_athena.conf's argument), thanks to foobar. - Fixed TK and Soul Linker's position of their job entry in exp2.txt, thanks to Coltaro. - Fixed NPC_GRANDDARKNESS targetting the enemy instead of yourself in mob_skill_db. - Fixed Grandcross's hit and range entries in the skill_db (it had hit 5? that wasn't even a valid value from the description) - PR_BENEDICTIO now ignores mdef - Removed the status_isdead checks from status_check_skilluse, they are now done only on the skill_castend_* functions. - Fixed NPC_SELFDESTRUCTION not doing the correct damage to oneself. - Fixed chatlog's x/y column capacity. git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@5584 54d463be-8e91-2dee-dedb-b68131a5f0ec
2006-03-04- Fixed subnet checking being broken in the login txt server.skotlex1-4/+4
- Changed a bit the information of the subnet checking to include the ip that is being checked. git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@5458 54d463be-8e91-2dee-dedb-b68131a5f0ec
2006-03-02- Fame list size is now defined by MAX_FAME_LIST constant (mmo.h)skotlex1-3/+26
- Char server can now specify the max size for blacksmith/alchemist/taekwon rankers. git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@5435 54d463be-8e91-2dee-dedb-b68131a5f0ec
2006-02-28Rewrote LAN support code. Changed configuration file name lan_support.conf ↵LuzZza1-93/+76
to subnet_athena.conf, changed it syntax. git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@5398 54d463be-8e91-2dee-dedb-b68131a5f0ec
2006-02-15- Fixed the char servers to store correctly exp as uints. They are also ↵skotlex1-17/+19
capped to LONG_MAX before being sent to the client. - TK_DODGE now dodges all ranged attacks, when used with SPURT, dodges everything. git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@5289 54d463be-8e91-2dee-dedb-b68131a5f0ec
2006-02-08- Fixed Char-SQL server setting up the save/last point to the novice grounds ↵skotlex1-1/+2
when either x, y or the map is 0. - Commented the char server setting up Prontera as default point when there's none (this bug should not exist) git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@5218 54d463be-8e91-2dee-dedb-b68131a5f0ec
2006-02-07- Fixed sql compile.skotlex1-6/+4
- Some small adjustments on how the user/password in the char server are read. git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@5207 54d463be-8e91-2dee-dedb-b68131a5f0ec