32 Commits

Author SHA1 Message Date
shennetsind
d792a2b57f Fixed compiling warning with gcc on --enable-64bit mode.
git-svn-id: https://svn.code.sf.net/p/rathena/svn/trunk@15860 54d463be-8e91-2dee-dedb-b68131a5f0ec
2012-04-15 11:52:22 +00:00
brianluau
00367cd7b7 - Removed more trailing tabs.
git-svn-id: https://svn.code.sf.net/p/rathena/svn/trunk@15527 54d463be-8e91-2dee-dedb-b68131a5f0ec
2012-01-30 20:17:55 +00:00
ai4rei
6aa18784a3 * Random accumulated tweaks and fixes.
- Added a error message to npc_enable, to spot disablenpc/enablenpc/hideoffnpc/hideonnpc on non-existing NPCs (related r14750).
- Replaced inlined npc_name2id code with calls to npc_name2id.
- Open Buying Store skill is now exempted from noskill mapflag like Vending as well (bugreport:4815, follow up to r14713).
- Fixed signed constant being returned as unsigned value in get_percentage (bugreport:4765, since r12679).
- Replaced strlen checks, which checked whether or not a string is empty, with first-byte checks.
- Fixed enabling 'fakename' not clearing party and guild name and cleaned up atcommand 'fakename' code.
- Cleaned up party/guild name code in clif_charnameack (follow up to r14737).

git-svn-id: https://svn.code.sf.net/p/rathena/svn/trunk@14751 54d463be-8e91-2dee-dedb-b68131a5f0ec
2011-03-20 20:19:23 +00:00
ai4rei
c9a3277785 * Cleaned up packet dumping code.
- Replaced utils function 'dump' with 'WriteDump' (files) and 'ShowDump' (console), and used those to replace inlined code in clif (related r10947).
- Fixed clif_parse_debug not printing anything, when it is used with a variable length packet.
- Added ability to dump invalid packets through define DUMP_INVALID_PACKET (clif.c).
- Removed code to dump all incoming packets, as that can be achieved with the DUMP_UNKNOWN_PACKET code as well when needed (from r1009, related r10947).

git-svn-id: https://svn.code.sf.net/p/rathena/svn/trunk@14734 54d463be-8e91-2dee-dedb-b68131a5f0ec
2011-03-07 09:51:33 +00:00
ai4rei
8dc5d7029c * Fixed non-windows 'findfile' utils function missing a 'closedir' call (bugreport:4739, since r1629).
git-svn-id: https://svn.code.sf.net/p/rathena/svn/trunk@14692 54d463be-8e91-2dee-dedb-b68131a5f0ec
2011-02-02 20:00:12 +00:00
ai4rei
e26ea94a2f * Reverted r14563, due to multiple issues which render the source malfunctioning or uncompilable. To be redone later (bugreport:4627).
git-svn-id: https://svn.code.sf.net/p/rathena/svn/trunk@14567 54d463be-8e91-2dee-dedb-b68131a5f0ec
2010-12-07 19:45:24 +00:00
Paradox924X
ca53ef6f4a Changed almost all instances of sprintf() to snprintf().
git-svn-id: https://svn.code.sf.net/p/rathena/svn/trunk@14563 54d463be-8e91-2dee-dedb-b68131a5f0ec
2010-12-07 18:38:03 +00:00
ai4rei
c792e189e4 * Moved function 'exists' (file presense check) to utils.c, so that it is available to code outside of lock.c
- Fixed associated F_OK and R_OK defines causing 'already defined' warnings on MinGW (since r1361).

git-svn-id: https://svn.code.sf.net/p/rathena/svn/trunk@14528 54d463be-8e91-2dee-dedb-b68131a5f0ec
2010-11-30 18:02:54 +00:00
ultramage
106b44c1e7 Merged the /loginmerge branch (topic:192754)
* the login server storage, ipban and logging systems have been abstracted and now provide a common interface; the rest has been merged into a single login server core (no more login/login_sql duplicity)
 * storage systems are now added via compiler options (WITH_SQL / WITH_TXT)
 * multiple storage engines can be compiled in at the same time, and the config option account.engine defines which one will be used.
 * due to MySQL autoincrement limitations, accounts with id '0' will not be supported; account IDs from this point on should start from '1'.
 * login_log() functions now again record IP addresses in dotted format, not as 4-byte integers (undo from r6868).
 * removed config options that defined column names in the login table
 * removed `memo` and `error message` columns from login db/savefile
 * moved `loginlog` table to the logs database
 * added sql files upgrade_svn12975.sql and upgrade_svn12975_log.sql
 * due to changes to the login table layout, I added an !optional! sql file (upgrade_svn12975_view.sql) that will provide a certain degree of backwards compatibility with existing software; read the instructions inside carefully!
 * moved third-party includes/libs to a separate directory
 * updated project files / makefiles

