Browse Source

* Fixed a typo in the status-change saving code (wrong variable used)
* Fixed a case of bad sql code conversion breaking homun skill loading

git-svn-id: https://svn.code.sf.net/p/rathena/svn/trunk@11264 54d463be-8e91-2dee-dedb-b68131a5f0ec

ultramage 17 năm trước cách đây
mục cha
commit
5216ecf05e
3 tập tin đã thay đổi với 5 bổ sung2 xóa
  1. 2 0
      Changelog-Trunk.txt
  2. 1 1
      src/char_sql/char.c
  3. 2 1
      src/char_sql/int_homun.c

+ 2 - 0
Changelog-Trunk.txt

@@ -8,6 +8,8 @@ IF YOU HAVE A WORKING AND TESTED BUGFIX PUT IT INTO STABLE AS WELL AS TRUNK.
 	  itemdb loockup and a first step to remove map_session_data->inventory_data).
 	* Fixed a typo in the configure script that replaced CFLAGS with CPPFLAGS 
 	  when -Wno-pointer-sign is supported by the compiler. [FlavioJS]
+	* Fixed a typo in the status-change saving code (wrong variable used)
+	* Fixed a case of bad sql code conversion breaking homun skill loading
 	* Corrected skill Charge Attack as described in bugreport:67 [ultramage]
 	- cast time is between 100% and 300% (+ infinite waiting fixed)
 	- damage is also between 100% and 300% (doesn't increase past range 9)

+ 1 - 1
src/char_sql/char.c

@@ -2733,7 +2733,7 @@ int parse_frommap(int fd)
 				for( i = 0; i < count; ++i )
 				{
 					memcpy (&data, RFIFOP(fd, 14+i*sizeof(struct status_change_data)), sizeof(struct status_change_data));
-					if( count > 0 )
+					if( i > 0 )
 						StringBuf_AppendStr(&buf, ", ");
 					StringBuf_Printf(&buf, "('%d','%d','%hu','%d','%d','%d','%d','%d')", aid, cid,
 						data.type, data.tick, data.val1, data.val2, data.val3, data.val4);

+ 2 - 1
src/char_sql/int_homun.c

@@ -199,7 +199,8 @@ int mapif_load_homunculus(int fd)
 		i = atoi(data);
 		if( i < HM_SKILLBASE || i >= HM_SKILLBASE + MAX_HOMUNSKILL )
 			continue;// invalid guild skill
-		homun_pt->hskill[i].id = (unsigned short)i;
+		i = i - HM_SKILLBASE - 1;
+		homun_pt->hskill[i].id = (unsigned short)atoi(data);
 		// lv
 		Sql_GetData(sql_handle, 1, &data, NULL);
 		homun_pt->hskill[i].lv = (unsigned short)atoi(data);