summaryrefslogtreecommitdiff
path: root/src/map/unit.c
diff options
context:
space:
mode:
authorprotimus <protimus@54d463be-8e91-2dee-dedb-b68131a5f0ec>2012-01-08 03:26:16 +0000
committerprotimus <protimus@54d463be-8e91-2dee-dedb-b68131a5f0ec>2012-01-08 03:26:16 +0000
commitefdd0ca8f32811f6d7fc78555a0afcdfad308ca8 (patch)
tree608d7babab1c68c7947c3f0adc8a0a3b07b5d2d5 /src/map/unit.c
parent6ba747880532b4278fed801896216146ac63a90d (diff)
downloadhercules-efdd0ca8f32811f6d7fc78555a0afcdfad308ca8.tar.gz
hercules-efdd0ca8f32811f6d7fc78555a0afcdfad308ca8.tar.bz2
hercules-efdd0ca8f32811f6d7fc78555a0afcdfad308ca8.tar.xz
hercules-efdd0ca8f32811f6d7fc78555a0afcdfad308ca8.zip
Fixed Cloaking Exceed.
- Stop hiding status when use skills or attack enemies. - Added security fixes to clear hiding status in some cases, like warped and reloging. - Updated walk speed formula. git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@15408 54d463be-8e91-2dee-dedb-b68131a5f0ec
Diffstat (limited to 'src/map/unit.c')
-rw-r--r--src/map/unit.c13
1 files changed, 13 insertions, 0 deletions
diff --git a/src/map/unit.c b/src/map/unit.c
index 1cfa2bfa2..5e0d5527f 100644
--- a/src/map/unit.c
+++ b/src/map/unit.c
@@ -1282,6 +1282,12 @@ int unit_skilluse_id2(struct block_list *src, int target_id, short skill_num, sh
status_change_end(src, SC_CLOAKING, INVALID_TIMER);
if (!src->prev) return 0; //Warped away!
}
+
+ if( sc && sc->data[SC_CLOAKINGEXCEED] && !(sc->data[SC_CLOAKINGEXCEED]->val4&4) && skill_num != GC_CLOAKINGEXCEED )
+ {
+ status_change_end(src,SC_CLOAKINGEXCEED, INVALID_TIMER);
+ if (!src->prev) return 0;
+ }
if( casttime > 0 )
{
@@ -1395,6 +1401,12 @@ int unit_skilluse_pos2( struct block_list *src, short skill_x, short skill_y, sh
status_change_end(src, SC_CLOAKING, INVALID_TIMER);
if (!src->prev) return 0; //Warped away!
}
+
+ if (sc && sc->data[SC_CLOAKINGEXCEED] && !(sc->data[SC_CLOAKINGEXCEED]->val4&4))
+ {
+ status_change_end(src, SC_CLOAKINGEXCEED, INVALID_TIMER);
+ if (!src->prev) return 0;
+ }
if( casttime > 0 )
{
@@ -1955,6 +1967,7 @@ int unit_remove_map_(struct block_list *bl, clr_type clrtype, const char* file,
status_change_end(bl, SC_HIDING, INVALID_TIMER);
status_change_end(bl, SC_CLOAKING, INVALID_TIMER);
status_change_end(bl, SC_CHASEWALK, INVALID_TIMER);
+ status_change_end(bl, SC_CLOAKINGEXCEED, INVALID_TIMER);
if (sc->data[SC_GOSPEL] && sc->data[SC_GOSPEL]->val4 == BCT_SELF)
status_change_end(bl, SC_GOSPEL, INVALID_TIMER);
status_change_end(bl, SC_CHANGE, INVALID_TIMER);