3058 Commits

Author SHA1 Message Date
ultramage
67cb0da56c Corrected a TXT compilation problem caused by r12023 (mail system code is not present in TXT builds).
git-svn-id: https://svn.code.sf.net/p/rathena/svn/trunk@12026 54d463be-8e91-2dee-dedb-b68131a5f0ec
2008-01-06 23:01:58 +00:00
ultramage
0848355f90 Extended the id range for npcs, now [400,700) will also be treated as NPC objects (see topic:170845 and bugreport:727).
Silenced a compilation warning.

git-svn-id: https://svn.code.sf.net/p/rathena/svn/trunk@12025 54d463be-8e91-2dee-dedb-b68131a5f0ec
2008-01-06 22:08:23 +00:00
ultramage
a4007e12d4 Expanded the poor "npc_touch_areanpc : some bug" with info about which cell exactly caused the problem.
git-svn-id: https://svn.code.sf.net/p/rathena/svn/trunk@12024 54d463be-8e91-2dee-dedb-b68131a5f0ec
2008-01-06 21:14:54 +00:00
zephyrus
825d214242 - Fixed a visual itemdupple bug on mail system.
- Fixed Overthrusth status cannot being recalled at same skill lvl.

git-svn-id: https://svn.code.sf.net/p/rathena/svn/trunk@12023 54d463be-8e91-2dee-dedb-b68131a5f0ec
2008-01-06 16:43:02 +00:00
ultramage
144afd8189 Cleaned up mob_once_spawn() and mob_once_spawn_area().
- now they use mapid instead of mapname as input parameter
- moved the responsibility to perform "this" -> mapid resolution to the caller
- added a pair of swap() operations to prevent working with a negative-dimensioned area (fixes bugreport:87)

git-svn-id: https://svn.code.sf.net/p/rathena/svn/trunk@12022 54d463be-8e91-2dee-dedb-b68131a5f0ec
2008-01-06 16:37:06 +00:00
ultramage
65834585a8 Modified showmsg code to not attach a timestamp to MSG_NONE-type messages, generated by ShowMessage(). It now works exactly like printf().
Removed/replaced all printf calls in the code.
Added a new flag to setting 'console_silent', for filtering debug messages.
Silenced the "Broken pipe found" and "Server running in debug mode" messages.

git-svn-id: https://svn.code.sf.net/p/rathena/svn/trunk@12020 54d463be-8e91-2dee-dedb-b68131a5f0ec
2008-01-06 14:19:26 +00:00
ultramage
f0038722a3 Corrected one place belonging to the no-stacking mod that I missed when doing the mapcell update (followup to r12003).
Added info from newest clients to packet db.

git-svn-id: https://svn.code.sf.net/p/rathena/svn/trunk@12015 54d463be-8e91-2dee-dedb-b68131a5f0ec
2008-01-05 21:41:22 +00:00
ultramage
23e02001cf Fixed a bad allocation line, which in my case resulted in trashing several ingame objects when doing @reloadmobdb.
git-svn-id: https://svn.code.sf.net/p/rathena/svn/trunk@12013 54d463be-8e91-2dee-dedb-b68131a5f0ec
2008-01-04 19:39:02 +00:00
ultramage
51e05f0fcf Fixed a typo in r12008 causing server crashes when sending the fake npc packet.
git-svn-id: https://svn.code.sf.net/p/rathena/svn/trunk@12012 54d463be-8e91-2dee-dedb-b68131a5f0ec
2008-01-04 17:11:01 +00:00
ultramage
24ee182b90 Waterball code cleanup (see bugreport:707)
git-svn-id: https://svn.code.sf.net/p/rathena/svn/trunk@12011 54d463be-8e91-2dee-dedb-b68131a5f0ec
2008-01-04 16:57:53 +00:00
ultramage
c29f4e1823 Fixed a mistake in r11991 that let knockback work through walls
git-svn-id: https://svn.code.sf.net/p/rathena/svn/trunk@12010 54d463be-8e91-2dee-dedb-b68131a5f0ec
2008-01-04 13:00:49 +00:00
ultramage
e7bb626a80 Modified the map_setcell() code to to use a boolean flag instead of needing SET_ / CLR_ pairs of defines (topic:174323).
Also removed script object 'setcell', added script function 'setcell'.
- Now you can manipulate cell information without needing @loadnpc
- You can also manipulate the terrain ('gat') type itself, using the new cell_walkable, cell_shootable and cell_water constants
  (currently the implementation uses bit flags too, so to get the type you want, you need to adjust the flags one by one)
