23 Commits

Author SHA1 Message Date
skotlex
0a5c14f801 - Changed slave chasing from using unit_walktobl to map_search_freecell + unit_walktoxy, since the previous behaviour makes all slaves always end up on the same cell.
- Changed some function declarations to take x,y arguments as short rather than int.


git-svn-id: https://svn.code.sf.net/p/rathena/svn/trunk@6024 54d463be-8e91-2dee-dedb-b68131a5f0ec
2006-04-13 00:45:55 +00:00
skotlex
a489ed4364 - Changed clif_damage/clif_skill_damage to return the walk-delay based on the passed on damage-delay.
- Changed battle_damage to accept the walk-delay as well.
- Removed the walk-delay timers from unit.c, merged them to battle_delay_damage.
- Traps will not be displayed when you walk within their range.
- Added HT_DETECTING revealing traps.


git-svn-id: https://svn.code.sf.net/p/rathena/svn/trunk@5997 54d463be-8e91-2dee-dedb-b68131a5f0ec
2006-04-11 23:58:55 +00:00
skotlex
3a0621b9ae - Added ers handling for skill_timerskill structures.
git-svn-id: https://svn.code.sf.net/p/rathena/svn/trunk@5995 54d463be-8e91-2dee-dedb-b68131a5f0ec
2006-04-11 20:33:19 +00:00
skotlex
d3db62a041 - Modified unit_walktoxy_sub to always move at least one cell when a large chaserange is specified to prevent possible infinite loops where attack_timer says you are not within range, but unit_walktoxy says you are.
git-svn-id: https://svn.code.sf.net/p/rathena/svn/trunk@5987 54d463be-8e91-2dee-dedb-b68131a5f0ec
2006-04-11 16:52:52 +00:00
skotlex
42c6f89d86 - Multiple optimizations to the unit_data auto-chase upgrade, also simplified the mob and pet ai routines.
- Simplified the walk routines to half the number of timers required for walking.


git-svn-id: https://svn.code.sf.net/p/rathena/svn/trunk@5982 54d463be-8e91-2dee-dedb-b68131a5f0ec
2006-04-11 04:10:41 +00:00
skotlex
3acdfa691b - Finished fixing the unit_data auto-case update. Still need to do some optimizations... but the current code-base should be usable.
git-svn-id: https://svn.code.sf.net/p/rathena/svn/trunk@5981 54d463be-8e91-2dee-dedb-b68131a5f0ec
2006-04-11 02:32:30 +00:00
skotlex
e68983a063 - Fixes to the unit_data update that lets characters auto-chase while attacking.
git-svn-id: https://svn.code.sf.net/p/rathena/svn/trunk@5980 54d463be-8e91-2dee-dedb-b68131a5f0ec
2006-04-11 00:27:15 +00:00
skotlex
418c98ea0a - Modified the unit_data structure to handle automatically switching between chasing and attacking a character. Note that it's a work in progress and not yet properly tested/finished...
git-svn-id: https://svn.code.sf.net/p/rathena/svn/trunk@5979 54d463be-8e91-2dee-dedb-b68131a5f0ec
2006-04-10 21:38:05 +00:00
skotlex
4dc9cb89ad - Fixed pc_setpos ignoring the clrtype sent to it.
- unit_free will now use clear type 3 for players (warping out effect)
- You can't invite someone to a guild now within Guild Castles.


git-svn-id: https://svn.code.sf.net/p/rathena/svn/trunk@5945 54d463be-8e91-2dee-dedb-b68131a5f0ec
2006-04-07 15:40:55 +00:00
skotlex
e9c44b50c8 - Added structure view_data to handle sprite information for all characters (equipment, weapons, hair, dyes, etc). Unified a bunch of clif functions now that you only need to handle the view_data (so instead of clif_spawn[pc/mob/npc/pet] you just have clif_spawn)
- Fixed the clif_change_class packet (it should check for non players classes, not a class above MAX_PC_CLASS), it fixes morphing enemies.
- Rewrote the way cloth dye packets are resent to optimize bandwidth usage.
- Fixed the npc_item_flag thing (enable_items/disable_items script command)
- Rewrote the disguise implementation to be bandwidth friendly.
- Modified the hide options to change your class to INVISIBLE_CLASS, since such classes don't even get their view packets sent around.
- Rewrote several clif functions to adapt to the new view_data class;
- Added class 139 to npcdb_checkid which was required by some npcs in the swordman quest? o.O


git-svn-id: https://svn.code.sf.net/p/rathena/svn/trunk@5833 54d463be-8e91-2dee-dedb-b68131a5f0ec
2006-04-01 02:23:56 +00:00
skotlex
39d33a2f80 - the auth function in login.c won't jstrescapecpy passwords that were encrypted.
- Moved the Endure and Gravitation sc ends to battle_damage from pc_damage.
- Endure level 11 and above are now considered infinite-endure.
- Set the minimum pet hungry delay to 10
- modified function skill_delayfix to only receive skill/lv, actual time is now always acquired from skill_get_delay. It also now will never return a value below min_skill_delay_limit.
- Modified brandish spear so you won't see the skill-animation for every targetted mob. Also cleaned it up to use map_foreachincell calls.
- splitted skill_cast_fix into skill_cast_fix and skill_cast_fix_sc, the first does cast adjustments based on dex and server settings, the later only based on sc changes. Mobs use the later while everyone else use the former (which invokes the later when appropiate)
- Added the Steel Body icon to auto-berserk.
- Now you can't cast auto-counter while the previous one is active.
- For the duration of Berserk, infinite-endure is activated.
- Added Veider's suggestion to do a hack-report when players request the name of an invisible/cloaked character.


