4932 Commits

Author SHA1 Message Date
ultramage
8e35ca3ebb Added skillunit_db for efficient execution of skill_unit_timer() (followup to r13503).
git-svn-id: https://svn.code.sf.net/p/rathena/svn/trunk@13504 54d463be-8e91-2dee-dedb-b68131a5f0ec
2009-01-31 19:31:30 +00:00
ultramage
54993d74aa objects[] array removal (bugreport:2559)
- Removed the 2 MB wide static array in favor of a general-purpose DBMap (id_db for now).
- Inlined functions map_addobject, map_delobject and map_delobjectnofree into their callers' code.
- Replaced the free id lookup algorithm from ancient jathena with something more efficient.
- Moved the algorithm to map_get_new_object_id() (similar idea as r13481).

git-svn-id: https://svn.code.sf.net/p/rathena/svn/trunk@13503 54d463be-8e91-2dee-dedb-b68131a5f0ec
2009-01-31 15:48:04 +00:00
ultramage
f4a36b9b63 Fixed mob_spawn_dataset() not initializing the spawn_timer variable (followup to r13497).
git-svn-id: https://svn.code.sf.net/p/rathena/svn/trunk@13498 54d463be-8e91-2dee-dedb-b68131a5f0ec
2009-01-29 01:05:29 +00:00
zephyrus
dfe943a397 - Fixed a little spawn_timer bug. Discovered with a previous fix from ultramage and because of this spawn line:
npc/mobs/fields/prontera.txt:
prt_fild06,222,30,40,10	monster	Green Plant	1080,15,900000,450000,1

This is an impossible spawn area, and the engine just keep trying each 5 seconds to spawn it again.
So we need to fix this line with a correct spawn too.

git-svn-id: https://svn.code.sf.net/p/rathena/svn/trunk@13497 54d463be-8e91-2dee-dedb-b68131a5f0ec
2009-01-29 00:13:25 +00:00
zephyrus
96c953126c - Implemented monster skill "Full Heal" NPC_ALLHEAL.
git-svn-id: https://svn.code.sf.net/p/rathena/svn/trunk@13493 54d463be-8e91-2dee-dedb-b68131a5f0ec
2009-01-25 20:14:19 +00:00
zephyrus
c728878085 - Ops... missing var from my source. Sorry.
git-svn-id: https://svn.code.sf.net/p/rathena/svn/trunk@13492 54d463be-8e91-2dee-dedb-b68131a5f0ec
2009-01-25 20:07:55 +00:00
zephyrus
d4c7aad803 - Implemented new Pet Bonus System. Enjoy!! :D
git-svn-id: https://svn.code.sf.net/p/rathena/svn/trunk@13491 54d463be-8e91-2dee-dedb-b68131a5f0ec
2009-01-25 20:06:13 +00:00
zephyrus
ede9af3b29 - Implemented new item bonus scripts required for battlegrounds.
- Battlegrounds items rewards for Tierra Valley and Flavius done (but autoscript rate is suggested - 5%).
- Restricted trade/storage/drop for those items.

git-svn-id: https://svn.code.sf.net/p/rathena/svn/trunk@13490 54d463be-8e91-2dee-dedb-b68131a5f0ec
2009-01-25 19:50:02 +00:00
FlavioJS
743de085b2 * Changed pc_spiritball_timer and pc_addspiritball: (bugreport:2705)
- don't make assumptions about the calling order of timers
- ensure that sd->spirit_timer is is ordered by expiration time

git-svn-id: https://svn.code.sf.net/p/rathena/svn/trunk@13485 54d463be-8e91-2dee-dedb-b68131a5f0ec
2009-01-24 23:43:27 +00:00
FlavioJS
9a8c2a60c9 * Changed the variables of the mapcache structs to fixed size equivalents. (64bit portability issue)
git-svn-id: https://svn.code.sf.net/p/rathena/svn/trunk@13483 54d463be-8e91-2dee-dedb-b68131a5f0ec
2009-01-24 19:38:48 +00:00
FlavioJS
58e4991d42 * Changed all uses of struct skill_unit_group* to group_id in status_change_entry's. (last known 64bit portability issue)
git-svn-id: https://svn.code.sf.net/p/rathena/svn/trunk@13482 54d463be-8e91-2dee-dedb-b68131a5f0ec
2009-01-24 17:38:17 +00:00
FlavioJS
1a2d2c0d4e * Changed npc_get_new_npc_id to ensure that it never returns invalid/used ids.
- npc_get_new_npc_id is used to generate ids for npcs/mobs/homunculus/mercenaries/pets. If the server runs for long enough (years to months or less, depending on settings), the auxiliary variable npc_id will eventually overflow and go negative, then go through the range of object ids, then through the range of account ids. This can lead to all sorts of random crashes and memory leaks.

