summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--Changelog-Trunk.txt2
-rw-r--r--src/map/mob.c3
2 files changed, 5 insertions, 0 deletions
diff --git a/Changelog-Trunk.txt b/Changelog-Trunk.txt
index 0c62e3882..9fcbd9ff5 100644
--- a/Changelog-Trunk.txt
+++ b/Changelog-Trunk.txt
@@ -1,5 +1,7 @@
Date Added
+2011/09/02
+ * Fixed @reloadmobdb wiping out monster spawn information. [Skotlex]
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]
2011/08/23
diff --git a/src/map/mob.c b/src/map/mob.c
index 3bfa7dfa7..c20672a13 100644
--- a/src/map/mob.c
+++ b/src/map/mob.c
@@ -3639,6 +3639,9 @@ static bool mob_parse_dbrow(char** str)
// Finally insert monster's data into the database.
if (mob_db_data[class_] == NULL)
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));
return true;