summaryrefslogtreecommitdiff
path: root/src/map/instance.c
diff options
context:
space:
mode:
authorHaru <haru@dotalux.com>2014-02-24 10:21:27 +0100
committerHaru <haru@dotalux.com>2014-03-05 22:35:02 +0100
commitd25cc9b7dbc103cf1454db37159ffffeedaac149 (patch)
tree0e4af566382b946797aa9de21df70b9bdf9d88fa /src/map/instance.c
parent78bf8d26567a2054bd9ff5268f9f73cb07d82b98 (diff)
downloadhercules-d25cc9b7dbc103cf1454db37159ffffeedaac149.tar.gz
hercules-d25cc9b7dbc103cf1454db37159ffffeedaac149.tar.bz2
hercules-d25cc9b7dbc103cf1454db37159ffffeedaac149.tar.xz
hercules-d25cc9b7dbc103cf1454db37159ffffeedaac149.zip
Ref redesign, part 2
- Reorganized regs var/array DBMaps into a specific reg_db structure Signed-off-by: Haru <haru@dotalux.com>
Diffstat (limited to 'src/map/instance.c')
-rw-r--r--src/map/instance.c14
1 files changed, 7 insertions, 7 deletions
diff --git a/src/map/instance.c b/src/map/instance.c
index a111751d0..caf622b3d 100644
--- a/src/map/instance.c
+++ b/src/map/instance.c
@@ -110,8 +110,8 @@ int instance_create(int owner_id, const char *name, enum instance_owner_type typ
instance->list[i].num_map = 0;
instance->list[i].owner_id = owner_id;
instance->list[i].owner_type = type;
- instance->list[i].vars = i64db_alloc(DB_OPT_RELEASE_DATA);
- instance->list[i].array_db = NULL;
+ instance->list[i].regs.vars = i64db_alloc(DB_OPT_RELEASE_DATA);
+ instance->list[i].regs.arrays = NULL;
instance->list[i].respawn.map = 0;
instance->list[i].respawn.y = 0;
instance->list[i].respawn.x = 0;
@@ -551,17 +551,17 @@ void instance_destroy(int instance_id) {
instance->del_map( instance->list[instance_id].map[0] );
}
- if( instance->list[instance_id].vars )
- db_destroy(instance->list[instance_id].vars);
- if( instance->list[instance_id].array_db )
- instance->list[instance_id].array_db->destroy(instance->list[instance_id].array_db,script->array_free_db);
+ if( instance->list[instance_id].regs.vars )
+ db_destroy(instance->list[instance_id].regs.vars);
+ if( instance->list[instance_id].regs.arrays )
+ instance->list[instance_id].regs.arrays->destroy(instance->list[instance_id].regs.arrays, script->array_free_db);
if( instance->list[instance_id].progress_timer != INVALID_TIMER )
timer->delete( instance->list[instance_id].progress_timer, instance->destroy_timer);
if( instance->list[instance_id].idle_timer != INVALID_TIMER )
timer->delete( instance->list[instance_id].idle_timer, instance->destroy_timer);
- instance->list[instance_id].vars = NULL;
+ instance->list[instance_id].regs.vars = NULL;
if( instance->list[instance_id].map )
aFree(instance->list[instance_id].map);