git-svn-id: https://svn.code.sf.net/p/rathena/svn/trunk@13481 54d463be-8e91-2dee-dedb-b68131a5f0ec
2009-01-23 17:49:44 +00:00
ultramage
47fad03c47 Added a missing break; in pc_setstat, messing up LUK increasing (see r13460) (bugreport:2697).
Corrected clif_bladestop(), void function returning a value (see r13471) (bugreport:2698).
Fixed npcs with touch area not stopping walk timers (see r6516) (bugreport:2700).

git-svn-id: https://svn.code.sf.net/p/rathena/svn/trunk@13480 54d463be-8e91-2dee-dedb-b68131a5f0ec
2009-01-23 11:53:52 +00:00
FlavioJS
e3d5e89496 * Changed val4 of SC_BLADESTOP from a block_list pointer to an id. (64bit portability issue and potential dangling pointer crash)
git-svn-id: https://svn.code.sf.net/p/rathena/svn/trunk@13471 54d463be-8e91-2dee-dedb-b68131a5f0ec
2009-01-22 09:37:47 +00:00
FlavioJS
672dbf2946 * Added a limit of 1MB of pending data in the write fifo for non-server sockets. Connections that go over the limit are closed.
git-svn-id: https://svn.code.sf.net/p/rathena/svn/trunk@13469 54d463be-8e91-2dee-dedb-b68131a5f0ec
2009-01-21 15:18:51 +00:00
ultramage
9c255d04a4 Fixed a null pointer crash in r13463 (thanks to Ramsey for reporting it).
git-svn-id: https://svn.code.sf.net/p/rathena/svn/trunk@13467 54d463be-8e91-2dee-dedb-b68131a5f0ec
2009-01-21 07:58:50 +00:00
FlavioJS
69720a42bf * Replaced the fake timer heap (sorted array) with a real heap. (improves performance)
git-svn-id: https://svn.code.sf.net/p/rathena/svn/trunk@13465 54d463be-8e91-2dee-dedb-b68131a5f0ec
2009-01-21 01:21:24 +00:00
FlavioJS
013d104eff * Added a generic binary heap implementation based on defines. (round 2)
git-svn-id: https://svn.code.sf.net/p/rathena/svn/trunk@13464 54d463be-8e91-2dee-dedb-b68131a5f0ec
2009-01-21 00:35:33 +00:00
ultramage
dfe2b1edaa Efficiency improvement for clif_send (use pc_db iterator instead of sockets array).
git-svn-id: https://svn.code.sf.net/p/rathena/svn/trunk@13463 54d463be-8e91-2dee-dedb-b68131a5f0ec
2009-01-20 21:55:07 +00:00
FlavioJS
d60b27d27d * Added a generic binary heap implementation based on defines.
git-svn-id: https://svn.code.sf.net/p/rathena/svn/trunk@13462 54d463be-8e91-2dee-dedb-b68131a5f0ec
2009-01-20 21:14:13 +00:00
ultramage
9640df0422 Fixed pc_statusup2 to correctly update the client's stat window
- was sending the increment value instead of the new value itself (bugreport:2614)
- wasn't refreshing the increase cost indicator (bugreport:2644)
- wasn't handling stats above 255 correctly

git-svn-id: https://svn.code.sf.net/p/rathena/svn/trunk@13460 54d463be-8e91-2dee-dedb-b68131a5f0ec
2009-01-20 13:53:28 +00:00
ultramage
ee76a93424 Fixed a boolean operator mistake in @memo command, caused by r11625 (bugreport:2681).
git-svn-id: https://svn.code.sf.net/p/rathena/svn/trunk@13459 54d463be-8e91-2dee-dedb-b68131a5f0ec
2009-01-20 11:33:57 +00:00
zephyrus
551e20a850 - Added support for item effect Ignore Def Rate by Race. bonus2 bIgnoreDefRate,<race>,<%>;
- Added support for item status effects on skills. bonus3 bAddEff,<sc_effect>,<rate>,ATF_SKILL;
- Update to battleground equipment.

git-svn-id: https://svn.code.sf.net/p/rathena/svn/trunk@13457 54d463be-8e91-2dee-dedb-b68131a5f0ec
2009-01-20 02:19:05 +00:00
sketchyphoenix
21b7ebe262 Updated script_commands.txt with the book reading command info.
Added/reworded/removed comments to/in/from r13450

git-svn-id: https://svn.code.sf.net/p/rathena/svn/trunk@13451 54d463be-8e91-2dee-dedb-b68131a5f0ec
2009-01-15 12:31:10 +00:00
sketchyphoenix
feb6e94bf5 #commands used by nonGM players now appear in the chat like normal
rather than being processed and ultimately failed, printing out
	  failed command messages that should be visible to only GMs. (bugreport:2637)

