summaryrefslogtreecommitdiff
path: root/src/map/instance.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/map/instance.c')
-rw-r--r--src/map/instance.c10
1 files changed, 10 insertions, 0 deletions
diff --git a/src/map/instance.c b/src/map/instance.c
index 045be5431..83b538ffc 100644
--- a/src/map/instance.c
+++ b/src/map/instance.c
@@ -242,6 +242,13 @@ int instance_add_map(const char *name, int instance_id, bool usebasename, const
}
}
+ //Mimic questinfo
+ if( map->list[m].qi_count ) {
+ map->list[im].qi_count = map->list[m].qi_count;
+ CREATE( map->list[im].qi_data, struct questinfo, map->list[im].qi_count );
+ memcpy( map->list[im].qi_data, map->list[m].qi_data, map->list[im].qi_count * sizeof(struct questinfo) );
+ }
+
map->list[im].m = im;
map->list[im].instance_id = instance_id;
map->list[im].instance_src_map = m;
@@ -443,6 +450,9 @@ void instance_del_map(int16 m) {
aFree(map->list[m].zone_mf);
}
+ if( map->list[m].qi_data )
+ aFree(map->list[m].qi_data);
+
// Remove from instance
for( i = 0; i < instance->list[map->list[m].instance_id].num_map; i++ ) {
if( instance->list[map->list[m].instance_id].map[i] == m ) {