313 Commits

Author SHA1 Message Date
ultramage
ea5212c5a8 * TXT/SQL login server code synchronization
- exported several core structures to login.h
- split off ladmin communication code from the TXT login server
- removed all occurences of login_log(); a unified function should be added when SQL's loginlog_db logging code gets synced with TXT
- removed conf setting login_log_filename
- fixed ladmin getting timeouts since the ping system was changed
- removed login/char server_fd[] arrays, added server[].fd instead

git-svn-id: https://svn.code.sf.net/p/rathena/svn/trunk@11826 54d463be-8e91-2dee-dedb-b68131a5f0ec
2007-11-27 19:38:16 +00:00
ultramage
4b8cf3c768 Removed some unneccessary charserver code.
git-svn-id: https://svn.code.sf.net/p/rathena/svn/trunk@11825 54d463be-8e91-2dee-dedb-b68131a5f0ec
2007-11-27 19:17:00 +00:00
skotlex
9a56a88f4a - Corrected the online_data_cleanup routine setting offline characters that are still connected to the char-server.
- Added a check in script command sc_end to properly end infinte endure
- ASC_BREAKER no longer triggers status effect cards.


git-svn-id: https://svn.code.sf.net/p/rathena/svn/trunk@11817 54d463be-8e91-2dee-dedb-b68131a5f0ec
2007-11-27 09:21:18 +00:00
ultramage
ef0971541b Removed one duplicit sql operation when saving items (bugreport:459)
git-svn-id: https://svn.code.sf.net/p/rathena/svn/trunk@11768 54d463be-8e91-2dee-dedb-b68131a5f0ec
2007-11-21 09:08:15 +00:00
skotlex
cf2d63d285 - Implemented a small change that was long overdue: Displaying the char-select screen now uses a single SQL query instead of up to 9.
- Fixed a bug in the update to prevent setting cell types on unwalkable cells.


git-svn-id: https://svn.code.sf.net/p/rathena/svn/trunk@11757 54d463be-8e91-2dee-dedb-b68131a5f0ec
2007-11-18 21:32:24 +00:00
skotlex
94896dc707 - setting npc cells will no longer work on non-walkable tiles (since you could do this to override cell types and make unwalkable cells walkable again, for example).
- Small fix in the char-server accept code.


git-svn-id: https://svn.code.sf.net/p/rathena/svn/trunk@11755 54d463be-8e91-2dee-dedb-b68131a5f0ec
2007-11-18 16:13:20 +00:00
ultramage
95f651807d Fixed a missing include/export, and typos in the previous revision.
Corrected wrong length values in one charserver packet.

git-svn-id: https://svn.code.sf.net/p/rathena/svn/trunk@11714 54d463be-8e91-2dee-dedb-b68131a5f0ec
2007-11-11 10:56:39 +00:00
ultramage
3b742b114e Fixed some more gcc incompatibilities...
git-svn-id: https://svn.code.sf.net/p/rathena/svn/trunk@11706 54d463be-8e91-2dee-dedb-b68131a5f0ec
2007-11-10 13:59:23 +00:00
ultramage
376a1f68ba * Re-worked the login-char-map packet spam mechanism
- mapserver no longer sends entire user list to charserver every 10 seconds; similar change done to the char-login connection
- user count updates are only sent when the value actually changes instead of servers polling each other every few seconds
- the servers now prevent interserver connection timeout explicitly by sending ping/ack packet pairs instead of relying on the usercount polling to do so; keepalive is sent every 'stall_time'-2 seconds
- removed the @refreshonline command as refresh happens automatically every 5 seconds

