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

📄 px_ls_init.c

📁 MMORPG游戏服务器端架构及函数
💻 C
📖 第 1 页 / 共 5 页
字号:
		pf->class_craftsman_req = atoi(cache);
		PopLeftString(pstr,cache);
		pf->class_knight_req = atoi(cache);
		PopLeftString(pstr,cache);
		pf->monster_req = atoi(cache);
		PopLeftString(pstr,cache);
		pf->genius_req = atoi(cache);
		PopLeftString(pstr,cache);
		pf->beastie_req = atoi(cache);
		PopLeftString(pstr,cache);
		pf->machine_req = atoi(cache);
		PopLeftString(pstr,cache);
		pf->country_guarder_req = atoi(cache);
		PopLeftString(pstr,cache);
		pf->country_aggresser_req = atoi(cache);
		PopLeftString(pstr,cache);
		pf->funner_req = atoi(cache);
		PopLeftString(pstr,cache);
		pf->card_tour_req = atoi(cache);
		PopLeftString(pstr,cache);
		pf->npc_req = atoi(cache);
		PopLeftString(pstr,cache);
		pf->dragon_req = atoi(cache);
		pf++;
	}
	init_free_cache(nlines);
	return;
}						

/* fmr */
void init_read_frame_fmr(){
	char					filename[FILENAME_MAX];
	char					cache[FILENAME_MAX];
	char				*	pstr;
	FRAME_FMR_BASE		*	pf;
	int						nlines;
	int						nconfig;
	int						i;
	filename[0] = '\0';
	strcpy(filename,base_path);
	strcat(filename,"\\configuration\\frame_fmr.txt");
	nlines = GetnLinesOfFile(filename);
	init_read_specify_file(filename,nlines);
	nconfig = init_get_valid_num_config(nlines);
	if (nconfig <= 0) {
		return;
	}
	g_stat->num_speed_frame_base_fmr = nconfig;
	frame_fmr_base_head = (LPFRAME_FMR_BASE)ms_malloc(nconfig*sizeof(FRAME_FMR_BASE));
	memset(frame_fmr_base_head,0,nconfig*sizeof(FRAME_FMR_BASE));
	pf = frame_fmr_base_head;
	for(i = 0;i < nlines;i++){
		pstr = pcfg_buf[i];
		if (pstr[0] == '\0') {
			continue;
		}
		PopLeftString(pstr,cache);
		pf->frame = atoi(cache);
		PopLeftString(pstr,cache);
		pf->class_human_req = atoi(cache);
		PopLeftString(pstr,cache);
		pf->class_hun_req = atoi(cache);
		PopLeftString(pstr,cache);
		pf->class_sorcer_req = atoi(cache);
		PopLeftString(pstr,cache);
		pf->class_genius_req = atoi(cache);
		PopLeftString(pstr,cache);
		pf->class_bowman_req = atoi(cache);
		PopLeftString(pstr,cache);
		pf->class_taoist_req = atoi(cache);
		PopLeftString(pstr,cache);
		pf->class_nodead_req = atoi(cache);
		PopLeftString(pstr,cache);
		pf->class_craftsman_req = atoi(cache);
		PopLeftString(pstr,cache);
		pf->class_knight_req = atoi(cache);
		PopLeftString(pstr,cache);
		pf->monster_req = atoi(cache);
		PopLeftString(pstr,cache);
		pf->genius_req = atoi(cache);
		PopLeftString(pstr,cache);
		pf->beastie_req = atoi(cache);
		PopLeftString(pstr,cache);
		pf->machine_req = atoi(cache);
		PopLeftString(pstr,cache);
		pf->country_guarder_req = atoi(cache);
		PopLeftString(pstr,cache);
		pf->country_aggresser_req = atoi(cache);
		PopLeftString(pstr,cache);
		pf->funner_req = atoi(cache);
		PopLeftString(pstr,cache);
		pf->card_tour_req = atoi(cache);
		PopLeftString(pstr,cache);
		pf->npc_req = atoi(cache);
		PopLeftString(pstr,cache);
		pf->dragon_req = atoi(cache);
		pf++;
	}
	init_free_cache(nlines);
	return;
}			

