summaryrefslogtreecommitdiff
path: root/src/map/mob.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/map/mob.c')
-rw-r--r--src/map/mob.c9
1 files changed, 4 insertions, 5 deletions
diff --git a/src/map/mob.c b/src/map/mob.c
index 7482a9d56..71c81749a 100644
--- a/src/map/mob.c
+++ b/src/map/mob.c
@@ -3868,13 +3868,12 @@ static bool mob_parse_dbrow(char** str)
id->mob[k].id = class_;
}
}
-
// 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));
+ mob_db_data[class_] = (struct mob_db*)aMalloc(sizeof(struct mob_db));
else
//Copy over spawn data
- memcpy(&db->spawn, mob_db_data[class_]->spawn, sizeof(db->spawn));
+ memcpy(&db->spawn, mob_db_data[class_]->spawn, sizeof(db->spawn));
memcpy(mob_db_data[class_], db, sizeof(struct mob_db));
return true;
@@ -4608,10 +4607,10 @@ static void mob_load(void)
void mob_reload(void) {
int i;
-
+
//Mob skills need to be cleared before re-reading them. [Skotlex]
for (i = 0; i < MAX_MOB_DB; i++)
- if (mob_db_data[i]) {
+ if (mob_db_data[i] && !mob_is_clone(i)) {
memset(&mob_db_data[i]->skill,0,sizeof(mob_db_data[i]->skill));
mob_db_data[i]->maxskill=0;
}