ソースを参照

Fix

git-svn-id: https://svn.code.sf.net/p/rathena/svn/branches/stable@781 54d463be-8e91-2dee-dedb-b68131a5f0ec
amber 20 年 前
コミット
70ac0a5e96
4 ファイル変更13 行追加7 行削除
  1. 3 0
      Changelog.txt
  2. 2 2
      Dev/GDB_reports.txt
  3. 2 2
      src/map/atcommand.c
  4. 6 3
      src/map/script.c

+ 3 - 0
Changelog.txt

@@ -1,5 +1,8 @@
 Date	Added
 12/24
+	* Fixed a scripting crash (SVN: 780) [MouseJstr]
+	* removed @changesex and @charchangesex until we can
+	  fix it properly [MouseJstr]
 	* Fixed item-dup bug in storage and cart [MouseJstr]
 	* @skilltree was looking outside of the particular class
 	  of the char to see if they could do a skill [MouseJstr]

+ 2 - 2
Dev/GDB_reports.txt

@@ -1,7 +1,7 @@
 Mainly because I'm (Ajarn) tired... and not too sure about these, or future ones even...
 I'll report GDB's here. MouseJstr, this is mainly for you.
 
-svn 770:
+svn 770:  Fixed
 -----------------
 #0  buildin_sc_start (st=0xbfbfea30) at script.c:4225
 4225            if(bl->type == BL_PC && ((struct map_session_data *)bl)->state.potionpitcher_flag)
@@ -39,4 +39,4 @@ $5 = (struct guild *) 0x0
 -----------------
 
 That's all I got for now. I'll keep adding them as they show up (if they are simple),
-if you are away Mouse (or whoever wants to fix them). Reply to them as they are fixed.
+if you are away Mouse (or whoever wants to fix them). Reply to them as they are fixed.

+ 2 - 2
src/map/atcommand.c

@@ -382,7 +382,7 @@ static AtCommandInfo atcommand_info[] = {
 	{ AtCommand_StatAll,			"@statsall",		60, atcommand_stat_all },
 	{ AtCommand_StatAll,			"@allstats",		60, atcommand_stat_all }, // by fritz
 	{ AtCommand_StatAll,			"@allstat",			60, atcommand_stat_all }, // by fritz
-	{ AtCommand_CharChangeSex,		"@charchangesex",	60, atcommand_char_change_sex }, // by Yor
+//	{ AtCommand_CharChangeSex,		"@charchangesex",	60, atcommand_char_change_sex }, // by Yor
 	{ AtCommand_CharBlock,			"@block",			60, atcommand_char_block }, // by Yor
 	{ AtCommand_CharBlock,			"@charblock",		60, atcommand_char_block }, // by Yor
 	{ AtCommand_CharBan,			"@ban",				60, atcommand_char_ban }, // by Yor
@@ -457,7 +457,7 @@ static AtCommandInfo atcommand_info[] = {
 	{ AtCommand_UnMute,				"@unmute",			60, atcommand_unmute }, // [Valaris]
 	{ AtCommand_Clearweather,         "@clearweather",   99, atcommand_clearweather }, // Dexity 
 	{ AtCommand_UpTime,				"@uptime",			 0, atcommand_uptime }, // by MC Cameri
-	{ AtCommand_ChangeSex,			"@changesex",		 1, atcommand_changesex }, // by MC Cameri
+//	{ AtCommand_ChangeSex,			"@changesex",		 1, atcommand_changesex }, // by MC Cameri
 	{ AtCommand_Mute,				"@mute",			99, atcommand_mute }, // [celest]
 	{ AtCommand_Mute,				"@red",				99, atcommand_mute }, // [celest]
 	{ AtCommand_WhoZeny,			"@whozeny",			20, atcommand_whozeny }, // [Valaris]

+ 6 - 3
src/map/script.c

@@ -4222,9 +4222,12 @@ int buildin_sc_start(struct script_state *st)
 		bl = map_id2bl(conv_num(st,& (st->stack->stack_data[st->start+5])));
 	else
 	bl = map_id2bl(st->rid);
-	if(bl->type == BL_PC && ((struct map_session_data *)bl)->state.potionpitcher_flag)
-		bl = map_id2bl(((struct map_session_data *)bl)->skilltarget);
-	skill_status_change_start(bl,type,val1,0,0,0,tick,0);
+	
+	if (bl != 0) {
+		if(bl->type == BL_PC && ((struct map_session_data *)bl)->state.potionpitcher_flag)
+			bl = map_id2bl(((struct map_session_data *)bl)->skilltarget);
+		skill_status_change_start(bl,type,val1,0,0,0,tick,0);
+	}
 	return 0;
 }