474 Commits

Author SHA1 Message Date
skotlex
e0afdded8b - Okay, added a chrif_save_ack packet to the char-server so now the map 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://svn.code.sf.net/p/rathena/svn/trunk@7568 54d463be-8e91-2dee-dedb-b68131a5f0ec
2006-07-07 16:28:41 +00:00
skotlex
b643528e50 - Now, when the login-char connection is cut, the char-server won't set everyone offline on reconnect, instead it will send the list of online accounts to the login server.
git-svn-id: https://svn.code.sf.net/p/rathena/svn/trunk@7563 54d463be-8e91-2dee-dedb-b68131a5f0ec
2006-07-07 14:38:54 +00:00
skotlex
544adf40b5 - Modified the error on the char-sql server to set chars online when it receives a save packet from a character tagged as offline.
git-svn-id: https://svn.code.sf.net/p/rathena/svn/trunk@7561 54d463be-8e91-2dee-dedb-b68131a5f0ec
2006-07-07 14:02:13 +00:00
skotlex
deba53730f - Fixed signed/unsigned comparison issues in the char txt/sql server.
- Fixed the cooking success chances. Thanks to Ishizu Chan.


git-svn-id: https://svn.code.sf.net/p/rathena/svn/trunk@7560 54d463be-8e91-2dee-dedb-b68131a5f0ec
2006-07-07 13:48:54 +00:00
skotlex
b7fa70b741 - Modified the party_data structure on the map server to remove some 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://svn.code.sf.net/p/rathena/svn/trunk@7553 54d463be-8e91-2dee-dedb-b68131a5f0ec
2006-07-06 23:39:24 +00:00
skotlex
798eea8c5e - Fixed code using i instead of id in a few instances when updating char/map server IP.
git-svn-id: https://svn.code.sf.net/p/rathena/svn/trunk@7510 54d463be-8e91-2dee-dedb-b68131a5f0ec
2006-07-04 13:48:13 +00:00
skotlex
1d6dbc95dc - Char-server SQL won't perform the reconnect cleanup routines when 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://svn.code.sf.net/p/rathena/svn/trunk@7459 54d463be-8e91-2dee-dedb-b68131a5f0ec
2006-07-03 19:59:48 +00:00
skotlex
6d354a4b06 - Cleaned up the IP sync code to...
- 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://svn.code.sf.net/p/rathena/svn/trunk@7360 54d463be-8e91-2dee-dedb-b68131a5f0ec
2006-06-27 17:02:59 +00:00
Lance
a90363726b Typos resolving login-DNS instead of char-DNS -.-
git-svn-id: https://svn.code.sf.net/p/rathena/svn/trunk@7291 54d463be-8e91-2dee-dedb-b68131a5f0ec
2006-06-22 09:13:58 +00:00
Lance
50ebb5e959 * [Fixed]:
- Compilation warnings and errors.
[Improved]: 
- Changed and moved IP sync status messages to elaborate more.

git-svn-id: https://svn.code.sf.net/p/rathena/svn/trunk@7290 54d463be-8e91-2dee-dedb-b68131a5f0ec
2006-06-22 08:50:36 +00:00
skotlex
4d27716bf1 - Tested and fixed resolve_hostbyname.
- 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://svn.code.sf.net/p/rathena/svn/trunk@7285 54d463be-8e91-2dee-dedb-b68131a5f0ec
2006-06-22 01:12:52 +00:00
Lance
59d0fde84a * [Added]:
- DNS (WAN) sync for those pesky disconnections (dynamic ip renewal). 

git-svn-id: https://svn.code.sf.net/p/rathena/svn/trunk@7275 54d463be-8e91-2dee-dedb-b68131a5f0ec
2006-06-21 10:55:26 +00:00
skotlex
3833a911c5 - Fixed the compilation errors of my last commit... >.> <.<
git-svn-id: https://svn.code.sf.net/p/rathena/svn/trunk@7249 54d463be-8e91-2dee-dedb-b68131a5f0ec
2006-06-19 14:50:43 +00:00
skotlex
ba4de26c1e - Removed the mysterious array of two of char_dat (char/sql server), replaced it with a static structure.
- Added function char_loadName to extract the character name of a given ID.
- Fixed fame-list updating crashing char-sql server when the given char-id just got into ranking.
- Sorry I didn't check if it compiles cleanly because I don't have sql here <.< (am gonna test it in a second, though)


