summaryrefslogtreecommitdiff
path: root/src/map/map.c
diff options
context:
space:
mode:
authorAsheraf <acheraf1998@gmail.com>2018-06-25 21:00:42 +0100
committerAsheraf <acheraf1998@gmail.com>2018-07-24 02:24:40 +0100
commit7c43dd908622e083b0fecf7fc8ebab61501186fa (patch)
treef742073f0dcc69ac5ac365ab24adaaac7aebc0df /src/map/map.c
parent620c55e87019a46ffffc6ffb69bea77df088b904 (diff)
downloadhercules-7c43dd908622e083b0fecf7fc8ebab61501186fa.tar.gz
hercules-7c43dd908622e083b0fecf7fc8ebab61501186fa.tar.bz2
hercules-7c43dd908622e083b0fecf7fc8ebab61501186fa.tar.xz
hercules-7c43dd908622e083b0fecf7fc8ebab61501186fa.zip
Questinfo System overhaul
Diffstat (limited to 'src/map/map.c')
-rw-r--r--src/map/map.c12
1 files changed, 1 insertions, 11 deletions
diff --git a/src/map/map.c b/src/map/map.c
index a0dfdb886..0124a3035 100644
--- a/src/map/map.c
+++ b/src/map/map.c
@@ -3681,7 +3681,7 @@ static void do_final_maps(void)
if( map->list[i].channel )
channel->delete(map->list[i].channel);
- VECTOR_CLEAR(map->list[i].qi_data);
+ quest->questinfo_vector_clear(i);
HPM->data_store_destroy(&map->list[i].hdata);
}
@@ -5967,19 +5967,9 @@ static int map_get_new_bonus_id(void)
static void map_add_questinfo(int m, struct questinfo *qi)
{
- unsigned short i;
-
nullpo_retv(qi);
Assert_retv(m >= 0 && m < map->count);
- /* duplicate, override */
- for (i = 0; i < VECTOR_LENGTH(map->list[m].qi_data); i++) {
- struct questinfo *qi_data = &VECTOR_INDEX(map->list[m].qi_data, i);
- if (qi_data->nd == qi->nd) {
- VECTOR_INDEX(map->list[m].qi_data, i) = *qi;
- return;
- }
- }
VECTOR_ENSURE(map->list[m].qi_data, 1, 1);
VECTOR_PUSH(map->list[m].qi_data, *qi);
}