4932 Commits

Author SHA1 Message Date
FlavioJS
acde528ec5 * Fixed missing iterator destruction in the map_foreach* functions (followup to r12684).
git-svn-id: https://svn.code.sf.net/p/rathena/svn/trunk@12686 54d463be-8e91-2dee-dedb-b68131a5f0ec
2008-05-02 21:22:20 +00:00
FlavioJS
7992f84a27 * Added backward compatible handling of PACKETVER 8 and 9. (followup to r12539)
(more missing changelog messages from ultramage)

git-svn-id: https://svn.code.sf.net/p/rathena/svn/trunk@12685 54d463be-8e91-2dee-dedb-b68131a5f0ec
2008-05-02 20:21:25 +00:00
FlavioJS
1be6ba4a63 * Changes to map_foreach* functions:
- removed the unecessary use of va_copy in map_foreachpc
- applied the same function pattern to map_foreachmob and map_foreachiddb
- created map_foreachnpc
- extended the behaviour of map_foreach* functions to stop iterating when func returns -1
(also added missing changelog entries from ultramage >.>)

git-svn-id: https://svn.code.sf.net/p/rathena/svn/trunk@12684 54d463be-8e91-2dee-dedb-b68131a5f0ec
2008-05-02 17:14:00 +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
0ce34d51a4 Added a custom implementation of the va_copy macro for systems that don't provide it.
Fixed varargs not being used correctly in foreach() calls in db.c (bugreport:551).

git-svn-id: https://svn.code.sf.net/p/rathena/svn/trunk@12682 54d463be-8e91-2dee-dedb-b68131a5f0ec
2008-05-02 09:27:03 +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
Kevin
9118792124 Quest packet typo.
git-svn-id: https://svn.code.sf.net/p/rathena/svn/trunk@12675 54d463be-8e91-2dee-dedb-b68131a5f0ec
2008-05-01 00:13:12 +00:00
Kevin
21802ff355 Cleaned up char server set online/offline/char select functions. (bugreport:1359)
git-svn-id: https://svn.code.sf.net/p/rathena/svn/trunk@12670 54d463be-8e91-2dee-dedb-b68131a5f0ec
2008-04-28 15:03:33 +00:00
ultramage
155416f712 fixing some timestamp type difference warnings...
git-svn-id: https://svn.code.sf.net/p/rathena/svn/trunk@12669 54d463be-8e91-2dee-dedb-b68131a5f0ec
2008-04-27 20:03:25 +00:00
ultramage
fc5918e335 Removed the calc_times() no-op (bugreport:1289)
git-svn-id: https://svn.code.sf.net/p/rathena/svn/trunk@12668 54d463be-8e91-2dee-dedb-b68131a5f0ec
2008-04-27 19:46:17 +00:00
ultramage
304565cc9b Corrected r12662 where a guild break would trigger the OnGuildBreak event for all castles (even of other guilds).
Corrected some x64 compilation warnings in ers/malloc files.
cleaned up a case of bad variable reuse.

git-svn-id: https://svn.code.sf.net/p/rathena/svn/trunk@12666 54d463be-8e91-2dee-dedb-b68131a5f0ec
2008-04-27 11:09:57 +00:00
ultramage
7a9a3a12bb Cleaning up the itemdb reload mess (see r12635, r12643, r12650, r12661, r12662, r12663)
* the player data inventory-itemdb index is now refreshed using pc_setinventorydata()
 * mobdb will no longer initialize with nonexistent items, and mobs will no longer drop them in case of a reload
 * the clif_buylist() function once again hides invalid npc shop items
 * it is no longer possible to purchase nonexistent items from a npc shop
 * npc shop loading will not abort if there is a nonexistent item entry, it will just skip over it