git-svn-id: https://svn.code.sf.net/p/rathena/svn/trunk@11703 54d463be-8e91-2dee-dedb-b68131a5f0ec
2007-11-09 21:44:29 +00:00
FlavioJS
9d2688ad87 * Changed EXIT_SUCCESS back to 0 in console.c to avoid an unnecessary include.
* 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://svn.code.sf.net/p/rathena/svn/trunk@11698 54d463be-8e91-2dee-dedb-b68131a5f0ec
2007-11-08 14:08:32 +00:00
ultramage
492650729a Synced the charservers' init procedure.
git-svn-id: https://svn.code.sf.net/p/rathena/svn/trunk@11697 54d463be-8e91-2dee-dedb-b68131a5f0ec
2007-11-08 10:50:08 +00:00
ultramage
1fb3859183 Synced charserver char creation creation code
* removed most of the creation failure messages printed to console
 * fixed sql charserver letting you use control chars in char names
 * new chars will not start with the 'Knife' and 'Cotton Shirt' equipped anymore (charserver blindly placed magic values into the equip field)
Fixed a glitch where all packets immediately after the map->char login packet would get discarded and the mapserver disconnected.

git-svn-id: https://svn.code.sf.net/p/rathena/svn/trunk@11696 54d463be-8e91-2dee-dedb-b68131a5f0ec
2007-11-08 10:17:44 +00:00
ultramage
98a809813b AGAIN corrected the sql charserver query that broke TXT->SQL conversion (fixed in r10835, reverted in 11245...)
git-svn-id: https://svn.code.sf.net/p/rathena/svn/trunk@11642 54d463be-8e91-2dee-dedb-b68131a5f0ec
2007-11-02 18:01:58 +00:00
ultramage
2cb8a5838e * Fixed TXT charserver doing periodic random-sized memory allocation (bugreport:312)
* Set 'Create Converter's produce success rate to 100% (bugreport:302)
* Added check that verifies weapon/ammo/state requirements also when casting finishes (might have unwanted side-effects tho'!) (bugreport:228)
* Fixed Firewall knocking back undead/fire element mobs (bug in r11578)
* Added dummy 'openmail' to txt server to fix a script error message

git-svn-id: https://svn.code.sf.net/p/rathena/svn/trunk@11585 54d463be-8e91-2dee-dedb-b68131a5f0ec
2007-10-27 11:59:35 +00:00
ultramage
d091f1cf05 * Cleaned up some messy guild code (more to come)
* 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://svn.code.sf.net/p/rathena/svn/trunk@11571 54d463be-8e91-2dee-dedb-b68131a5f0ec
2007-10-24 12:14:18 +00:00
zephyrus
c34325a53b - Added the new mail system. Requires optimization and tests.
- Updated the maildb sql structure.

git-svn-id: https://svn.code.sf.net/p/rathena/svn/trunk@11548 54d463be-8e91-2dee-dedb-b68131a5f0ec
2007-10-22 20:38:26 +00:00
ultramage
6cca14200e Fixed a nasty bug from r11410 which let people create chars with already taken char names, and (in TXT's case) even cause a crash.
Closes bugreport:234.

git-svn-id: https://svn.code.sf.net/p/rathena/svn/trunk@11530 54d463be-8e91-2dee-dedb-b68131a5f0ec
2007-10-20 21:21:54 +00:00
ultramage
0bbf505d59 * Merged do_sendrecv() and do_parse() into do_sockets()
* Fixed subnet check message displaying incorrect ip addresses
* client_addr will now be properly set to 0 for server connections
* Removed socket code that attempts to cope with code bugs at runtime
* Removed outdated copyright and version number from startup logo

git-svn-id: https://svn.code.sf.net/p/rathena/svn/trunk@11503 54d463be-8e91-2dee-dedb-b68131a5f0ec
2007-10-17 20:24:48 +00:00
ultramage
d2b0e3a658 Fixed charsrever crashes, caused by r11410
git-svn-id: https://svn.code.sf.net/p/rathena/svn/trunk@11466 54d463be-8e91-2dee-dedb-b68131a5f0ec
2007-10-14 17:44:09 +00:00
ultramage
8ac3690bca * Fixed wrong index calculation in TXT char creation code (ref: r11410)
* Fixed SQL itemdb loading crash on NULL columns (ref: 11398)

git-svn-id: https://svn.code.sf.net/p/rathena/svn/trunk@11434 54d463be-8e91-2dee-dedb-b68131a5f0ec
2007-10-12 23:15:27 +00:00
ultramage
83863850b5 Charserver cleaning / code simplification.
Removed min. 4-letter restriction on char creation name length (but still must be longer than 0).

git-svn-id: https://svn.code.sf.net/p/rathena/svn/trunk@11410 54d463be-8e91-2dee-dedb-b68131a5f0ec
2007-10-11 16:56:08 +00:00
zephyrus
7c12bd5a32 - Ops!.
git-svn-id: https://svn.code.sf.net/p/rathena/svn/trunk@11379 54d463be-8e91-2dee-dedb-b68131a5f0ec
2007-10-07 21:53:04 +00:00
zephyrus
8c1bd7bfd8 - Bug ID #184: Char Creation With An Empty Name [Zephyrus]
git-svn-id: https://svn.code.sf.net/p/rathena/svn/trunk@11377 54d463be-8e91-2dee-dedb-b68131a5f0ec
2007-10-07 20:46:50 +00:00
ultramage
286e1a32c4 * Added MAX_HOTKEYS to supplement the HOTKEY_SAVING define
* Fixed a compile problem when hotkey saving is disabled (topic:167265)
* Added script source error reporting to countitem() (topic:167165)
* Removed integer mob skill state/target definition support (unused)

git-svn-id: https://svn.code.sf.net/p/rathena/svn/trunk@11353 54d463be-8e91-2dee-dedb-b68131a5f0ec
2007-10-04 16:16:44 +00:00
ultramage
25ccf137f4 Removed redundant 'subnet' s_subnet structure variable.
Removed duplicate code from the sql charserver that somehow appeared after the tmpsql merge.

git-svn-id: https://svn.code.sf.net/p/rathena/svn/trunk@11333 54d463be-8e91-2dee-dedb-b68131a5f0ec
2007-09-30 21:56:07 +00:00
FlavioJS
fba34ea4ee * Changed back the query to get the friends of a character to a LEFT JOIN.
* Setting the item script variables to NULL when they are freed. (bugreport:142 ?)
  (a double @reloaditemdb might result in a double free)

git-svn-id: https://svn.code.sf.net/p/rathena/svn/trunk@11328 54d463be-8e91-2dee-dedb-b68131a5f0ec
2007-09-28 18:26:55 +00:00
ultramage
caaa7bde2f Removed some redundant code from the sql charserver.
Fixed a sql-charserver @block crash (missing Sql_NextRow() call).
Probably fixed 'random junk' being displayed in @changesex reply text.

git-svn-id: https://svn.code.sf.net/p/rathena/svn/trunk@11324 54d463be-8e91-2dee-dedb-b68131a5f0ec
2007-09-28 14:37:31 +00:00
FlavioJS
0498cb19c0 * Reimplemented mmo_char_fromsql using sql statements. (fixes bugreport:93)
* Fixed buildin_gethominfo not being included in the script engine. (bugreport:124)
* homunculus_evolution -> homevolution in script_commands.txt.
* Deleted item DEFAULT from item_db.txt and regenerated item_db.sql. (bugreport:103)
* Skip empty lines and give more feedback (for invalid lines) when reading item_db.txt/item_db2.txt.


git-svn-id: https://svn.code.sf.net/p/rathena/svn/trunk@11311 54d463be-8e91-2dee-dedb-b68131a5f0ec
2007-09-27 11:18:58 +00:00
ultramage
8998f367c1 Fixed a severe bug in inventory saving code (caused by r11192).
The fix was to revert the changes; I totally misunderstood how it was supposed to work...

git-svn-id: https://svn.code.sf.net/p/rathena/svn/trunk@11275 54d463be-8e91-2dee-dedb-b68131a5f0ec
2007-09-22 12:29:45 +00:00
ultramage
5216ecf05e * Fixed a typo in the status-change saving code (wrong variable used)
* Fixed a case of bad sql code conversion breaking homun skill loading

git-svn-id: https://svn.code.sf.net/p/rathena/svn/trunk@11264 54d463be-8e91-2dee-dedb-b68131a5f0ec
2007-09-21 21:19:59 +00:00
ultramage
8d014dd02a Added back SQL charserver listening socket code that got removed in the /tmpsql merge.
git-svn-id: https://svn.code.sf.net/p/rathena/svn/trunk@11251 54d463be-8e91-2dee-dedb-b68131a5f0ec
2007-09-20 17:10:53 +00:00
FlavioJS
65642f6f1c * Merged the tmpsql branch:
- 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://svn.code.sf.net/p/rathena/svn/trunk@11245 54d463be-8e91-2dee-dedb-b68131a5f0ec
2007-09-20 11:09:36 +00:00
ultramage
8a45d05f1c Wiped out every mention of RETCODE from /src.
The servers no longer save data using CRCRLF as line terminator on Windows.
Closes bugreport:45.

git-svn-id: https://svn.code.sf.net/p/rathena/svn/trunk@11187 54d463be-8e91-2dee-dedb-b68131a5f0ec
2007-09-13 06:06:30 +00:00
skotlex
0c1a8f2b37 - Cleaned some more the hotkey code: The order by and limit specifications are not really needed when loading hotkeys, and added hotkey deletion when you delete the character.
git-svn-id: https://svn.code.sf.net/p/rathena/svn/trunk@11022 54d463be-8e91-2dee-dedb-b68131a5f0ec
2007-08-16 03:55:16 +00:00
skotlex
dff80559d4 - Merged and completed Latio's work on server-side hot-key saving (http://www.eathena.ws/board/index.php?s=&showtopic=159388&view=findpost&p=884453)
- Now hotkeys are stored server-side (table hotkey in SQL servers, file save/hotkeys.txt for TXT servers). You can disable this behaviour by commenting out the 'HOTKEY_SAVING' define in mmo.h
- Fixed a few compilation warnings/errors.
- Apply upgrade_svn11018.sql to create the hotkey table.


git-svn-id: https://svn.code.sf.net/p/rathena/svn/trunk@11019 54d463be-8e91-2dee-dedb-b68131a5f0ec
2007-08-15 22:08:30 +00:00
ultramage
bc31c68ad5 The new functions now clear junk from the output buffer, this simplifies the code a bit.
Added a TODO for one emblem loading problem/crash.

git-svn-id: https://svn.code.sf.net/p/rathena/svn/trunk@10969 54d463be-8e91-2dee-dedb-b68131a5f0ec
2007-08-09 11:02:44 +00:00
ultramage
f5f77a5d51 * Cleaned up junk left in the code by the mapcache/mapindex update
- Added mapindex_getmapname(_ext) to help with ".gat" adding/removing
- Moved related processing to the interface (prevents duplicity)

git-svn-id: https://svn.code.sf.net/p/rathena/svn/trunk@10963 54d463be-8e91-2dee-dedb-b68131a5f0ec
2007-08-08 17:41:49 +00:00
ultramage
c06dca0c87 Some minor typo fixing.
git-svn-id: https://svn.code.sf.net/p/rathena/svn/trunk@10960 54d463be-8e91-2dee-dedb-b68131a5f0ec
2007-08-07 21:54:12 +00:00
ultramage
7f6ee484ba Fixed a missing charserver include causing "warning: struct declared inside parameter list".
git-svn-id: https://svn.code.sf.net/p/rathena/svn/trunk@10953 54d463be-8e91-2dee-dedb-b68131a5f0ec
2007-08-05 16:17:10 +00:00
ultramage
8be64bc3b4 * Added support for character rename packet (only dummy code for now)
* Added support for langtype-12 char deletion packet (tested, works)
* Synchronized txt/sql charserver code a bit
* Adjusted motd.txt to not crash new clients
* Removed some dead code from the charserver (see r352)

git-svn-id: https://svn.code.sf.net/p/rathena/svn/trunk@10909 54d463be-8e91-2dee-dedb-b68131a5f0ec
2007-07-25 16:45:09 +00:00
ultramage
16baba6519 * Corrected packet_db.txt. See topic:158382 for details. As a side-effect, the latest packet version is now 22 instead of 21.
* Added a charserver config option for the character renaming flag, along with a detailed comment on what it's supposed to be. This eliminates all that "change PACKETVER to 8 and recompile" mess.
* Moved PACKETVER back to clif.h, cleaned the related code a bit.

git-svn-id: https://svn.code.sf.net/p/rathena/svn/trunk@10888 54d463be-8e91-2dee-dedb-b68131a5f0ec
2007-07-20 03:38:47 +00:00
ultramage
1ed7f6c584 Cleaned up some parts of the code.
Removed obsolete script function 'hasitems'.

git-svn-id: https://svn.code.sf.net/p/rathena/svn/trunk@10838 54d463be-8e91-2dee-dedb-b68131a5f0ec
2007-07-01 15:26:53 +00:00
ultramage
3935c7bf4a * TXT->SQL converter fixup
- Added missing char_id insert which totally messed up the conversion
- Fixed login converter ignoring many columns (although it had the data)
- Pointed out that Login-stored account variable conversion is MISSING!
- Pointed out that Status, Homunculus and Mapreg conversion is MISSING!
- Blocked the config functions from exiting server when file not found
- Finally added VS8 project files for this thing

git-svn-id: https://svn.code.sf.net/p/rathena/svn/trunk@10835 54d463be-8e91-2dee-dedb-b68131a5f0ec
2007-07-01 10:19:43 +00:00
FlavioJS
3e13b73efe git-svn-id: https://svn.code.sf.net/p/rathena/svn/trunk@10706 54d463be-8e91-2dee-dedb-b68131a5f0ec 2007-06-06 16:53:09 +00:00
ultramage
e1397576e6 - Fixed missing client update when 'return to savepoint' fails
- Fixed a bad copy-paste from r10028 letting players escape jail (char was dead on login, so statuses (SC_JAILED) couln't be applied)
- Added clif_standing() to clif_sitting(), and used them in clif.c
- Cleaned up clif.c a bit - clif_clearchar->clif_clearunit_area, clif_clearchar_id->clif_clearunit_single

git-svn-id: https://svn.code.sf.net/p/rathena/svn/trunk@10668 54d463be-8e91-2dee-dedb-b68131a5f0ec
2007-06-03 14:43:34 +00:00
FlavioJS
f68f40f94d * Displaying op names instead of numbers in script engine errors.
* Fixed a bug introduced in the last rework of the fame ranking.
* Created safestrncpy that ensures the string is nul-terminated.

git-svn-id: https://svn.code.sf.net/p/rathena/svn/trunk@10667 54d463be-8e91-2dee-dedb-b68131a5f0ec
2007-06-02 20:19:40 +00:00
ultramage
1bf049d7d2 Some typo fixing / cleaning
git-svn-id: https://svn.code.sf.net/p/rathena/svn/trunk@10658 54d463be-8e91-2dee-dedb-b68131a5f0ec
2007-06-01 10:57:31 +00:00
ultramage
e142319d63 - Fixed an infinite char-server loop on the map connection
- Cleaned up the charserver a bit

git-svn-id: https://svn.code.sf.net/p/rathena/svn/trunk@10641 54d463be-8e91-2dee-dedb-b68131a5f0ec
2007-05-28 19:39:24 +00:00
FlavioJS
f3bb9a322d * RFIFOREST returns 0 when the session is eof (input data is implicitly discarted).
* Reworked the player fame update:
- would crash if an invalid pos was received
- the wrong player could be updated on certain conditions

git-svn-id: https://svn.code.sf.net/p/rathena/svn/trunk@10640 54d463be-8e91-2dee-dedb-b68131a5f0ec
2007-05-28 18:25:32 +00:00
ultramage
dfdb5368c7 Corrected some weird fgets() statements, plus reformatted them
git-svn-id: https://svn.code.sf.net/p/rathena/svn/trunk@10616 54d463be-8e91-2dee-dedb-b68131a5f0ec
2007-05-25 15:21:53 +00:00