diff options
author | shennetsind <ind@henn.et> | 2013-07-05 01:07:59 -0300 |
---|---|---|
committer | shennetsind <ind@henn.et> | 2013-07-05 01:07:59 -0300 |
commit | a3711050a219e887b6637969bac66fb7d261d9cf (patch) | |
tree | f56eea60a1904dae8e43e0ff31ae72c7c8decc00 /src/map/mob.c | |
parent | 88da261c4cf6f984252adb46a1b780a9aeeb8ccc (diff) | |
download | hercules-a3711050a219e887b6637969bac66fb7d261d9cf.tar.gz hercules-a3711050a219e887b6637969bac66fb7d261d9cf.tar.bz2 hercules-a3711050a219e887b6637969bac66fb7d261d9cf.tar.xz hercules-a3711050a219e887b6637969bac66fb7d261d9cf.zip |
Minor compliance adjustments
Data provided by clang
Signed-off-by: shennetsind <ind@henn.et>
Diffstat (limited to 'src/map/mob.c')
-rw-r--r-- | src/map/mob.c | 9 |
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; } |