- This breaks current scripts, so please adjust places that use setcell
  (also be sure to _only_ use predefined constants, not direct numbers)
- Details can be found in the script reference.

git-svn-id: https://svn.code.sf.net/p/rathena/svn/trunk@12009 54d463be-8e91-2dee-dedb-b68131a5f0ec
2008-01-04 12:41:49 +00:00
skotlex
416f151368 - Fixed clif_sendfakenpc not being updated for PACKETVER 9
git-svn-id: https://svn.code.sf.net/p/rathena/svn/trunk@12008 54d463be-8e91-2dee-dedb-b68131a5f0ec
2008-01-04 09:47:39 +00:00
skotlex
de7ce05609 - Fixed Music Lesson's effect on Assassin Cross of Sunset.
- Fixed a possible crash in status_change_timer when debug mode is disabled.


git-svn-id: https://svn.code.sf.net/p/rathena/svn/trunk@12006 54d463be-8e91-2dee-dedb-b68131a5f0ec
2008-01-04 09:33:24 +00:00
ultramage
6bf267e60e Changes to reduce the number of map cell types
- Pneuma now again works via status change (see r3969)
- removed unused CELL_SAFETYWALL
- removed custom CELL_REGEN, it just increased regen rate (r1192, r1518)

git-svn-id: https://svn.code.sf.net/p/rathena/svn/trunk@12005 54d463be-8e91-2dee-dedb-b68131a5f0ec
2008-01-03 23:27:22 +00:00
ultramage
c2dfc595b1 Fixed npc unloading not clearing NPC touch cells (bugreport:595).
Added a comment to npc_unsetcells(), pointing out that it's most likely not scanning for cells correctly.

git-svn-id: https://svn.code.sf.net/p/rathena/svn/trunk@12004 54d463be-8e91-2dee-dedb-b68131a5f0ec
2008-01-03 22:00:59 +00:00
ultramage
8fdc689343 Map cell mechanism rewrite
- defined a data structure for map cells (replaces 3 various cell arrays)
- both terrain (gat) and dynamic (cell) information is now stored as C-style bit flags instead of #defines and bitmasks
- added map_gat2cell() and map_cell2gat() for terrain type conversions
- changing terrain information via 'setcell' is temporarily disabled
- mapserver startup now takes longer, as it needs to adapt mapcache data to internal representation, cell by cell (new mapcache format anyone?)

git-svn-id: https://svn.code.sf.net/p/rathena/svn/trunk@12003 54d463be-8e91-2dee-dedb-b68131a5f0ec
2008-01-03 21:36:40 +00:00
ultramage
8f1eaa3d67 Moved extra junk from map_addblock/map_delblock to where it logically belongs (loadendack/unit_remove_map), removed flags and _sub macros
git-svn-id: https://svn.code.sf.net/p/rathena/svn/trunk@12002 54d463be-8e91-2dee-dedb-b68131a5f0ec
2008-01-03 20:56:20 +00:00
ultramage
ca115ffc82 Removed map_data's block_count, as (quote Yor/ja2160), "Perhaps useful for debug, but uses memory AND CPU for nothing." (block lists are linked lists, they don't need count tracking)
git-svn-id: https://svn.code.sf.net/p/rathena/svn/trunk@12001 54d463be-8e91-2dee-dedb-b68131a5f0ec
2008-01-03 20:43:25 +00:00
FlavioJS
1c3b249328 * Added code to reject double logins in clif_parse_WantToConnection and added debug messages to detect possible double logins that escaped.
* Isolated accounts that are waiting for the quit ack. The rest of the game logic no longer has access to them though the id2sd/charid2sd dbs.

