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

📄 charinfo.h

📁 国内著名网络游戏dragon的服务端完整源码 内附完整数据库结构
💻 H
📖 第 1 页 / 共 2 页
字号:
// CharInfo.h: interface for the CCharInfo class.
//
//////////////////////////////////////////////////////////////////////

#if !defined(AFX_CHARINFO_H__1A212137_3131_4DD3_8343_EE42343C165E__INCLUDED_)
#define AFX_CHARINFO_H__1A212137_3131_4DD3_8343_EE42343C165E__INCLUDED_

#if _MSC_VER > 1000
#pragma once
#endif // _MSC_VER > 1000

#include "ExchangeMgr.h"
#include "ItemMgr.h"

extern int MAX_EXP_LEVEL;  // CSD-040204
extern int MAX_TAC_LEVEL;  // CSD-040204

///////////////////////////////////////////////////////////////////////////////
// 某腐磐俊 包茄 单捞鸥
struct CHAR_DATA
{	
	BYTE			bAlive;					// 某腐磐狼 积荤咯何(	REMOVE_:0 / ALIVE_:1 / DEAD_:2 / BUFE_:3)	// Check_
	int				deadcount;					// 某腐磐啊 磷篮饶 角力 绝绢瘤扁鳖瘤狼 count
	BYTE			installType;
	DWORD			total_id;
	short			eventno;
	short			generationpos;		// NPC老版快 惯积 困摹 Table狼 Index蔼阑 扁撅窍绊 乐绰促.
	short			generationtype;		// NPC老跋快 惯积规侥( GT_SKB_FILE, GT_SCRIPT );
	char			Name[20];
	int				namenumber;			// NPC_Name_Ref[ namenumber].Female甫 狼固茄促. 
	DWORD			Exp;
	short int		Gender;						// 0:咯磊 1 : 巢磊
	short int		Face;						
	short int		Class;						// 0:傈荤 1:泵荐 2:档利 3:己流磊 4:付过荤
	short int		Spell;					// 付过荤:0 / 己流磊:1
	short int		fame;

	short int       fame_pk;			// 010915 LTS //Fame_PK -> NWCharacter肺 背眉 DB俊绰 角力肺 NWCharacter狼 蔼捞 甸绢癌聪促.	// LTS AI2	//胶其既 绢琶 锅龋扁撅	
	NW_Character	NWCharacter;		// 010915 LTS

	short int       social_status;
	unsigned char	Tactics ;						// 急琶茄 傈捧扁贱 (焊咯林扁 困窃)
	unsigned char	Tactics_para;					// 角力 skill俊 利侩且 颇扼皋磐蔼阑 啊瘤绊 乐澜...
	short int		Race;						// 辆练
	short int		Str  ;				//  塞
	short int		Con  ;				//  扒碍
	short int		Dex  ;				//	刮酶己
	short int		Wis  ;				//	瘤驱
	short int		Int  ;				//	瘤瓷
	short int		MoveP;				//	捞悼仿
	short int		Char ;				//	概仿
	short int		Endu ;				//  历氢仿
	short int		Moral;				//	荤扁
	short int		Luck ;				//	青款
	short int		wsps ;				//  付过仿->付过 皋葛扼捞令
	//公扁, Armor, 厩技荤府 ,ETC 俊 狼茄 	
	short int		Strw;				//  塞
	short int		Conw;				//  扒碍
	short int		Dexw;				//	刮酶己
	short int		Wisw;				//	瘤驱
	short int		Intw;				//	瘤瓷
	short int		MovePw;				//	捞悼仿
	short int		Charw;				//	概仿
	short int		Enduw;				//  历氢仿
	short int		Moralw;				//	荤扁
	short int		Luckw;				//	青款
	short int		wspsw;

	BYTE			item_Hit_Rate;
	BYTE			item_Deffence_Rate;

	CCharRank		name_status;		// 0927 YGI
	DWORD			scan_time;			// LTS AI2 NPC SUMMON DELAY TIME
	short int		Ac;//AC( 规绢仿 )
	short int		Job;
	
	DWORD			Money;