git-svn-id: https://svn.code.sf.net/p/rathena/svn/trunk@13450 54d463be-8e91-2dee-dedb-b68131a5f0ec
2009-01-14 15:18:04 +00:00
FlavioJS
e478e97941 * Added client login packets 0x01fa and 0x027c.
* Other minor cleanups.

git-svn-id: https://svn.code.sf.net/p/rathena/svn/trunk@13449 54d463be-8e91-2dee-dedb-b68131a5f0ec
2009-01-14 14:03:06 +00:00
sketchyphoenix
7ffc67deaa Corrected a typo in r13444
git-svn-id: https://svn.code.sf.net/p/rathena/svn/trunk@13448 54d463be-8e91-2dee-dedb-b68131a5f0ec
2009-01-14 13:37:23 +00:00
ultramage
09be248ca5 Fixed Sql_SetEncoding() returning SQL_ERROR when it succeeds and vice versa (thanks to Rail for noticing it).
git-svn-id: https://svn.code.sf.net/p/rathena/svn/trunk@13447 54d463be-8e91-2dee-dedb-b68131a5f0ec
2009-01-13 15:44:47 +00:00
FlavioJS
e64c3496a8 * Cleaned up command @users/#users:
- displays everything on the target user (self for @users)
- uses a static array instead of a temporary DBMap
- displays percentages with precision of 0.01%
- uses safesnprintf instead of sprintf

git-svn-id: https://svn.code.sf.net/p/rathena/svn/trunk@13446 54d463be-8e91-2dee-dedb-b68131a5f0ec
2009-01-13 12:53:11 +00:00
ultramage
95d25086a6 Mobs with nonzero spawn time can now be cached as well, saving some more cpu/memory (bugreport:1197).
Fixed dynamic mobs being unloaded without stopping their respawn timer.

git-svn-id: https://svn.code.sf.net/p/rathena/svn/trunk@13445 54d463be-8e91-2dee-dedb-b68131a5f0ec
2009-01-13 10:38:54 +00:00
sketchyphoenix
753620d68c * #command parsing cleaned up.
- Fixed charname reading problems from r13441 
- Corrected agitend typo to agitend2 (bugreport:2654)

git-svn-id: https://svn.code.sf.net/p/rathena/svn/trunk@13444 54d463be-8e91-2dee-dedb-b68131a5f0ec
2009-01-12 17:49:10 +00:00
ultramage
b80a8cdc87 Added regen_db to reduce hp/sp processing delays (bugreport:2256).
git-svn-id: https://svn.code.sf.net/p/rathena/svn/trunk@13443 54d463be-8e91-2dee-dedb-b68131a5f0ec
2009-01-12 14:26:33 +00:00
sketchyphoenix
3547890011 bugreport:2637
git-svn-id: https://svn.code.sf.net/p/rathena/svn/trunk@13441 54d463be-8e91-2dee-dedb-b68131a5f0ec
2009-01-11 19:07:16 +00:00
sketchyphoenix
800a0366a5 Added @charcommands to return a list of available charcommands (bugreport:2630)
git-svn-id: https://svn.code.sf.net/p/rathena/svn/trunk@13435 54d463be-8e91-2dee-dedb-b68131a5f0ec
2009-01-05 19:10:03 +00:00
ultramage
578532f577 Moved the 'changed' mailbox flag from shared mmo.h to mapserver-only.
git-svn-id: https://svn.code.sf.net/p/rathena/svn/trunk@13433 54d463be-8e91-2dee-dedb-b68131a5f0ec
2009-01-05 15:34:09 +00:00
ultramage
f9d21826b8 Fixed @mobsearch and @showmobs (bugreport:2481)
- now only search for mobs on the same map as the caller
- now properly distinguish between dead and alive mobs

git-svn-id: https://svn.code.sf.net/p/rathena/svn/trunk@13432 54d463be-8e91-2dee-dedb-b68131a5f0ec
2009-01-05 11:13:14 +00:00
FlavioJS
89d683d668 * Changes to the script engine:
- new stack datatype script_retinfo for C_RETINFO to hold all the return state info that was being stored in the stack. (the script engine in 64bit-ready now)
- pop_stack is responsible for adjusting all the stack pointers.
- push_* returns the created script_data.
- 'return' only converts to value scope variables of the current scope.