/* fms */
void init_read_frame_fms(){
	char					filename[FILENAME_MAX];
	char					cache[FILENAME_MAX];
	char				*	pstr;
	FRAME_FMS_BASE		*	pf;
	int						nlines;
	int						nconfig;
	int						i;
	filename[0] = '\0';
	strcpy(filename,base_path);
	strcat(filename,"\\configuration\\frame_fms.txt");
	nlines = GetnLinesOfFile(filename);
	init_read_specify_file(filename,nlines);
	nconfig = init_get_valid_num_config(nlines);
	if (nconfig <= 0) {
		return;
	}
	g_stat->num_speed_frame_base_fms = nconfig;
	frame_fms_base_head = (LPFRAME_FMS_BASE)ms_malloc(nconfig*sizeof(FRAME_FMS_BASE));
	memset(frame_fms_base_head,0,nconfig*sizeof(FRAME_FMS_BASE));
	pf = frame_fms_base_head;
	for(i = 0;i < nlines;i++){
		pstr = pcfg_buf[i];
		if (pstr[0] == '\0') {
			continue;
		}
		PopLeftString(pstr,cache);
		pf->frame = atoi(cache);
		PopLeftString(pstr,cache);
		pf->class_human_req = atoi(cache);
		PopLeftString(pstr,cache);
		pf->class_hun_req = atoi(cache);
		PopLeftString(pstr,cache);
		pf->class_sorcer_req = atoi(cache);
		PopLeftString(pstr,cache);
		pf->class_genius_req = atoi(cache);
		PopLeftString(pstr,cache);
		pf->class_bowman_req = atoi(cache);
		PopLeftString(pstr,cache);
		pf->class_taoist_req = atoi(cache);
		PopLeftString(pstr,cache);
		pf->class_nodead_req = atoi(cache);
		PopLeftString(pstr,cache);
		pf->class_craftsman_req = atoi(cache);
		PopLeftString(pstr,cache);
		pf->class_knight_req = atoi(cache);
		PopLeftString(pstr,cache);
		pf->monster_req = atoi(cache);
		PopLeftString(pstr,cache);
		pf->genius_req = atoi(cache);
		PopLeftString(pstr,cache);
		pf->beastie_req = atoi(cache);
		PopLeftString(pstr,cache);
		pf->machine_req = atoi(cache);
		PopLeftString(pstr,cache);
		pf->country_guarder_req = atoi(cache);
		PopLeftString(pstr,cache);
		pf->country_aggresser_req = atoi(cache);
		PopLeftString(pstr,cache);
		pf->funner_req = atoi(cache);
		PopLeftString(pstr,cache);
		pf->card_tour_req = atoi(cache);
		PopLeftString(pstr,cache);
		pf->npc_req = atoi(cache);
		PopLeftString(pstr,cache);
		pf->dragon_req = atoi(cache);
		pf++;
	}
	init_free_cache(nlines);
	return;
}				

