summaryrefslogtreecommitdiff
path: root/src/common
AgeCommit message (Collapse)AuthorFilesLines
2007-11-30* Random cleanup/documentation.FlavioJS1-11/+11
* Made common/Makefile get the svn version from the src directory, not src/common. * Added a warning message to the install and uninstall targets. * Renamed all obj directories to obj_all, obj_txt or obj_sql in the makefiles (if an obj/ directory exists, BSD make enters it before reading the makefile) (run ./configure to update your makefiles, and don't forget to do 'make clean' before updating) git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@11844 54d463be-8e91-2dee-dedb-b68131a5f0ec
2007-11-27* Added safesnprintf to strlib.c/h (bugreport:372)FlavioJS2-0/+30
git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@11828 54d463be-8e91-2dee-dedb-b68131a5f0ec
2007-11-26* Normalized makefiles:FlavioJS1-35/+22
- 3 sections: variables, public targets, private/support targets - object files always in a *_OBJ variable - header files always in a *_H variable - object files always generated to an obj* subfolder - all Makefiles can be executed individually, calling other makefiles if necessary - generic object targets when possible git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@11812 54d463be-8e91-2dee-dedb-b68131a5f0ec
2007-11-22- Changed the status_change structure to use dynamic rather than static ↵skotlex1-1/+1
memory to hold the individual status changes, this should have a noticeable impact on the server's memory consumption. - Had to add a few 'ugly' flags to status_change since now you can't track SC related information while said SC is not active (happens only for Storm Gust, Joint Beat and Magic Power). - Since I am unable to fully test, watch out for any bugs~ git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@11786 54d463be-8e91-2dee-dedb-b68131a5f0ec
2007-11-21upsFlavioJS1-1/+1
git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@11775 54d463be-8e91-2dee-dedb-b68131a5f0ec
2007-11-21* Fixed Sql_SetEncoding not setting the encoding of the connection properly. ↵FlavioJS1-2/+4
(fixes bugreport:30) git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@11774 54d463be-8e91-2dee-dedb-b68131a5f0ec
2007-11-19Random cleaning of party.c in attempt to make party_send_xy_timer() crashes ↵ultramage1-1/+1
a bit clearer... - now party_db is iterated instead of using foreach() git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@11761 54d463be-8e91-2dee-dedb-b68131a5f0ec
2007-11-19* Nullpo's disabled on release builds.FlavioJS5-57/+63
* Added timestamps to the log of memory leaks. * Moved definition of __func__ to cbasetypes.h. * Configure script updated: - added option to select the memory manager - added option to enable MAPREGSQL - added option to enable DEBUG * common's Makefile deleting svnversion.h on 'clean' target. (run ./configure again to update your Makefile) git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@11760 54d463be-8e91-2dee-dedb-b68131a5f0ec
2007-11-14Fixed some homunculus skill offset calculation mistakes (bugreport:363)ultramage1-1/+1
git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@11731 54d463be-8e91-2dee-dedb-b68131a5f0ec
2007-11-12- Important fix to Mail System allowing (by a low change) items duple.zephyrus1-1/+0
- Added picklog to mail. git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@11721 54d463be-8e91-2dee-dedb-b68131a5f0ec
2007-11-10Changing enum weapon_type in the mmo_charstatus structure back to integer ↵ultramage1-1/+1
until someone resolves that include mess... git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@11705 54d463be-8e91-2dee-dedb-b68131a5f0ec
2007-11-09Replaced several 'int' variables with enums that they represent.ultramage1-3/+4
Expanded weapon_type enum with dual-wield constants (bugreport:384). git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@11704 54d463be-8e91-2dee-dedb-b68131a5f0ec
2007-11-09Fixed socket.c using time() incorrectly, causing stall timer ↵ultramage1-3/+3
desynchronization (bugreport:394) git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@11702 54d463be-8e91-2dee-dedb-b68131a5f0ec
2007-11-09* Added a database iterator to db.c/db.h.FlavioJS2-1/+442
git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@11701 54d463be-8e91-2dee-dedb-b68131a5f0ec
2007-11-08* Changed EXIT_SUCCESS back to 0 in console.c to avoid an unnecessary include.FlavioJS2-410/+278
* 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://rathena.svn.sourceforge.net/svnroot/rathena/trunk@11698 54d463be-8e91-2dee-dedb-b68131a5f0ec
2007-11-03Tried to make sense out of timer.c ... and failedultramage2-80/+101
git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@11647 54d463be-8e91-2dee-dedb-b68131a5f0ec
2007-10-31* Added names to the SC_ and SI_ enums, now they can be used to properly ↵ultramage2-7/+4
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://rathena.svn.sourceforge.net/svnroot/rathena/trunk@11625 54d463be-8e91-2dee-dedb-b68131a5f0ec
2007-10-27Fixed a compilation error in the mail code. Blame the C standard and gcc for ↵ultramage1-11/+10
giving enums a variable-sized type, thus making forward declarations impossible. git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@11587 54d463be-8e91-2dee-dedb-b68131a5f0ec
2007-10-27Followup fixes to r11583:ultramage1-10/+11
* 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://rathena.svn.sourceforge.net/svnroot/rathena/trunk@11584 54d463be-8e91-2dee-dedb-b68131a5f0ec
2007-10-27- Improvements to the mail system.zephyrus1-1/+11
- Added a sql patch, renaming "read_flag" column to "status" on the mail db. - Need more testing. git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@11583 54d463be-8e91-2dee-dedb-b68131a5f0ec
2007-10-24* Corrected a fex misshaps from r11571:FlavioJS1-1/+1
- 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://rathena.svn.sourceforge.net/svnroot/rathena/trunk@11573 54d463be-8e91-2dee-dedb-b68131a5f0ec
2007-10-24- added defines JOB_MAX_BASIC and JOB_MAX to mmo.h so the code can know ↵skotlex1-0/+2
which are the max valid classes. - @/#jobchange no longer strip your equipment since pc_jobchange removes any unequippables already. - removed the wasteful define MAX_PC_CLASS and replaced it by the CLASS_COUNT define (which is automatically updated using the previous JOB_MAX* defines) + pc_class2idx function (which converts high class IDs into values that fit in CLASS_COUNT) - Made status_charge a function rather than a define to get rid of those warnings that have been there since forever. - Merged the CELL_NOVENDING code (see topic #129209) - Small check that disables the pet catching process if you try to use another item. - Added a check to fix a warning and prevent a crash in the npc duplicate check (even though I have no idea what this check is supposed to do, therefore I can't fix it properly other than to avoid the crash) git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@11572 54d463be-8e91-2dee-dedb-b68131a5f0ec
2007-10-24* Cleaned up some messy guild code (more to come)ultramage3-10/+6
* 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://rathena.svn.sourceforge.net/svnroot/rathena/trunk@11571 54d463be-8e91-2dee-dedb-b68131a5f0ec
2007-10-23* Removed the inter_athena.conf maildb settings as they are not required ↵zephyrus1-4/+4
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://rathena.svn.sourceforge.net/svnroot/rathena/trunk@11557 54d463be-8e91-2dee-dedb-b68131a5f0ec
2007-10-22- Added the new mail system. Requires optimization and tests.zephyrus1-0/+31
- Updated the maildb sql structure. git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@11548 54d463be-8e91-2dee-dedb-b68131a5f0ec
2007-10-21Fixed a small mistake in r11503 causing a fatal error&exit on unix when you ↵ultramage1-4/+4
try to do a graceful exit (by ctrl+c for example) git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@11538 54d463be-8e91-2dee-dedb-b68131a5f0ec
2007-10-20Fixed a nasty bug from r11410 which let people create chars with already ↵ultramage1-1/+1
taken char names, and (in TXT's case) even cause a crash. Closes bugreport:234. git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@11530 54d463be-8e91-2dee-dedb-b68131a5f0ec
2007-10-18Fixed numerous /W4 warnings (and created more :)ultramage2-1/+2
git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@11514 54d463be-8e91-2dee-dedb-b68131a5f0ec
2007-10-18* Removed commented-out code for check_fake_id()ultramage2-5/+3
* Merged improved/cleaned up (WiP) code for clif_parse_WisMessage * Removed the requirement to provide a character name in the message string when calling is_atcommand() (needed for the previous fix) - currently both ways work, but old will be removed in the upcoming command cleanup so please adjust your custom code if you use this! * Added clif_process_message(), an unified way to validate all four types of player message packets and retrieve their components * Applied the new checking function to clif code, this fixes various length mismatches caused by incomplete code in r11386 (bugreport:198) git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@11507 54d463be-8e91-2dee-dedb-b68131a5f0ec
2007-10-18Fixed unix compilation problem due to a missing include (caused by r11499)ultramage1-0/+2
git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@11506 54d463be-8e91-2dee-dedb-b68131a5f0ec
2007-10-17* Merged do_sendrecv() and do_parse() into do_sockets()ultramage3-148/+124
* 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://rathena.svn.sourceforge.net/svnroot/rathena/trunk@11503 54d463be-8e91-2dee-dedb-b68131a5f0ec
2007-10-17* Reworked the parsing at npc.c.FlavioJS2-0/+24
- Fixes npc.c discarding the '}' at the end of file, when there is no newline. (uncovered as a side-effect of r11487) * Empty script functions always have code now (won't report as missing when you try to call them). * Changed userfunc_db to not limit the name to 50 characters. git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@11502 54d463be-8e91-2dee-dedb-b68131a5f0ec
2007-10-17Using predefined constants as parameters to the exit() function.ultramage5-20/+20
git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@11501 54d463be-8e91-2dee-dedb-b68131a5f0ec
2007-10-17* small timer.c cleaningultramage2-100/+57
- removed "with less than 4 values, it's speedier to use a simple loop" as this case will never occur (premature optimization from r1284) git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@11499 54d463be-8e91-2dee-dedb-b68131a5f0ec
2007-10-13Fixed memleak hell during mapserver shutdown (if grf reading is used and the ↵ultramage1-5/+11
deallocation routine is actually called). git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@11439 54d463be-8e91-2dee-dedb-b68131a5f0ec
2007-10-04* Added MAX_HOTKEYS to supplement the HOTKEY_SAVING defineultramage1-3/+4
* 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://rathena.svn.sourceforge.net/svnroot/rathena/trunk@11353 54d463be-8e91-2dee-dedb-b68131a5f0ec
2007-10-03* Cleaned up parts of skill.c related to skill unitsultramage1-0/+2
- removed some nonsense code in skill_dance_switch() (from r8876) - removed 'security system to prevent forgetting timer removal' (r1213) - renamed some skill-related data structs (had same name as variables) - commented out custom Venom Splasher countdown messaging code git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@11347 54d463be-8e91-2dee-dedb-b68131a5f0ec
2007-09-28* Implemented Summer Outfit care of Zephyrus_CR.L0ne_W0lf1-1/+2
- Increased MAX_GUILDCASTLE in mmo.h to 29 for future implementation of the 12.1 Guild Castles. * Added constants for Summer Outfit and updated the Summer_Event_Suit item script. git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@11321 54d463be-8e91-2dee-dedb-b68131a5f0ec
2007-09-25* Fixed the double free's caused by r11290 (wrong option in the database ↵FlavioJS1-0/+3
constructors). Readded tick cache variables (deleted by mistake). git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@11292 54d463be-8e91-2dee-dedb-b68131a5f0ec
2007-09-25* Disabled tick cache (to enable it: define TICK_CACHE to the number of ↵FlavioJS2-5/+28
calls that should be cached). * Added a charid2sd database for fast charid searches. * Reworked the nick cache to only contain offline characters. Note: The tick cache was causing _some_ of the desync problems in eA. Gameplay should be much smother, but desync problems still exist. git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@11290 54d463be-8e91-2dee-dedb-b68131a5f0ec
2007-09-24* Limited manual detection of data truncation to string/enum/blob columns.FlavioJS1-4/+20
* Renamed conf-tmpl to conf. git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@11284 54d463be-8e91-2dee-dedb-b68131a5f0ec
2007-09-23* Added flag svn:executable to the configure script.FlavioJS1-13/+36
* Added code for MySQL versions (below 5.0) that don't have MYSQL_DATA_TRUNCATED. git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@11281 54d463be-8e91-2dee-dedb-b68131a5f0ec
2007-09-22* Added 'safestrnlen' to prevent null pointer crashesultramage3-1/+10
* 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://rathena.svn.sourceforge.net/svnroot/rathena/trunk@11271 54d463be-8e91-2dee-dedb-b68131a5f0ec
2007-09-22* Added a sanity check for MAX_ZENY (doesn't compile if too big).FlavioJS1-0/+5
* Redid the buildin_query_sql function. (fixes bugreport:81). git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@11268 54d463be-8e91-2dee-dedb-b68131a5f0ec
2007-09-20* Merged the tmpsql branch:FlavioJS16-192/+1464
- 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://rathena.svn.sourceforge.net/svnroot/rathena/trunk@11245 54d463be-8e91-2dee-dedb-b68131a5f0ec
2007-09-13Wiped out every mention of RETCODE from /src.ultramage1-15/+0
The servers no longer save data using CRCRLF as line terminator on Windows. Closes bugreport:45. git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@11187 54d463be-8e91-2dee-dedb-b68131a5f0ec
2007-08-15- 'make clean' now removes the svnversion.h file in src/common/ since ↵skotlex1-1/+1
otherwise it is pretty much never updated. git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@11020 54d463be-8e91-2dee-dedb-b68131a5f0ec
2007-08-15- Merged and completed Latio's work on server-side hot-key saving ↵skotlex1-0/+16
(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://rathena.svn.sourceforge.net/svnroot/rathena/trunk@11019 54d463be-8e91-2dee-dedb-b68131a5f0ec
2007-08-15* Some serious code cleanupsultramage3-9/+4
- adjusted @reloadbattleconf to not depend on variable ordering - changed all battle vars to 'int' (removes pointless duplicit coding) - added min, max and default columns to battle config data structure - added properly bounded values for these columns (or at least tried to) - battle-conf loading will now complain if it finds unknown settings, and will reject values that are outside of the allowed range - added CHATROOM_TITLE_SIZE and CHATROOM_PASS_SIZE - partially cleaned up chatroom manipulation code * Fixed 'Job_Professer' typo in mage jobchange quest git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@11017 54d463be-8e91-2dee-dedb-b68131a5f0ec
2007-08-15small mapindex.c typo fixultramage1-5/+5
git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@11014 54d463be-8e91-2dee-dedb-b68131a5f0ec