diff --git a/src/client/client.c b/src/client/client.c index b6b4d75..fdb33d8 100644 --- a/src/client/client.c +++ b/src/client/client.c @@ -48,7 +48,7 @@ void client() { return; } - setlocale(LC_ALL, ""); + setlocale(LC_ALL, ""); initscr(); start_color(); @@ -164,10 +164,10 @@ void create_account() { packet_free(pck); - char input[9]; + char input[9]; int a = //scr_prompt_string(TRUE, 20, "this prompt box is a test of a prompt box is a test of a prompt box is a test of a prompt box is a test of a prompt box is a test of a prompt box is a test of a prompt box is a test of a prompt box is a test of a prompt box is a test", input, 8); scr_prompt_voptions(TRUE, 30, "I'm glad you know which way to go, but that ain't gunna stop me, here we go!\n \nCheck and turn the signals to the left.\n \nNow turn to the left.", 3, - "Now turn to the left!", "Now turn to the right!", "Uh oh"); + "Now turn to the left!", "Now turn to the right!", "Uh oh"); for(;;); diff --git a/src/common.c b/src/common.c index 72dfc86..a0f241e 100644 --- a/src/common.c +++ b/src/common.c @@ -1,5 +1,55 @@ #include "common.h" +const char* _SKILL_NAMES[] = { + "Melee", + "Ranged", + "White Magic", + "Black Magic", + "Woodcutting", + "Firemaking", + "Mining", + "Smithing", + "Fishing", + "Cooking" +}; + +const char* _SKILL_NAMES_SHORT[] = { + "MELE", + "RANG", + "WMAG", + "BMAG", + "WCUT", + "FIRE", + "MINE", + "SMTH", + "FISH", + "COOK" +}; + +const char* _STAT_NAMES[] = { + "Strength", + "Health", + "Defense", + "Agility", + "Intellect", + "Wisdom", + "Charisma", + "Perception", + "Luck" +}; + +const char* _STAT_NAMES_SHORT[] = { + "STR", + "HP", + "DEF", + "AGIL", + "INT", + "WIS", + "CHAR", + "PCPT", + "LUCK" +}; + /* HOST TO NETWORK CONVERSIONS */ static BOOL in_order = 0xFF; diff --git a/src/common.h b/src/common.h index a738d26..1960541 100644 --- a/src/common.h +++ b/src/common.h @@ -8,6 +8,7 @@ #define WORK #define MAHOU_PORT "6770" +#define MAX_CONNS 100 #define FALSE 0 #define TRUE 1 @@ -21,7 +22,35 @@ #define KEY_TAB 9 #define KEY_LF 10 -#define MAX_CONNS 100 +/** SKILL SECTION START **/ +#define SKILLS_COUNT 10 +#define SKILL_MELEE 0 +#define SKILL_RANGED 1 +#define SKILL_WHMAGIC 2 +#define SKILL_BLMAGIC 3 +#define SKILL_WOODCUT 4 +#define SKILL_FIREMAKE 5 +#define SKILL_MINING 6 +#define SKILL_SMITHING 7 +#define SKILL_FISHING 8 +#define SKILL_COOKING 9 + +#define STATS_COUNT 9 +#define STAT_STRENGTH 0 +#define STAT_HEALTH 1 +#define STAT_DEFENSE 2 +#define STAT_AGILITY 3 +#define STAT_INTELLECT 4 +#define STAT_WISDOM 5 +#define STAT_CHARISMA 6 +#define STAT_PERCEPT 7 +#define STAT_LUCK 8 + +extern const char* _SKILL_NAMES[]; +extern const char* _SKILL_NAMES_SHORT[]; +extern const char* _STAT_NAMES[]; +extern const char* _STAT_NAMES_SHORT[]; +/** SKILL SECTION END **/ uint64_t htonll(uint64_t); uint64_t ntohll(uint64_t); diff --git a/src/server/user.c b/src/server/user.c index bf79e9a..d8d044e 100644 --- a/src/server/user.c +++ b/src/server/user.c @@ -1,55 +1,5 @@ #include "user.h" -const char* _SKILL_NAMES[] = { - "Melee", - "Ranged", - "White Magic", - "Black Magic", - "Woodcutting", - "Firemaking", - "Mining", - "Smithing", - "Fishing", - "Cooking" -}; - -const char* _SKILL_NAMES_SHORT[] = { - "MELE", - "RANG", - "WMAG", - "BMAG", - "WCUT", - "FIRE", - "MINE", - "SMTH", - "FISH", - "COOK" -}; - -const char* _STAT_NAMES[] = { - "Strength", - "Health", - "Defense", - "Agility", - "Intellect", - "Wisdom", - "Charisma", - "Perception", - "Luck" -}; - -const char* _STAT_NAMES_SHORT[] = { - "STR", - "HP", - "DEF", - "AGIL", - "INT", - "WIS", - "CHAR", - "PCPT", - "LUCK" -}; - struct { pthread_mutex_t mx_ctx; list_t *active_users; diff --git a/src/server/user.h b/src/server/user.h index 88f64d3..5533970 100644 --- a/src/server/user.h +++ b/src/server/user.h @@ -15,34 +15,6 @@ #define USER_GENDER_FEMALE 1 #define USER_FLAG_POISONED 2 -#define SKILLS_COUNT 10 -#define SKILL_MELEE 0 -#define SKILL_RANGED 1 -#define SKILL_WHMAGIC 2 -#define SKILL_BLMAGIC 3 -#define SKILL_WOODCUT 4 -#define SKILL_FIREMAKE 5 -#define SKILL_MINING 6 -#define SKILL_SMITHING 7 -#define SKILL_FISHING 8 -#define SKILL_COOKING 9 - -#define STATS_COUNT 9 -#define STAT_STRENGTH 0 -#define STAT_HEALTH 1 -#define STAT_DEFENSE 2 -#define STAT_AGILITY 3 -#define STAT_INTELLECT 4 -#define STAT_WISDOM 5 -#define STAT_CHARISMA 6 -#define STAT_PERCEPT 7 -#define STAT_LUCK 8 - -extern const char* _SKILL_NAMES[]; -extern const char* _SKILL_NAMES_SHORT[]; -extern const char* _STAT_NAMES[]; -extern const char* _STAT_NAMES_SHORT[]; - typedef struct user_t user_t; struct user_t { pthread_mutex_t mx_user;