mmo.h
来自「仙镜游戏源码,仅供学习!请勿用于非法应用!」· C头文件 代码 · 共 187 行
H
187 行
#define MAX_SERVERS 20
#define MAX_MAP_PER_SERVER 256
#define MAX_NPC_PER_MAP 512
#define BLOCK_SIZE 8
#define AREA_SIZE 3
#define MAX_INVENTORY 100
#define MAX_CART 100
#define MAX_SKILL 64
#define LOCAL_REG_NUM 16
#define GLOBAL_REG_NUM 16
#define DEFAULT_WALK_SPEED 80
#define LIFETIME_FLOORITEM 60
int timer_info_a[100000];
int timer_info_m[100000];
int monster_i[100000];
int timer_info_mp[100000];
int monster_nums[100000];
struct mons_data {
short health_points;
int npc_num;
int job_exp;
int base_exp;
int group;
int move;
};
struct mmo_account {
char* userid;
char* passwd;
int ver_1;
int ver_2;
long account_id;
long login_id1;
long login_id2;
long char_id;
char lastlogin[24];
int sex;
};
struct mmo_char_server {
char name[32];
long ip;
short port;
int users;
};
struct mmo_map_server{
long ip;
short port;
int users;
char map[256][16];
};
struct item {
int id;
short nameid;
short amount;
short equip;
char identify;
char refine;
char attribute;
short card[4];
};
struct point{
char map[16];
short x,y;
};
struct skill {
unsigned char id,lv;
};
struct mmo_charstatus {
int char_id;
int account_id;
int base_exp,job_exp,zeny;
short class;
short status_point,skill_point;
short hp,max_hp,sp,max_sp;
short option,karma,manner;
short party_id,guild_id;
short hair,hair_color,clothes_color;
short weapon,sheild;
short head_top,head_mid,head_bottom;
char name[24];
unsigned char base_level,job_level;
unsigned char str,agi,vit,int_,dex,luk,char_num;
struct point last_point,save_point,memo_point[3];
struct item inventory[MAX_INVENTORY],cart[MAX_CART];
struct skill skill[MAX_SKILL];
int global_reg[GLOBAL_REG_NUM];
};
enum { BL_NUL, BL_PC, BL_NPC, BL_ITEM };
enum { MONS, WARP, SHOP, SCRIPT };
struct block_list {
struct block_list *next,*prev;
short type,subtype;
};
struct map_session_data {
struct block_list block;
struct {
int auth : 1 ;
} state;
int account_id,char_id,login_id1,login_id2,sex,a_tick;
struct mmo_charstatus status;
int weight,max_weight;
char mapname[16];
int mapno;
int fd;
short x,y;
short to_x,to_y;
short speed;
char sitting,dir,head_dir;
unsigned long client_tick,server_tick;
int walkpath_len,walkpath_pos;
int walktimer;
char walkpath[64];
int npc_id;
int npc_n;
int npc_pc;
int local_reg[LOCAL_REG_NUM];
};
struct npc_data {
struct block_list block;
int id;
short m,x,y;
short class,dir;
char name[24];
union {
char *script;
struct npc_item_list *shop_item;
struct {
short xs,ys;
short x,y;
char name[16];
} warp;
struct {
int timer;
short to_x,to_y;
int speed;
short hp;
int target_id;
} mons;
} u;
};
struct npc_item_list {
int nameid,value;
};
struct mmo_map_data {
unsigned char *gat;
struct block_list *block;
int xs,ys;
int bxs,bys;
int npc_num;
struct npc_data *npc[MAX_NPC_PER_MAP];
};
struct flooritem_data {
struct block_list block;
int id;
short m,x,y;
short subx,suby;
int drop_tick;
struct item item_data;
};
enum {
SP_SPEED,SP_BASEEXP,SP_JOBEXP,SP_KARMA,SP_MANNER,SP_HP,SP_MAXHP,SP_SP,
SP_MAXSP,SP_STATUSPOINT,SP_0a,SP_BASELEVEL,SP_SKILLPOINT,SP_STR,SP_AGI,SP_VIT,
SP_INT,SP_DEX,SP_LUK,SP_13,SP_ZENY,SP_15,SP_NEXTBASEEXP,SP_NEXTJOBEXP,
SP_WEIGHT,SP_MAXWEIGHT,SP_1a,SP_1b,SP_1c,SP_1d,SP_1e,SP_1f,
SP_USTR,SP_UAGI,SP_UVIT,SP_UINT,SP_UDEX,SP_ULUK,SP_26,SP_27,
SP_28,SP_ATK1,SP_ATK2,SP_MATK1,SP_MATK2,SP_DEF1,SP_DEF2,SP_MDEF1,
SP_MDEF2,SP_HIT,SP_FLEE1,SP_FLEE2,SP_CRITICAL,SP_ASPD,SP_36,SP_JOBLEVEL
};
enum {
LOOK_BASE,LOOK_01,LOOK_WEAPON,LOOK_HEAD_BOTTOM,LOOK_HEAD_TOP,LOOK_HEAD_MID,LOOK_06,LOOK_07,LOOK_SHEILD
};
⌨️ 快捷键说明
复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?