	//Hp Mp 殿殿狼 蔼
	int		Hp;
	int		HpMax;
	int		Mana;
	int		ManaMax;
	int		Hungry;	
	int		HungryMax;
	int		Cp;
	int		CpMax;

	float	fChangeHungry;//硅绊悄 荐摹 函拳樊//020214 lsw
	
	char			MapName[21];
	unsigned char	Peacests;
	int				Sight; //020425 YGI
	short int		BodyR, BodyG, BodyB;		// 个 祸彬 R.G.B
	short int		ClothR, ClothG, ClothB;		// 鹅 祸彬 R.G.B
	short int		Age;
	short int		nk[MAX_NATION];							// 康剧啊1
	
	DWORD			killmon;					// 1拌凯阁胶磐 懦傅胶
	DWORD			killanimal;					// 悼拱 懦傅荐
	DWORD			killpc;						// 荤恩,NPC 懦傅荐
	char			KillerName[40];
	
	BYTE Ws[200];			//	付过
	BYTE Ps[200];			//	脚过
	BYTE Skill[MAX_SKILL_NO];

	t_skillexp		skillexp[MAX_SKILL_EXP];		// 011012 lsw //胶懦版氰摹 函版

	// 郴啊 啊瘤绊 乐绰 酒捞袍..
	ItemAttr	inv[3][3][8] ;// 牢亥配府
	ItemAttr	equip[8] ;// 厘馒
	ItemAttr	quick[7] ;// 狞 
	ItemAttr	handheld ;// 颊俊 甸绊 乐绰
	ItemAttr	bank[5][3][6];// 篮青俊 焊包前

	short int	Item[MAX_LEARN_ITEM];		// 父甸荐 乐绰 酒捞袍		1220
	short int	ItemMax;					// 泅犁 父甸荐 乐绰 酒捞袍 弥措摹 1220
	int			itemweight;					// 家券茄 林牢狼 ID			// LTS AI2

	//  Client阑 困茄 Data
	short int		SprNo;
	short int		mutant;  // 0810 KHS
	short int		npc_index; // NPC index concerned by Parameter 'index'
	short int		SprType;	
	short int		ElementType; // 盔玫利牢 加己阑 狼固茄促. (抗) 固畴: 阂(fire)		
	BYTE			accessory[4];
	
	short int		mantle;		// 011018 KHS 噶肚
	short int		jjing;      // 011030 KHS JJING

	DIRECTION		Direction;
	DWORD			IDWhoImAttacked;	// 唱甫 模仇捞 穿备衬..
	short int		nCurrentAction;						
	short int       ox, oy;		// 磊脚捞 怕绢抄厘家..
	short int		X, Y;		// 泅犁 谅钎( Dot 窜困 )
	short int		MovePathCount;
	short int		MoveLength;
	unsigned char	MoveType;
	short int		OldMoveSx,MoveSx;	// 泅犁谅钎(鸥老窜第 )
	short int		OldMoveSy,MoveSy;
	unsigned char   MoveDirTbl[MAX_DIR_TABLE];
	short int		MoveGox;			// 格利瘤狼 谅钎( Dot 窜困 )
	short int		MoveGoy;
	short int		Tox, Toy;			// 鸥拜阑 罐栏搁 剐赴促.( Dot窜困 )
	short int		detect_x, detect_y;
	int				path[ MAX_SHORTPATH][2];		// PathBuild()甫 困茄 函荐..
	int				pathcount;
	// --------------  NPC Pattern---------- NPC傍拜阑 困秦..-
	short 			patterntype;
	short 			oldpatterntype;
	int				targetid;
	int				bossid;
	short			attackcount;		// NPC啊 荤侩茄促. 瘤陛篮荤侩窍瘤 臼绰促. 
	DWORD 			aitimedelay;
	DWORD			aidelayhowmuch;
	int				tx, ty, how;// 捞悼俊 包访等荤亲.
	int				attacked;
	bool			notcomeinside; // 笼救俊 甸绢哎荐 绝促. 
	//  ------------------------------------- NPC啊 磷栏搁 掘阑荐 乐绰 巴甸...
	short int		Get_meat;
	char			Meat_amount;
	short int		Get_skin;
	char			Skin_amount;
	short int		Get_Wool;
	char			Wool_amount;
	short int		Get_beewax;
	char			BeeWax_amount;
	char			viewtype;
	short int		openhouse;
	short int		tame;				// tame荐摹... 
	short int		tamingable;
	short int		tamingcountdown;
	BYTE			tame_cmd;
	char			HostName[ 21]; // 林牢狼 捞抚...
	short int		HostId;
	char			TargetName[ 31]; // 林牢捞 沥茄 傍拜磊狼 捞抚.
	short			pkid;		//
	short			pkcount;	// 捞 荐摹啊 3捞惑捞搁 PK甫 茄巴捞促 ! 
	DWORD			cast_pk;	// BroadCast等 矫埃.
	//------------------------   辑滚俊辑父 荤侩窍绰 para...
	DWORD			WalkTime;
	DWORD			desttime;
	short int		cur_skillno; // 泅犁 角青登扁 困秦 矫傈吝牢 Skill...
	short int		cur_skillx;
	short int		cur_skilly;
	short int		cur_skilltargettype;
	short int		cur_skilltarget_id;
	short int		cur_skillKey;//030102 lsw Skill Key
	POS				cur_skillPOS;
	char			cur_skillTargetName[31];//020531 lsw
	DWORD			exetime_skill; // 角青瞪 Skill狼 矫埃.

