summaryrefslogtreecommitdiff
path: root/src/common/mapindex.h
diff options
context:
space:
mode:
authorshennetsind <ind@henn.et>2013-05-04 17:22:57 -0300
committershennetsind <ind@henn.et>2013-05-04 17:22:57 -0300
commit18b1965ce16909613f0a53515d40553742082ce2 (patch)
treec17d031f20d140f289113a5e632eb551961ad475 /src/common/mapindex.h
parentad9a13be6ef115de1d5e124283a1d63a0bc5cd4d (diff)
downloadhercules-18b1965ce16909613f0a53515d40553742082ce2.tar.gz
hercules-18b1965ce16909613f0a53515d40553742082ce2.tar.bz2
hercules-18b1965ce16909613f0a53515d40553742082ce2.tar.xz
hercules-18b1965ce16909613f0a53515d40553742082ce2.zip
mapindex update
Fixed a mapindex_name2id problem that'd persistently not fix a broken mapindex data (e.g. char save/last map data being incorrect). It'll now align it to MAP_DEFAULT when such error occurs. Also speeded up mapindex_name2id queries, replaced the loop by the red-black-tree db lookup. Special Thanks to yommy~! Signed-off-by: shennetsind <ind@henn.et>
Diffstat (limited to 'src/common/mapindex.h')
-rw-r--r--src/common/mapindex.h13
1 files changed, 11 insertions, 2 deletions
diff --git a/src/common/mapindex.h b/src/common/mapindex.h
index 4c0641c56..d35d9899c 100644
--- a/src/common/mapindex.h
+++ b/src/common/mapindex.h
@@ -1,9 +1,18 @@
-// Copyright (c) Athena Dev Teams - Licensed under GNU GPL
-// For more information, see LICENCE in the main folder
+// Copyright (c) Hercules Dev Team, licensed under GNU GPL.
+// See the LICENSE file
+// Portions Copyright (c) Athena Dev Teams
#ifndef _MAPINDEX_H_
#define _MAPINDEX_H_
+#include "../common/db.h"
+
+/* when a map index search fails, return results from what map? default:prontera */
+#define MAP_DEFAULT "prontera"
+#define MAP_DEFAULT_X 150
+#define MAP_DEFAULT_Y 150
+DBMap *mapindex_db;
+
//File in charge of assigning a numberic ID to each map in existance for space saving when passing map info between servers.
extern char mapindex_cfgfile[80];