Changed the way GM levels are handled
 * removed conf/gm_account.txt
 * added the gm level column to the txt savefile (after 'email' column)
 * gm level information is now transferred along with account data
 
For open problems see bugreport:1889.

git-svn-id: https://svn.code.sf.net/p/rathena/svn/trunk@13000 54d463be-8e91-2dee-dedb-b68131a5f0ec
2008-07-26 20:45:57 +00:00
ultramage
62cc01866b Replaced the very ineffective clif_foreachclient() with map_foreachpc() since they essentially do the same thing (bugreport:1174).
Rewrote map_foreachpc() so that its callback function signature now uses a more natural 'sd' instead of a DBKey/void* pair.
Rewrote atcommand_users() to use a single function, instead of depending on two helper functions and global objects.

git-svn-id: https://svn.code.sf.net/p/rathena/svn/trunk@12683 54d463be-8e91-2dee-dedb-b68131a5f0ec
2008-05-02 15:08:14 +00:00
ultramage
6559c24882 Replaced the integers+checking approach in r12679 with usage of floating point arithmetic.
Applied search&replace to use the new name of the function.

git-svn-id: https://svn.code.sf.net/p/rathena/svn/trunk@12680 54d463be-8e91-2dee-dedb-b68131a5f0ec
2008-05-01 13:56:24 +00:00
ultramage
d5775e7e11 Implemented get_percentage() for compact and safe calculation of percentual values.
Fixed integer arithmetic overflows that were occuring in several supernovice checks (bugreport:1135).

git-svn-id: https://svn.code.sf.net/p/rathena/svn/trunk@12679 54d463be-8e91-2dee-dedb-b68131a5f0ec
2008-05-01 12:14:06 +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
0a0782c664 Some all-around code reformatting/cleaning
git-svn-id: https://svn.code.sf.net/p/rathena/svn/trunk@10947 54d463be-8e91-2dee-dedb-b68131a5f0ec
2007-08-04 16:24:49 +00:00
FlavioJS
a75ec9a547 * Changed the string hash of the script engine to SDBM.
* Reporting information about script data when an error occurs.
* More work on ticket #41 (array functions).

git-svn-id: https://svn.code.sf.net/p/rathena/svn/trunk@10813 54d463be-8e91-2dee-dedb-b68131a5f0ec
2007-06-26 21:03:31 +00:00
ultramage
a6e61e1d2f Gave each file an empty last line, to make svn happier
Added svn:eol-style native where missing
Removed remaining .gats

git-svn-id: https://svn.code.sf.net/p/rathena/svn/trunk@10401 54d463be-8e91-2dee-dedb-b68131a5f0ec
2007-04-29 08:17:53 +00:00
FlavioJS
f4907979c1 * Extended the functionality of StringBuf - length and appending a string.
* menu/select/prompt script functions support grouped and empty options.
  The selected option number is consistent with them.
* More work on ticket #41.

git-svn-id: https://svn.code.sf.net/p/rathena/svn/trunk@10316 54d463be-8e91-2dee-dedb-b68131a5f0ec
2007-04-22 15:45:37 +00:00
FlavioJS
cc893dbaab * Changed db key from 'unsigned char*' to 'const char*'.
* Defined out the dump function in util.h/c.

Notes: saw some suspicious code in npc.c so kept the 'const char*' propagation to a minimum for now

git-svn-id: https://svn.code.sf.net/p/rathena/svn/trunk@10193 54d463be-8e91-2dee-dedb-b68131a5f0ec
2007-04-09 13:03:34 +00:00
ultramage
8dc1b77f03 * Made a crazy attempt to at least partially synchronize login&char code
* Major edit to the way the servers handle ip addresses, making them obey the "host byte order inside, network byte order outside" rule
- hopefully covered all entry- and exit-points for IP address data
- discovered several places where Gravity's client breaks the convention, will need to come up with a suitable countermeasure for that
- other than that, the code should be portable, except for printing and ipban mask testing (those still assume a specific byte order)
- tested both txt and sql in all usual situations; tested single- and multi-server setups, all seems to work (but watch out for hidden bugs!)

