8764 Commits

Author SHA1 Message Date
ai4rei
9aa76bdd13 * Added support for new /remove and /recall packets for 2010-08-03aRagexeRE and newer.
git-svn-id: https://svn.code.sf.net/p/rathena/svn/trunk@14620 54d463be-8e91-2dee-dedb-b68131a5f0ec
2010-12-25 01:40:35 +00:00
ai4rei
8af3da1d3e * Synchronized TXT/SQL char-server code a bit.
git-svn-id: https://svn.code.sf.net/p/rathena/svn/trunk@14619 54d463be-8e91-2dee-dedb-b68131a5f0ec
2010-12-25 01:08:36 +00:00
ai4rei
adb8fd5aa3 * Fixes to char-server.
- Removed unnecessary #includes from TXT and synchronized them with SQL.
- Fixed TXT having start Zeny of 500 instead of 0 by default (follow up to r4409 and r8420).
- Fixed TXT using 1024 instead of NAME_LENGTH for 'unknown_char_name' (follow up to r2191).
- Fixed SQL potentionally attempting to disconnect a player for account_id == 0 in changesex packet.
- Fixed SQL looking for option 'db_path' in 'inter_athena.conf' instead of 'char_athena.conf'.
- Fixed char select not sending a reply packet, when selected character was not found.
- Made use of safestrncpy instead of strcpy, strncpy and memset for copying strings where appropriate.
- Removed unused function 'chardb_final' in TXT (since r4878).
- Removed unnecessary WFIFOHEAD in char deletion in SQL (since r11245, related r9307 and r10909).

git-svn-id: https://svn.code.sf.net/p/rathena/svn/trunk@14618 54d463be-8e91-2dee-dedb-b68131a5f0ec
2010-12-24 23:04:35 +00:00
ai4rei
a45a6400e3 * Fixed server processing the sell list (deleting items and giving zeny) for script-controlled shops (OnSellItem), causing the controller script to fail (bugreport:4656, since r6557).
- This also makes the server first check the sell list and only continue, if all items can be processed, thus no longer causing incomplete deals and the need for client disconnection in such case (since r6557).

git-svn-id: https://svn.code.sf.net/p/rathena/svn/trunk@14617 54d463be-8e91-2dee-dedb-b68131a5f0ec
2010-12-23 16:05:49 +00:00
ai4rei
d23eafd077 * NPC shop buy list received from the client is now validated for scripted shops (OnBuyItem), before the control is transfered to the script, as well (bugreport:3680, since r5841, related r8525).
git-svn-id: https://svn.code.sf.net/p/rathena/svn/trunk@14616 54d463be-8e91-2dee-dedb-b68131a5f0ec
2010-12-22 23:05:50 +00:00
ai4rei
1e81541e66 * Resolved random compiler warnings.
- Silenced pointer size mismatch gcc warning for variables passed to script_setarray_pc (bugreport:4661, since r14613).

git-svn-id: https://svn.code.sf.net/p/rathena/svn/trunk@14615 54d463be-8e91-2dee-dedb-b68131a5f0ec
2010-12-22 14:06:37 +00:00
ai4rei
951823bbde * Fixed sql mapreg loading code specifying output buffer size for SqlStmt_BindColumn without zero-terminator, leading to truncations of variable names and/or their values when using the maximum length (bugreport:1939, since r11245).
git-svn-id: https://svn.code.sf.net/p/rathena/svn/trunk@14614 54d463be-8e91-2dee-dedb-b68131a5f0ec
2010-12-22 12:11:15 +00:00
ai4rei
b86d48e71a * Added script_setarray_pc for setting temporary character array variables outside of script.c without requiring them to use script-interal code (add_str and reference_uid).
- Applied script_setarray_pc to assignment of dynamic shop arrays (related r5841).