git-svn-id: https://svn.code.sf.net/p/rathena/svn/trunk@7248 54d463be-8e91-2dee-dedb-b68131a5f0ec
2006-06-19 14:45:26 +00:00
Lance
67e445d784 * [Fixed]:
- Typo in parse_frommap.

git-svn-id: https://svn.code.sf.net/p/rathena/svn/trunk@7240 54d463be-8e91-2dee-dedb-b68131a5f0ec
2006-06-19 06:13:21 +00:00
Lance
0985a26455 * [Temperory Fixed]:
- Crashing of SQL char-server in parse_frommap case 0x2b01.

git-svn-id: https://svn.code.sf.net/p/rathena/svn/trunk@7236 54d463be-8e91-2dee-dedb-b68131a5f0ec
2006-06-18 11:38:19 +00:00
skotlex
c185d6ae82 - Merged Adam's patch to let the char-server handle validation of pet-name-change requests through the allowed char letters config.
git-svn-id: https://svn.code.sf.net/p/rathena/svn/trunk@7192 54d463be-8e91-2dee-dedb-b68131a5f0ec
2006-06-16 03:05:29 +00:00
skotlex
e74e095778 - Fixed main.sql adding a key on char_id rather than account_id for the char 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://svn.code.sf.net/p/rathena/svn/trunk@7160 54d463be-8e91-2dee-dedb-b68131a5f0ec
2006-06-14 14:18:30 +00:00
skotlex
3b13b070e1 - Made guild member exp an unsigned int.
- 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://svn.code.sf.net/p/rathena/svn/trunk@7103 54d463be-8e91-2dee-dedb-b68131a5f0ec
2006-06-12 14:55:35 +00:00
Lance
3b9eeb4451 * [Fixed]
- Compilation warnings on guild.c and int_guild.c

git-svn-id: https://svn.code.sf.net/p/rathena/svn/trunk@7088 54d463be-8e91-2dee-dedb-b68131a5f0ec
2006-06-11 05:30:23 +00:00
skotlex
55df062534 - Added structure party_data and party_member_data to the map server to hold 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://svn.code.sf.net/p/rathena/svn/trunk@7083 54d463be-8e91-2dee-dedb-b68131a5f0ec
2006-06-10 03:58:15 +00:00
Vicious
8e3fb1da90 fixed MoM's typo
git-svn-id: https://svn.code.sf.net/p/rathena/svn/trunk@7081 54d463be-8e91-2dee-dedb-b68131a5f0ec
2006-06-10 03:13:28 +00:00
skotlex
2e5660ec68 - Fixed @mapinfo displaying incorrectly maps with nosave which send you back 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://svn.code.sf.net/p/rathena/svn/trunk@7074 54d463be-8e91-2dee-dedb-b68131a5f0ec
2006-06-09 15:12:53 +00:00
MasterOfMuppets
3e901e2ef5 Fixed a typo in char_sql/char.c, thanks to Euph.
git-svn-id: https://svn.code.sf.net/p/rathena/svn/trunk@7070 54d463be-8e91-2dee-dedb-b68131a5f0ec
2006-06-09 13:37:53 +00:00
skotlex
51db3a7cdc - Modified guild exp to be an unsigned int rather than a signed one.
git-svn-id: https://svn.code.sf.net/p/rathena/svn/trunk@7059 54d463be-8e91-2dee-dedb-b68131a5f0ec
2006-06-09 03:51:18 +00:00
skotlex
d3ffb31cc4 - Removed char_nick2id from char-sql server as it's no longer needed.
- Fixed quitting the map server not properly saving the storage before deleting it.