git-svn-id: https://svn.code.sf.net/p/rathena/svn/trunk@13427 54d463be-8e91-2dee-dedb-b68131a5f0ec
2008-12-31 15:54:33 +00:00
FlavioJS
cb8ef12df8 * Changes to the script engine:
- script ends when run_func can't find the buildin command. (script engine error)
- run_script_main doesn't change RERUNLINE to RUN automatically, the buildin command that set it is responsible for that now. The buildin command can use this to detect a rerun.
- created functions to alloc/free a script_state.

git-svn-id: https://svn.code.sf.net/p/rathena/svn/trunk@13426 54d463be-8e91-2dee-dedb-b68131a5f0ec
2008-12-30 03:27:46 +00:00
sketchyphoenix
77044b9042 Removed a trailing argument left in r13420
git-svn-id: https://svn.code.sf.net/p/rathena/svn/trunk@13425 54d463be-8e91-2dee-dedb-b68131a5f0ec
2008-12-30 02:13:01 +00:00
ultramage
c0c7bb3166 Fixed broken card insert code (bugreport:2606).
git-svn-id: https://svn.code.sf.net/p/rathena/svn/trunk@13421 54d463be-8e91-2dee-dedb-b68131a5f0ec
2008-12-29 21:10:37 +00:00
sketchyphoenix
590bdb332d * Added missing command #delitem.
* Fixed charcommand behavior where those that can accept a name with no additional parameters 
	  being able to execute under said player's name with the name as a parameter.(bugreport:2601)

git-svn-id: https://svn.code.sf.net/p/rathena/svn/trunk@13420 54d463be-8e91-2dee-dedb-b68131a5f0ec
2008-12-29 04:36:14 +00:00
sketchyphoenix
472769518b Corrected typo in @adjcmdlvl's parameter check.
git-svn-id: https://svn.code.sf.net/p/rathena/svn/trunk@13419 54d463be-8e91-2dee-dedb-b68131a5f0ec
2008-12-28 23:06:10 +00:00
ultramage
ac66afa042 Cleaned up code for inserting cards into items.
git-svn-id: https://svn.code.sf.net/p/rathena/svn/trunk@13418 54d463be-8e91-2dee-dedb-b68131a5f0ec
2008-12-28 23:04:50 +00:00
zephyrus
d33dce2ac2 - Book reading script command.
git-svn-id: https://svn.code.sf.net/p/rathena/svn/trunk@13417 54d463be-8e91-2dee-dedb-b68131a5f0ec
2008-12-28 17:08:51 +00:00
FlavioJS
7263ae4f45 * Extended sv_escape_c to escape '\a','\b','\t','\v','\f','\?' characters to their respective representations instead of octal.
git-svn-id: https://svn.code.sf.net/p/rathena/svn/trunk@13414 54d463be-8e91-2dee-dedb-b68131a5f0ec
2008-12-25 22:05:16 +00:00
sketchyphoenix
4a5a9de682 * Charcommands no longer default to self if no target is found.
git-svn-id: https://svn.code.sf.net/p/rathena/svn/trunk@13413 54d463be-8e91-2dee-dedb-b68131a5f0ec
2008-12-25 21:38:51 +00:00
sketchyphoenix
b9a1343eaa * Added a few missing atcommands.
* Added more commands to configurations (bugreport:2565)
	* Added a missing charcommand symbol config to atcommand configs.
	* GM command configs under the old format will have a warning printed back to the console as being deprecated.
	* Other fixes/cleaning partially resolving bugreport:2549

git-svn-id: https://svn.code.sf.net/p/rathena/svn/trunk@13409 54d463be-8e91-2dee-dedb-b68131a5f0ec
2008-12-23 02:06:21 +00:00
ultramage
285441dd41 Fixed incorrect usage of sv_escape_c() in TXT's login_log function, which produced malformed log entries (caused by r12489).
git-svn-id: https://svn.code.sf.net/p/rathena/svn/trunk@13408 54d463be-8e91-2dee-dedb-b68131a5f0ec
2008-12-22 16:42:56 +00:00
FlavioJS
d55642d64c * Extended how duplicates work: (based on Orcao's work in bugreport:2361) [FlavioJS]
- you can duplicate warps/shops/cashshops/npcs (before only npcs could be duplicated)
- warp duplicates inherit the target location
- shop/cashshop duplicates inherit the item list
- npc duplicates inherit the script code (backward compatible behaviour)
- updated script_commands.txt with the information

git-svn-id: https://svn.code.sf.net/p/rathena/svn/trunk@13407 54d463be-8e91-2dee-dedb-b68131a5f0ec
2008-12-20 22:57:29 +00:00
ultramage
99fd15915e some minor generic cleanups
git-svn-id: https://svn.code.sf.net/p/rathena/svn/trunk@13406 54d463be-8e91-2dee-dedb-b68131a5f0ec
2008-12-20 20:50:26 +00:00