Browse Source

Follow up to r17321 - Fix VCC errors bugreport:7662

git-svn-id: https://svn.code.sf.net/p/rathena/svn/trunk@17323 54d463be-8e91-2dee-dedb-b68131a5f0ec
akinari1087 12 years ago
parent
commit
b484c33694
3 changed files with 10 additions and 11 deletions
  1. 1 1
      doc/script_commands.txt
  2. 8 9
      src/map/script.c
  3. 1 1
      src/map/skill.c

+ 1 - 1
doc/script_commands.txt

@@ -3850,7 +3850,7 @@ you have maximum. Like 'heal', this will not call up any animations or effects.
 *recovery <type>{,<id | mapname>,<revive_flag>{,<map>}};
 
 Recovery can be used to recover all HP/SP to specific characters as well as revive.
-Party and Guild type use party and guild name.  This command will return 1 on
+Party and Guild type use party and guild ID.  This command will return 1 on
 successful use.
 
 <type> is who you are targeting.  Valid types are:

+ 8 - 9
src/map/script.c

@@ -12844,7 +12844,6 @@ BUILDIN_FUNC(recovery)
 	TBL_PC *sd = script_rid2sd(st);
 
 	int map = 0, type = 0, revive = 1;
-	const char *mapname;
 
 	type = script_getnum(st,2);
 
@@ -12861,6 +12860,10 @@ BUILDIN_FUNC(recovery)
 			break;
 		case 1:
 		{
+			struct party_data* p;
+			struct map_session_data* pl_sd;
+			//When no party given, we use invoker party
+			int p_id, i;
 			if(script_hasdata(st,5)) {//Bad maps shouldn't cause issues
 				map = map_mapname2mapid(script_getstr(st,5));
 				if(map < 1) { //But we'll check anyways
@@ -12868,10 +12871,6 @@ BUILDIN_FUNC(recovery)
 					return 1;
 				}
 			}
-			struct party_data* p;
-			struct map_session_data* pl_sd;
-			//When no party given, we use invoker party
-			int p_id, i;
 			if(script_hasdata(st,3))
 				p_id = script_getnum(st,3);
 			else
@@ -12889,6 +12888,10 @@ BUILDIN_FUNC(recovery)
 		}
 		case 2:
 		{
+			struct guild* g;
+			struct map_session_data* pl_sd;
+			//When no guild given, we use invoker guild
+			int g_id, i;
 			if(script_hasdata(st,5)) {//Bad maps shouldn't cause issues
 				map = map_mapname2mapid(script_getstr(st,5));
 				if(map < 1) { //But we'll check anyways
@@ -12896,10 +12899,6 @@ BUILDIN_FUNC(recovery)
 					return 1;
 				}
 			}
-			struct guild* g;
-			struct map_session_data* pl_sd;
-			//When no guild given, we use invoker guild
-			int g_id, i;
 			if(script_hasdata(st,3))
 				g_id = script_getnum(st,3);
 			else

+ 1 - 1
src/map/skill.c

@@ -14296,9 +14296,9 @@ int skill_delayfix (struct block_list *bl, uint16 skill_id, uint16 skill_lv)
 void skill_overbrand(struct block_list* src, uint16 skill_id, uint16 skill_lv, uint16 x, uint16 y, unsigned int tick, int flag)
 {
 	struct s_skill_unit_layout *layout;
-	layout = skill_get_unit_layout(skill_id,skill_lv,src,x,y);
 	int i, ux[53], uy[53]; //Number of cells we are attacking
 	short dir = map_calc_dir(src,x,y);
+	layout = skill_get_unit_layout(skill_id,skill_lv,src,x,y);
 	if(dir > 0 && dir < 4) { //Need to invert the cell locations for directions
 		for(i = 0; i < 53; i++) {
 			ux[i] = layout->dy[i];