summaryrefslogtreecommitdiff
path: root/src/map/unit.c
AgeCommit message (Collapse)AuthorFilesLines
2008-01-22- Removed hom_setting&02 (ignore skill range) as this was fixed by Gravity ↵skotlex1-2/+2
some time ago. - Moved pc_delinvincibletimer from unit_removemap to unit_free as the previous method has a logic glitch that could cause an on-place event to trigger after the on-left event. git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@12130 54d463be-8e91-2dee-dedb-b68131a5f0ec
2008-01-14Simplified the BL_CAST macro (see topic:166795)ultramage1-27/+18
git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@12072 54d463be-8e91-2dee-dedb-b68131a5f0ec
2008-01-08- Made the pc reg variables receive a const char* as the argument, since ↵skotlex1-1/+1
they duplicate the value anyway (and they were receiving const char* values from the setd function) - Fixed Wand of Hermod not starting the SC_HERMOD status change (which blocks spells) - Fixed a missing break in the cast cancel code. - Fixed additional def/mdef from vit/int bonuses being lost when a status change that affects def/mdef triggers (for homunculus) git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@12033 54d463be-8e91-2dee-dedb-b68131a5f0ec
2008-01-03Moved extra junk from map_addblock/map_delblock to where it logically ↵ultramage1-10/+31
belongs (loadendack/unit_remove_map), removed flags and _sub macros git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@12002 54d463be-8e91-2dee-dedb-b68131a5f0ec
2008-01-03Removed map_data's block_count, as (quote Yor/ja2160), "Perhaps useful for ↵ultramage1-4/+2
debug, but uses memory AND CPU for nothing." (block lists are linked lists, they don't need count tracking) git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@12001 54d463be-8e91-2dee-dedb-b68131a5f0ec
2007-12-22Path code cleaning...ultramage1-28/+17
* 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-12-10- Cleared up npc shop id when warping a player.skotlex1-0/+1
- Added missing range/skill-mask info to reflected damage (fixes autospells not triggering on it) git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@11880 54d463be-8e91-2dee-dedb-b68131a5f0ec
2007-12-08- Changed the chaotic delay from block to delay since it just a secskotlex1-1/+1
- Fixed the longing for freedom check in unit_can_move - Corrected a check while parsing refine_db.txt git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@11870 54d463be-8e91-2dee-dedb-b68131a5f0ec
2007-12-07- Fixed ensembles skills.skotlex1-4/+2
git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@11869 54d463be-8e91-2dee-dedb-b68131a5f0ec
2007-11-28- Corrected skill_check_condition to not delete items right away for certain ↵skotlex1-3/+2
skills that do the deletion themselves. Fixes several skills consuming items twice. - Dispel's success rate is no longer affected by MDEF - You are no longer blocked from being warped when standing in a warp while in a duel. - Duels are now automatically ended when you warp out of the map you are in. git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@11836 54d463be-8e91-2dee-dedb-b68131a5f0ec
2007-11-24Fixed a crash when a taekwon hits a wall while Sprinting (bugreport:483)ultramage1-4/+7
git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@11795 54d463be-8e91-2dee-dedb-b68131a5f0ec
2007-11-22- Changed the status_change structure to use dynamic rather than static ↵skotlex1-75/+73
memory to hold the individual status changes, this should have a noticeable impact on the server's memory consumption. - Had to add a few 'ugly' flags to status_change since now you can't track SC related information while said SC is not active (happens only for Storm Gust, Joint Beat and Magic Power). - Since I am unable to fully test, watch out for any bugs~ git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@11786 54d463be-8e91-2dee-dedb-b68131a5f0ec
2007-11-21- Moved subtype from struct block_list to struct npc_data.skotlex1-0/+1
- Fixed some compilation warnings. git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@11772 54d463be-8e91-2dee-dedb-b68131a5f0ec
2007-11-19- removed 'skill_fail' message when a ground skill fails as that caues ↵skotlex1-1/+1
double 'skill failed' messages in several instances. - Corrected shop freeing using free instead of aFree ,causing memory leak reports. - Corrected the sc def settings modifying tick_def in regards to sc_def instead of tick_def git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@11762 54d463be-8e91-2dee-dedb-b68131a5f0ec
2007-11-17Removed battle_config.error_log as console_silent already handles thisultramage1-10/+5
git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@11751 54d463be-8e91-2dee-dedb-b68131a5f0ec
2007-11-10Fixed a bug in r11384 letting you bypass requirements for some skills (see ↵ultramage1-2/+1
bugreport:219). git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@11710 54d463be-8e91-2dee-dedb-b68131a5f0ec
2007-11-02Removed some long-unneccessary debug messages (from r1105).ultramage1-2/+2
Removed function skill_count_target() because it's a duplicate (see topic:169337). Renamed skill_get_pl to skill_get_ele (because it retrieves element ids). The block_list structure now uses the BL_ enums instead of 'unsigned char'. git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@11640 54d463be-8e91-2dee-dedb-b68131a5f0ec
2007-10-31* Added names to the SC_ and SI_ enums, now they can be used to properly ↵ultramage1-1/+1
indicate where such values are to be used (replaces usage of 'int') * removed MIN_/MAX_PORTAL_MEMO, set MAX_MEMOPOINTS from 10 to 3 * removed support for @go-ing to your memo points * simplified the overly verbose @memo command; now re-uses pc_memo() * cleaned up pc_memo(), now uses semi-correct packet replies * Minor code cleaning/formatting git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@11625 54d463be-8e91-2dee-dedb-b68131a5f0ec
2007-10-27* Fixed TXT charserver doing periodic random-sized memory allocation ↵ultramage1-1/+1
(bugreport:312) * Set 'Create Converter's produce success rate to 100% (bugreport:302) * Added check that verifies weapon/ammo/state requirements also when casting finishes (might have unwanted side-effects tho'!) (bugreport:228) * Fixed Firewall knocking back undead/fire element mobs (bug in r11578) * Added dummy 'openmail' to txt server to fix a script error message git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@11585 54d463be-8e91-2dee-dedb-b68131a5f0ec
2007-10-19- Added bonusautoscript and bonusautoscript2. These are used to attach a ↵skotlex1-0/+4
script to a player which gets executed on attack (or when attacked). Required for several of the more recent items. git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@11519 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-16/+19
git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@11514 54d463be-8e91-2dee-dedb-b68131a5f0ec
2007-10-04* Corrected Icewall skill to be closer to official behavior (part of ↵ultramage1-6/+2
bugreport:38) - now works on occupied squares (previously it disappeared) - now you can walk out of an icewall square (removed code that blocked pathfinding if the origin cell was of a nonwalkable type) - added back the hack where mapcell changes are broadcast to whole map (prevents client from leaving the cells non-walkable if you warp away) git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@11354 54d463be-8e91-2dee-dedb-b68131a5f0ec
2007-10-03* Cleaned up parts of skill.c related to skill unitsultramage1-2/+2
- removed some nonsense code in skill_dance_switch() (from r8876) - removed 'security system to prevent forgetting timer removal' (r1213) - renamed some skill-related data structs (had same name as variables) - commented out custom Venom Splasher countdown messaging code git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@11347 54d463be-8e91-2dee-dedb-b68131a5f0ec
2007-09-21some unimportant path.c / unit.c cleaningultramage1-12/+7
git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@11257 54d463be-8e91-2dee-dedb-b68131a5f0ec
2007-09-21* Corrected skill Charge Attack as described in bugreport:67ultramage1-2/+5
- cast time is between 100% and 300% (+ infinite waiting fixed) - damage is also between 100% and 300% (doesn't increase past range 9) - added knockback that's equal to the distance to target - no longer causes teleportation on WoE grounds - if target runs behind an obstacle, the skill will still teleport you, but will not perform the attack or do knockback - this should be official behavior, so enjoy the weirdness! git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@11256 54d463be-8e91-2dee-dedb-b68131a5f0ec
2007-09-17- Finally got some time to clean up and fix monster_ai&0x40 (chase through ↵skotlex1-1/+10
warps). It works correctly now regardless of the number of players on the source/destination maps. git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@11233 54d463be-8e91-2dee-dedb-b68131a5f0ec
2007-09-13- Corrected SG Miracle to trigger per attack, not per walked tile. Trigger ↵skotlex1-6/+0
rate is now 0.02% - Corrected the warmth skills not clearing up correctly the previous field when you place another one down. - Corrected vit not affecting the HP bonus that Super Novices, Ninjas and Gunslingers get. git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@11193 54d463be-8e91-2dee-dedb-b68131a5f0ec
2007-09-07- Added support for the new party invite/reply packets from the latest ↵skotlex1-0/+3
client version. - Cleared up some TODO's - Added auto-rejecting party/guild invites when the target is disconnected from the server. - Added a correction in the walking code to abort it when map_moveblock cancels the player's walking (by warping/knocking back),the default code would fail because unit_stopwalking would do nothing since the walk timer was already -1 in that moment. - Corrected mob_randomwalk to use unsigned int for the tick variable. - Changed the default @Main format to prevent crashes in the newer clients. git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@11134 54d463be-8e91-2dee-dedb-b68131a5f0ec
2007-08-31* Documented/cleaned up chatroom code and packetryultramage1-1/+1
* Added some comments to clif_changechatowner() - totally broken, see the code + topic:163829 * Implemented the chatroom display packet properly - now has 4 types: public, private, npc and non-clickable npc chatroom * Implemented the chatroom leave packet properly - now utilizes the 'kicked' flag when the user was forced to leave - TODO: banlist support to prevent re-entry, see jAthena code git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@11100 54d463be-8e91-2dee-dedb-b68131a5f0ec
2007-08-19* Cleaned/clarified some #include relationships between headersultramage1-4/+5
* 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-08-08* Cleaned up junk left in the code by the mapcache/mapindex updateultramage1-3/+3
- Added mapindex_getmapname(_ext) to help with ".gat" adding/removing - Moved related processing to the interface (prevents duplicity) git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@10963 54d463be-8e91-2dee-dedb-b68131a5f0ec
2007-08-04Some all-around code reformatting/cleaningultramage1-16/+12
git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@10947 54d463be-8e91-2dee-dedb-b68131a5f0ec
2007-07-31Renamed menuskill_lv -> Renamed menuskill_val, because people also used it ↵ultramage1-1/+1
to store stuff like map coords, inventory offsets and object IDs... git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@10937 54d463be-8e91-2dee-dedb-b68131a5f0ec
2007-07-26* Cleaned up mob drop code, crashfix is still needed though...ultramage1-2/+1
* Reduced ignore-list length to 20, added proper reply packet * Cleaned up some very poorly written pm-ignore code (see r141) * Fixed a typo in Warp Portal code displaying an incorrect map name git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@10915 54d463be-8e91-2dee-dedb-b68131a5f0ec
2007-07-06* Cleaned up some nasty code related to skill_blownultramage1-2/+3
- split 'direction' value from flags - moved (almost) entire direction calculating code to the outside - bowling bash now has the 'suck-in' effect (knockback is now done in the direction you were last facing, not in your-target direction) git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@10861 54d463be-8e91-2dee-dedb-b68131a5f0ec
2007-07-05* update from Skotlexultramage1-8/+18
- Fixed NPC_STOP's visual effect not clearing when the status ends - Corrected @homshuffle making the skill tree be lost. - Corrected homunculus skills being unusable if the master was sitting or inflicted by a disabling status (eg: petrify, stun) - Some fixes to the cell no stacking mod (mainly mobs would just get stuck behind each other and not properly surround you) git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@10856 54d463be-8e91-2dee-dedb-b68131a5f0ec
2007-06-22* Changed behavior of some guild-related code (according to X.4 tests):ultramage1-3/+3
- removed code that prevented Homunculus Resurrection during WoE - logging in doesn't activate the 5 minute guild skill block anymore - non-Urgent guild skills can now only be cast on WoE grounds during WoE - all guild skills now have no cast delay (previously was 1 second) - casting guild skills will now block FreeCast sages from walking - Battle Orders and Regeneration are now instacast - Restoration now has a 10 second cast time, reducible only by dex - Urgent Call's cast cannot be reduced anymore (not even by items) git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@10807 54d463be-8e91-2dee-dedb-b68131a5f0ec
2007-06-03- Fixed missing client update when 'return to savepoint' failsultramage1-3/+3
- Fixed a bad copy-paste from r10028 letting players escape jail (char was dead on login, so statuses (SC_JAILED) couln't be applied) - Added clif_standing() to clif_sitting(), and used them in clif.c - Cleaned up clif.c a bit - clif_clearchar->clif_clearunit_area, clif_clearchar_id->clif_clearunit_single git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@10668 54d463be-8e91-2dee-dedb-b68131a5f0ec
2007-05-23- Added new flag to skill_castnodex.txt, to allow per-skill tweaking of cast ↵ultramage1-2/+3
time and delay reducibility by item scripts (cards and such) - Fixed Martyr's Reckoning never triggering for gms with all skills - Added MO_TRIPLEATTACK and RG_SNATCHER to @skillall's skill filter - Made gm_skill_unconditional bypass skill blocking (guild timer, etc) - Reverted the weird delay_dependon_agi thing (r8923, r9055, r9059) - Changed a few memsets to strncpy (reading past buffer is a bad idea) - Sped up some memset operations (multiples of 4 are faster) git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@10613 54d463be-8e91-2dee-dedb-b68131a5f0ec
2007-05-23Fixed a typo in Chase Walk code (caused by r10593)ultramage1-1/+1
git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@10609 54d463be-8e91-2dee-dedb-b68131a5f0ec
2007-05-20- Fixed one missed malloc->aMallocA typo, causing memory deallocation problemsultramage1-2/+2
- Some small trunk-stable formatting synchronization git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@10595 54d463be-8e91-2dee-dedb-b68131a5f0ec
2007-05-20- Fixed Chase Walk having a deactivation cast time (should be instant)ultramage1-11/+15
- Changed status calc to allow value 0 stats; aegis allows negative values, but eA is unsigned in this regard, so ... git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@10589 54d463be-8e91-2dee-dedb-b68131a5f0ec
2007-05-19Reformatting @_@ultramage1-41/+40
git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@10581 54d463be-8e91-2dee-dedb-b68131a5f0ec
2007-05-11Re-phrased the attacker flee/def penalty config descsultramage1-19/+16
git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@10530 54d463be-8e91-2dee-dedb-b68131a5f0ec
2007-04-22- Removed the include of features.h from the console.c plugin. It is ↵skotlex1-22/+6
apparently not needed (and it was preventing compilation on FreeBSD) - Fixed bug which totally broke item group bonuses. - Added warnings when setting a pvp/gvg flag removes the other flags on the same map (gvg and pvp can't coexist on the same map) - Optimized the unequip loop when changing sex. - Removed the check that prevented you from casting soul-collect when you already have 5 spirits. - Corrected Magic Rod so it doesn't displays any skill-use animation until it triggers. - Debuff on logout&2 is again set to default, instead of removing food bonuses now it removes Maximize Power, Maximum Overthrust and Steel Body. - Corrected Steel Body's icon (it actually belongs to AutoBerserk) git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@10317 54d463be-8e91-2dee-dedb-b68131a5f0ec
2007-04-17- The gain exp from resurrection config will now only work when the revived ↵skotlex1-0/+1
player has yet to reach the last level (since otherwise it can give quite a lot of exp since the last level exp just keeps piling up) - Corrected unit_canmove so you can't move if you are vending. - Corrected npc_click so it won't let you click on hidden npcs. git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@10281 54d463be-8e91-2dee-dedb-b68131a5f0ec
2007-04-11- Some cleaning of the castend_map code to prevent the menuskill variable ↵skotlex1-1/+1
from not being cleared if you made a choice but the skill was not triggered (due to silence, stun or whatever). - Cleaned up a bit the Charge Attack casttime equation, should prevent infinite casttime when the distance is 0. git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@10213 54d463be-8e91-2dee-dedb-b68131a5f0ec
2007-03-27- Changed a bit the Moonlit code to prevent an infinite loopskotlex1-2/+2
- Changed clif_skillcasting definition to take as argument the element of the skill. git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@10083 54d463be-8e91-2dee-dedb-b68131a5f0ec
2007-03-20- Removed Magic Rod's cast bar.skotlex1-1/+0
- Corrected warning on login sql. - Gravitation no longer causes damage flinch. git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@10038 54d463be-8e91-2dee-dedb-b68131a5f0ec