summaryrefslogtreecommitdiff
path: root/src/map/map.c
diff options
context:
space:
mode:
authorFlipp <mysteriousragnarok@hotmail.com>2013-05-17 15:18:51 -0700
committerFlipp <mysteriousragnarok@hotmail.com>2013-05-17 15:18:51 -0700
commitb3bc657a44a9fbdd1730f569855e25ccd0f8dd01 (patch)
treeba8dc9ee07be73d2cbb62e0a1f83d29d1fa6b7c8 /src/map/map.c
parent4ef9258f0f618857ed5d9e2f9e07f33dc6d13559 (diff)
parent9afe7f28d0e3f4c9bc3abba22d8055ae7dc46f45 (diff)
downloadhercules-b3bc657a44a9fbdd1730f569855e25ccd0f8dd01.tar.gz
hercules-b3bc657a44a9fbdd1730f569855e25ccd0f8dd01.tar.bz2
hercules-b3bc657a44a9fbdd1730f569855e25ccd0f8dd01.tar.xz
hercules-b3bc657a44a9fbdd1730f569855e25ccd0f8dd01.zip
Merge pull request #26 from Earisu/master
HPM Update
Diffstat (limited to 'src/map/map.c')
-rw-r--r--src/map/map.c14
1 files changed, 7 insertions, 7 deletions
diff --git a/src/map/map.c b/src/map/map.c
index ddd2a9c82..d4c15cd6e 100644
--- a/src/map/map.c
+++ b/src/map/map.c
@@ -1478,7 +1478,7 @@ static DBData create_charid2nick(DBKey key, va_list args)
{
struct charid2nick *p;
CREATE(p, struct charid2nick, 1);
- return db_ptr2data(p);
+ return DB->ptr2data(p);
}
/// Adds(or replaces) the nick of charid to nick_db and fullfils pending requests.
@@ -1514,7 +1514,7 @@ void map_delnickdb(int charid, const char* name)
struct map_session_data* sd;
DBData data;
- if (!nick_db->remove(nick_db, db_i2key(charid), &data) || (p = db_data2ptr(&data)) == NULL)
+ if (!nick_db->remove(nick_db, DB->i2key(charid), &data) || (p = DB->data2ptr(&data)) == NULL)
return;
while( p->requests ) {
@@ -2702,7 +2702,7 @@ static DBData create_map_data_other_server(DBKey key, va_list args)
mdos=(struct map_data_other_server *)aCalloc(1,sizeof(struct map_data_other_server));
mdos->index = mapindex;
memcpy(mdos->name, mapindex_id2name(mapindex), MAP_NAME_LENGTH);
- return db_ptr2data(mdos);
+ return DB->ptr2data(mdos);
}
/*==========================================
@@ -2732,7 +2732,7 @@ int map_setipport(unsigned short mapindex, uint32 ip, uint16 port)
*/
int map_eraseallipport_sub(DBKey key, DBData *data, va_list va)
{
- struct map_data_other_server *mdos = db_data2ptr(data);
+ struct map_data_other_server *mdos = DB->data2ptr(data);
if(mdos->cell == NULL) {
db_remove(map_db,key);
aFree(mdos);
@@ -4851,7 +4851,7 @@ void read_map_zone_db(void) {
*/
int map_db_final(DBKey key, DBData *data, va_list ap)
{
- struct map_data_other_server *mdos = db_data2ptr(data);
+ struct map_data_other_server *mdos = DB->data2ptr(data);
if(mdos && mdos->cell == NULL)
aFree(mdos);
return 0;
@@ -4862,7 +4862,7 @@ int map_db_final(DBKey key, DBData *data, va_list ap)
*/
int nick_db_final(DBKey key, DBData *data, va_list args)
{
- struct charid2nick* p = db_data2ptr(data);
+ struct charid2nick* p = DB->data2ptr(data);
struct charid_request* req;
if( p == NULL )
@@ -4910,7 +4910,7 @@ int cleanup_sub(struct block_list *bl, va_list ap)
*/
static int cleanup_db_sub(DBKey key, DBData *data, va_list va)
{
- return cleanup_sub(db_data2ptr(data), va);
+ return cleanup_sub(DB->data2ptr(data), va);
}
/*==========================================