⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 dr_network.h

📁 国内著名网络游戏dragon的服务端完整源码 内附完整数据库结构
💻 H
📖 第 1 页 / 共 5 页
字号:
/////////////////////////////////////////////////////////////////////////////
/////////////////////////////////////////////////////////////////////////////
/////////////////////////////////////////////////////////////////////////////
/////////////////////////////////////////////////////////////////////////////




/////////////////////////////////////////////////////////////////////////////
/////////////////////////////////////////////////////////////////////////////
/////////////////////////////////////////////////////////////////////////////
/////////////////////////////////////////////////////////////////////////////
typedef struct  server_interface_peace
{
	short int	client_id ;
}t_server_interface_peace;

typedef struct  server_interface_battle
{
	short int	client_id ;
}t_server_interface_battle;


//--------------------------------------------------------
typedef struct server_weather
{
	unsigned int	weather;
	unsigned int	another;
	unsigned int	rainstart;
	unsigned int	rainend;
	short			amount;
	short			temperature;
} t_server_weather;

struct t_server_npc_add
{	//< CSD-030419
	DWORD nX:15;
	DWORD nY:15;
	DWORD nStatus:2;
  
	DWORD nHomeX:10;
	DWORD nHomeY:10;
	DWORD nSprNo:9;
	DWORD nEventNpc:1;
	DWORD nAIType:1; // LTS AI 0 : 努扼捞攫飘 AI, 1 : 辑滚 AI
	DWORD nRecall:1; 

	DWORD idNpc:16;
	DWORD nNameNo:13;
	DWORD nMutant:3;

	DWORD nViewType:4;
	DWORD nAttr:4;
	DWORD nRace:4;
};	//> CSD-030419

typedef struct server_npc_remove
{	
	short int		server_id;
} t_server_npc_remove;

struct t_server_change_equip
{	//< CSD-031001
	unsigned int	server_id;
	unsigned char	equip[4];
	short int		mantle;
	char			jjing;		// 011030 KHS JJING
	short int		ChairNum;		// LTS SITDOWN BUG
	char			Horse[4];		// LTS HORSERIDER
	WORD idWeaponItem;
};	//> CSD-031001

typedef struct t_client_change_equip
{
	unsigned char	equip[4];
}client_change_equip;


// Attack........................................
// Attack........................................
// Attack........................................
typedef struct client_attack										
{														
	short int		target_id;								
} t_client_attack;											
														
typedef struct server_attack							
{														
	short int		server_id;						
	short int		target_id;					
} t_server_attack;	




		
												
											
// Item......................................
// Item......................................
// Item......................................
typedef struct server_item_add 		
{
	short int		item_id;
	ItemAttr		item;
	short int		offx, offy;
	short int		x, y;
} t_server_item_add;

//this lsw 捞巴捞拘绵瞪 菩哦. 010326
typedef struct server_item_add_ziped 		
{
	BYTE zipedpack[50];
} t_server_item_add_ziped;



typedef struct server_item_remove
{
	short int		item_id;
} t_server_item_remove;
typedef struct server_you_got_item
{
	short int		item_id;
} t_server_you_got_item;
typedef struct client_item_drop
{
	ItemAttr		item;
	short int		x,y;
} t_client_item_drop;
typedef struct client_item_take
{
	short int		item_id;
} t_client_item_take;
typedef struct client_item_status
{
	short int		item_id;
	unsigned int 	attr[6];
} t_client_item_status;
typedef struct server_item_status
{
	short int		item_id;
	unsigned int 	attr[6];
} t_server_item_status;
typedef struct chr_item_info0
{
	char        ar0;
	char        ar1;
	ItemAttr	inv[8];
} t_chr_item_info0;
typedef struct chr_item_info1
{
	ItemAttr	equip[8];
} t_chr_item_info1;
typedef struct chr_item_info2
{
	ItemAttr	quick[6];
} t_chr_item_info2;
typedef struct chr_name_info
{
	char	name[ NM_LENGTH];
	char	login_id[20];
} t_chr_name_info;

//---





// Bank........................................
// Bank........................................
// Bank........................................
typedef struct client_bank		
{
	int				total_money;
	int				money;
	int				char_money;
	DWORD			time;
} t_client_bank;



// Event ................................................ ###0923
// Event ................................................
// Event ................................................

typedef struct client_event
{
	short int type;
	short int event_no;
} t_client_event;

typedef struct item_attr_change
{
	short int		item_id;
	char			array;
	unsigned int	attr;
}t_item_attr_change;





/// Change Map .........................................
/// Change Map .........................................
/// Change Map .........................................
typedef struct server_change_map
{
	char			mapname[ NM_LENGTH ];
	int				port;
	short int		x;
	short int		y;
	short int		server_id;
} t_server_change_map;


// Log In  ... Select Character.........................
// Log In  ... Select Character.........................
// Log In  ... Select Character.........................
//--------------------------------------------------------
typedef struct client_access_login
{
	char			id[ID_LENGTH];
	char			pw[PW_LENGTH];
	short int		version;
	short int		mycode;
} t_client_access_login;

