summaryrefslogtreecommitdiff
path: root/src/map
diff options
context:
space:
mode:
authorHaru <haru@dotalux.com>2016-02-20 15:20:42 +0100
committerHaru <haru@dotalux.com>2016-03-20 18:32:08 +0100
commitd9ffa7399bc88ecfaf1f3b17f9f04a743b7f2dd2 (patch)
tree33a179c32d67e49bddd7d70db6280764b6c0173b /src/map
parent9975335df7aa30d687bf47aa1fe01f0c4993849d (diff)
downloadhercules-d9ffa7399bc88ecfaf1f3b17f9f04a743b7f2dd2.tar.gz
hercules-d9ffa7399bc88ecfaf1f3b17f9f04a743b7f2dd2.tar.bz2
hercules-d9ffa7399bc88ecfaf1f3b17f9f04a743b7f2dd2.tar.xz
hercules-d9ffa7399bc88ecfaf1f3b17f9f04a743b7f2dd2.zip
Dropped typedef from DBMap
Signed-off-by: Haru <haru@dotalux.com>
Diffstat (limited to 'src/map')
-rw-r--r--src/map/atcommand.h4
-rw-r--r--src/map/battleground.h2
-rw-r--r--src/map/channel.h8
-rw-r--r--src/map/chat.h5
-rw-r--r--src/map/chrif.h2
-rw-r--r--src/map/guild.h8
-rw-r--r--src/map/itemdb.h4
-rw-r--r--src/map/map.h20
-rw-r--r--src/map/npc.c2
-rw-r--r--src/map/npc.h8
-rw-r--r--src/map/party.h4
-rw-r--r--src/map/pc.h4
-rw-r--r--src/map/pc_groups.h6
-rw-r--r--src/map/script.c10
-rw-r--r--src/map/script.h12
-rw-r--r--src/map/skill.h12
-rw-r--r--src/map/storage.h2
-rw-r--r--src/map/vending.h5
18 files changed, 61 insertions, 57 deletions
diff --git a/src/map/atcommand.h b/src/map/atcommand.h
index 40db16bbf..0e7895825 100644
--- a/src/map/atcommand.h
+++ b/src/map/atcommand.h
@@ -94,8 +94,8 @@ struct atcommand_interface {
struct atcmd_binding_data** binding;
int binding_count;
/* other vars */
- DBMap* db; //name -> AtCommandInfo
- DBMap* alias_db; //alias -> AtCommandInfo
+ struct DBMap *db; //name -> AtCommandInfo
+ struct DBMap *alias_db; //alias -> AtCommandInfo
/**
* msg_table[lang_id][msg_id]
* Server messages (0-499 reserved for GM commands, 500-999 reserved for others)
diff --git a/src/map/battleground.h b/src/map/battleground.h
index 05458a9b1..8657beaf8 100644
--- a/src/map/battleground.h
+++ b/src/map/battleground.h
@@ -102,7 +102,7 @@ struct battleground_interface {
struct bg_arena **arena;
unsigned char arenas;
/* */
- DBMap *team_db; // int bg_id -> struct battleground_data*
+ struct DBMap *team_db; // int bg_id -> struct battleground_data*
unsigned int team_counter; // Next bg_id
/* */
void (*init) (bool minimal);
diff --git a/src/map/channel.h b/src/map/channel.h
index ac1c8f0cb..e8696fd90 100644
--- a/src/map/channel.h
+++ b/src/map/channel.h
@@ -21,12 +21,12 @@
#define MAP_CHANNEL_H
#include "common/hercules.h"
-#include "common/db.h"
#include "common/mmo.h"
/**
* Declarations
**/
+struct DBMap; // common/db.h
struct map_session_data;
struct guild;
@@ -83,8 +83,8 @@ struct channel_data {
char name[HCS_NAME_LENGTH];
char password[HCS_NAME_LENGTH];
unsigned char color;
- DBMap *users;
- DBMap *banned;
+ struct DBMap *users;
+ struct DBMap *banned;
unsigned int options;
unsigned int owner;
enum channel_types type;
@@ -94,7 +94,7 @@ struct channel_data {
struct channel_interface {
/* vars */
- DBMap *db;
+ struct DBMap *db;
struct Channel_Config *config;
int (*init) (bool minimal);
diff --git a/src/map/chat.h b/src/map/chat.h
index 603d8441f..59d61a46e 100644
--- a/src/map/chat.h
+++ b/src/map/chat.h
@@ -23,8 +23,9 @@
#include "map/map.h" // struct block_list, CHATROOM_TITLE_SIZE
#include "common/hercules.h"
-#include "common/db.h"
+/* Forward Declarations */
+struct DBMap; // common/db.h
struct chat_data;
struct map_session_data;
struct npc_data;
@@ -46,7 +47,7 @@ struct chat_data {
struct block_list* owner;
char npc_event[EVENT_NAME_LENGTH];
/* isn't this a waste? there is a enormous overhead, wouldn't something like skill_blockpc_start be better here? [Ind] */
- DBMap* kick_list; ///< DBMap of users who were kicked from this chat
+ struct DBMap *kick_list; ///< DBMap of users who were kicked from this chat
};
/*=====================================
diff --git a/src/map/chrif.h b/src/map/chrif.h
index dc946b1c1..4a1e1da47 100644
--- a/src/map/chrif.h
+++ b/src/map/chrif.h
@@ -72,7 +72,7 @@ struct chrif_interface {
/* */
struct eri *auth_db_ers; //For re-utilizing player login structures.
- DBMap* auth_db; // int id -> struct auth_node*
+ struct DBMap *auth_db; // int id -> struct auth_node*
/* */
int packet_len_table[CHRIF_PACKET_LEN_TABLE_SIZE];
int fd;
diff --git a/src/map/guild.h b/src/map/guild.h
index c0191469b..1f3b74543 100644
--- a/src/map/guild.h
+++ b/src/map/guild.h
@@ -71,10 +71,10 @@ struct guild_interface {
void (*init) (bool minimal);
void (*final) (void);
/* */
- DBMap* db; // int guild_id -> struct guild*
- DBMap* castle_db; // int castle_id -> struct guild_castle*
- DBMap* expcache_db; // int char_id -> struct guild_expcache*
- DBMap* infoevent_db; // int guild_id -> struct eventlist*
+ struct DBMap *db; // int guild_id -> struct guild*
+ struct DBMap *castle_db; // int castle_id -> struct guild_castle*
+ struct DBMap *expcache_db; // int char_id -> struct guild_expcache*
+ struct DBMap *infoevent_db; // int guild_id -> struct eventlist*
/* */
struct eri *expcache_ers; //For handling of guild exp payment.
/* */
diff --git a/src/map/itemdb.h b/src/map/itemdb.h
index 58d19db05..d33805174 100644
--- a/src/map/itemdb.h
+++ b/src/map/itemdb.h
@@ -589,10 +589,10 @@ struct itemdb_interface {
struct item_combo **combos;
unsigned short combo_count;
/* */
- DBMap *names;
+ struct DBMap *names;
/* */
struct item_data *array[MAX_ITEMDB];
- DBMap *other;// int nameid -> struct item_data*
+ struct DBMap *other;// int nameid -> struct item_data*
struct item_data dummy; //This is the default dummy item used for non-existant items. [Skotlex]
/* */
void (*read_groups) (void);
diff --git a/src/map/map.h b/src/map/map.h
index 9df2dd586..dbd30febf 100644
--- a/src/map/map.h
+++ b/src/map/map.h
@@ -1004,16 +1004,16 @@ struct map_interface {
int16 index2mapid[MAX_MAPINDEX];
/* */
- DBMap* id_db; // int id -> struct block_list*
- DBMap* pc_db; // int id -> struct map_session_data*
- DBMap* mobid_db; // int id -> struct mob_data*
- DBMap* bossid_db; // int id -> struct mob_data* (MVP db)
- DBMap* map_db; // unsigned int mapindex -> struct map_data_other_server*
- DBMap* nick_db; // int char_id -> struct charid2nick* (requested names of offline characters)
- DBMap* charid_db; // int char_id -> struct map_session_data*
- DBMap* regen_db; // int id -> struct block_list* (status_natural_heal processing)
- DBMap* zone_db; // string => struct map_zone_data
- DBMap* iwall_db;
+ struct DBMap *id_db; // int id -> struct block_list*
+ struct DBMap *pc_db; // int id -> struct map_session_data*
+ struct DBMap *mobid_db; // int id -> struct mob_data*
+ struct DBMap *bossid_db; // int id -> struct mob_data* (MVP db)
+ struct DBMap *map_db; // unsigned int mapindex -> struct map_data_other_server*
+ struct DBMap *nick_db; // int char_id -> struct charid2nick* (requested names of offline characters)
+ struct DBMap *charid_db; // int char_id -> struct map_session_data*
+ struct DBMap *regen_db; // int id -> struct block_list* (status_natural_heal processing)
+ struct DBMap *zone_db; // string => struct map_zone_data
+ struct DBMap *iwall_db;
struct block_list **block_free;
int block_free_count, block_free_lock, block_free_list_size;
struct block_list **bl_list;
diff --git a/src/map/npc.c b/src/map/npc.c
index 291f3c172..4db5ce625 100644
--- a/src/map/npc.c
+++ b/src/map/npc.c
@@ -3625,7 +3625,7 @@ int npc_do_atcmd_event(struct map_session_data* sd, const char* command, const c
*/
const char *npc_parse_function(const char *w1, const char *w2, const char *w3, const char *w4, const char *start, const char *buffer, const char *filepath, int *retval)
{
- DBMap* func_db;
+ struct DBMap *func_db;
struct DBData old_data;
struct script_code *scriptroot;
const char* end;
diff --git a/src/map/npc.h b/src/map/npc.h
index 5b4707d00..8ee59e410 100644
--- a/src/map/npc.h
+++ b/src/map/npc.h
@@ -177,10 +177,10 @@ struct npc_path_data {
struct npc_interface {
/* */
struct npc_data *motd;
- DBMap *ev_db; // const char* event_name -> struct event_data*
- DBMap *ev_label_db; // const char* label_name (without leading "::") -> struct linkdb_node** (key: struct npc_data*; data: struct event_data*)
- DBMap *name_db; // const char* npc_name -> struct npc_data*
- DBMap *path_db;
+ struct DBMap *ev_db; // const char* event_name -> struct event_data*
+ struct DBMap *ev_label_db; // const char* label_name (without leading "::") -> struct linkdb_node** (key: struct npc_data*; data: struct event_data*)
+ struct DBMap *name_db; // const char* npc_name -> struct npc_data*
+ struct DBMap *path_db;
struct eri *timer_event_ers; //For the npc timer data. [Skotlex]
struct npc_data *fake_nd;
struct npc_src_list *src_files;
diff --git a/src/map/party.h b/src/map/party.h
index 750f7d07f..253f074bb 100644
--- a/src/map/party.h
+++ b/src/map/party.h
@@ -85,8 +85,8 @@ struct party_booking_ad_info {
* created by Susu
*-------------------------------------*/
struct party_interface {
- DBMap* db; // int party_id -> struct party_data* (releases data)
- DBMap* booking_db; // int char_id -> struct party_booking_ad_info* (releases data) // Party Booking [Spiria]
+ struct DBMap *db; // int party_id -> struct party_data* (releases data)
+ struct DBMap *booking_db; // int char_id -> struct party_booking_ad_info* (releases data) // Party Booking [Spiria]
unsigned int booking_nextid;
/* funcs */
void (*init) (bool minimal);
diff --git a/src/map/pc.h b/src/map/pc.h
index 728d02734..a702b44bc 100644
--- a/src/map/pc.h
+++ b/src/map/pc.h
@@ -785,9 +785,9 @@ struct autotrade_vending {
struct pc_interface {
/* */
- DBMap *at_db;/* char id -> struct autotrade_vending */
+ struct DBMap *at_db;/* char id -> struct autotrade_vending */
/* */
- DBMap* itemcd_db;
+ struct DBMap *itemcd_db;
/* */
int day_timer_tid;
int night_timer_tid;
diff --git a/src/map/pc_groups.h b/src/map/pc_groups.h
index 3f95237b7..27eac7284 100644
--- a/src/map/pc_groups.h
+++ b/src/map/pc_groups.h
@@ -22,9 +22,9 @@
#define MAP_PC_GROUPS_H
#include "common/hercules.h"
-#include "common/db.h"
/* Forward Declarations */
+struct DBMap; // common/db.h
struct config_setting_t;
/// PC permissions
@@ -91,8 +91,8 @@ struct pc_groups_new_permission {
struct pc_groups_interface {
/* */
- DBMap* db; // id -> GroupSettings
- DBMap* name_db; // name -> GroupSettings
+ struct DBMap *db; // id -> GroupSettings
+ struct DBMap *name_db; // name -> GroupSettings
/* */
struct pc_groups_permission_table *permissions;
unsigned char permission_count;
diff --git a/src/map/script.c b/src/map/script.c
index 5d7698f75..0fc4a5a65 100644
--- a/src/map/script.c
+++ b/src/map/script.c
@@ -56,6 +56,7 @@
#include "map/unit.h"
#include "common/cbasetypes.h"
#include "common/conf.h"
+#include "common/db.h"
#include "common/memmgr.h"
#include "common/md5calc.h"
#include "common/mmo.h" // NEW_CARTS
@@ -3606,7 +3607,8 @@ void pop_stack(struct script_state* st, int start, int end) {
/*==========================================
* Release script dependent variable, dependent variable of function
*------------------------------------------*/
-void script_free_vars(struct DBMap* var_storage) {
+void script_free_vars(struct DBMap *var_storage)
+{
if( var_storage ) {
// destroy the storage construct containing the variables
db_destroy(var_storage);
@@ -4919,7 +4921,7 @@ void script_load_translations(void) {
if( total ) {
struct DBIterator *main_iter, *sub_iter;
- DBMap *string_db;
+ struct DBMap *string_db;
struct string_translation *st = NULL;
uint32 j = 0;
@@ -4982,7 +4984,7 @@ void script_load_translation(const char *file, uint8 lang_id, uint32 *total) {
uint32 translations = 0;
char line[1024];
char msgctxt[NAME_LENGTH*2+1] = { 0 };
- DBMap *string_db;
+ struct DBMap *string_db;
size_t i;
FILE *fp;
struct script_string_buf msgid = { 0 }, msgstr = { 0 };
@@ -5135,7 +5137,7 @@ void script_clear_translations(bool reload) {
**/
int script_translation_db_destroyer(union DBKey key, struct DBData *data, va_list ap)
{
- DBMap *string_db = DB->data2ptr(data);
+ struct DBMap *string_db = DB->data2ptr(data);
if( db_size(string_db) ) {
struct string_translation *st = NULL;
diff --git a/src/map/script.h b/src/map/script.h
index 368247c63..a1fbe31f0 100644
--- a/src/map/script.h
+++ b/src/map/script.h
@@ -494,8 +494,8 @@ struct script_syntax_data {
int last_func; // buildin index of the last parsed function
unsigned int nested_call; //Dont really know what to call this
bool lang_macro_active;
- DBMap *strings; // string map parsed (used when exporting strings only)
- DBMap *translation_db; //non-null if this npc has any translated strings to be linked
+ struct DBMap *strings; // string map parsed (used when exporting strings only)
+ struct DBMap *translation_db; //non-null if this npc has any translated strings to be linked
};
struct casecheck_data {
@@ -534,7 +534,7 @@ struct string_translation {
**/
struct script_interface {
/* */
- DBMap *st_db;
+ struct DBMap *st_db;
unsigned int active_scripts;
unsigned int next_id;
struct eri *st_ers;
@@ -602,8 +602,8 @@ struct script_interface {
/* */
/* Caches compiled autoscript item code. */
/* Note: This is not cleared when reloading itemdb. */
- DBMap* autobonus_db; // char* script -> char* bytecode
- DBMap* userfunc_db; // const char* func_name -> struct script_code*
+ struct DBMap *autobonus_db; // char* script -> char* bytecode
+ struct DBMap *userfunc_db; // const char* func_name -> struct script_code*
/* */
int potion_flag; //For use on Alchemist improved potions/Potion Pitcher. [Skotlex]
int potion_hp, potion_per_hp, potion_sp, potion_per_sp;
@@ -621,7 +621,7 @@ struct script_interface {
int buildin_select_offset;
int buildin_lang_macro_offset;
/* */
- DBMap *translation_db;/* npc_name => DBMap (strings) */
+ struct DBMap *translation_db;/* npc_name => DBMap (strings) */
char **translation_buf;/* */
uint32 translation_buf_size;
/* */
diff --git a/src/map/skill.h b/src/map/skill.h
index 2f8525654..35fddafa4 100644
--- a/src/map/skill.h
+++ b/src/map/skill.h
@@ -1856,12 +1856,12 @@ struct skill_interface {
void (*reload) (void);
void (*read_db) (bool minimal);
/* */
- DBMap* cd_db; // char_id -> struct skill_cd
- DBMap* name2id_db;
- DBMap* unit_db; // int id -> struct skill_unit*
- DBMap* usave_db; // char_id -> struct skill_unit_save
- DBMap* group_db;// int group_id -> struct skill_unit_group*
- DBMap* bowling_db;// int mob_id -> struct mob_data*s
+ struct DBMap *cd_db; // char_id -> struct skill_cd
+ struct DBMap *name2id_db;
+ struct DBMap *unit_db; // int id -> struct skill_unit*
+ struct DBMap *usave_db; // char_id -> struct skill_unit_save
+ struct DBMap *group_db;// int group_id -> struct skill_unit_group*
+ struct DBMap *bowling_db;// int mob_id -> struct mob_data*s
/* */
struct eri *unit_ers; //For handling skill_unit's [Skotlex]
struct eri *timer_ers; //For handling skill_timerskills [Skotlex]
diff --git a/src/map/storage.h b/src/map/storage.h
index 2c7ee4ffe..94512c456 100644
--- a/src/map/storage.h
+++ b/src/map/storage.h
@@ -56,7 +56,7 @@ struct storage_interface {
};
struct guild_storage_interface {
- struct DBMap* db; // int guild_id -> struct guild_storage*
+ struct DBMap *db; // int guild_id -> struct guild_storage*
/* */
struct guild_storage *(*ensure) (int guild_id);
/* */
diff --git a/src/map/vending.h b/src/map/vending.h
index 6684ed256..1d2135076 100644
--- a/src/map/vending.h
+++ b/src/map/vending.h
@@ -22,8 +22,9 @@
#define MAP_VENDING_H
#include "common/hercules.h"
-#include "common/db.h"
+/* Forward Declarations */
+struct DBMap; // common/db.h
struct map_session_data;
struct s_search_store_search;
@@ -35,7 +36,7 @@ struct s_vending {
struct vending_interface {
unsigned int next_id;/* next vender id */
- DBMap *db;
+ struct DBMap *db;
/* */
void (*init) (bool minimal);
void (*final) (void);