git-svn-id: https://svn.code.sf.net/p/rathena/svn/trunk@12665 54d463be-8e91-2dee-dedb-b68131a5f0ec
2008-04-27 11:06:55 +00:00
toms
e50dd25ec2 Fixed 'suggest parentheses around assignment ...' gcc warning
git-svn-id: https://svn.code.sf.net/p/rathena/svn/trunk@12664 54d463be-8e91-2dee-dedb-b68131a5f0ec
2008-04-27 10:29:30 +00:00
Kevin
76c426d731 <3 Cake
git-svn-id: https://svn.code.sf.net/p/rathena/svn/trunk@12663 54d463be-8e91-2dee-dedb-b68131a5f0ec
2008-04-27 09:19:56 +00:00
Kevin
1f6d5057bc Changed the last commit so it must be called with @reloaditemdb2. @reloaditemdb only removes the item_data from the itemdb subsystem. If you don't like my code you can uncomment the macro I_HATE_KEVIN in item_db.c so it isn't even compiled.
git-svn-id: https://svn.code.sf.net/p/rathena/svn/trunk@12662 54d463be-8e91-2dee-dedb-b68131a5f0ec
2008-04-27 09:15:05 +00:00
Kevin
26a70ed737 Some major changes to @reloaditemdb to allow unloading of any item while map server is running.
- Delete any item from inventory/cart/open storages that went missing during the reload.
- Delete item from any shop that has this item.
- Refresh item screen for anyone who has a shop open.
- Delete mob db drop table references.
- Delete item from storage during load if it isn't in the item db.

git-svn-id: https://svn.code.sf.net/p/rathena/svn/trunk@12661 54d463be-8e91-2dee-dedb-b68131a5f0ec
2008-04-27 07:18:21 +00:00
Kevin
2eabb3d1f7 Added script function hasquest.
git-svn-id: https://svn.code.sf.net/p/rathena/svn/trunk@12660 54d463be-8e91-2dee-dedb-b68131a5f0ec
2008-04-26 23:11:15 +00:00
Kevin
2070c16a1b Uncommented and cleaned up the OnGuildBreak code.
git-svn-id: https://svn.code.sf.net/p/rathena/svn/trunk@12659 54d463be-8e91-2dee-dedb-b68131a5f0ec
2008-04-26 22:20:20 +00:00
Kevin
679e600fcc Cleaned up auth system after change back to map server request.
- Created function set_char_charselect to get rid of some of the "special case" variables.
- Removed code that involved the char server sending auth data at char select.
- Changed char select code to update the instance of the char data in the DB to fix map/sex info not being propagated to auth request.

git-svn-id: https://svn.code.sf.net/p/rathena/svn/trunk@12658 54d463be-8e91-2dee-dedb-b68131a5f0ec
2008-04-26 22:13:02 +00:00
toms
c79a5092eb Fixed bugreport:1223 (Invalid Items In Shops Are Processed Incorrectly)
git-svn-id: https://svn.code.sf.net/p/rathena/svn/trunk@12650 54d463be-8e91-2dee-dedb-b68131a5f0ec
2008-04-25 07:47:29 +00:00
toms
c68d9e2a7d * Modified delitem/delitem2 to have the same behaviour as getitem/getitem2 (optional account_id parameter) bugreport:1035
* Modified doc in consequence

git-svn-id: https://svn.code.sf.net/p/rathena/svn/trunk@12648 54d463be-8e91-2dee-dedb-b68131a5f0ec
2008-04-25 06:54:53 +00:00
Kevin
75cd3c3acb Changed @reloaditemdb again to only unload items from item_db2. Also byte aligned the item_data struct a bit.
git-svn-id: https://svn.code.sf.net/p/rathena/svn/trunk@12643 54d463be-8e91-2dee-dedb-b68131a5f0ec
2008-04-23 20:54:07 +00:00
FlavioJS
2599064a46 * Fixed script strings not being handled properly (only skipped the \).
* Added skip_escaped_c to strlib.c/h.
* Fixed sv_unescape_c not handling hex/octal escapes properly.

