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

📄 px_ls_char.h

📁 MMORPG游戏服务器端架构及函数
💻 H
📖 第 1 页 / 共 2 页
字号:
#pragma	  once

/* must been first include begin */
#include "..\ProjectX_Common\ProjectX_Copyright.h"
#include "..\ProjectX_Common\ProjectX_Common.h"
/* must been first include end */

/* std and common include */
#include <windows.h>
#include <stdio.h>
#include <stdlib.h>

#include "px_ls_battle_guid.h"
#include "px_ls_blacklist.h"
#include "px_ls_char_class.h"
#include "px_ls_chat_radio.h"
#include "px_ls_chat_video.h"
#include "px_ls_compound.h"
#include "px_ls_discharge_skill.h"
#include "px_ls_friends.h"
#include "px_ls_item.h"
#include "px_ls_lottery.h"
#include "px_ls_marriage.h"
#include "px_ls_master_prentice.h"
#include "px_ls_passive_effect.h"
#include "px_ls_pet.h"
#include "px_ls_pk.h"
#include "px_ls_roup.h"
#include "px_ls_skill.h"
#include "px_ls_stranger.h"
#include "px_ls_task.h"
#include "px_ls_team.h"
#include "px_ls_trade.h"
#include "px_ls_war_guid.h"

typedef struct tagPx_LS_Exp_Base {
	int level;					//等级
	int hunman;					/* 人类 */
	int hun;					/* 野蛮人 */
	int sorcer;					/* 法师 */
	int genius;					/* 精灵 */
	int bowman;					/* 弓弩手 */
	int taoist;					/* 道士 */
	int nodead;					/* 亡灵 */
	int craftsman;				/* 匠人 */
	int knight;					/* 骑士 */
	int pet;					/* 宠物 */				
}PX_LS_EXP_BASE, * LPPX_LS_EXP_BASE;