git-svn-id: https://svn.code.sf.net/p/rathena/svn/trunk@5813 54d463be-8e91-2dee-dedb-b68131a5f0ec
2006-03-30 15:50:54 +00:00
skotlex
b286e0af1e - Some cleaning of the mob_ai. Mobs should stop chasing once you are beyond their min_chase range. Improved rude-attacked checking when mobs can't move.
- range3 is now used as min-chase value of mobs.
- Added a debug message when status_change_timer fails.
- Fixed tick direct modifications increasing duration instead of decreasing it.
- Fixed inf2 of Jump-Kick to make it a "combo-skill" so that it may do a BCT_ENEMY check.
- When sd->state.skill_flag is set, auto-targetting through combo-skills is disabled. 
- You can't SG_FEEL maps already memorized.


git-svn-id: https://svn.code.sf.net/p/rathena/svn/trunk@5796 54d463be-8e91-2dee-dedb-b68131a5f0ec
2006-03-29 14:53:22 +00:00
skotlex
286820f191 - Fixed Wedding support skills healing yourself instead of partner.
- Added a check to prevent knocking back the Emperium at all costs.


git-svn-id: https://svn.code.sf.net/p/rathena/svn/trunk@5792 54d463be-8e91-2dee-dedb-b68131a5f0ec
2006-03-28 20:26:50 +00:00
skotlex
15092b4955 - Fixed summon mobs being able to cast "summon" skills.
- Summoned mobs will inherit the size and ai properties of the master.


git-svn-id: https://svn.code.sf.net/p/rathena/svn/trunk@5790 54d463be-8e91-2dee-dedb-b68131a5f0ec
2006-03-28 15:49:36 +00:00
skotlex
6bdbd8646b - Walk/move functions will abort now when an area npc script triggers and moves the character out of the map.
git-svn-id: https://svn.code.sf.net/p/rathena/svn/trunk@5750 54d463be-8e91-2dee-dedb-b68131a5f0ec
2006-03-26 03:37:02 +00:00
skotlex
13e8924fa0 - Incremented the number of iterations to find a random stop to 100 as 50 seems to no be enough for certain maps.
- Fixed iteminfo only displaying first result when there were many.


git-svn-id: https://svn.code.sf.net/p/rathena/svn/trunk@5744 54d463be-8e91-2dee-dedb-b68131a5f0ec
2006-03-25 03:19:47 +00:00
blackhole89
5fe56e275c Replaced !sd->special_state.nocastcancel2 && something to (sd->special_state.nocastcancel2 || something).
git-svn-id: https://svn.code.sf.net/p/rathena/svn/trunk@5733 54d463be-8e91-2dee-dedb-b68131a5f0ec
2006-03-24 18:35:14 +00:00
skotlex
77e57852cc - Added function map_search_freecell to locate an available cell around an area (for recall/warping skills)
git-svn-id: https://svn.code.sf.net/p/rathena/svn/trunk@5732 54d463be-8e91-2dee-dedb-b68131a5f0ec
2006-03-24 18:20:55 +00:00
skotlex
38a6abcd3f - Some small, insignificant code cleanups in unit.c
git-svn-id: https://svn.code.sf.net/p/rathena/svn/trunk@5730 54d463be-8e91-2dee-dedb-b68131a5f0ec
2006-03-24 14:16:54 +00:00
skotlex
0f19e9bbe5 - Fixed a crash in unit_useskill_pos2
git-svn-id: https://svn.code.sf.net/p/rathena/svn/trunk@5725 54d463be-8e91-2dee-dedb-b68131a5f0ec
2006-03-24 04:44:42 +00:00
Lance
b8116f49db * Minor cleanups.
git-svn-id: https://svn.code.sf.net/p/rathena/svn/trunk@5712 54d463be-8e91-2dee-dedb-b68131a5f0ec
2006-03-23 07:08:31 +00:00
skotlex
b6ff4970fa - Changed Preserve's cost to 30sp
- Fixed Arrow Shower, UNT_MAGIC_SKILLS was renamed to UNT_ATTACK_SKILLS
- Fixed skill_use_pos checking target tile CELL_CHKNOPASS as invalid instead of CELL_CHKNOREACH


git-svn-id: https://svn.code.sf.net/p/rathena/svn/trunk@5708 54d463be-8e91-2dee-dedb-b68131a5f0ec
2006-03-23 01:56:52 +00:00
skotlex
7a8371273a - Merged the unit_data structure from jA for handling unit-related data (attack times, walking, auto-attack timers, skill related data)
- Modified unit_skillcastcancel to receive flag&2, which stands for "cancel casting only if current skill is cancellable"
- Battle config options changed from yes/no to BL_TYPE settings: skillrange_by_distance, skill_noreiteration, skill_nofootset, gvg_traps_target_all, skill_log, attack_direction_change, auto_counter_type
- Clif.c will disconnect sessions that send an unknown command packet above 0x30000 instead of just ignoring it.
- Cleaned up/rewrite of the pet ai, same for pet_calc_pos
- Implemented use of mob variable attacked_players as it is used on jA
- Cleaned up error reporting during mob-skill loading to be less spamy with non-loaded mobs.
- Corrected water_height reading. I forgot to give credits to LittleWolf for providing the water-reading function :X


git-svn-id: https://svn.code.sf.net/p/rathena/svn/trunk@5707 54d463be-8e91-2dee-dedb-b68131a5f0ec
2006-03-22 23:58:16 +00:00