git-svn-id: https://svn.code.sf.net/p/rathena/svn/trunk@12639 54d463be-8e91-2dee-dedb-b68131a5f0ec
2008-04-23 11:14:45 +00:00
FlavioJS
d903fda1c7 * Script parse errors displayed with one ShowError instead of several ShowMessage's.
git-svn-id: https://svn.code.sf.net/p/rathena/svn/trunk@12637 54d463be-8e91-2dee-dedb-b68131a5f0ec
2008-04-23 04:35:32 +00:00
Kevin
e78798984a Changed itemdb_reload to clear the database before reloading, so it is possible can remove an item from the DB without restarting the server (bugreport:1348)
git-svn-id: https://svn.code.sf.net/p/rathena/svn/trunk@12635 54d463be-8e91-2dee-dedb-b68131a5f0ec
2008-04-22 22:02:54 +00:00
toms
4c74bd7ac6 Fixed a "bug" in sv_readdb under windows and cygwin configured as "Unix/binary" for text files ('\r' is read and empty lines are not skipped) bugreport:1382 bugreport:1401
git-svn-id: https://svn.code.sf.net/p/rathena/svn/trunk@12634 54d463be-8e91-2dee-dedb-b68131a5f0ec
2008-04-22 15:13:32 +00:00
FlavioJS
c880052f0f * Changed the data field of timers from int to intptr.
git-svn-id: https://svn.code.sf.net/p/rathena/svn/trunk@12633 54d463be-8e91-2dee-dedb-b68131a5f0ec
2008-04-21 21:34:31 +00:00
FlavioJS
cbbf504bca * Added intptr/uintptr to cbasetypes.h (integers with the same size as a pointer).
git-svn-id: https://svn.code.sf.net/p/rathena/svn/trunk@12632 54d463be-8e91-2dee-dedb-b68131a5f0ec
2008-04-21 21:32:26 +00:00
L0ne_W0lf
7708c0c766 * Changed Sacrifice status to end on caster's death, not at 25% HP.
- Should also fix over-flow damage returning to sacrificed targets. Partially fixes bugreport:1332


git-svn-id: https://svn.code.sf.net/p/rathena/svn/trunk@12631 54d463be-8e91-2dee-dedb-b68131a5f0ec
2008-04-21 21:22:33 +00:00
toms
ccb23efe49 Made some cleanup in changesex
git-svn-id: https://svn.code.sf.net/p/rathena/svn/trunk@12626 54d463be-8e91-2dee-dedb-b68131a5f0ec
2008-04-21 16:19:25 +00:00
zephyrus
7c9411922a * Several updates from Trunk
- Merged the new Auth process to avoid double logins.
- Merged official adoption process.
- Removed @gm command.
- Cleaning of MAX_ACCOUNT_ID and MAX_CHAR_ID
- Update of the online user count (map_getusers)

NOTE: i will do a second check to see if i forget something else.

git-svn-id: https://svn.code.sf.net/p/rathena/svn/trunk@12621 54d463be-8e91-2dee-dedb-b68131a5f0ec
2008-04-20 16:17:24 +00:00
toms
443c56e21f Fixed a bug in (init/start/stop)npctimer
git-svn-id: https://svn.code.sf.net/p/rathena/svn/trunk@12619 54d463be-8e91-2dee-dedb-b68131a5f0ec
2008-04-19 15:37:18 +00:00
Lupus
ba5c9df29d fixed mapserv crash (divide by zero in Earthquake)
git-svn-id: https://svn.code.sf.net/p/rathena/svn/trunk@12618 54d463be-8e91-2dee-dedb-b68131a5f0ec
2008-04-18 19:43:31 +00:00
toms
2577ffdf25 * Fixed a bug when unloading a npc near a shop.
* Fixed npc_buylist not giving/checking the good item when it was an item_avail in the shop (the real one was added in inventory).

git-svn-id: https://svn.code.sf.net/p/rathena/svn/trunk@12616 54d463be-8e91-2dee-dedb-b68131a5f0ec
2008-04-18 14:33:31 +00:00
ultramage
b7b80e5c97 Implemented config setting 'vending_over_max', to let people configure the behavior of vending items over the MAX_ZENY limit.
Default/official setting is 'yes', which makes players lose zeny that they cannot hold. Adjust as needed.
This re-adds the behavior from before r11344 (see topic:180568).

git-svn-id: https://svn.code.sf.net/p/rathena/svn/trunk@12614 54d463be-8e91-2dee-dedb-b68131a5f0ec
2008-04-18 08:12:55 +00:00
ultramage
45f1ef5202 Modified sv_readdb to be able to process non-native line terminators (bugreport:1382)
git-svn-id: https://svn.code.sf.net/p/rathena/svn/trunk@12610 54d463be-8e91-2dee-dedb-b68131a5f0ec
2008-04-17 10:50:28 +00:00
zephyrus
bb98e43f3c - Some mistake from someone but OMG!
git-svn-id: https://svn.code.sf.net/p/rathena/svn/trunk@12609 54d463be-8e91-2dee-dedb-b68131a5f0ec
2008-04-17 00:51:15 +00:00
ultramage
70e34f81cd Fixed an issue in r12575 where 'not setting char offline when going from mapserver to charserver' also caused a permanent account lockout if the player pressed 'cancel' in the char select screen.
Merged some recent changes from SQL to TXT, as someone didn't bother to do it.
Ifdefed the quest data request code as SQL-only (this was causing server disconnects whenver someone logged in).