git-svn-id: https://svn.code.sf.net/p/rathena/svn/trunk@14613 54d463be-8e91-2dee-dedb-b68131a5f0ec
2010-12-21 23:23:06 +00:00
ai4rei
cbf4ef5dd5 * Replaced in-place generation of uid of script array elements with reference_uid macro (follow up to r10813).
git-svn-id: https://svn.code.sf.net/p/rathena/svn/trunk@14612 54d463be-8e91-2dee-dedb-b68131a5f0ec
2010-12-21 22:52:25 +00:00
ai4rei
7c90fd1bf1 * Fixed dynamic shop arrays @bought_nameid, @bought_quantity, @sold_nameid and @sold_quantity not getting reset to zero before use, thus providing attached script with wrong/old data, if it did not clear them by itself in previous call (bugreport:1574, since r5841).
git-svn-id: https://svn.code.sf.net/p/rathena/svn/trunk@14611 54d463be-8e91-2dee-dedb-b68131a5f0ec
2010-12-21 21:30:46 +00:00
ai4rei
2a043e4999 * Removed 'strsignal' forward-declaration from 'sig' plugin to prevent random gcc distributions from failing to compile due to mismatched declaration already present in <string.h> (bugreport:4644, topic:262284, follow up to r14591).
- Removed WIN32 conditions in non-WIN32 code in 'sig' plugin (follow up to r4380).

git-svn-id: https://svn.code.sf.net/p/rathena/svn/trunk@14610 54d463be-8e91-2dee-dedb-b68131a5f0ec
2010-12-21 10:04:10 +00:00
ai4rei
8643992d0b * Fixes to the dynamic shop sample script (first part of dynamic shop fixes).
- Fixed wrong check in ::OnSellItem, causing not-enough-items condition not getting detected (since r11829).
- Fixed an exploit in ::OnSellItem, causing Zeny to be given to the player, even if the items fail to delete (since r5842).
- Fixed missing 'close' in ::OnSellItem (since r5842).
- Replaced 'end' with 'close' in ::OnBuyItem (since r5842, followup to r11829).

git-svn-id: https://svn.code.sf.net/p/rathena/svn/trunk@14609 54d463be-8e91-2dee-dedb-b68131a5f0ec
2010-12-19 18:04:18 +00:00
ai4rei
e45ba2f126 * Replaced maximum script array size literals with a define (constant).
- Fixed an off-by-one mistake in copyarray, allowing to copy 1 element more into the target array, than allowed (since r10813).

git-svn-id: https://svn.code.sf.net/p/rathena/svn/trunk@14608 54d463be-8e91-2dee-dedb-b68131a5f0ec
2010-12-19 15:21:46 +00:00
ai4rei
08684261f6 * Renamed item array in 'struct guild_storage' from 'storage_' to 'items' to match 'struct storage_data' (related r12933).
git-svn-id: https://svn.code.sf.net/p/rathena/svn/trunk@14607 54d463be-8e91-2dee-dedb-b68131a5f0ec
2010-12-18 16:40:53 +00:00
ai4rei
30d36bd8a1 * Bunch of intif_parse_LoadGuildStorage fixes.
- Fixed guild storage not being sorted, when the storage had to be requested first (follow up to r14605).
- Fixed missing check, whether or not the character has already an open storage (follow up to r4562).
- Fixed missing GM trust check, whether or not the player is allowed to use guild storage (follow up to r3481).

git-svn-id: https://svn.code.sf.net/p/rathena/svn/trunk@14606 54d463be-8e91-2dee-dedb-b68131a5f0ec
2010-12-18 16:24:23 +00:00
ai4rei
9ae0e011e7 * Fixed character storage no longer being sorted (bugreport:1982, since r12950).
- Guild storage is now sorted before being displayed rather than after being saved...
- Merged storage_gsortitem into storage_sortitem.
- Added option 'client_sort_storage' to control storage sorting.

git-svn-id: https://svn.code.sf.net/p/rathena/svn/trunk@14605 54d463be-8e91-2dee-dedb-b68131a5f0ec
2010-12-18 15:20:31 +00:00
ai4rei
7ed6e26fb4 * Updates to handling of hair color/style and cloth color of characters.
- Moved limit shortcut defines from mmo.h to battle.h, as they are only required in files, which include battle.h (since pre-svn 2004/10/15).
- Moved hair style/color validation from char-server to map-server. This enables use of non-default limits as specified in battle config, rather than being restricted to hard-coded ones (bugreport:150).
- Cleaned up related capping of values in pc_changelook (related r1708).