//--------------------------------------------------------
typedef struct server_accept_login
{
	short int		server_id;
	char			name[ MAX_CHARACTEROFID][NM_LENGTH];
	unsigned char	level[ MAX_CHARACTEROFID];
	unsigned char	job[ MAX_CHARACTEROFID];
	unsigned char	cla[ MAX_CHARACTEROFID];
	unsigned char	gender[ MAX_CHARACTEROFID];
	
	DWORD			packetkeycode;

	unsigned char   bodyr[ MAX_CHARACTEROFID];
	unsigned char   bodyg[ MAX_CHARACTEROFID];
	unsigned char   bodyb[ MAX_CHARACTEROFID];

	unsigned char   clothr[ MAX_CHARACTEROFID];
	unsigned char   clothg[ MAX_CHARACTEROFID];
	unsigned char   clothb[ MAX_CHARACTEROFID];

	short int		age[ MAX_CHARACTEROFID];
	unsigned int	money[ MAX_CHARACTEROFID];
	unsigned char	acc_equip1[ MAX_CHARACTEROFID];
	unsigned char	acc_equip2[ MAX_CHARACTEROFID];
	unsigned char	acc_equip3[ MAX_CHARACTEROFID];
	unsigned char	acc_equip4[ MAX_CHARACTEROFID];

	char			nation;

	short int		remained_day;

} t_server_accept_login;

//--------------------------------------------------------
typedef struct client_connect_info
{
	char			name[NM_LENGTH];
	char			startposition;
	char			startmap;
} t_client_connect_info;

typedef struct server_connect_info	// 荤侩救窃.
{
	char			ip[3][18];
	int				port;
} t_server_connect_info;
	
//--------------------------------------------------------
typedef struct client_chat_data
{	
	short int		range;
	unsigned char	type;
	unsigned char	length;
	char			text[TEXT_LENGTH];
} t_client_chat_data;
	
//--------------------------------------------------------
typedef struct server_chat_data
{	
	short int		server_id;
	unsigned char   type;
	unsigned char	length;
	char			text[TEXT_LENGTH];
} t_server_chat_data;
	
//--------------------------------------------------------
typedef struct client_move
{	
	short int		server_id;
	short int		length;
	unsigned char	movetype;
	short int       movep;
	short int		sx;
	short int		sy;
	short int		gox;
	short int		goy;
	unsigned char	dir_tbl[MAX_DIR_TABLE];
} t_client_move;
	
//--------------------------------------------------------
typedef struct server_move
{	
	short int		server_id;
	short int		length;
	unsigned char	movetype;
	short int		sx;
	short int		sy;
	short int		gox;
	short int		goy;
	short int		targetid;
	unsigned int	desttime;
	unsigned char	dir_tbl[MAX_DIR_TABLE];
} t_server_move;
	
//--------------------------------------------------------
typedef struct client_create_char
{	
	char			name[NM_LENGTH];
	unsigned char	gender;
	unsigned char	face;
	short int		age;
	unsigned char	nGuildCode; // CSD-030324
	unsigned char	body_r, body_g, body_b;
	unsigned char	cloth_r, cloth_g, cloth_b;
	unsigned char	tactics;
	unsigned char	Class;
	unsigned char	job;
	unsigned char	spell;
} t_client_create_char;

struct ACCESSJOIN
{	//< CSD-030806	
	char			id[ID_LENGTH];
	char			pw[PW_LENGTH];
	char			name[NM_LENGTH];
	char			startposition;		// 99捞搁 盖 付瘤阜俊 LogOut茄磊府俊辑 唱鸥抄促. 
	short			nBillingType;
	char			ip[40];
};	//> CSD-030806

typedef struct server_assign_server_id
{	
	short int		server_id;
	short int		x, y;
}t_server_assign_server_id;
	
//// LoginServer客 GameServer埃狼 Access Join包拌..
	
#define CMD_REQ_INSERT_USERID			34
#define CMD_REQ_DELETE_USERID			35
#define CMD_JOINABLE					36
#define CMD_NOT_JOINABLE				37
	
#define CMD_UPDATING					38
	
	
typedef struct gs_req_insert_userid
{	
	short int server_id;
	char id[ ID_LENGTH];
	char pw[ PW_LENGTH];
	char name[ NM_LENGTH];
	char mapname[ NM_LENGTH];
}t_gs_req_insert_userid;
	
	
typedef struct gs_req_delete_userid
{	
	short int server_id;
	char id[ ID_LENGTH];
	char mapname[ NM_LENGTH];
}t_gs_req_delete_userid;
	
typedef struct ls_joinable
{	
	short int server_id;
}t_ls_joinable;
	