git-svn-id: https://svn.code.sf.net/p/rathena/svn/trunk@11998 54d463be-8e91-2dee-dedb-b68131a5f0ec
2007-12-31 19:23:34 +00:00
FlavioJS
b465fb5f30 * Fixed get_val2 not using the stack, which automatically frees the data, causing memory leaks for string variables since r11976. (bugreport:723 , part of bugreport:714 and part of bugreport:708)
git-svn-id: https://svn.code.sf.net/p/rathena/svn/trunk@11997 54d463be-8e91-2dee-dedb-b68131a5f0ec
2007-12-30 21:14:09 +00:00
ultramage
470a56dbea Implemented THE official Steal skill equation and game mechanics (basically version from /stable plus a few tweaks) (see topic:116540).
Added missing bAddStealRate reference to doc/item_bonus.txt.
Removed skill_steal_rate, as it was never used in the code (see r231).
Removed skill_steal_type, it's just a one-liner source mod (see r231).

git-svn-id: https://svn.code.sf.net/p/rathena/svn/trunk@11992 54d463be-8e91-2dee-dedb-b68131a5f0ec
2007-12-29 22:30:29 +00:00
ultramage
bad3a0c04e Knockback now works through cells where there is a diagonal path, but no horizontal+vertical alternative (like two perpendicular icewalls with a gap where they 'join').
Some dead code removal in path.c.

git-svn-id: https://svn.code.sf.net/p/rathena/svn/trunk@11991 54d463be-8e91-2dee-dedb-b68131a5f0ec
2007-12-29 20:12:46 +00:00
FlavioJS
548e1bfd28 * Reverted a bad modification in clif_produceeffect from r11290.
git-svn-id: https://svn.code.sf.net/p/rathena/svn/trunk@11988 54d463be-8e91-2dee-dedb-b68131a5f0ec
2007-12-28 14:43:15 +00:00
ultramage
d75169014a Removed an incorrect range check and fixed a copypaste typo which caused script engine errors / crashes (see r11984)
git-svn-id: https://svn.code.sf.net/p/rathena/svn/trunk@11987 54d463be-8e91-2dee-dedb-b68131a5f0ec
2007-12-27 18:45:33 +00:00
ultramage
f16dcdf4d5 Re-added a missing mob last_thinktime timer initialization when a mob spawns, causing mob AI to freeze (mistake in r11964)
git-svn-id: https://svn.code.sf.net/p/rathena/svn/trunk@11986 54d463be-8e91-2dee-dedb-b68131a5f0ec
2007-12-27 18:00:29 +00:00
FlavioJS
b6c11a8282 * Corrected description of scope and npc variables in script_commands.txt.
* Made temporary character string variables not have a limited length. (now all temporary string variables don't have limited length)
* Made temporary character variables reuse free positions.

git-svn-id: https://svn.code.sf.net/p/rathena/svn/trunk@11984 54d463be-8e91-2dee-dedb-b68131a5f0ec
2007-12-27 05:47:50 +00:00
FlavioJS
4dcf5bb0b9 * Tweeked the declaration and initialization defines for vectors.
* Made do_sockets leave the for loop as soon as the readable number of sockets returned by select is found.
* Made all posix compliant systems that support it and FreeBSD >= 5.1 (implements it but doesn't have the posix defines) use the precise and consistent tick() implementation.
* Minor tweek to HEAP_SEARCH (same variable can be used in from and to).
* Fixed the map server not exiting when make_listen_bind fails and returns -1.

git-svn-id: https://svn.code.sf.net/p/rathena/svn/trunk@11983 54d463be-8e91-2dee-dedb-b68131a5f0ec
2007-12-27 03:35:57 +00:00
ultramage
a91d8177c6 Fixed the incorrect interpretation of the map-cell height information stored in .gat files; this was causing an overall of 20000 cells to be treated as water when officially they aren't.
A full mapcache rebuild is needed to apply this change.

git-svn-id: https://svn.code.sf.net/p/rathena/svn/trunk@11982 54d463be-8e91-2dee-dedb-b68131a5f0ec
2007-12-26 21:51:58 +00:00
ultramage
7906017662 Moved distance-related functions to path.c/h
git-svn-id: https://svn.code.sf.net/p/rathena/svn/trunk@11981 54d463be-8e91-2dee-dedb-b68131a5f0ec
2007-12-26 17:18:57 +00:00
FlavioJS
214feac880 * Fixed string variables dereferencing directly to the value instead of dereferencing to a copy of the value. (fixes bugreport:684 bugreport:641)
git-svn-id: https://svn.code.sf.net/p/rathena/svn/trunk@11976 54d463be-8e91-2dee-dedb-b68131a5f0ec
2007-12-26 00:55:27 +00:00
ultramage
67088ee436 some minor cleaning of player variable loading/saving
git-svn-id: https://svn.code.sf.net/p/rathena/svn/trunk@11975 54d463be-8e91-2dee-dedb-b68131a5f0ec
2007-12-24 22:51:43 +00:00
skotlex
1d73a777c6 - Fixed horrible handling of skill_abra_db which leads to memory corruption (depending on the contents of yor abra_db.txt file)
git-svn-id: https://svn.code.sf.net/p/rathena/svn/trunk@11970 54d463be-8e91-2dee-dedb-b68131a5f0ec
2007-12-23 16:32:45 +00:00
skotlex
81e5c08f4f - Fixed warning about unused variable
- Made the kaahi heal timer function uncrashable.
- Fixed pc move item to cart function checking against the wrong max index.
- Fixed initialization of sd issue in map_addblock
- Removed redundant reinitialization when parsing item pickup.


git-svn-id: https://svn.code.sf.net/p/rathena/svn/trunk@11968 54d463be-8e91-2dee-dedb-b68131a5f0ec
2007-12-23 11:06:58 +00:00
ultramage
f9c52aa0aa Fixed droprate overflows when going over rate 2000x
git-svn-id: https://svn.code.sf.net/p/rathena/svn/trunk@11966 54d463be-8e91-2dee-dedb-b68131a5f0ec
2007-12-22 21:24:40 +00:00
skotlex
146ca072bb - Corrected mob spawn utilization of the delay1/delay2 values (one is respawn delay base, the second is random variance added on top of it). Cleaned up related code.
- Changed abit map_add_block to prevent adding a player object which is invalid (not authed, waiting to be disconnected)


git-svn-id: https://svn.code.sf.net/p/rathena/svn/trunk@11964 54d463be-8e91-2dee-dedb-b68131a5f0ec
2007-12-22 18:08:37 +00:00
ultramage
e0611bf8b5 Fixed server not always sending the correct level values to the client.
git-svn-id: https://svn.code.sf.net/p/rathena/svn/trunk@11963 54d463be-8e91-2dee-dedb-b68131a5f0ec
2007-12-22 17:30:49 +00:00
ultramage
08980b13b3 Fixed non-skill splash attacks showing 'unknown skill' (bugreport:665)
git-svn-id: https://svn.code.sf.net/p/rathena/svn/trunk@11961 54d463be-8e91-2dee-dedb-b68131a5f0ec
2007-12-22 16:05:47 +00:00
ultramage
0d011cc9b2 forgot path.h ._.
git-svn-id: https://svn.code.sf.net/p/rathena/svn/trunk@11959 54d463be-8e91-2dee-dedb-b68131a5f0ec
2007-12-22 13:05:51 +00:00
ultramage
b3b275f24f Path code cleaning...
* Added map/path.h, moved path-related function headers to path.h.
 * Removed the macroed _real() path functions.
 * Modified some functions to use boolean return values instead of 1/0 or 0/-1.
 * Modified path_search_long() to allow a NULL output pointer (in which case a temporary local buffer will be used instead).
 * Removed an unused ->path_half member variable from struct walkpath_data.

git-svn-id: https://svn.code.sf.net/p/rathena/svn/trunk@11958 54d463be-8e91-2dee-dedb-b68131a5f0ec
2007-12-22 13:00:48 +00:00
ultramage
db3db2c2e5 Fixed mob AI code iterating over non-mob objects without checking, when monster_ai flag 0x20 is set (caused by r11943)
Cleaned up macros that wrap unit_stop_attack() (bugreport:357)

git-svn-id: https://svn.code.sf.net/p/rathena/svn/trunk@11957 54d463be-8e91-2dee-dedb-b68131a5f0ec
2007-12-22 09:00:57 +00:00
ultramage
9a8739d28e Fixed some formatting glitches in atcommand.c
git-svn-id: https://svn.code.sf.net/p/rathena/svn/trunk@11956 54d463be-8e91-2dee-dedb-b68131a5f0ec
2007-12-19 22:15:27 +00:00
ultramage
6730ae32cc Fixed yet another buffer overflow, in @adopt
(caused by a conflict between a mass replace in r2207 and very dumb variable reuse in r1316)

git-svn-id: https://svn.code.sf.net/p/rathena/svn/trunk@11955 54d463be-8e91-2dee-dedb-b68131a5f0ec
2007-12-19 20:56:37 +00:00
skotlex
c5415465da - Corected the SC_MIRACLE + Anger code using the wrong skill level to calculate damage bonus.
- Corrected SC_MIRACLE to trigger Bless of the Stars on all defeated mobs.


git-svn-id: https://svn.code.sf.net/p/rathena/svn/trunk@11950 54d463be-8e91-2dee-dedb-b68131a5f0ec
2007-12-19 16:41:56 +00:00
skotlex
a6875211ef - Fixed skill name for skill 39 (MC_PUSHCART)
- Corrected some formatting in a few entries in skill_db (TODO: if you really want to format the file to have file names aligned, spaces should be used instead of tabs, like it was done for GD/HLIF skills!)
- Corrected placement of leveled up mobs bonus exp
- Fixed a possible crash when parsing MSC_MASTERATTACKED mob skills.


git-svn-id: https://svn.code.sf.net/p/rathena/svn/trunk@11949 54d463be-8e91-2dee-dedb-b68131a5f0ec
2007-12-19 13:10:48 +00:00
ultramage
ff2ae0fe05 Fixed a possible buffer overflow in @partyoption code.
git-svn-id: https://svn.code.sf.net/p/rathena/svn/trunk@11947 54d463be-8e91-2dee-dedb-b68131a5f0ec
2007-12-18 22:06:36 +00:00
Playtester
4703cc8e2e * Updated respawn time interpretation according to latest kRO update
- this first time is the "min respawn time"
- the second time is the "variance" which is added to the "min respawn time"

git-svn-id: https://svn.code.sf.net/p/rathena/svn/trunk@11946 54d463be-8e91-2dee-dedb-b68131a5f0ec
2007-12-18 21:22:29 +00:00
skotlex
ece12b6e42 - Cleaned up a bit the format of skill_db.txt (that comma next to the skill name looks ugly if you ask me)
- Corrected skill_db reading to properly trim the skill name/descs.
- Added a mobid_db in map.c to handle mob lookups faster.


git-svn-id: https://svn.code.sf.net/p/rathena/svn/trunk@11943 54d463be-8e91-2dee-dedb-b68131a5f0ec
2007-12-18 15:45:48 +00:00
skotlex
ace81763bc - removed redundant clif_hominfo line in merc_hom_dead (it was sent already from hom_damage)
- Item usage is now blocked while hidden.
- Moved the bladestop/berserk check from clif_parse_EquipItem to pc_equipitem


git-svn-id: https://svn.code.sf.net/p/rathena/svn/trunk@11942 54d463be-8e91-2dee-dedb-b68131a5f0ec
2007-12-18 15:01:18 +00:00
ultramage
acad1ac4dd minor code tweaking
git-svn-id: https://svn.code.sf.net/p/rathena/svn/trunk@11936 54d463be-8e91-2dee-dedb-b68131a5f0ec
2007-12-18 09:13:01 +00:00