/* fpr */
void init_read_frame_fpr(){
	char					filename[FILENAME_MAX];
	char					cache[FILENAME_MAX];
	char				*	pstr;
	FRAME_FPR_BASE		*	pf;
	int						nlines;
	int						nconfig;
	int						i;
	filename[0] = '\0';
	strcpy(filename,base_path);
	strcat(filename,"\\configuration\\frame_fpr.txt");
	nlines = GetnLinesOfFile(filename);
	init_read_specify_file(filename,nlines);
	nconfig = init_get_valid_num_config(nlines);
	if (nconfig <= 0) {
		return;
	}
	g_stat->num_speed_frame_base_fpr = nconfig;
	frame_fpr_base_head = (LPFRAME_FPR_BASE)ms_malloc(nconfig*sizeof(FRAME_FPR_BASE));
	memset(frame_fpr_base_head,0,nconfig*sizeof(FRAME_FPR_BASE));
	pf = frame_fpr_base_head;
	for(i = 0;i < nlines;i++){
		pstr = pcfg_buf[i];
		if (pstr[0] == '\0') {
			continue;
		}
		PopLeftString(pstr,cache);
		pf->frame = atoi(cache);
		PopLeftString(pstr,cache);
		pf->class_human_req = atoi(cache);
		PopLeftString(pstr,cache);
		pf->class_hun_req = atoi(cache);
		PopLeftString(pstr,cache);
		pf->class_sorcer_req = atoi(cache);
		PopLeftString(pstr,cache);
		pf->class_genius_req = atoi(cache);
		PopLeftString(pstr,cache);
		pf->class_bowman_req = atoi(cache);
		PopLeftString(pstr,cache);
		pf->class_taoist_req = atoi(cache);
		PopLeftString(pstr,cache);
		pf->class_nodead_req = atoi(cache);
		PopLeftString(pstr,cache);
		pf->class_craftsman_req = atoi(cache);
		PopLeftString(pstr,cache);
		pf->class_knight_req = atoi(cache);
		PopLeftString(pstr,cache);
		pf->monster_req = atoi(cache);
		PopLeftString(pstr,cache);
		pf->genius_req = atoi(cache);
		PopLeftString(pstr,cache);
		pf->beastie_req = atoi(cache);
		PopLeftString(pstr,cache);
		pf->machine_req = atoi(cache);
		PopLeftString(pstr,cache);
		pf->country_guarder_req = atoi(cache);
		PopLeftString(pstr,cache);
		pf->country_aggresser_req = atoi(cache);
		PopLeftString(pstr,cache);
		pf->funner_req = atoi(cache);
		PopLeftString(pstr,cache);
		pf->card_tour_req = atoi(cache);
		PopLeftString(pstr,cache);
		pf->npc_req = atoi(cache);
		PopLeftString(pstr,cache);
		pf->dragon_req = atoi(cache);
		pf++;
	}
	init_free_cache(nlines);
	return;
}			

/* fsr */
void init_read_frame_fsr(){
	char					filename[FILENAME_MAX];
	char					cache[FILENAME_MAX];
	char				*	pstr;
	FRAME_FSR_BASE		*	pf;
	int						nlines;
	int						nconfig;
	int						i;
	filename[0] = '\0';
	strcpy(filename,base_path);
	strcat(filename,"\\configuration\\frame_fsr.txt");
	nlines = GetnLinesOfFile(filename);
	init_read_specify_file(filename,nlines);
	nconfig = init_get_valid_num_config(nlines);
	if (nconfig <= 0) {
		return;
	}
	g_stat->num_speed_frame_base_fsr = nconfig;
	frame_fsr_base_head = (LPFRAME_FSR_BASE)ms_malloc(nconfig*sizeof(FRAME_FSR_BASE));
	memset(frame_fsr_base_head,0,nconfig*sizeof(FRAME_FSR_BASE));
	pf = frame_fsr_base_head;
	for(i = 0;i < nlines;i++){
		pstr = pcfg_buf[i];
		if (pstr[0] == '\0') {
			continue;
		}
		PopLeftString(pstr,cache);
		pf->frame = atoi(cache);
		PopLeftString(pstr,cache);
		pf->class_human_req = atoi(cache);
		PopLeftString(pstr,cache);
		pf->class_hun_req = atoi(cache);
		PopLeftString(pstr,cache);
		pf->class_sorcer_req = atoi(cache);
		PopLeftString(pstr,cache);
		pf->class_genius_req = atoi(cache);
		PopLeftString(pstr,cache);
		pf->class_bowman_req = atoi(cache);
		PopLeftString(pstr,cache);
		pf->class_taoist_req = atoi(cache);
		PopLeftString(pstr,cache);
		pf->class_nodead_req = atoi(cache);
		PopLeftString(pstr,cache);
		pf->class_craftsman_req = atoi(cache);
		PopLeftString(pstr,cache);
		pf->class_knight_req = atoi(cache);
		PopLeftString(pstr,cache);
		pf->monster_req = atoi(cache);
		PopLeftString(pstr,cache);
		pf->genius_req = atoi(cache);
		PopLeftString(pstr,cache);
		pf->beastie_req = atoi(cache);
		PopLeftString(pstr,cache);
		pf->machine_req = atoi(cache);
		PopLeftString(pstr,cache);
		pf->country_guarder_req = atoi(cache);
		PopLeftString(pstr,cache);
		pf->country_aggresser_req = atoi(cache);
		PopLeftString(pstr,cache);
		pf->funner_req = atoi(cache);
		PopLeftString(pstr,cache);
		pf->card_tour_req = atoi(cache);
		PopLeftString(pstr,cache);
		pf->npc_req = atoi(cache);
		PopLeftString(pstr,cache);
		pf->dragon_req = atoi(cache);
		pf++;
	}
	init_free_cache(nlines);
	return;
}			

