diff options
Diffstat (limited to 'src/map/atcommand.h')
-rw-r--r-- | src/map/atcommand.h | 23 |
1 files changed, 13 insertions, 10 deletions
diff --git a/src/map/atcommand.h b/src/map/atcommand.h index 5c4acdf01..efcf6dd31 100644 --- a/src/map/atcommand.h +++ b/src/map/atcommand.h @@ -2,7 +2,7 @@ * This file is part of Hercules. * http://herc.ws - http://github.com/HerculesWS/Hercules * - * Copyright (C) 2012-2015 Hercules Dev Team + * Copyright (C) 2012-2016 Hercules Dev Team * Copyright (C) Athena Dev Teams * * Hercules is free software: you can redistribute it and/or modify @@ -23,7 +23,6 @@ #include "map/pc_groups.h" #include "common/hercules.h" -#include "common/conf.h" #include "common/db.h" #include <stdarg.h> @@ -34,6 +33,7 @@ struct map_session_data; struct AtCommandInfo; struct block_list; +struct config_setting_t; /** * Defines @@ -79,8 +79,10 @@ struct AtCommandInfo { struct atcmd_binding_data { char command[ATCOMMAND_LENGTH]; char npc_event[ATCOMMAND_LENGTH]; - int group_lv; - int group_lv_char; + int group_lv; // DEPRECATED + int group_lv_char; // DEPRECATED + char *at_groups; // quick @commands "can-use" lookup + char *char_groups; // quick @charcommands "can-use" lookup bool log; }; @@ -94,8 +96,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) @@ -110,7 +112,7 @@ struct atcommand_interface { bool (*create) (char *name, AtCommandFunc func); bool (*can_use) (struct map_session_data *sd, const char *command); bool (*can_use2) (struct map_session_data *sd, const char *command, AtCommandType type); - void (*load_groups) (GroupSettings **groups, config_setting_t **commands_, size_t sz); + void (*load_groups) (GroupSettings **groups, struct config_setting_t **commands_, size_t sz); AtCommandInfo* (*exists) (const char* name); bool (*msg_read) (const char *cfg_name, bool allow_override); void (*final_msg) (void); @@ -135,7 +137,7 @@ struct atcommand_interface { /* */ void (*commands_sub) (struct map_session_data* sd, const int fd, AtCommandType type); void (*cmd_db_clear) (void); - int (*cmd_db_clear_sub) (DBKey key, DBData *data, va_list args); + int (*cmd_db_clear_sub) (union DBKey key, struct DBData *data, va_list args); void (*doload) (void); void (*base_commands) (void); bool (*add) (char *name, AtCommandFunc func, bool replace); @@ -152,7 +154,8 @@ void atcommand_defaults(void); HPShared struct atcommand_interface *atcommand; /* stay here */ -#define ACMD(x) static bool atcommand_ ## x (const int fd, struct map_session_data* sd, const char* command, const char* message, struct AtCommandInfo *info) __attribute__((nonnull (2, 3, 4, 5))); \ - static bool atcommand_ ## x (const int fd, struct map_session_data* sd, const char* command, const char* message, struct AtCommandInfo *info) +#define ACMD(x) \ + static bool atcommand_ ## x (const int fd, struct map_session_data* sd, const char* command, const char* message, struct AtCommandInfo *info) __attribute__((nonnull (2, 3, 4, 5))); \ + static bool atcommand_ ## x (const int fd, struct map_session_data* sd, const char* command, const char* message, struct AtCommandInfo *info) #endif /* MAP_ATCOMMAND_H */ |