git-svn-id: https://svn.code.sf.net/p/rathena/svn/trunk@14604 54d463be-8e91-2dee-dedb-b68131a5f0ec
2010-12-18 12:48:56 +00:00
ai4rei
1543efa34c * Fixed usage of literals for map name length in character list packet (since r14368).
git-svn-id: https://svn.code.sf.net/p/rathena/svn/trunk@14603 54d463be-8e91-2dee-dedb-b68131a5f0ec
2010-12-18 11:03:16 +00:00
ai4rei
867b706234 * Made the 'player not attached' script error also report the function it occured in, if available.
git-svn-id: https://svn.code.sf.net/p/rathena/svn/trunk@14602 54d463be-8e91-2dee-dedb-b68131a5f0ec
2010-12-18 01:19:16 +00:00
ai4rei
89dc57acdc * Fixed a crash, when script command 'doevent' is called without an attached player (bugreport:3973).
git-svn-id: https://svn.code.sf.net/p/rathena/svn/trunk@14601 54d463be-8e91-2dee-dedb-b68131a5f0ec
2010-12-17 23:41:02 +00:00
ai4rei
d59156d971 * Fixed label definitions silently overwriting built-in script functions (bugreport:2806, follow up to r8027).
git-svn-id: https://svn.code.sf.net/p/rathena/svn/trunk@14600 54d463be-8e91-2dee-dedb-b68131a5f0ec
2010-12-17 22:54:13 +00:00
ai4rei
ddbbf5e603 * Added temporary check to skill_delunitgroup to prevent crashes when 'group' is NULL and added some debug messages to track down the source of the crash (bugreport:3504).
git-svn-id: https://svn.code.sf.net/p/rathena/svn/trunk@14599 54d463be-8e91-2dee-dedb-b68131a5f0ec
2010-12-17 20:04:26 +00:00
ai4rei
59e20f2496 * Spellchecked script_commands.txt.
git-svn-id: https://svn.code.sf.net/p/rathena/svn/trunk@14598 54d463be-8e91-2dee-dedb-b68131a5f0ec
2010-12-17 13:55:04 +00:00
ai4rei
f964fb6ec2 * Random script engine clean-ups that have accumulated over time.
- Resolved unnecessary script_getnum re-evaluation in a loop in script command 'npcshopdelitem' (since r7120).
- Script commands 'menu', 'select' and 'prompt' now warn, when there are more menu options, than the client can handle correctly (TODO from r10316).

git-svn-id: https://svn.code.sf.net/p/rathena/svn/trunk@14597 54d463be-8e91-2dee-dedb-b68131a5f0ec
2010-12-17 12:40:38 +00:00
ai4rei
6269cfe730 * Added missing pet db documentation for fields 'attack_rate', 'defence_attack_rate', 'change_target_rate', 'pet_script' and 'loyal_script' based on the one provided by frenzmu06 (bugreport:4636, follow up to r13752).
git-svn-id: https://svn.code.sf.net/p/rathena/svn/trunk@14596 54d463be-8e91-2dee-dedb-b68131a5f0ec
2010-12-17 00:51:00 +00:00
ai4rei
7502f6c185 * Reverted r14525 (introduction of SV_READDB_MAX_FIELDS) because it causes confusion to certain group of users and depends on MAX_LEVEL since r14526.
- Made sv_readdb be able to process any amount of columns instead.

git-svn-id: https://svn.code.sf.net/p/rathena/svn/trunk@14595 54d463be-8e91-2dee-dedb-b68131a5f0ec
2010-12-16 22:53:42 +00:00
ai4rei
9eeaa7dc47 * Fixed a mistake in sv_split, causing CR being recognized as EOL character, even when only LF was specified (since r12459).
git-svn-id: https://svn.code.sf.net/p/rathena/svn/trunk@14594 54d463be-8e91-2dee-dedb-b68131a5f0ec
2010-12-16 20:55:41 +00:00
ai4rei
ddca23e35d * Corrected type of second argument of script command 'setbattleflag' from string to number (bugreport:4640, topic:261833, since r5407, related r14577).
git-svn-id: https://svn.code.sf.net/p/rathena/svn/trunk@14593 54d463be-8e91-2dee-dedb-b68131a5f0ec
2010-12-15 23:50:42 +00:00
ai4rei
98c85e0d33 * Fixed missing check in cooking, causing cooking kit requirement could be bypassed by sending 0x25b (CZ_REQ_MAKINGITEM) directly (bugreport:4642, since r13628).
git-svn-id: https://svn.code.sf.net/p/rathena/svn/trunk@14592 54d463be-8e91-2dee-dedb-b68131a5f0ec
2010-12-15 19:33:27 +00:00
ai4rei
af9699058d * Fixed plugin 'sig' not being compilable on Mac OS X, due to different return value type of 'strsignal' (bugreport:4637).
git-svn-id: https://svn.code.sf.net/p/rathena/svn/trunk@14591 54d463be-8e91-2dee-dedb-b68131a5f0ec
2010-12-13 20:57:21 +00:00
ai4rei
7e97934f53 * Added pet_db2.txt to make it apparent, that pet db has support for customs as well.
- Fixed typo 'HungeyDelay' into 'HungryDelay' in pet database description (bugreport:4636, since r13752).

