Browse Source

- Fixed @reloadmobdb wiping out monster spawn information

git-svn-id: https://svn.code.sf.net/p/rathena/svn/trunk@14951 54d463be-8e91-2dee-dedb-b68131a5f0ec
Skotlex 13 years ago
parent
commit
1a369e2eb5
2 changed files with 5 additions and 0 deletions
  1. 2 0
      Changelog-Trunk.txt
  2. 3 0
      src/map/mob.c

+ 2 - 0
Changelog-Trunk.txt

@@ -1,5 +1,7 @@
 Date	Added
 Date	Added
 
 
+2011/09/02
+	* Fixed @reloadmobdb wiping out monster spawn information. [Skotlex]
 2011/08/30
 2011/08/30
 	* Corrected SQL saving so that the server won't update the 'saved' data if there is an SQL error. It should fix possible dupes and other data synch issues when the SQL server is temporarily down during save. [Skotlex]
 	* Corrected SQL saving so that the server won't update the 'saved' data if there is an SQL error. It should fix possible dupes and other data synch issues when the SQL server is temporarily down during save. [Skotlex]
 2011/08/23
 2011/08/23

+ 3 - 0
src/map/mob.c

@@ -3639,6 +3639,9 @@ static bool mob_parse_dbrow(char** str)
 	// Finally insert monster's data into the database.
 	// Finally insert monster's data into the database.
 	if (mob_db_data[class_] == NULL)
 	if (mob_db_data[class_] == NULL)
 		mob_db_data[class_] = (struct mob_db*)aCalloc(1, sizeof(struct mob_db));
 		mob_db_data[class_] = (struct mob_db*)aCalloc(1, sizeof(struct mob_db));
+	else
+		//Copy over spawn data
+		memcpy(&db->spawn, mob_db_data[class_]->spawn, sizeof(db->spawn));
 
 
 	memcpy(mob_db_data[class_], db, sizeof(struct mob_db));
 	memcpy(mob_db_data[class_], db, sizeof(struct mob_db));
 	return true;
 	return true;