summaryrefslogtreecommitdiff
path: root/src/map/skill.c
diff options
context:
space:
mode:
authorultramage <ultramage@54d463be-8e91-2dee-dedb-b68131a5f0ec>2009-06-15 14:00:27 +0000
committerultramage <ultramage@54d463be-8e91-2dee-dedb-b68131a5f0ec>2009-06-15 14:00:27 +0000
commit00be89f64050ff5373a63cc599f533f57ffaead1 (patch)
treed6ffded38d53e36cf5075a62242c8a03b21e13b0 /src/map/skill.c
parent2503f4ca66cfd8c7014d099883ca696082c27a39 (diff)
downloadhercules-00be89f64050ff5373a63cc599f533f57ffaead1.tar.gz
hercules-00be89f64050ff5373a63cc599f533f57ffaead1.tar.bz2
hercules-00be89f64050ff5373a63cc599f533f57ffaead1.tar.xz
hercules-00be89f64050ff5373a63cc599f533f57ffaead1.zip
Improving the r13888 crashfix to cover similar crash scenarios discovered:
Reordered code in status_change_end(SC_DANCING) so that an ensemble's skill unit group is deleted only after removing both performers' status changes. Modified the call to skill_delunitgroup() IN status_change_end(SC_DANCING) so that it always processes the group's true owner and not others (bugreport:3253). Replaced calls to skill_stop_dancing() with status_change_end(SC_DANCING), since it now provides identical functionality. git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@13891 54d463be-8e91-2dee-dedb-b68131a5f0ec
Diffstat (limited to 'src/map/skill.c')
-rw-r--r--src/map/skill.c43
1 files changed, 2 insertions, 41 deletions
diff --git a/src/map/skill.c b/src/map/skill.c
index bfe20c8c9..a2b337e6a 100644
--- a/src/map/skill.c
+++ b/src/map/skill.c
@@ -4163,7 +4163,7 @@ int skill_castend_nodamage_id (struct block_list *src, struct block_list *bl, in
case BD_ADAPTATION:
if(tsc && tsc->data[SC_DANCING]){
clif_skill_nodamage(src,bl,skillid,skilllv,1);
- skill_stop_dancing(bl);
+ status_change_end(bl, SC_DANCING, -1);
}
break;
@@ -7810,7 +7810,7 @@ static int skill_unit_onleft (int skill_id, struct block_list *bl, unsigned int
//it only checks if you are doing the same ensemble. So if there's two chars doing an ensemble
//which overlaps, by stepping outside of the other parther's ensemble will cause you to cancel
//your own. Let's pray that scenario is pretty unlikely and noone will complain too much about it.
- skill_stop_dancing(bl);
+ status_change_end(bl, SC_DANCING, -1);
}
case MG_SAFETYWALL:
case AL_PNEUMA:
@@ -9901,45 +9901,6 @@ bool skill_check_cloaking(struct block_list *bl, struct status_change_entry *sce
/*==========================================
*
- *
- *------------------------------------------*/
-void skill_stop_dancing (struct block_list *src)
-{
- struct status_change* sc;
- struct status_change_entry *sce;
- struct skill_unit_group* group;
- struct map_session_data* dsd = NULL;
-
- nullpo_retv(src);
- nullpo_retv(sc = status_get_sc(src));
-
- if(!sc->count || !(sce=sc->data[SC_DANCING]))
- return;
-
- group = skill_id2group(sce->val2);
- sce->val2 = 0;
-
- if (sce->val4)
- {
- if (sce->val4 != BCT_SELF)
- dsd = map_id2sd(sce->val4);
- sce->val4 = 0;
- }
-
- status_change_end(src, SC_DANCING, -1);
-
- if (dsd && (sce=dsd->sc.data[SC_DANCING]))
- {
- sce->val4 = sce->val2 = 0;
- status_change_end(&dsd->bl, SC_DANCING, -1);
- }
-
- if (group)
- skill_delunitgroup(NULL, group);
-}
-
-/*==========================================
- *
*------------------------------------------*/
struct skill_unit *skill_initunit (struct skill_unit_group *group, int idx, int x, int y, int val1, int val2)
{