summaryrefslogtreecommitdiff
path: root/src/map/instance.c
diff options
context:
space:
mode:
authorshennetsind <ind@henn.et>2013-10-25 09:32:22 -0200
committershennetsind <ind@henn.et>2013-10-25 09:32:22 -0200
commitbf27a9e0cf1bfe9be298c4191010ba6876457d64 (patch)
tree5a7e85a639423109b6e8cf935f2f4c8ddf1bb595 /src/map/instance.c
parent94b7b25456aa8a9de1e0f2a147d58dba6e5976dd (diff)
downloadhercules-bf27a9e0cf1bfe9be298c4191010ba6876457d64.tar.gz
hercules-bf27a9e0cf1bfe9be298c4191010ba6876457d64.tar.bz2
hercules-bf27a9e0cf1bfe9be298c4191010ba6876457d64.tar.xz
hercules-bf27a9e0cf1bfe9be298c4191010ba6876457d64.zip
Quest Bubbles Update
- Introduced questinfo cache, memory & processing speed improvement - Fixed mini-map marker support Special Thanks to Haruna Signed-off-by: shennetsind <ind@henn.et>
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 ) {