	short int		MaxWizardSpell ;
	short int		MaxPriestSpell ;

	short int		Weight, MaxWeight ;

	DWORD			tac_skillEXP[13] ;
	char			cur_tac_skill;	// 泅犁 绢恫傍拜捞 捞幅绢脸阑锭 Setting登哥 傈捧扁贱 Index啊 甸绢埃促. ( TACTICS_Crapple....苞 鞍篮 )

	DWORD			LastTotal;
	DWORD			LastLoan;
	DWORD			LastLoan_time;
//	DWORD			box_id;							// 泅犁 凯妨 乐绰 冠胶狼 绊蜡 ID
	int				Defence;						// 规绢仿
	
	// Chatting包访 函荐 ----------------
	char			chatname[ 31];
	char			chattype;
	short int		whisperid;
	
	// Party / Relation / Employment.
	CharacterParty party[MAX_PARTY_MEMBER];			
	CharacterParty relation[3];				
	CharacterParty employment[6];				
	
	/// up_date侩
	char		party_str[6][31];
	char		relation_str[3][31];
	char		employment_str[6][31];
	int			partyrequestflag;
	BYTE		Status;				// 某腐磐狼 绒侥 惑怕 0篮 nomal		//0108
	DWORD		timetoupdate;
	char		updatable; // CSD-TW-030620
	int			balancingtest;
	DWORD		attackedblock;  // 甘俊 甸绢坷搁  0810 KHS							
	AREA		area_tbl[MAX_AREA_BUFFER];							
	int			ctrlpc;			// NPC老版快 唱甫 力绢窍绰 NPC狼 ID, 绝阑 版快 -1甫 啊瘤绊 乐促.
	int			ctrlnpc[MAX_PC_CONTROL_NPC];		
	DWORD		SpeedUp;			//  泅犁 加档狼 1/2父怒 歹 弧扼咙
	char		believe_god;		// 郴啊 瓜绰 脚
	short int	faith;				// 脚居缴
	char		preach_name[20];	// 傈档茄 荤恩狼 捞抚
	short int	god_cast_level;		// 脚傈 林巩 切嚼 窜拌	// 0410	YGI	// sql 历厘 鞘夸
	bool		in_temple;			// 脚傈救俊 乐促		// 0410	YGI	// sql 历厘 鞘夸 绝澜
	int			is_god_meeting;		// 泅犁 抗硅吝捞促		// 0410	YGI	// sql 历厘 鞘夸 绝澜
	DWORD		god_meeting_start_time;	// 抗硅 矫累茄 矫埃	// 0410	YGI	// sql 历厘 鞘夸 绝澜
	bool		i_go_year_meeting;		// 楷吝 抗硅俊 艾促.// 0410	YGI	// sql 历厘 鞘夸 绝澜
	bool		i_go_month_meeting;		// 岿吝 抗硅俊 艾促.// 0410	YGI	// sql 历厘 鞘夸 绝澜
	bool		i_go_day_meeting;		// 老老 抗硅俊 艾促.// 0410	YGI	// sql 历厘 鞘夸 绝澜
	bool		use_supper;				// 澜侥 力傍阑 罐绰 吝捞た.		// 0601
	int			much_supper;			// 力傍 罐绰 澜侥狼 剧			// 0601
	DWORD		can_memorize_time;		// 啊瓷茄 矫埃	// 历厘且 鞘夸 绝澜  0414 YGI
	short int	startposition;
	short int	startmap;
	//////////////////////////////////  搬捧 矫胶袍...
	char        dualname[20];
	char        dualstatus;	// 0: No Dual    1: 脚没茄惑怕..   2: 措搬惑怕.
	DWORD		dualvictory;	
	DWORD		dualfail;	
	DWORD		dualdraw;	
	/////////////////// DB Update绝捞 Packet栏肺 鸥 霸烙辑滚俊 傈价.
	char		change_map_confirm[9];						// YGI 0521
	int			now_changing_map;	// 泅犁 甘 傈券 吝捞促	// YGI 0521
	POINT		memory_Position;			//鸥款器呕沁阑锭 捞悼且 甘 谅钎(鸥老 谅钎)
	int			homemap;
	int         homex, homey;
	BOOL		fight_flag;	//1:1 措搬 惑怕眉农.
	int			fight_id;	//傈捧且 仇..
	DWORD		first_ResultMagicTime;		//老馆 措惑付过牢 版快 1檬俊 1锅 捞郴肺 力茄窍扁 困茄 矫埃扁撅
	DWORD		magic_delay;
	int			curr_fight_map;		// 0907 YGI
	int			dec_duration;		// 厘厚狼 Duration捞 脆绰沥档甫 Check茄促. 
	short int	vote_num;			// 付瘤阜 鳖瘤 急芭茄 朝楼
	int         sealstone;	// 搬拌籍捞 嘎栏搁 捞荐摹啊 棵扼啊哥. 利寸洒 棵扼哎锭付促. 努扼捞攫飘肺 焊郴霖促. 
	int			view_job;		// 焊咯林扁 流诀		//001028 YGI
  