git-svn-id: https://svn.code.sf.net/p/rathena/svn/trunk@14590 54d463be-8e91-2dee-dedb-b68131a5f0ec
2010-12-13 10:58:56 +00:00
ai4rei
63d3ed791c * Fixed homunculus_autoloot not working with skill/item granted drops and loot (bugreport:4452, since r12203).
git-svn-id: https://svn.code.sf.net/p/rathena/svn/trunk@14589 54d463be-8e91-2dee-dedb-b68131a5f0ec
2010-12-12 21:14:16 +00:00
ai4rei
23ac179cf0 * Fixed killed monsters were assumed to be killed by homunculus only, if no damage log entries were elligible for exp distribution, even when no homunculus took part in damage dealing (bugreport:4452, since r12203).
git-svn-id: https://svn.code.sf.net/p/rathena/svn/trunk@14588 54d463be-8e91-2dee-dedb-b68131a5f0ec
2010-12-12 21:09:55 +00:00
ai4rei
c457a39996 * Added enumeration for monster damage log field 'flag'.
* Corrected wording of the setting homunculus_autoloot (since r12203).

git-svn-id: https://svn.code.sf.net/p/rathena/svn/trunk@14587 54d463be-8e91-2dee-dedb-b68131a5f0ec
2010-12-12 20:22:25 +00:00
ai4rei
e7fec551b1 * Removed disabled backup of script command 'isequipped' (since r1605).
git-svn-id: https://svn.code.sf.net/p/rathena/svn/trunk@14586 54d463be-8e91-2dee-dedb-b68131a5f0ec
2010-12-12 18:06:14 +00:00
ai4rei
edfc3293e5 * Made script engine's DEBUG_DISASM block use script_op2name, rather than hardcoding operator names as per TODO from r13083 (related r9569, follow up to r10667).
git-svn-id: https://svn.code.sf.net/p/rathena/svn/trunk@14585 54d463be-8e91-2dee-dedb-b68131a5f0ec
2010-12-12 16:09:18 +00:00
ai4rei
b19741a68a * Cleaned up MOTD reading (related r292 and r4552).
- Added a warning for common client crash caused by the sequence ' :' in MOTD.

git-svn-id: https://svn.code.sf.net/p/rathena/svn/trunk@14584 54d463be-8e91-2dee-dedb-b68131a5f0ec
2010-12-12 14:53:57 +00:00
ai4rei
6a0558d0c2 * Fixed impossible condition in soundeffect script command (since athena-dev-2.1.1-mod1046, related r5841).
git-svn-id: https://svn.code.sf.net/p/rathena/svn/trunk@14583 54d463be-8e91-2dee-dedb-b68131a5f0ec
2010-12-12 13:48:14 +00:00
ai4rei
adc89d50f4 * Updates to the playBGM functionality (since r14335).
- Removed impossible condition in playBGM script command (from soundeffect).
- Removed unused code (retrieving of a bl) in playBGMall (from soundeffectall).
- Made playBGMall default to 'entire server' when both map name and coordinates are omitted instead of printing an error.
- Updated documentation for playBGM and playBGMall to match actual behavior.
- Removed unused parameter 'bl' in clif_playBGM.