git-svn-id: https://svn.code.sf.net/p/rathena/svn/trunk@10162 54d463be-8e91-2dee-dedb-b68131a5f0ec
2007-04-05 18:49:57 +00:00
ultramage
59b38494b7 - Major reconfiguration of the trunk VS8 project files, read the changelog for details
- Also removed some deprecated code that was causing linking conflicts
- And fixed a missing md5calc reference in stable's VS8 files

git-svn-id: https://svn.code.sf.net/p/rathena/svn/trunk@9619 54d463be-8e91-2dee-dedb-b68131a5f0ec
2007-01-05 15:57:01 +00:00
skotlex
b9fd36a7cd - There will be now warnings printed when a shop sells an item which's buy price is 20z, since those usually are "rare" items with no buyying price set. Note that this reports one fake, and that is the selling of a certain shuriken that indeed costs 20z.
- Most likely fixed client crash when xmas/wedding status runs out.


git-svn-id: https://svn.code.sf.net/p/rathena/svn/trunk@9505 54d463be-8e91-2dee-dedb-b68131a5f0ec
2006-12-15 18:13:37 +00:00
FlavioJS
7ecc1ab6e1 - Fixed ladmin's linux compilation and moved some platform specific defines to cbasetypes.h
git-svn-id: https://svn.code.sf.net/p/rathena/svn/trunk@9435 54d463be-8e91-2dee-dedb-b68131a5f0ec
2006-12-07 23:59:26 +00:00
FlavioJS
53a7ca362b - Added StringBuf_Vprintf to utils.c and changed the showmsg.c buffer.
Now it uses a static buffer and a StringBuf when needed (a debug message indicating the static buffer needs to be increased is shown).

git-svn-id: https://svn.code.sf.net/p/rathena/svn/trunk@9414 54d463be-8e91-2dee-dedb-b68131a5f0ec
2006-12-06 04:25:13 +00:00
FlavioJS
637ae9a4dc - Massive EOL normalization & 'svn:eol-style native' flag setting for all txt/conf/h/c files.
git-svn-id: https://svn.code.sf.net/p/rathena/svn/trunk@9410 54d463be-8e91-2dee-dedb-b68131a5f0ec
2006-12-05 13:23:07 +00:00
Lance
4c65151fb5 * Fixed warnings on compilers again.
git-svn-id: https://svn.code.sf.net/p/rathena/svn/trunk@5654 54d463be-8e91-2dee-dedb-b68131a5f0ec
2006-03-18 01:43:46 +00:00
Valaris
2178a86317 AS OF SVN REV. 5901, WE ARE NOW USING TRUNK. ALL UNTESTED BUGFIXES/FEATURES GO INTO TRUNK.
IF YOU HAVE A WORKING AND TESTED BUGFIX PUT IT INTO STABLE AS WELL AS TRUNK.  EVERYTHING ELSE
GOES INTO TRUNK AND WILL BE MERGED INTO STABLE BY VALARIS AND WIZPUTER. -- VALARIS


git-svn-id: https://svn.code.sf.net/p/rathena/svn/trunk@5094 54d463be-8e91-2dee-dedb-b68131a5f0ec
2006-01-29 16:10:48 +00:00
Valaris
fd99753f8e Clearing trunk.
git-svn-id: https://svn.code.sf.net/p/rathena/svn/trunk@5091 54d463be-8e91-2dee-dedb-b68131a5f0ec
2006-01-29 16:00:45 +00:00
(no author)
778e804dd6 update
git-svn-id: https://svn.code.sf.net/p/rathena/svn/branches/stable@968 54d463be-8e91-2dee-dedb-b68131a5f0ec
2005-01-23 20:38:44 +00:00
amber
d8dd831efb update
git-svn-id: https://svn.code.sf.net/p/rathena/svn/branches/stable@821 54d463be-8e91-2dee-dedb-b68131a5f0ec
2004-12-27 16:29:44 +00:00
amber
c056c6be90 guild_cache
git-svn-id: https://svn.code.sf.net/p/rathena/svn/branches/stable@619 54d463be-8e91-2dee-dedb-b68131a5f0ec
2004-12-19 02:41:24 +00:00
amber
d479e29aee Fixed some file types
git-svn-id: https://svn.code.sf.net/p/rathena/svn/athena@172 54d463be-8e91-2dee-dedb-b68131a5f0ec
2004-11-14 16:18:26 +00:00
(no author)
706e785091 git-svn-id: https://svn.code.sf.net/p/rathena/svn/athena@2 54d463be-8e91-2dee-dedb-b68131a5f0ec 2004-11-04 23:25:09 +00:00