This commit is contained in:
mallocnull 2017-12-26 10:09:36 -06:00
parent 8f394ab34b
commit 046cd298aa
5 changed files with 83 additions and 82 deletions

View file

@ -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;

View file

@ -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);

View file

@ -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;

View file

@ -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;