git-svn-id: https://svn.code.sf.net/p/rathena/svn/trunk@14582 54d463be-8e91-2dee-dedb-b68131a5f0ec
2010-12-12 13:10:08 +00:00
ai4rei
6aabf7c260 * Fixed script command setd always assuming value parameter to be a string, which causes hexadecimal and octal numbers not being handled properly (topic:261833, followup to r14577 and r14578).
git-svn-id: https://svn.code.sf.net/p/rathena/svn/trunk@14581 54d463be-8e91-2dee-dedb-b68131a5f0ec
2010-12-12 01:38:41 +00:00
ai4rei
c961604f0b * Removed motd from ragsrvinfo table in main.sql, missed in previous commit (follow up to r14579).
git-svn-id: https://svn.code.sf.net/p/rathena/svn/trunk@14580 54d463be-8e91-2dee-dedb-b68131a5f0ec
2010-12-12 00:58:24 +00:00
ai4rei
d173283814 * Updates to dynamic server information ragsrvinfo on SQL.
- Fixed exp and drop rates (int) getting truncated (short) when sent to char-server.
- Removed `motd` from `ragsrvinfo` as it is not dynamically changed by the server and as such can be read by 3rd party applications directly from conf/motd.txt if required.

git-svn-id: https://svn.code.sf.net/p/rathena/svn/trunk@14579 54d463be-8e91-2dee-dedb-b68131a5f0ec
2010-12-12 00:44:38 +00:00
brianluau
8c9202976a - Fixed argument declaration of 'setd' (topic:261833, related r14573).
git-svn-id: https://svn.code.sf.net/p/rathena/svn/trunk@14578 54d463be-8e91-2dee-dedb-b68131a5f0ec
2010-12-12 00:12:10 +00:00
ai4rei
6a684a566b * Added support for checking argument data type of built-in script functions (bugreport:1701, topic:261833, related r14573).
git-svn-id: https://svn.code.sf.net/p/rathena/svn/trunk@14577 54d463be-8e91-2dee-dedb-b68131a5f0ec
2010-12-11 21:52:27 +00:00
ai4rei
72e7dce800 * Fixed error message in intif_parse_mercenary_received printing wrong struct size (bugreport:4633, since r13116).
git-svn-id: https://svn.code.sf.net/p/rathena/svn/trunk@14576 54d463be-8e91-2dee-dedb-b68131a5f0ec
2010-12-11 12:13:20 +00:00
ai4rei
806daea231 * Replaced buildin_getpartyname_sub, buildin_getguildname_sub and buildin_getguildmaster_sub, which create only unnecessary overhead, with equivalent inlined code.
- Fixed a memory leak in getguildmasterid, when the guild leader was not online (bugreport:2743).
- Command getguildmasterid no longer requires the guild leader to be online.

git-svn-id: https://svn.code.sf.net/p/rathena/svn/trunk@14575 54d463be-8e91-2dee-dedb-b68131a5f0ec
2010-12-11 01:23:38 +00:00
ai4rei
f27307a8cf * Fixed bAutoSpellOnSkill bonuses not working independently of each other (bugreport:4617, since r13596, related r14536).
git-svn-id: https://svn.code.sf.net/p/rathena/svn/trunk@14574 54d463be-8e91-2dee-dedb-b68131a5f0ec
2010-12-11 00:07:25 +00:00
ai4rei
e560ba458b * Revised argument declaration of all script commands according to the actual functions' argument usage.
- Fixed many script commands with fixed amount of optional parameters to no longer accept any amount of arguments (faulty declaration).
- Corrected use of dummy parameter for guildopenstorage in scripts.

git-svn-id: https://svn.code.sf.net/p/rathena/svn/trunk@14573 54d463be-8e91-2dee-dedb-b68131a5f0ec
2010-12-10 22:29:12 +00:00
ai4rei
a322c9e9f1 * Applied update to charhelp.txt provided by EvilPuncker to match current charcommand behavior (bugreport:4632, follow up to r13403).
git-svn-id: https://svn.code.sf.net/p/rathena/svn/trunk@14572 54d463be-8e91-2dee-dedb-b68131a5f0ec
2010-12-10 16:59:20 +00:00
ai4rei
522a51bb10 * Removed some of the duplicate, storage-related packet code.
- Removed clif_guildstoragelist and adjusted clif_storagelist to be able to handle any kind of storage.
- Removed clif_guildstorageitemadded in favor of clif_storageitemadded.
- This also fixes clif_guildstorageitemadded sending old update packet for clients prior 20090603, although packet 0x1c4 (ZC_ADD_ITEM_TO_STORE2) was added before PACKETVER 5 (before 2003-11-03aSakexe, exact addition date unknown) (since r14286).

git-svn-id: https://svn.code.sf.net/p/rathena/svn/trunk@14571 54d463be-8e91-2dee-dedb-b68131a5f0ec
2010-12-09 23:18:03 +00:00