summaryrefslogblamecommitdiff
path: root/src/map/charcommand.h
blob: 7c1618cca6dbfe2293af85f3b316d1d0f80d5331 (plain) (tree)
1
2
3
4
5
6
7
8
9
10
11
12
13












                               
                              
                            
                          
                               
                                        
                        
                        

                             




































                                                                                          
#ifndef _CHARCOMMAND_H_
#define _CHARCOMMAND_H_

enum CharCommandType {
	CharCommand_None = -1,
	CharCommandJobChange,
	CharCommandPetRename,
	CharCommandPetFriendly,
	CharCommandReset,
	CharCommandStats,
	CharCommandOption,
	CharCommandSave,
	CharCommandStatsAll,
	CharCommandSpiritball,
	CharCommandItemList,
	CharCommandEffect,
	CharCommandStorageList,
	CharCommandItem, // by MC Cameri
	CharCommandWarp,
	CharCommandZeny,
	CharCommandShowDelay,
	CharCommandShowExp,

#ifdef TXT_ONLY
/* TXT_ONLY */

/* TXT_ONLY */
#else
/* SQL-only */

/* SQL Only */
#endif
	
	// End. No more commans after this line.
	CharCommand_Unknown,
	CharCommand_MAX
};

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, int gmlvl);

CharCommandType charcommand(
	const int level, const char* message, CharCommandInfo* info);
int get_charcommand_level(const CharCommandType type);

int charcommand_config_read(const char *cfgName);

#endif