typedef struct ls_not_joinable
{	
	short int server_id;
	
}t_ls_not_joinable;
	
	
typedef struct ls_updating		// LoginServer ->  GameServer.	夸没茄 User绰 泅犁 Data甫 Updating窍绊 乐扁 锭巩俊 泪矫 扁促妨具 钦聪促. 
{	
	short int server_id;
	
}t_ls_updating;
	
	
struct t_server_user_db_data
{	//< CSD-031001
	short int		lev;
	DWORD			exp;
	char			name[NM_LENGTH];
	short int		Attr[10]; //MAX_CHARACTERDATA];
	short int		Avility[20];
	DWORD			money;
	int	nLife;
	int	nMaxHp;
	int	nMana;
	int	nMaxMp;
	int	nHungry;
	int	nMaxHungry;
  	char spell;
	BYTE condition;
	
	short int sprno;
	short int x;
	short int y;
	
	unsigned char acc_equip1;
	unsigned char acc_equip2;
	unsigned char acc_equip3;
	unsigned char acc_equip4;
	
	char mapname[NM_LENGTH];
	
	unsigned char bodyr, bodyg, bodyb;
	unsigned char clothr,clothg,clothb;
	int	sight;
	short int Age;
	
	short int openhouse;
	short int reserved_point;
	
	char viewtype;
	
	short int social_status;
	short int fame;
	short int fame_pk;		// 010915 LTS		//Fame_PK -> NWCharacter肺 背眉 DB俊绰 角力肺 NWCharacter狼 蔼捞 甸绢癌聪促.		
	NW_Character NWCharacter;	// 010915 LTS
	short int nk3;
	short int nk4;
	short int nk6;

	DWORD nation;			//1004 YGI
	char aStepInfo[20];
};	//> CSD-031001
	
//--------------------------------------------------------
typedef struct server_envir_info
{	
	DWORD			currtime_count;
	DWORD			weather_count;
	DWORD			rainstart;
	DWORD			rainend;
	short			amount;
	short			temperature;
	char			mapname[NM_LENGTH];
} t_server_envir_info;
  	
//------------------------------------------


struct t_server_user_add
{	//< CSD-031007
	DWORD nk3:16;
	DWORD server_id:15;
	DWORD peacests:1;

	DWORD body_r:5;
	DWORD body_g:5;
	DWORD body_b:5;
	DWORD cloth_r:5;
	DWORD cloth_g:5;
	DWORD cloth_b:5;
	DWORD bAlive:2;
	
	DWORD x:11;
	DWORD y:11;
	DWORD face:4;
	DWORD viewtype:4;
	DWORD spr_no:1;
	DWORD spell:1;

	DWORD equip0:8;
	DWORD equip1:8;
	DWORD equip2:8;
	DWORD equip3:8;

	DWORD namelen:5;
	DWORD lv:8;				// 0807 YGI
	DWORD nation:3;			// 1014 YGI
	DWORD guild_master:3;			// 1014 YGI
	DWORD king:1;			// 1014 YGI
	DWORD imsi:9;			// 1014 YGI
	DWORD counselor:2;			// 1014 YGI
	DWORD reporter:1;		

	DWORD nk4:16;
	DWORD nk6:16;

	DWORD SquadNo:3;	//	何措锅龋		// 010915 LTS
	DWORD isSquadLeader:1;	//	何措厘牢啊?	
	DWORD YL_JoinNation:4;	//	老胶牢版快 磊捞戚俊沁唱? 官捞辑胶俊 沁唱?  // 惫啊锅龋
	DWORD nDualCls:4;		// 掂倔 包访	
	DWORD nClsStep:4;		
	DWORD mantle:16;  // 011018 KHS 噶肚 

	DWORD isCommander:1;	//	荤飞包牢啊?
	DWORD jjing:4;	// 011030 KHS JJING
	DWORD JoinLocalWar:1;		// 惫扁傈俊 曼咯 沁促. // LTS LOCALWAR
	DWORD nCurrentAction:1;		
	DWORD ChairNum:2;		  // 0 绝澜 1 狼磊1  2 狼磊2	// LTS SITDOWN BUG
	DWORD HorseNo:2;			// LTS HORSERIDER
	DWORD RiderNo:2;			// LTS HORSERIDER
	DWORD HorseGrade:2;			// LTS HORSERIDER
	DWORD RiderGrade:2;			// LTS HORSERIDER
	DWORD DragonLordWarTeam:2;			// LTS DRAGONLORD
	DWORD guild_code:16; 
	
	DWORD idWeaponItem:16;
	DWORD class_type:3;		// 0807 YGI

	char name[16];
};	//> CSD-031007

	
//--------------------------------------------------------
typedef struct server_user_remove
{	
	short int		server_id;
} t_server_user_remove;
	
//--------------------------------------------------------


typedef struct req_pc_add
{
	short int server_id;
}t_req_pc_add;

typedef struct req_npc_add
{
	short int server_id;
}t_req_npc_add;

typedef struct req_item_add
{
	short int server_id;
}t_req_item_add;

typedef struct element {
	unsigned char var_kind ;
	short int value ;
} t_element ;

typedef struct mass_data {
	unsigned char num ;
	t_element elements[100] ;

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -