474 Commits

Author SHA1 Message Date
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
b5cf6976a2 Fixed some homunculus skill offset calculation mistakes (bugreport:363)
git-svn-id: https://svn.code.sf.net/p/rathena/svn/trunk@11731 54d463be-8e91-2dee-dedb-b68131a5f0ec
2007-11-14 09:31:47 +00:00
zephyrus
0cf565292d - Important fix to Mail System allowing (by a low change) items duple.
- Added picklog to mail.

git-svn-id: https://svn.code.sf.net/p/rathena/svn/trunk@11721 54d463be-8e91-2dee-dedb-b68131a5f0ec
2007-11-12 08:55:36 +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
ac33a63e54 * Added names to the SC_ and SI_ enums, now they can be used to properly indicate where such values are to be used (replaces usage of 'int')
* removed MIN_/MAX_PORTAL_MEMO, set MAX_MEMOPOINTS from 10 to 3
* removed support for @go-ing to your memo points
* simplified the overly verbose @memo command; now re-uses pc_memo()
* cleaned up pc_memo(), now uses semi-correct packet replies
* Minor code cleaning/formatting

git-svn-id: https://svn.code.sf.net/p/rathena/svn/trunk@11625 54d463be-8e91-2dee-dedb-b68131a5f0ec
2007-10-31 13:20:48 +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
b6bbaef27b Followup fixes to r11583:
* fixed wrong sql upgrade file name, added svn:eol-style native
 * made 'status' variable directly use the mail_status enum
 * replaced some hardcoded numbers in mail queries with references to the enum
 * fixed a query which still used 'read_flag'
 * fixed all new mails being displayed as 'already read'
 * removed sd nullpo checks from parse_ functions as that can never happen
 * fixed mapserver sending (and charserver saving) junk item fields when there is no item attached to a mail
 * fixed wrong mail send packet interpretation saving random memory after message body ('body_len' doesn't include the terminating zero)

git-svn-id: https://svn.code.sf.net/p/rathena/svn/trunk@11584 54d463be-8e91-2dee-dedb-b68131a5f0ec
2007-10-27 09:48:27 +00:00
zephyrus
284222a415 - Improvements to the mail system.
- Added a sql patch, renaming "read_flag" column to "status" on the mail db.
- Need more testing.

git-svn-id: https://svn.code.sf.net/p/rathena/svn/trunk@11583 54d463be-8e91-2dee-dedb-b68131a5f0ec
2007-10-27 06:34:04 +00:00
ultramage
e0cccf7d12 * Removed confusing map_nick2sd_nocase(), let the charserver handle it
* Added correct packet for attachment retrieval failure when overweight
* Fixed one more mistake in r11571 (Sql->SqlStmt)

git-svn-id: https://svn.code.sf.net/p/rathena/svn/trunk@11579 54d463be-8e91-2dee-dedb-b68131a5f0ec
2007-10-26 08:42:32 +00:00
FlavioJS
d9774ac8ca * Corrected a fex misshaps from r11571:
- disabling the memory manager
- using the wrong length for the title and body in mail_savemessage
* Removed the quick-fix in the npc duplicate check and the impossible condition that is generating the warning.

git-svn-id: https://svn.code.sf.net/p/rathena/svn/trunk@11573 54d463be-8e91-2dee-dedb-b68131a5f0ec
2007-10-24 13:29:00 +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
b96d3cb54c - Another FALSE to false... sorry.
git-svn-id: https://svn.code.sf.net/p/rathena/svn/trunk@11561 54d463be-8e91-2dee-dedb-b68131a5f0ec
2007-10-23 16:13:35 +00:00
zephyrus
3b34abfc21 - Fixed a compilation bug on linux (FALSE -> false)
git-svn-id: https://svn.code.sf.net/p/rathena/svn/trunk@11560 54d463be-8e91-2dee-dedb-b68131a5f0ec
2007-10-23 15:35:02 +00:00
zephyrus
a0b1a582a1 * Removed the inter_athena.conf maildb settings as they are not required anymore.
- MailDB is now an integral part of the MainDB.
- To Server Admins, use mysql tools to move your mail data to the new structure.
- You can get the maildb structure from main.sql.
- Renamed some vars (recomendation of Ultramage :D)

git-svn-id: https://svn.code.sf.net/p/rathena/svn/trunk@11557 54d463be-8e91-2dee-dedb-b68131a5f0ec
2007-10-23 00:31:37 +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
3d7a129b90 Using predefined constants as parameters to the exit() function.
git-svn-id: https://svn.code.sf.net/p/rathena/svn/trunk@11501 54d463be-8e91-2dee-dedb-b68131a5f0ec
2007-10-17 17:20:01 +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
961f23767d * Added 'safestrnlen' to prevent null pointer crashes
* Fixed global chat logging always crashing on a null pointer
* Applied changes to clif_parse_globalmessage() from my WiP code
- clearer processing of the individual packet components
- proper code ordering, some more integrity checks
- fixes to some poorly chosen ShowWarning() format strings
- global chat logging no longer logs the entire string (w/ player name)

git-svn-id: https://svn.code.sf.net/p/rathena/svn/trunk@11271 54d463be-8e91-2dee-dedb-b68131a5f0ec
2007-09-22 11:02:26 +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