git-svn-id: https://svn.code.sf.net/p/rathena/svn/trunk@12606 54d463be-8e91-2dee-dedb-b68131a5f0ec
2008-04-16 07:48:53 +00:00
toms
034920992e Use the same code for script commands getitem & getitem2 as @item to avoid bug in bugreport:1324 (non-stackable items are stacked)
git-svn-id: https://svn.code.sf.net/p/rathena/svn/trunk@12603 54d463be-8e91-2dee-dedb-b68131a5f0ec
2008-04-15 18:37:06 +00:00
toms
7d3d258492 Used a forward declaration of the struct quest instead of including mmo.h
git-svn-id: https://svn.code.sf.net/p/rathena/svn/trunk@12600 54d463be-8e91-2dee-dedb-b68131a5f0ec
2008-04-15 14:57:00 +00:00
ultramage
9609149c15 * Corrected some invalid syntax in skill_db.txt (wrong usage of commas)
* Renamed BA_FROSTJOKE to BA_FROSTJOKER (aegis server-side name)
 * Implemented a generic framework for parsing delimited db files (allows specifying min/max column ranges and max number of rows to read)
 * Corrected a typo in quest_update_objective()
 * Cleaned up pc.c a bit

git-svn-id: https://svn.code.sf.net/p/rathena/svn/trunk@12599 54d463be-8e91-2dee-dedb-b68131a5f0ec
2008-04-15 13:49:40 +00:00
FlavioJS
f2fd4cde62 * Fixed a possible crash in char_sql. (since r12575, later modified in r12590).
git-svn-id: https://svn.code.sf.net/p/rathena/svn/trunk@12593 54d463be-8e91-2dee-dedb-b68131a5f0ec
2008-04-14 20:22:48 +00:00
toms
73df203735 Fixed a memory leak in mapif_quests_fromsql
git-svn-id: https://svn.code.sf.net/p/rathena/svn/trunk@12592 54d463be-8e91-2dee-dedb-b68131a5f0ec
2008-04-14 15:01:04 +00:00
toms
92f9bf6a8c Fixed a typo in char_sql/char.c
git-svn-id: https://svn.code.sf.net/p/rathena/svn/trunk@12591 54d463be-8e91-2dee-dedb-b68131a5f0ec
2008-04-14 14:22:54 +00:00
toms
e61bf34e4f Fixed a bug in the disconnection part char-server (not sending you offline)
git-svn-id: https://svn.code.sf.net/p/rathena/svn/trunk@12590 54d463be-8e91-2dee-dedb-b68131a5f0ec
2008-04-14 13:48:25 +00:00
Kevin
a653b4e2d6 Removed some unused variables that appeared in the last commit (r12584).
git-svn-id: https://svn.code.sf.net/p/rathena/svn/trunk@12585 54d463be-8e91-2dee-dedb-b68131a5f0ec
2008-04-14 02:45:11 +00:00
Kevin
236c7cba43 Some more updates to the quest log system. It has been completely moved to the inter server instead of the char server.
git-svn-id: https://svn.code.sf.net/p/rathena/svn/trunk@12584 54d463be-8e91-2dee-dedb-b68131a5f0ec
2008-04-14 02:32:24 +00:00
FlavioJS
dcf71ce50b * Followup to r12579 (all other players appeared as female on sql branch).
git-svn-id: https://svn.code.sf.net/p/rathena/svn/trunk@12583 54d463be-8e91-2dee-dedb-b68131a5f0ec
2008-04-14 01:11:21 +00:00
Kevin
302adbf42a Major updates to the quest system.
git-svn-id: https://svn.code.sf.net/p/rathena/svn/trunk@12581 54d463be-8e91-2dee-dedb-b68131a5f0ec
2008-04-13 22:19:02 +00:00