git-svn-id: https://svn.code.sf.net/p/rathena/svn/trunk@7030 54d463be-8e91-2dee-dedb-b68131a5f0ec
2006-06-07 13:19:12 +00:00
Lance
a6f2c2e5ed * [Optimized]:
- list and size not being initialized (size get intialized in default: switch case) Eliminated default case and initialized list and size at the beginning. 

git-svn-id: https://svn.code.sf.net/p/rathena/svn/trunk@7021 54d463be-8e91-2dee-dedb-b68131a5f0ec
2006-06-07 01:26:17 +00:00
skotlex
166265be07 - Fixed skill_unitsetting using layout->count for the for instead of group->count
- Added SC_INCDEXRATE/SC_INCAGIRATE. NPC_POWERUP/NPC_AGIUP now correctly increase dex/agi by 40% per level.
- Fixed char-sql server not deleting character variables


git-svn-id: https://svn.code.sf.net/p/rathena/svn/trunk@6984 54d463be-8e91-2dee-dedb-b68131a5f0ec
2006-06-05 17:59:28 +00:00
Lance
8686c24f90 [Fixed]:
- Guys can't go across map-servers :( Thanks to Buuyo^

git-svn-id: https://svn.code.sf.net/p/rathena/svn/trunk@6905 54d463be-8e91-2dee-dedb-b68131a5f0ec
2006-06-01 01:55:35 +00:00
skotlex
a6b8c38454 - Fixed compilation of char_sql/int_party.c -.-
git-svn-id: https://svn.code.sf.net/p/rathena/svn/trunk@6899 54d463be-8e91-2dee-dedb-b68131a5f0ec
2006-05-31 20:41:31 +00:00
skotlex
ca917a0909 - Made the char_name_option char_athena.conf setting apply to parties and guilds as well. It cannot be applied to pets yet without adding a change-name-request interserver packet.
git-svn-id: https://svn.code.sf.net/p/rathena/svn/trunk@6897 54d463be-8e91-2dee-dedb-b68131a5f0ec
2006-05-31 20:37:39 +00:00
skotlex
0d281eea6d - Fixed compilation of char_sql/char.c
git-svn-id: https://svn.code.sf.net/p/rathena/svn/trunk@6896 54d463be-8e91-2dee-dedb-b68131a5f0ec
2006-05-31 20:13:20 +00:00
skotlex
92255a237b - Moved the JOB_* defines from map.h to mmo.h, update char.c to use them.
- 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://svn.code.sf.net/p/rathena/svn/trunk@6895 54d463be-8e91-2dee-dedb-b68131a5f0ec
2006-05-31 20:08:40 +00:00
skotlex
053931237b - Some cleaning of the fame-update code, fixing a logic bug which made the ranking list fail to display the correct ranker names.
git-svn-id: https://svn.code.sf.net/p/rathena/svn/trunk@6891 54d463be-8e91-2dee-dedb-b68131a5f0ec
2006-05-31 15:07:37 +00:00
Lance
e43f38bb0d * Change scripting engine's NPC scope vars to dot (.) style.
* Improved and (should be fully) fixed the mob control engine. 

git-svn-id: https://svn.code.sf.net/p/rathena/svn/trunk@6769 54d463be-8e91-2dee-dedb-b68131a5f0ec
2006-05-26 07:21:48 +00:00
Lance
63438cde12 * Fixed typos in char.c
git-svn-id: https://svn.code.sf.net/p/rathena/svn/trunk@6766 54d463be-8e91-2dee-dedb-b68131a5f0ec
2006-05-26 06:11:35 +00:00
DracoRPG
d94ebfdd53 I'm still here!
Rewrote fame ranking lists

git-svn-id: https://svn.code.sf.net/p/rathena/svn/trunk@6764 54d463be-8e91-2dee-dedb-b68131a5f0ec
2006-05-26 01:35:17 +00:00
skotlex
b2b800212c - Fixed the nocast flag 2 (not usable in pvp) returning true in pk-mode servers.
- When removing a castle's owning guild, the char servers will erase the guardian data now.


