diff options
author | skotlex <skotlex@54d463be-8e91-2dee-dedb-b68131a5f0ec> | 2006-09-07 17:40:46 +0000 |
---|---|---|
committer | skotlex <skotlex@54d463be-8e91-2dee-dedb-b68131a5f0ec> | 2006-09-07 17:40:46 +0000 |
commit | 8cf58f2846e8a701fe61a149c5bf532732572780 (patch) | |
tree | 6492a544f57cffc01af8cd22a0e96dfbc1fe020a /src/map/unit.c | |
parent | 79f357bf323dbd91529bafe78160149851902377 (diff) | |
download | hercules-8cf58f2846e8a701fe61a149c5bf532732572780.tar.gz hercules-8cf58f2846e8a701fe61a149c5bf532732572780.tar.bz2 hercules-8cf58f2846e8a701fe61a149c5bf532732572780.tar.xz hercules-8cf58f2846e8a701fe61a149c5bf532732572780.zip |
- Removed the Warmth "stacking" code.
- 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
Diffstat (limited to 'src/map/unit.c')
-rw-r--r-- | src/map/unit.c | 21 |
1 files changed, 21 insertions, 0 deletions
diff --git a/src/map/unit.c b/src/map/unit.c index c36c14971..2db6108aa 100644 --- a/src/map/unit.c +++ b/src/map/unit.c @@ -1139,6 +1139,27 @@ int unit_attack(struct block_list *src,int target_id,int type) return 0; } +//Cancels an ongoing combo, resets attackable time and restarts the +//attack timer to resume attacking after amotion time. [Skotlex] +int unit_cancel_combo(struct block_list *bl) +{ + struct unit_data *ud; + + if (!status_change_end(bl, SC_COMBO, -1)) + return 0; //Combo wasn't active. + + ud = unit_bl2ud(bl); + nullpo_retr(0, ud); + + ud->attackabletime = gettick() + status_get_amotion(bl); + + if (ud->attacktimer == -1) + return 1; //Nothing more to do. + + delete_timer(ud->attacktimer, unit_attack_timer); + ud->attacktimer=add_timer(ud->attackabletime,unit_attack_timer,bl->id,0); + return 1; +} /*========================================== * *------------------------------------------ |