/* fss */
void init_read_frame_fss(){
	char					filename[FILENAME_MAX];
	char					cache[FILENAME_MAX];
	char				*	pstr;
	FRAME_FSS_BASE		*	pf;
	int						nlines;
	int						nconfig;
	int						i;
	filename[0] = '\0';
	strcpy(filename,base_path);
	strcat(filename,"\\configuration\\frame_fss.txt");
	nlines = GetnLinesOfFile(filename);
	init_read_specify_file(filename,nlines);
	nconfig = init_get_valid_num_config(nlines);
	if (nconfig <= 0) {
		return;
	}
	g_stat->num_speed_frame_base_fss = nconfig;
	frame_fss_base_head = (LPFRAME_FSS_BASE)ms_malloc(nconfig*sizeof(FRAME_FSS_BASE));
	memset(frame_fss_base_head,0,nconfig*sizeof(FRAME_FSS_BASE));
	pf = frame_fss_base_head;
	for(i = 0;i < nlines;i++){
		pstr = pcfg_buf[i];
		if (pstr[0] == '\0') {
			continue;
		}
		PopLeftString(pstr,cache);
		pf->frame = atoi(cache);
		PopLeftString(pstr,cache);
		pf->class_human_req = atoi(cache);
		PopLeftString(pstr,cache);
		pf->class_hun_req = atoi(cache);
		PopLeftString(pstr,cache);
		pf->class_sorcer_req = atoi(cache);
		PopLeftString(pstr,cache);
		pf->class_genius_req = atoi(cache);
		PopLeftString(pstr,cache);
		pf->class_bowman_req = atoi(cache);
		PopLeftString(pstr,cache);
		pf->class_taoist_req = atoi(cache);
		PopLeftString(pstr,cache);
		pf->class_nodead_req = atoi(cache);
		PopLeftString(pstr,cache);
		pf->class_craftsman_req = atoi(cache);
		PopLeftString(pstr,cache);
		pf->class_knight_req = atoi(cache);
		PopLeftString(pstr,cache);
		pf->monster_req = atoi(cache);
		PopLeftString(pstr,cache);
		pf->genius_req = atoi(cache);
		PopLeftString(pstr,cache);
		pf->beastie_req = atoi(cache);
		PopLeftString(pstr,cache);
		pf->machine_req = atoi(cache);
		PopLeftString(pstr,cache);
		pf->country_guarder_req = atoi(cache);
		PopLeftString(pstr,cache);
		pf->country_aggresser_req = atoi(cache);
		PopLeftString(pstr,cache);
		pf->funner_req = atoi(cache);
		PopLeftString(pstr,cache);
		pf->card_tour_req = atoi(cache);
		PopLeftString(pstr,cache);
		pf->npc_req = atoi(cache);
		PopLeftString(pstr,cache);
		pf->dragon_req = atoi(cache);
		pf++;
	}
	init_free_cache(nlines);
	return;
}
void init_read_entity_exp(){
	char					filename[FILENAME_MAX];
	char					cache[FILENAME_MAX];
	char				*	pstr;
	PX_LS_EXP_BASE			*	peb;
	int						nlines;
	int						nconfig;
	int						i;
	filename[0] = '\0';
	strcpy(filename,base_path);
	strcat(filename,"\\configuration\\level.txt");
	nlines = GetnLi

⌨️ 快捷键说明

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