diff options
Diffstat (limited to 'src/map/guild.c')
-rw-r--r-- | src/map/guild.c | 28 |
1 files changed, 14 insertions, 14 deletions
diff --git a/src/map/guild.c b/src/map/guild.c index 9e7dc9b0f..b83f05f00 100644 --- a/src/map/guild.c +++ b/src/map/guild.c @@ -296,7 +296,7 @@ int guild_payexp_timer_sub(DBKey key, DBData *data, va_list ap) { struct guild_expcache *c; struct guild *g; - c = db_data2ptr(data); + c = DB->data2ptr(data); if ( (g = guild->search(c->guild_id)) == NULL || @@ -331,7 +331,7 @@ int guild_payexp_timer(int tid, unsigned int tick, int id, intptr_t data) */ int guild_send_xy_timer_sub(DBKey key, DBData *data, va_list ap) { - struct guild *g = db_data2ptr(data); + struct guild *g = DB->data2ptr(data); int i; nullpo_ret(g); @@ -439,8 +439,8 @@ int guild_npc_request_info(int guild_id,const char *event) ev=(struct eventlist *)aCalloc(sizeof(struct eventlist),1); memcpy(ev->name,event,strlen(event)); //The one in the db (if present) becomes the next event from this. - if (guild_infoevent_db->put(guild_infoevent_db, db_i2key(guild_id), db_ptr2data(ev), &prev)) - ev->next = db_data2ptr(&prev); + if (guild_infoevent_db->put(guild_infoevent_db, DB->i2key(guild_id), DB->ptr2data(ev), &prev)) + ev->next = DB->data2ptr(&prev); } return guild->request_info(guild_id); @@ -615,8 +615,8 @@ int guild_recv_info(struct guild *sg) { } //Occurrence of an event - if (guild_infoevent_db->remove(guild_infoevent_db, db_i2key(sg->guild_id), &data)) { - struct eventlist *ev = db_data2ptr(&data), *ev2; + if (guild_infoevent_db->remove(guild_infoevent_db, DB->i2key(sg->guild_id), &data)) { + struct eventlist *ev = DB->data2ptr(&data), *ev2; while(ev) { npc_event_do(ev->name); ev2=ev->next; @@ -1243,7 +1243,7 @@ static DBData create_expcache(DBKey key, va_list args) c->account_id = sd->status.account_id; c->char_id = sd->status.char_id; c->exp = 0; - return db_ptr2data(c); + return DB->ptr2data(c); } /*==================================================== @@ -1269,7 +1269,7 @@ unsigned int guild_payexp(struct map_session_data *sd,unsigned int exp) { exp = exp * per / 100; //Otherwise tax everything. - c = db_data2ptr(guild_expcache_db->ensure(guild_expcache_db, db_i2key(sd->status.char_id), create_expcache, sd)); + c = DB->data2ptr(guild_expcache_db->ensure(guild_expcache_db, DB->i2key(sd->status.char_id), create_expcache, sd)); if (c->exp > UINT64_MAX - exp) c->exp = UINT64_MAX; @@ -1292,7 +1292,7 @@ int guild_getexp(struct map_session_data *sd,int exp) if (sd->status.guild_id == 0 || sd->guild == NULL) return 0; - c = db_data2ptr(guild_expcache_db->ensure(guild_expcache_db, db_i2key(sd->status.char_id), create_expcache, sd)); + c = DB->data2ptr(guild_expcache_db->ensure(guild_expcache_db, DB->i2key(sd->status.char_id), create_expcache, sd)); if (c->exp > UINT64_MAX - exp) c->exp = UINT64_MAX; else @@ -1692,7 +1692,7 @@ int guild_allianceack(int guild_id1,int guild_id2,int account_id1,int account_id */ int guild_broken_sub(DBKey key, DBData *data, va_list ap) { - struct guild *g = db_data2ptr(data); + struct guild *g = DB->data2ptr(data); int guild_id=va_arg(ap,int); int i,j; struct map_session_data *sd=NULL; @@ -1717,7 +1717,7 @@ int guild_broken_sub(DBKey key, DBData *data, va_list ap) */ int castle_guild_broken_sub(DBKey key, DBData *data, va_list ap) { - struct guild_castle *gc = db_data2ptr(data); + struct guild_castle *gc = DB->data2ptr(data); int guild_id = va_arg(ap, int); nullpo_ret(gc); @@ -2145,7 +2145,7 @@ void guild_flag_remove(struct npc_data *nd) { */ static int eventlist_db_final(DBKey key, DBData *data, va_list ap) { struct eventlist *next = NULL; - struct eventlist *current = db_data2ptr(data); + struct eventlist *current = DB->data2ptr(data); while (current != NULL) { next = current->next; aFree(current); @@ -2158,7 +2158,7 @@ static int eventlist_db_final(DBKey key, DBData *data, va_list ap) { * @see DBApply */ static int guild_expcache_db_final(DBKey key, DBData *data, va_list ap) { - ers_free(expcache_ers, db_data2ptr(data)); + ers_free(expcache_ers, DB->data2ptr(data)); return 0; } @@ -2166,7 +2166,7 @@ static int guild_expcache_db_final(DBKey key, DBData *data, va_list ap) { * @see DBApply */ static int guild_castle_db_final(DBKey key, DBData *data, va_list ap) { - struct guild_castle* gc = db_data2ptr(data); + struct guild_castle* gc = DB->data2ptr(data); if( gc->temp_guardians ) aFree(gc->temp_guardians); aFree(gc); |