git-svn-id: https://svn.code.sf.net/p/rathena/svn/trunk@6602 54d463be-8e91-2dee-dedb-b68131a5f0ec
2006-05-15 18:35:18 +00:00
skotlex
eac7f93dbc - Added logging of deleted characters when the char_log is enabled.
git-svn-id: https://svn.code.sf.net/p/rathena/svn/trunk@6251 54d463be-8e91-2dee-dedb-b68131a5f0ec
2006-04-24 15:55:04 +00:00
skotlex
41a6c38e23 - Added SC_KEEPING/SC_BARRIER to calc_flag in status_change_end
- 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://svn.code.sf.net/p/rathena/svn/trunk@6229 54d463be-8e91-2dee-dedb-b68131a5f0ec
2006-04-22 05:21:24 +00:00
skotlex
0db2a0aa0b - Char server will now ignore packet 0x65 for already authentified accounts.
git-svn-id: https://svn.code.sf.net/p/rathena/svn/trunk@6206 54d463be-8e91-2dee-dedb-b68131a5f0ec
2006-04-21 00:19:14 +00:00
skotlex
b6558a82ae - Fixed char-sql server still reading the old lanconfig format rather than the new one.
git-svn-id: https://svn.code.sf.net/p/rathena/svn/trunk@6123 54d463be-8e91-2dee-dedb-b68131a5f0ec
2006-04-16 21:44:30 +00:00
skotlex
47adb68d91 - Fixed mysql ping setting being in minutes rather than hours.
- Removed npc_event_sub from npc.h and moved it to npc.c
- Cleaned up #warp to prevent spitting non-walkable tile warnings.
- Changed the meaning of msg_athena 2, it is now "invalid target cell, randomizing".


git-svn-id: https://svn.code.sf.net/p/rathena/svn/trunk@6114 54d463be-8e91-2dee-dedb-b68131a5f0ec
2006-04-16 15:33:59 +00:00
skotlex
dc8d892b45 - Added an Info message when pinging the SQL servers.
- Changed line terminators back to *nix on map.c because otherwise it's impossible to run a diff between the stable and trunk versions of the file.


git-svn-id: https://svn.code.sf.net/p/rathena/svn/trunk@6043 54d463be-8e91-2dee-dedb-b68131a5f0ec
2006-04-13 18:10:08 +00:00
skotlex
b6fa7be9e9 - Updated the subnet support to not require specifying the subnet mask, it is auto-acquired from the char/map IP and the subnet-mask.
- skill_wall_check defaults to yes now.


git-svn-id: https://svn.code.sf.net/p/rathena/svn/trunk@5976 54d463be-8e91-2dee-dedb-b68131a5f0ec
2006-04-10 14:26:52 +00:00
skotlex
491228d9cc - Added inter config connection_ping_interval which specifies interval in 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://svn.code.sf.net/p/rathena/svn/trunk@5902 54d463be-8e91-2dee-dedb-b68131a5f0ec
2006-04-05 00:23:18 +00:00
skotlex
34eeb7cd5b - Added a check to remove exp-even-share when someone leaves a party.
git-svn-id: https://svn.code.sf.net/p/rathena/svn/trunk@5855 54d463be-8e91-2dee-dedb-b68131a5f0ec
2006-04-01 23:47:24 +00:00
skotlex
f2d2edd1cd - Changed status_point/skill_point to unsigned short. Adjusted the code as necessary to prevent overflows.
git-svn-id: https://svn.code.sf.net/p/rathena/svn/trunk@5762 54d463be-8e91-2dee-dedb-b68131a5f0ec
2006-03-27 01:24:34 +00:00
Lupus
d740947921 warning msg typos fix
git-svn-id: https://svn.code.sf.net/p/rathena/svn/trunk@5692 54d463be-8e91-2dee-dedb-b68131a5f0ec
2006-03-21 11:50:27 +00:00
skotlex
cee086fece - Fixed handling of the char_gm_read config for packet 0x2af7 (reloadgmdb)
- 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://svn.code.sf.net/p/rathena/svn/trunk@5644 54d463be-8e91-2dee-dedb-b68131a5f0ec
2006-03-17 14:09:54 +00:00