diff options
author | shennetsind <ind@henn.et> | 2013-10-27 15:00:54 -0200 |
---|---|---|
committer | shennetsind <ind@henn.et> | 2013-10-27 15:00:54 -0200 |
commit | a1c3a358aefa46b37e6745f9c54cc6df14ea6ba4 (patch) | |
tree | 200bfbff424724d1c324527359fce2c96c957957 /src/map/instance.c | |
parent | baef78f7954fa4e6fa2449f2c7de92a901c7f5f3 (diff) | |
parent | e6a1225802e01ad5390c033ca7a4653c1a976c24 (diff) | |
download | hercules-a1c3a358aefa46b37e6745f9c54cc6df14ea6ba4.tar.gz hercules-a1c3a358aefa46b37e6745f9c54cc6df14ea6ba4.tar.bz2 hercules-a1c3a358aefa46b37e6745f9c54cc6df14ea6ba4.tar.xz hercules-a1c3a358aefa46b37e6745f9c54cc6df14ea6ba4.zip |
Merge branch 'master' of https://github.com/HerculesWS/Hercules
Diffstat (limited to 'src/map/instance.c')
-rw-r--r-- | src/map/instance.c | 12 |
1 files changed, 11 insertions, 1 deletions
diff --git a/src/map/instance.c b/src/map/instance.c index 045be5431..6b96c3112 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 ) { @@ -470,7 +480,7 @@ void instance_del_map(int16 m) { /*-------------------------------------- * Timer to destroy instance by process or idle *--------------------------------------*/ -int instance_destroy_timer(int tid, unsigned int tick, int id, intptr_t data) { +int instance_destroy_timer(int tid, int64 tick, int id, intptr_t data) { instance->destroy(id); return 0; } |