summaryrefslogtreecommitdiff
path: root/src/map/unit.c
AgeCommit message (Collapse)AuthorFilesLines
2006-04-20- Added back the "you can't walk delay while attacking" to ↵skotlex1-3/+1
unit_attack_timer, now when you want to walk during your attack animation, you will only stop attacking, you will have to click again to move. git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@6185 54d463be-8e91-2dee-dedb-b68131a5f0ec
2006-04-17- skill_clear_unitgroup is now invoked in unit_remove_map only on death if ↵skotlex1-2/+5
the applicable battle setting is set. It is now also invoked in unit_free. - Changed setting clear_unit_ondeath to a type 4 (bl-based) which defaults to BL_ALL. - Fixed Absorb spirit sphere not working on mobs, thanks to Vividd. - Cleared the ud->target on pc_stop_attack to prevent attack resuming an other such oddities. git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@6145 54d463be-8e91-2dee-dedb-b68131a5f0ec
2006-04-17- Fixed pet being incorrectly removed when it had intimacy 0.skotlex1-1/+1
git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@6139 54d463be-8e91-2dee-dedb-b68131a5f0ec
2006-04-17- Added state.running to unit_data to make it easier to check for running ↵skotlex1-43/+68
characters (saves having to get the sc data and check for the corresponding timer all the time) - removed pc_run, pc_walktodir, replaced with unit_run. - moved the code that makes you walk that extra cell to unit_stop_walking, which is now invoked before resetting the walk-target. - Flag &2 in unit_stop_walking is now to make the character force-move that extra tile if the walkpath pos is 0 at hit time. - Added variable walk_count to unit_data to be use as a counter for cells walked for walk-triggered skills (walk path_pos is not good enough since it keeps resetting each time the walk path is updated) - Increased WALK_SKILL_INTERVAL to 5 (it is the closest value that makes the average mob trigger a chase skill every second) git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@6137 54d463be-8e91-2dee-dedb-b68131a5f0ec
2006-04-17- Fixed TK_RUN having a cast-bar when attempting to stop-running and ↵skotlex1-4/+8
generating timer_delete errors when halting as well. git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@6135 54d463be-8e91-2dee-dedb-b68131a5f0ec
2006-04-17- Fixed the first call to the walk timers having the tick interval halved, ↵skotlex1-5/+14
which made all walking timers be off by half cell with the actual position displayed client-side. - Changed the data component of the walktoxy timers to hold the speed (timer interval) so that when you are halted when walking, if you have walked more than half the distance to the next cell, your position is fixed at the next cell. - If you are halted (damaged) while walking and before reaching the first cell of your walking path, then you are halted at the next cell, this effectively will block stun-lock regardless of aspd of the attacker. git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@6127 54d463be-8e91-2dee-dedb-b68131a5f0ec
2006-04-16- Cleared ud->target on remove-map, it should fix the phantom mob sprite issue.skotlex1-3/+7
git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@6102 54d463be-8e91-2dee-dedb-b68131a5f0ec
2006-04-13- Changed slave chasing from using unit_walktobl to map_search_freecell + ↵skotlex1-1/+1
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://rathena.svn.sourceforge.net/svnroot/rathena/trunk@6024 54d463be-8e91-2dee-dedb-b68131a5f0ec
2006-04-11- Changed clif_damage/clif_skill_damage to return the walk-delay based on ↵skotlex1-41/+2
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://rathena.svn.sourceforge.net/svnroot/rathena/trunk@5997 54d463be-8e91-2dee-dedb-b68131a5f0ec
2006-04-11- Added ers handling for skill_timerskill structures.skotlex1-2/+0
git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@5995 54d463be-8e91-2dee-dedb-b68131a5f0ec
2006-04-11- Modified unit_walktoxy_sub to always move at least one cell when a large ↵skotlex1-10/+5
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://rathena.svn.sourceforge.net/svnroot/rathena/trunk@5987 54d463be-8e91-2dee-dedb-b68131a5f0ec
2006-04-11- Multiple optimizations to the unit_data auto-chase upgrade, also ↵skotlex1-109/+95
simplified the mob and pet ai routines. - Simplified the walk routines to half the number of timers required for walking. git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@5982 54d463be-8e91-2dee-dedb-b68131a5f0ec
2006-04-11- Finished fixing the unit_data auto-case update. Still need to do some ↵skotlex1-3/+13
optimizations... but the current code-base should be usable. git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@5981 54d463be-8e91-2dee-dedb-b68131a5f0ec
2006-04-11- Fixes to the unit_data update that lets characters auto-chase while attacking.skotlex1-25/+16
git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@5980 54d463be-8e91-2dee-dedb-b68131a5f0ec
2006-04-10- Modified the unit_data structure to handle automatically switching between ↵skotlex1-24/+203
chasing and attacking a character. Note that it's a work in progress and not yet properly tested/finished... git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@5979 54d463be-8e91-2dee-dedb-b68131a5f0ec
2006-04-07- Fixed pc_setpos ignoring the clrtype sent to it.skotlex1-2/+2
- 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://rathena.svn.sourceforge.net/svnroot/rathena/trunk@5945 54d463be-8e91-2dee-dedb-b68131a5f0ec
2006-04-01- Added structure view_data to handle sprite information for all characters ↵skotlex1-103/+24
(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://rathena.svn.sourceforge.net/svnroot/rathena/trunk@5833 54d463be-8e91-2dee-dedb-b68131a5f0ec
2006-03-30- the auth function in login.c won't jstrescapecpy passwords that were ↵skotlex1-3/+3
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://rathena.svn.sourceforge.net/svnroot/rathena/trunk@5813 54d463be-8e91-2dee-dedb-b68131a5f0ec
2006-03-29- Some cleaning of the mob_ai. Mobs should stop chasing once you are beyond ↵skotlex1-3/+3
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://rathena.svn.sourceforge.net/svnroot/rathena/trunk@5796 54d463be-8e91-2dee-dedb-b68131a5f0ec
2006-03-28- Fixed Wedding support skills healing yourself instead of partner.skotlex1-3/+3
- Added a check to prevent knocking back the Emperium at all costs. git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@5792 54d463be-8e91-2dee-dedb-b68131a5f0ec
2006-03-28- Fixed summon mobs being able to cast "summon" skills.skotlex1-0/+9
- Summoned mobs will inherit the size and ai properties of the master. git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@5790 54d463be-8e91-2dee-dedb-b68131a5f0ec
2006-03-26- Walk/move functions will abort now when an area npc script triggers and ↵skotlex1-4/+8
moves the character out of the map. git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@5750 54d463be-8e91-2dee-dedb-b68131a5f0ec
2006-03-25- Incremented the number of iterations to find a random stop to 100 as 50 ↵skotlex1-1/+0
seems to no be enough for certain maps. - Fixed iteminfo only displaying first result when there were many. git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@5744 54d463be-8e91-2dee-dedb-b68131a5f0ec
2006-03-24Replaced !sd->special_state.nocastcancel2 && something to ↵blackhole891-2/+2
(sd->special_state.nocastcancel2 || something). git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@5733 54d463be-8e91-2dee-dedb-b68131a5f0ec
2006-03-24- Added function map_search_freecell to locate an available cell around an ↵skotlex1-17/+19
area (for recall/warping skills) git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@5732 54d463be-8e91-2dee-dedb-b68131a5f0ec
2006-03-24- Some small, insignificant code cleanups in unit.cskotlex1-16/+15
git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@5730 54d463be-8e91-2dee-dedb-b68131a5f0ec
2006-03-24- Fixed a crash in unit_useskill_pos2skotlex1-1/+1
git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@5725 54d463be-8e91-2dee-dedb-b68131a5f0ec
2006-03-23* Minor cleanups.Lance1-1/+1
git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@5712 54d463be-8e91-2dee-dedb-b68131a5f0ec
2006-03-23- Changed Preserve's cost to 30spskotlex1-1/+1
- 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://rathena.svn.sourceforge.net/svnroot/rathena/trunk@5708 54d463be-8e91-2dee-dedb-b68131a5f0ec
2006-03-22- Merged the unit_data structure from jA for handling unit-related data ↵skotlex1-0/+1680
(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://rathena.svn.sourceforge.net/svnroot/rathena/trunk@5707 54d463be-8e91-2dee-dedb-b68131a5f0ec