Browse Source

- Fixed crash when using Adaptation during an Encore.

git-svn-id: https://svn.code.sf.net/p/rathena/svn/trunk@8627 54d463be-8e91-2dee-dedb-b68131a5f0ec
skotlex 18 years ago
parent
commit
072b488c01
2 changed files with 6 additions and 5 deletions
  1. 1 0
      Changelog-Trunk.txt
  2. 5 5
      src/map/skill.c

+ 1 - 0
Changelog-Trunk.txt

@@ -4,6 +4,7 @@ AS OF SVN REV. 5091, WE ARE NOW USING TRUNK.  ALL UNTESTED BUGFIXES/FEATURES GO
 IF YOU HAVE A WORKING AND TESTED BUGFIX PUT IT INTO STABLE AS WELL AS TRUNK.
 IF YOU HAVE A WORKING AND TESTED BUGFIX PUT IT INTO STABLE AS WELL AS TRUNK.
 
 
 2006/09/04
 2006/09/04
+	* Fixed crash when using Adaptation during an Encore. [Skotlex]
 	* Should have fixed manner being reset to 0 on logout while muted.
 	* Should have fixed manner being reset to 0 on logout while muted.
 	  [Skotlex]
 	  [Skotlex]
 	* Removed status_get_sc_tick, duration and chance are now both handled by
 	* Removed status_get_sc_tick, duration and chance are now both handled by

+ 5 - 5
src/map/skill.c

@@ -9544,16 +9544,16 @@ void skill_stop_dancing (struct block_list *src)
 			dsd = map_id2sd(sc->data[SC_DANCING].val4);
 			dsd = map_id2sd(sc->data[SC_DANCING].val4);
 		sc->data[SC_DANCING].val4 = 0;
 		sc->data[SC_DANCING].val4 = 0;
 	}
 	}
+	status_change_end(src, SC_DANCING, -1);
 
 
-	if (group)
-		skill_delunitgroup(NULL, group, 0);
-		
 	if (dsd)
 	if (dsd)
 	{
 	{
 		dsd->sc.data[SC_DANCING].val4 = dsd->sc.data[SC_DANCING].val2 = 0;
 		dsd->sc.data[SC_DANCING].val4 = dsd->sc.data[SC_DANCING].val2 = 0;
 		status_change_end(&dsd->bl, SC_DANCING, -1);
 		status_change_end(&dsd->bl, SC_DANCING, -1);
 	}
 	}
-	status_change_end(src, SC_DANCING, -1);
+
+	if (group)
+		skill_delunitgroup(NULL, group, 0);
 }
 }
 
 
 /*==========================================
 /*==========================================
@@ -9789,7 +9789,7 @@ int skill_delunitgroup (struct block_list *src, struct skill_unit_group *group,
 		group->valstr=NULL;
 		group->valstr=NULL;
 	}
 	}
 
 
-	map_freeblock((struct block_list*)group->unit);
+	map_freeblock(&group->unit->bl);
 	group->unit=NULL;
 	group->unit=NULL;
 	group->group_id=0;
 	group->group_id=0;
 	group->unit_count=0;
 	group->unit_count=0;