	// Added by chan78 at 2000/11/27
	short int		MapChange_MoveGox;
	short int		MapChange_MoveGoy;
	short int		MapChange_X;
	short int		MapChange_Y;
	short int		MapChange_MovePathCount;
	short int		MapChange_MoveLength;
	short int		MapChange_MoveSx;
	short int		MapChange_MoveSy;
	
	// 010406 YGI
	DWORD			LadderScore;		// 妮肺技胶 贰歹 痢荐
	WINLOSEPOINT	WinLoseScore;		// 妮肺技胶 铰菩
	bool			refresh_ladder;		// 贰歹 珐欧 叼厚俊 历厘且 鞘夸啊 乐绰啊? // 010511 YGI

	DWORD	dwSkillTime;//010703 lsw
	DWORD	dwSkillMakeitemTime;//010703 lsw
 
	int iPhysicalTotalDamage;
	int iPhysicalRandomDamage;
	
	//蜡飞捞唱 飘乏阑 焊绰 矫埃
	bool	bCanViewGhost;
	DWORD	dwCanViewGhostTime;
	
	bool	bCanViewTrap;
	DWORD	dwCanViewTrapTime;
	
	bool	bCanViewBomb;
	DWORD	dwCanViewBombTime;

	short	nSkillSadCount;
	short	nSkillBlessLeaf;
	
	//雀汗 矫埃
	DWORD	dwHungryRecoverTime;
	DWORD	dwHpRecoverTime;
	DWORD	dwManaRecoverTime;
	DWORD	dwDivineRecoverTime;
	DWORD	dwCpRecoverTime;
	
	DWORD	dwCheckAccelTime;
	DWORD	dwSendedAccelTime;

	//灌扁 炼例
	short int nDayLightControl;

	DWORD		dwDayLightControlCustomTime;
	short int	nDayLightControlCustom;//020610 lsw
		
