summaryrefslogtreecommitdiff
path: root/src/map/charcommand.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/map/charcommand.h')
-rw-r--r--src/map/charcommand.h101
1 files changed, 8 insertions, 93 deletions
diff --git a/src/map/charcommand.h b/src/map/charcommand.h
index 754989d4b..25a27b732 100644
--- a/src/map/charcommand.h
+++ b/src/map/charcommand.h
@@ -4,101 +4,16 @@
#ifndef _CHARCOMMAND_H_
#define _CHARCOMMAND_H_
-enum CharCommandType {
- CharCommand_None = -1,
- CharCommandJobChange,
- CharCommandPetRename,
- CharCommandPetFriendly,
- CharCommandReset,
- CharCommandStats,
- CharCommandOption,
- CharCommandSave,
- CharCommandSpiritball,
- CharCommandItemList,
- CharCommandEffect,
- CharCommandStorageList,
- CharCommandItem, // by MC Cameri
- CharCommandWarp,
- CharCommandZeny,
- CharCommandFakeName,
- CharCommandBaseLevel,
- CharCommandJobLevel,
- CharCommandQuestSkill,
- CharCommandLostSkill,
- CharCommandSkReset,
- CharCommandStReset,
- CharCommandModel,
- CharCommandSKPoint,
- CharCommandSTPoint,
- CharCommandChangeSex,
- CharCommandFeelReset, // Komurka
- CharCommandHelp,
- CharCommandLoad,
- CharCommandSpeed,
- CharCommandStorage,
- CharCommandGStorage,
- CharCommandHide,
- CharCommandAlive,
- CharCommandHeal,
- CharCommandItem2,
- CharCommandItemReset,
- CharCommandRefine,
- CharCommandProduce,
- CharCommandStrength,
- CharCommandAgility,
- CharCommandVitality,
- CharCommandIntelligence,
- CharCommandDexterity,
- CharCommandLuck,
- CharCommandGuildLevelUp,
- CharCommandHatch,
- CharCommandPetHungry,
- CharCommandAllSkill,
- CharCommandDye,
- CharCommandHStyle,
- CharCommandHColor,
- CharCommandAllStats,
- CharCommandMountPeco,
- CharCommandDelItem,
- CharCommandJailTime,
- CharCommandDisguie,
- CharCommandUnDisguise,
- CharCommandCartList,
- CharCommandKiller,
- CharCommandKillable,
- CharCommandRefresh,
- CharCommandExp,
- CharCommandMonsterIgnore,
- CharCommandSize,
- CharCommandHomLevel,
- CharCommandHomEvolve,
- CharCommandHomFriendly,
- CharCommandHomHungry,
- CharCommandHomInfo,
- // No more commands after this line
- CharCommand_Unknown,
- CharCommand_MAX
-};
+//#include "map.h"
+struct map_session_data;
-typedef enum CharCommandType CharCommandType;
-typedef struct CharCommandInfo {
- CharCommandType type;
- const char* command;
- int level;
- int (*proc)(const int, struct map_session_data*,
- const char* command, const char* message);
-} CharCommandInfo;
-
-CharCommandType
-is_charcommand(const int fd, struct map_session_data* sd, const char* message);
-CharCommandType
-is_charcommand_sub(const int fd, struct map_session_data* sd, const char* str, int gmlvl);
+extern char charcommand_symbol;
+typedef int (*CharCommandFunc)(const int fd, struct map_session_data* sd, const char* command, const char* message);
-CharCommandType charcommand(
- struct map_session_data* sd, const int level, const char* message, CharCommandInfo* info);
-int get_charcommand_level(const CharCommandType type);
+bool is_charcommand(const int fd, struct map_session_data* sd, const char* message);
+bool is_charcommand_sub(const int fd, struct map_session_data* sd, const char* str, int gmlvl);
+int get_charcommand_level(const CharCommandFunc func);
-int charcommand_config_read(const char *cfgName);
-extern char charcommand_symbol;
+int charcommand_config_read(const char* cfgName);
#endif /* _CHARCOMMAND_H_ */