summaryrefslogtreecommitdiff
path: root/src/map/unit.h
AgeCommit message (Collapse)AuthorFilesLines
2008-08-24- Implemented unit_calc_pos (copy from pet_calc_pos) to implement it on ↵zephyrus1-0/+1
Mercenary/Homunculus and don't use x,y-1 always. - Implemented Mercenary walk to master (same packet as Homunculus). - Starting work on Stats but i will need lot of help. git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@13121 54d463be-8e91-2dee-dedb-b68131a5f0ec
2008-04-02* Added more debug information to track the double remove_map'sFlavioJS1-1/+2
git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@12457 54d463be-8e91-2dee-dedb-b68131a5f0ec
2008-03-24* Reorganized the contents of the mapserver's header files.ultramage1-0/+50
- map.h is no longer a generic dumping spot of all the shared structs, and instead, each such structure now resides in its logical component - map.h now only holds mostly map-related things (needs more cleaning) - there's still a lot of room for improvement (reorganization within individual header files, etc...) git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@12429 54d463be-8e91-2dee-dedb-b68131a5f0ec
2008-02-21- Fixed new guilds displaying online-connect member count at 0 rather than ↵skotlex1-0/+3
1, and the guild master not knowing it is one (eg: it cannot edit the guild notice of a newly created guild until relogging). - Fixed acc_reg2 parsing screwing up the char_id and subtracting 2 from it rather than passing it as it is. - Extended the auth_node/auth_db system in chrif.c to handle log in/out and mapserver-change procedures. This way players are not in the main dbs when they are not "active", which blocks potential invalid accesses to them. - Replaced states auth, waiting_disconnect and finalsave with active. - Cleaned some the party/guild login and creation procedures, removed the party_sent/guild_sent states. - Removed a redundant guild_check_member call which is beyond not-needed and into the realm of wasting resources. - clif_parse will no longer process packets from !sd->state.active players, this also makes checking for finalsave uneccessary (since players re already removed from the maps and dbs by this point, so you can't access them in any other way) - Separated the roles of unit_free and map_quit, the former will handle cleaning structures from the player so it can be free'd safely, while the latter performs additional routines which are unique to characters logging out normally (map-server changes will invoke unit_free and bypass map_quit). - Removed pc_isplaying, quit_db, map_knowsaccount, MAPIT_PCISPLAYING among other functions/defines which are no longer needed due to the new login scheme. - Cleand up a bit some code in the clif_send(_sub) functions. git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@12223 54d463be-8e91-2dee-dedb-b68131a5f0ec
2007-12-22Path code cleaning...ultramage1-2/+2
* 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://rathena.svn.sourceforge.net/svnroot/rathena/trunk@11958 54d463be-8e91-2dee-dedb-b68131a5f0ec
2007-10-18Fixed some gcc-specific stuff, silenced some more warningsultramage1-3/+3
git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@11515 54d463be-8e91-2dee-dedb-b68131a5f0ec
2007-10-18Fixed numerous /W4 warnings (and created more :)ultramage1-13/+13
git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@11514 54d463be-8e91-2dee-dedb-b68131a5f0ec
2007-08-19* Cleaned/clarified some #include relationships between headersultramage1-1/+3
* Changed clif_sitting() to use 'bl' instead of 'sd' (for non-player objects) * Removed way messed-up script function 'unitdeadsit' * Tagged 'FIXME' lines written by myself git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@11040 54d463be-8e91-2dee-dedb-b68131a5f0ec
2007-02-21Applied a consistent look to all header files (copyright, ifdefs)ultramage1-2/+3
git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@9891 54d463be-8e91-2dee-dedb-b68131a5f0ec
2007-01-16- Added function unit_escape to simplify the run-away code a bit in the mob ai.skotlex1-0/+1
- Some cleaning on the mob_ai to enable mobs to run away from their current target when they are rude-attacked by them. git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@9658 54d463be-8e91-2dee-dedb-b68131a5f0ec
2006-12-31* Refer to http://www.eathena.ws/board/index.php?showtopic=130285FlavioJS1-1/+1
- Renamed pc_checkweighticon to pc_updateweightstatus and cleaned it. - Updated pc_is50overweight to use battle_config.natural_heal_weight_rate. - Added 90% weight check when attacking. git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@9600 54d463be-8e91-2dee-dedb-b68131a5f0ec
2006-09-07- Removed the Warmth "stacking" code.skotlex1-2/+1
- Added back the effect of /doridori to skill-SP regen - Implemented a rough version of Angel of the Sun/Moon/Stars, it has a low chance of triggering on doridori-boosted SP-regen events. - Added sg_angel_skill_ratio to specify rate at which the Angel skill triggers. - Added unit_cancel_combo which takes care of ending a combo time and resuming normal attack 'inmediately' - Cleaned up some the SG_HATE code, you can't change hate targets anymore. - Increased duration of Miracle of the Sun/Moon/Stars to one hour. git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@8664 54d463be-8e91-2dee-dedb-b68131a5f0ec
2006-08-18- Little code cleanuptoms1-0/+2
- Cleaned merc_hom_evolution to avoid free'ing/realloc'ing - Fixed "args of aFree is freed pointer" on Homunc deletion git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@8341 54d463be-8e91-2dee-dedb-b68131a5f0ec
2006-08-18- Changed unit_free so that it receives which cleartype should be used when ↵skotlex1-1/+1
the character is still on a map. Used this on status_damage so that mobs that do not respawn when killed will properly display the death animation. - Should have fixed the signed/unsigned comparison warnings in the main regen function. - Fixed Energy Coat consuming 10x less SP per hit than it should. git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@8339 54d463be-8e91-2dee-dedb-b68131a5f0ec
2006-06-20- Corrected the line terminator setting on the unit.* files as pointed out ↵skotlex1-70/+70
by Irmin git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@7268 54d463be-8e91-2dee-dedb-b68131a5f0ec
2006-04-17- Added state.running to unit_data to make it easier to check for running ↵skotlex1-0/+1
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-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-2/+0
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-10- Modified the unit_data structure to handle automatically switching between ↵skotlex1-1/+3
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-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-22- Merged the unit_data structure from jA for handling unit-related data ↵skotlex1-0/+69
(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