//以下为角色角色信息定义
typedef struct tagCharInfo {
	int		session_id;
	byte	check_code;							//校验码
	int		state;								//状态
	unsigned int uid_char;						//角色uid
	char name[MAX_CHAR_NAME_LEN];				//角色名称
	ITEM_INVENTORY item_body[4][8];				//存放在角色身上的道具
	ITEM_INVENTORY item_backup[4][8];			//用于为合成或者交易等保存的道具备份	
	ITEM_INVENTORY item_warehouse[8][8];		//城镇里仓库内的道具
	int account_uid;							//帐号uid
	int level;
	WORD strength_base;							//力量基值
	WORD agility_base;							//敏捷基值
	WORD wit_base;								//智力基值
	WORD command_base;							//统领基值
	WORD strength_curr;							//当前力量
	WORD agility_curr;							//当前敏捷
	WORD wit_curr;								//当前智力
	WORD command_curr;							//当前统领
	WORD point_surplus;							//剩余属性点数

	//以下为角色身上穿戴的道具
	int		item_helm;							//头盔
	int		item_eye;							//眼罩
	int		item_armor;							//衣服
	int		item_belt;							//腰带
	int		item_glove_left;					//左手手套
	int		item_glove_right;					//右手手套
	int		item_boot;							//靴子
	int		item_shield;						//盾牌
	int		item_amulet;						//项链
	int		item_ring_left;						//左手戒指
	int		item_ring_right;					//右手戒指
	int		item_ring_marriage;					//婚姻戒指
	int		item_shirt;							//内衣
	int		item_wing;							//翅膀
	int		item_guardianship;					//守护
	int		item_mantle;						//披风
	byte	item_left_type;						//左手道具类型
	byte	item_right_type;					//右手道具类型
	int		item_left_item;						//左手道具	
	int		item_right_item;					//右手道具
	byte	left_skill_type;					//左手技能类型
	byte	right_skill_type;					//右手技能类型
	byte	left_skill_index;					//左手技能
	byte	right_skill_index;					//右手技能

	int		map_id;								//地图id
	byte	map_x;								//坐标x
	byte	map_y;								//坐标y
	byte	map_z;								//坐标z
	byte	direction;							//方向
	float	move_speed;							//移动速度,为一帧移动距离
	byte	move_state;							//移动状态,走动?加速至跑动状态?跑动?飞行?飞行停止过程中?跑动停止过程中?

	//以下为角色各种扩展数据信息
	WORD	hp_base;							//hp基值
	WORD	mana_base;							//mana基值
	WORD	sp_base;							//sp基值
	WORD	defence_base;						//防御基值
	WORD	hp_curr;							//当前hp
	WORD	mana_curr;							//当前mana
	WORD	sp_curr;							//当前sp
	WORD	defence_curr;						//当前防御
	byte	block_ratio;						//格挡率
	byte	physics_damage_decrease_ratio;		//物理伤害减免率
	byte	magic_damage_decrease_ratio;		//魔法伤害减免率
	byte	element_damage_decrease_ratio;		//元素伤害减免率

	WORD	attack_veracity_left;				/* 左手攻击准确性  */
	WORD	damage_min_left;					/* 左手最小攻击力  */
	WORD	damage_max_left;					/* 左手最大攻击力  */
	byte	damage_resist_base_left;			/* 左手与攻击相关的施加抵抗基值 */

	WORD	attack_veracity_right;				/* 右手攻击准确性  */
	WORD	damage_min_right;					/* 右手最小攻击力  */
	WORD	damage_max_right;					/* 右手最大攻击力  */
	byte	damage_resist_base_right;			/* 右手与攻击相关的施加抵抗基值 */



	byte	physic_resist;						/* 物理抵抗  */
	byte	magic_resist;						/* 魔法抵抗  */
	byte	cold_resist;						/* 冰系抵抗  */
	byte	poison_resist;						/* 毒系抵抗  */
	byte	ligthing_resist;					/* 电系抵抗  */
	byte	fire_resist;						/* 火系抵抗  */

	/* fast recovery and protect */
	byte block_frame;							//快速格挡帧数
	byte start_cast_frame_left;					//左手技能启动帧数
	byte cast_frame_left;						//左手技能释放帧数
	byte cold_frame_left;						//左手技能冷却帧数
	byte delay_frame_left;						//左手技能延迟帧数
	byte start_cast_frame_right;				//右手技能启动帧数
	byte cast_frame_right;						//右手技能释放帧数
	byte cold_frame_right;						//右手技能冷却帧数
	byte delay_frame_right;						//右手技能延迟帧数
	byte cold_recovery_frame;					//冰冻恢复帧数
	byte hit_recovery_frame;					//打击恢复帧数
	byte lancinate_recovery_frame;				//撕裂伤口恢复帧数
	byte magic_damage_recovery_frame;			//魔法伤害恢复帧数
	byte poison_recovery_frame;					//中毒恢复帧数
	byte stun_recovery_frame;					//打晕恢复帧数
	byte curse_recovery_frame;					//诅咒恢复帧数
	
	float hp_increase_frame;					//hp每帧恢复数值
	float mana_increast_frame;					//mana每帧恢复数值
	float sp_increase_frame;					//sp每帧恢复数值
	int  base_frame;							//帧数基值
	WORD last_handled_frame;					//最后一次处理帧数

	WORD last_block_frame;						//最后一次格挡帧数
	WORD last_cast_left_frae;					//左手最后一次释放帧数
	WORD last_cast_right_frame;					//右手最后一次释放帧数
	WORD last_hit_recovery_frame;				//最后一次打击恢复帧数
	WORD last_lancinate_recovery_frame;			//最后一次撕裂伤口恢复帧数
	WORD last_magic_damage_recovery_frame;		//最后一次魔法上海恢复帧数
	WORD last_stun_recovery_frame;				//最后一次打晕恢复帧数
	byte lancinate_surplus_frame;				//撕裂伤口剩余帧数
	byte magic_damage_surplus_frame;			//魔法伤害剩余帧数
	WORD last_heartbreak_frame;					//最后一次心跳记录帧数
	int heartbreak;								//心跳记录数值


	int battle_guid_sessionid;					//角色血盟信息
	int war_guid_sessionid;						//角色战盟信息
	int team_sessionid;							//角色组队信息
	int master_prentice_sessionid;				//角色师徒信息

	int pk_pvp_sessionid;						//pk_pvp
	int pk_tvt_sessionid;						//pk_tvt
	int pk_wvw_sessionid;						//pk_wvw

	int trade_sessionid;						//角色交易信息
	int marriage_sessionid;						//角色婚姻信息
	int lottery_sessionid;						//角色彩票竞猜信息
	int roup_sessionid;							//角色拍卖信息
	int chat_radio_sessionid;					//音频聊天信息
	int chat_video_sessionid;					//视频聊天信息

	byte num_friends;							//角色好友信息
	FRIENDS * pfriends;

⌨️ 快捷键说明

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