summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorshennetsind <shennetsind@54d463be-8e91-2dee-dedb-b68131a5f0ec>2012-03-21 23:19:22 +0000
committershennetsind <shennetsind@54d463be-8e91-2dee-dedb-b68131a5f0ec>2012-03-21 23:19:22 +0000
commit5471705b4190f390029d990cda966f95db5d19a7 (patch)
treee8bf235065012bb15e08781d7aa531b427ef6bfe
parenteba83e0231886458138a7344ce7beaa32087b6a7 (diff)
downloadhercules-5471705b4190f390029d990cda966f95db5d19a7.tar.gz
hercules-5471705b4190f390029d990cda966f95db5d19a7.tar.bz2
hercules-5471705b4190f390029d990cda966f95db5d19a7.tar.xz
hercules-5471705b4190f390029d990cda966f95db5d19a7.zip
Fixed bugreport:5462, Cursed Circle target is no longer able to move.
Also Fixed Cursed Circle effect not going off if status is ended normally. git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@15743 54d463be-8e91-2dee-dedb-b68131a5f0ec
-rw-r--r--src/map/status.c15
-rw-r--r--src/map/unit.c59
2 files changed, 45 insertions, 29 deletions
diff --git a/src/map/status.c b/src/map/status.c
index cd70b75e6..4d4aa4421 100644
--- a/src/map/status.c
+++ b/src/map/status.c
@@ -8579,19 +8579,20 @@ int status_change_end_(struct block_list* bl, enum sc_type type, int tid, const
map_foreachinrange(status_change_timer_sub, bl, skill_get_splash(SR_CURSEDCIRCLE, sce->val1),BL_CHAR, bl, sce, SC_CURSEDCIRCLE_TARGET, gettick());
break;
case SC_RAISINGDRAGON:
- if( sd && sce->val2 && !pc_isdead(sd) )
- {
+ if( sd && sce->val2 && !pc_isdead(sd) ) {
int i;
i = min(sd->spiritball,5);
pc_delspiritball(sd, sd->spiritball, 0);
status_change_end(bl, SC_EXPLOSIONSPIRITS, -1);
- while( i > 0 )
- {
+ while( i > 0 ) {
pc_addspiritball(sd, skill_get_time(MO_CALLSPIRITS, pc_checkskill(sd,MO_CALLSPIRITS)), 5);
--i;
}
}
break;
+ case SC_CURSEDCIRCLE_TARGET:
+ clif_bladestop(bl, sce->val2, 0);
+ break;
}
opt_flag = 1;
@@ -9613,8 +9614,7 @@ int status_change_timer_sub(struct block_list* bl, va_list ap)
tsc = status_get_sc(bl);
- switch( type )
- {
+ switch( type ) {
case SC_SIGHT: /* ƒTƒCƒg */
case SC_CONCENTRATE:
status_change_end(bl, SC_HIDING, INVALID_TIMER);
@@ -9653,8 +9653,7 @@ int status_change_timer_sub(struct block_list* bl, va_list ap)
break;
case SC_CURSEDCIRCLE_TARGET:
if( tsc && tsc->data[SC_CURSEDCIRCLE_TARGET] && tsc->data[SC_CURSEDCIRCLE_TARGET]->val2 == src->id ) {
- status_change_end(bl, type, -1);
- clif_bladestop(src, bl->id, 0);
+ status_change_end(bl, type, -1);
}
break;
}
diff --git a/src/map/unit.c b/src/map/unit.c
index 36a57a59d..f6ef79e56 100644
--- a/src/map/unit.c
+++ b/src/map/unit.c
@@ -912,6 +912,7 @@ int unit_can_move(struct block_list *bl)
|| sc->data[SC_MAGNETICFIELD]
|| sc->data[SC__MANHOLE]
|| (sc->data[SC_FEAR] && sc->data[SC_FEAR]->val2 > 0)
+ || sc->data[SC_CURSEDCIRCLE_TARGET]
))
return 0;
}
@@ -1277,18 +1278,27 @@ int unit_skilluse_id2(struct block_list *src, int target_id, short skill_num, sh
ud->skillid = skill_num;
ud->skilllv = skill_lv;
- if( sc && sc->data[SC_CLOAKING] && !(sc->data[SC_CLOAKING]->val4&4) && skill_num != AS_CLOAKING )
- {
- 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( sc ) {
+ /**
+ * why the if else chain: these 3 status do not stack, so its efficient that way.
+ **/
+ if( sc->data[SC_CLOAKING] && !(sc->data[SC_CLOAKING]->val4&4) && skill_num != AS_CLOAKING ) {
+ status_change_end(src, SC_CLOAKING, INVALID_TIMER);
+ if (!src->prev) return 0; //Warped away!
+ } else if( 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;
+ } else
+ status_change_end(src,SC_CAMOUFLAGE,-1);
+
+ if( sc->data[SC_CURSEDCIRCLE_ATKER] ) {
+ sc->data[SC_CURSEDCIRCLE_ATKER]->val3 = 1;
+ status_change_end(src,SC_CURSEDCIRCLE_ATKER,-1);
+ }
+
}
+
if( casttime > 0 )
{
ud->skilltimer = add_timer( tick+casttime, skill_castend_id, src->id, 0 );
@@ -1396,18 +1406,25 @@ int unit_skilluse_pos2( struct block_list *src, short skill_x, short skill_y, sh
ud->skilly = skill_y;
ud->skilltarget = 0;
- if (sc && sc->data[SC_CLOAKING] && !(sc->data[SC_CLOAKING]->val4&4))
- {
- 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( sc ) {
+ /**
+ * why the if else chain: these 3 status do not stack, so its efficient that way.
+ **/
+ if (sc->data[SC_CLOAKING] && !(sc->data[SC_CLOAKING]->val4&4)) {
+ status_change_end(src, SC_CLOAKING, INVALID_TIMER);
+ if (!src->prev) return 0; //Warped away!
+ } else if (sc->data[SC_CLOAKINGEXCEED] && !(sc->data[SC_CLOAKINGEXCEED]->val4&4)) {
+ status_change_end(src, SC_CLOAKINGEXCEED, INVALID_TIMER);
+ if (!src->prev) return 0;
+ } else
+ status_change_end(src,SC_CAMOUFLAGE,-1);
+ if( sc->data[SC_CURSEDCIRCLE_ATKER] ) {
+ sc->data[SC_CURSEDCIRCLE_ATKER]->val3 = 1;
+ status_change_end(src,SC_CURSEDCIRCLE_ATKER,-1);
+ }
+
+ }
if( casttime > 0 )
{
unit_stop_walking(src,1);