	RareMain					SquadRare;
	DYNAMICRAREEFFECT			DynamicRare;
	STATICRAREEFFECT			StaticRare;		//馒侩 酒捞袍
  
	// 011108 YGI
	BYTE	select_rune;			// 白喉矫 急琶等 烽 锅龋
 	int 	JoinLocalWar;			// 惫瘤傈俊 曼咯 沁澜 窍瘤 臼疽澜	// LTS LOCALWAR		// LTS AI2 MONSTER 弊缝锅龋 // CSD-030528
	char	GainedFame;				// 惫瘤傈俊辑 掘篮 疙己			// LTS LOCALWAR			// LTS AI2 阁胶磐 焊胶锅龋
	char	CurrentPhase;			// 惫瘤傈俊辑 利惫啊狼 甘俊辑 茄窜拌究 甸绢哎锭
	char	ChairNum;				// 狼磊锅龋						// LTS SITDOWN BUG

	char	reporter_mode;
	char	party_select;	// 颇萍矫 棵扼啊绰 版氰摹 搬沥
	char	ox_select;		// ox event 俊辑 急琶茄 蔼

	char			EventLocalWarJoin;			// 020115 LTS			// 促澜捞亥飘俊 静扁困秦 
	Event_Join		EventJoin;					// 020115 LTS
	int				EventPoint;					// 020115 LTS

	char			HorseNo;					// LTS HORSERIDER		// LTS NEW AI		// 府目滚府 墨款飘 
	char			RiderNo;					// LTS HORSERIDER
	char			HorseGrade;					// LTS HORSERIDER
	char			RiderGrade;					// LTS HORSERIDER

	char			pk_on_off;		// YGI 020418
	char			QuestMode;					// LTS DRAGON MODIFY
	char			DragonLordWarTeam;			// LTS DRAGONLORD		// 0 : 绝澜 1: BLUE 2: RED

	//021030 lsw 背券 函版
	K_ITEM			give[MAX_EXCHANGE_ITEM];		// 郴啊 拎具 窍绰 酒捞袍
	K_ITEM			recv[MAX_EXCHANGE_ITEM];		// 郴啊 罐酒具 窍绰 酒捞袍
	short int		m_iExchangeTargetId;		// 芭贰 措惑
	char			m_szExchangeTargetName[21];		// 芭贰 措惑 捞抚
	int				m_iExchangeType;		// 芭贰窍绊 乐绰瘤 绝绰瘤...
	int				m_iExchangeState;		// 芭贰窍绊 乐绰瘤 绝绰瘤...
	bool			m_bExchangeMode;		// 芭贰窍绊 乐绰瘤 绝绰瘤...
	int				m_nUserAge;				// 030929 kyo // 怕惫俊辑父 荤侩窍绰 蜡历 唱捞
};

///////////////////////////////////////////////////////////////////////////////
// 裙垫 器牢磐俊 包茄 努贰胶
class CGainPoint
{
public:
	CGainPoint() : m_nPoint(0)
	{
	}
	
public:
	void Clear() { m_nPoint = 0; }
	
	int GetPoint() const { return m_nPoint; }
	void SetPoint(int nPoint) { m_nPoint = nPoint; }
	void Increase(int nPoint = 1) { m_nPoint += nPoint; }
	void Decrease(int nPoint = 1) { m_nPoint -= nPoint; }
	
	bool IsEnough(int nPoint) const
	{ 
		return (m_nPoint >= nPoint) ? true:false;
	}
	
public:
	int m_nPoint;
};
//
///////////////////////////////////////////////////////////////////////////////

///////////////////////////////////////////////////////////////////////////////
// 惑怕 器牢磐俊 包访等 努贰胶
class CStatePoint
{
public:
	CStatePoint() :	m_nMaxPoint(0), m_nCurPoint(0)
	{
	
	}

public:
	int Increase(int nPoint, int nPercent);
	int Decrease(int nPoint, int nPercent);

public:
	void SetMaximumPoint(int nPoint)
	{
		m_nMaxPoint = nPoint;
	}

	int GetMaximumPoint() const
	{
		return m_nMaxPoint;
	}

	void SetCurrentPoint(int nPoint)

⌨️ 快捷键说明

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