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

📄 skillmgr.h

📁 国内著名网络游戏dragon的服务端完整源码 内附完整数据库结构
💻 H
📖 第 1 页 / 共 2 页
字号:
	short miningcount;
	short fishing_old[ MAX_EARTHSKILL ];
	short fishing[ MAX_EARTHSKILL ];
	short fishingcount;
	short cutting_old[ MAX_EARTHSKILL ];
	short cutting[ MAX_EARTHSKILL ];
	short cuttingcount;
	short digging_old[ MAX_EARTHSKILL ];
	short digging[ MAX_EARTHSKILL ];
	short diggingcount;
}t_earthpower;

typedef struct RAREITEMBAG
{
	int iNo;
	int iRareItemBagPercentTableNo;
	int iGradeMin;
	int iGradeMax;
	int ItemNo[21];//0 锅篮 绝绰 蔼
}t_RareItemBag;
const int MAX_RAREITEMBAG = 1000;

typedef struct BASICITEMBAG
{
	int iNo;
	int iBasicItemPercentTableNo;
	int ItemNo[21];//0锅篮 绝绰蔼
}t_BasicItemBag;
const int MAX_BASICITEMBAG = 1000;

typedef struct ItemControlPercent
{
	int iNo	;
	int	per[8];//0锅篮 配呕蔼 1~5绰 海捞流 弊缝 6~7篮 饭绢 弊缝
}t_ItemControlPercent;
const int MAX_ITEMCONTROLPERCENT = 1000;

typedef struct ITEMFALLPERCENT
{
	int iNo;
	int per[21];//0 锅篮 配呕 蔼 捞促
}t_ItemFallPercent;
const int MAX_ITEMFALLPERCENT = 1000;

typedef struct ITEMCONTROL
{
	int iNo;
	int ItemControlPercentNo;
	int ItemGroup[8];//0锅篮 绝绰蔼 1~5绰 海捞流 弊缝 6~7篮 饭绢 弊缝
	int	iFallItemCount;//冻绢龙 肮荐, 溜, 馆汗巩 龋免 冉荐
}t_ItemControl;
const int MAX_ITEMCONTROL = 1000;

class CSkillMgr  
{
public:
	CSkillMgr();
	virtual ~CSkillMgr();
	void	AutoSetCanView(CHARLIST *ch);

	bool	CanViewGhost(CHARLIST *ch)		const	{return ch->bCanViewGhost;}
	bool	CanViewTrap(CHARLIST *ch)		const	{return ch->bCanViewTrap;}
	
	bool	CheckSkillNo( const int iSkillNo )const;
	bool	CheckIsYourSkill( LPCHARLIST ch, const int iSkillNo )const;
	int		CorrectLearnItem(CHARLIST *ch);

	void	CharacterToAlive(CHARLIST *ch, const int iType = 0);
	void	CharacterToGhost(CHARLIST *ch, const int iType = 0);
	
	bool	SetCanViewGhost(CHARLIST *ch, const int iTime);//檬窜困
	bool	SetCanViewBomb(CHARLIST *ch, const int iTime);//檬窜困
	bool	SetCanViewTrap(CHARLIST *ch, const int iTime);//檬窜困

  bool  IncSkillCount(CHARLIST *ch, const int iType, const int iKind, const int iPoint);//檬窜困
	void	SendSkillExp( const int iType, const t_skillexp exp, const int cn);

	int		FallItemWhenNPCDie(CHARLIST *NPC);
	
	int		GenerateNPCItem2(CHARLIST *NPC, NPC_Generation* g);

	void	RecvCMD_CONFORM_SADONIX(const t_packet &p);
private:
	void	SendCMD_CONFORM_SADONIX(const int cn, const int iItemNo,const int kind,const int x , const int y);//例措 private
	bool	IsRecoverAble(const int iNow,const int iMax)const;//泅犁 蔼苞 弥措樊阑 厚背秦辑 弥措樊捞 泅犁焊促 腹栏搁 啊瓷窍促甫 府畔茄促
	
	int		GetItemFallPercentPos(const int iFallNo);
	int		SetNPCInventory(CHARLIST *NPC, const int iItemControlNo,ItemAttr* pItem, const int iCallType = 0);
	int		SetNPCItem(const int iBagNo, const bool bIsBasic, ItemAttr *pItem,const int iCallType = 0);
	

public:
	void	AutoRecoverHp(CHARLIST *ch);
	void	AutoRecoverMp(CHARLIST *ch);
	void	AutoChangeHungry(CHARLIST *ch );//硅绊悄 霸捞瘤绰 弊成 瞒瘤 臼绰促 漂喊茄 惑炔俊辑父 蛮促(ex>狼磊)
	void	AutoRecoverCp(CHARLIST *ch);
	void	AutoRefreshRareMakeCount(CHARLIST *ch);
	int		CheckYouCanSkillIt( const int cn, CItem_Join &join, const int skillno, const int x, const int y, const int target_id );
	int 	CheckSkillTool( LPCHARLIST ch, CItem_Join &join, const int iSkillNo, const int target_id );
	int		FindLearnItem( CHARLIST *ch, const int item_no );		// 硅款霸 乐栏搁 -1阑 府畔, 绝栏搁 item_max甫 府畔
	bool	CanLearnItem( CHARLIST *ch, const int join_num )const;

	void	SkillMapper( const int cn, const int iSkillNo, const int x, const int y, const int targettype, const int target_id, const POS s );
	int		MakeItemByItemControl( ItemAttr *pItem, const int iItemControlNo ) { return SetNPCInventory(NULL, iItemControlNo, pItem );}		// 020821 YGI
private:
	int Skill_Detect_ghost					(const int iCn, const int iSkillNo, const int iX, const int iY, const int targettype, const int iTargetID );
	int Skill_Talk_with_ghost				(const int iCn, const int iSkillNo, const int iX, const int iY, const int targettype, const int iTargetID );
	int Skill_Poisoning						(const int iCn, const int iSkillNo, const int iX, const int iY, const int targettype, const int iTargetID );
	int Skill_Detect_poison					(const int iCn, const int iSkillNo, const int iX, const int iY, const int targettype, const int iTargetID );
	int Skill_Find_traps					(const int iCn, const int iSkillNo, const int iX, const int iY, const int targettype, const int iTargetID );
	int Skill_Remove_traps					(const int iCn, const int iSkillNo, const int iX, const int iY, const int targettype, const int iTargetID );
	int Skill_Entrapment					(const int iCn, const int iSkillNo, const int iX, const int iY, const int targettype, const int iTargetID );
	int Skill_Detect_bomb					(const int iCn, const int iSkillNo, const int iX, const int iY, const int targettype, const int iTargetID );
	int Skill_Bomb_in_box					(const int iCn, const int iSkillNo, const int iX, const int iY, const int targettype, const int iTargetID );
	int Skill_Remove_bomb					(const int iCn, const int iSkillNo, const int iX, const int iY, const int targettype, const int iTargetID );
	int Skill_Stealing						(const int iCn, const int iSkillNo, const int iX, const int iY, const int targettype, const int iTargetID );
	int Skill_Reclaim						(const int iCn, const int iSkillNo, const int iX, const int iY, const int targettype, const int iTargetID );
	int Skill_Sow							(const int iCn, const int iSkillNo, const int iX, const int iY, const int targettype, const int iTargetID );
	int Skill_Havest						(const int iCn, const int iSkillNo, const int iX, const int iY, const int targettype, const int iTargetID );
	int Skill_Mining						(const int iCn, const int iSkillNo, const int iX, const int iY, const int targettype, const int iTargetID );
	int Skill_Refine						(const int iCn, const int iSkillNo, const int iX, const int iY, const int targettype, const int iTargetID );
	int Skill_Fish_hooking					(const int iCn, const int iSkillNo, const int iX, const int iY, const int targettype, const int iTargetID );
	int Skill_Netting						(const int iCn, const int iSkillNo, const int iX, const int iY, const int targettype, const int iTargetID );
	int Skill_Cutting						(const int iCn, const int iSkillNo, const int iX, const int iY, const int targettype, const int iTargetID );
	int Skill_Lumbering						(const int iCn, const int iSkillNo, const int iX, const int iY, const int targettype, const int iTargetID );
	int Skill_Butchering					(const int iCn, const int iSkillNo, const int iX, const int iY, const int targettype, const int iTargetID );
	int Skill_Digging						(const int iCn, const int iSkillNo, const int iX, const int iY, const int targettype, const int iTargetID );
	int Skill_Makepowder					(const int iCn, const int iSkillNo, const int iX, const int iY, const int targettype, const int iTargetID );
	int Skill_Shear							(const int iCn, const int iSkillNo, const int iX, const int iY, const int targettype, const int iTargetID );
	int Skill_Carpentry						(const int iCn, const int iSkillNo, const int iX, const int iY, const int targettype, const int iTargetID );
	int Skill_Blacksmithy					(const int iCn, const int iSkillNo, const int iX, const int iY, const int targettype, const int iTargetID );
	int Skill_Cooking						(const int iCn, const int iSkillNo, const int iX, const int iY, const int targettype, const int iTargetID );
	int Skill_Clothing						(const int iCn, const int iSkillNo, const int iX, const int iY, const int targettype, const int iTargetID );
	int Skill_Tailoring						(const int iCn, const int iSkillNo, const int iX, const int iY, const int targettype, const int iTargetID );
	int Skill_Bowcrafting					(const int iCn, const int iSkillNo, const int iX, const int iY, const int targettype, const int iTargetID );
	int Skill_Fletching						(const int iCn, const int iSkillNo, const int iX, const int iY, const int targettype, const int iTargetID );
	int Skill_Makepotion					(const int iCn, const int iSkillNo, const int iX, const int iY, const int targettype, const int iTargetID );
	int Skill_Makemetal						(const int iCn, const int iSkillNo, const int iX, const int iY, const int targettype, const int iTargetID );
	int Skill_Makebottle					(const int iCn, const int iSkillNo, const int iX, const int iY, const int targettype, const int iTargetID );
	int Skill_Candlemaking					(const int iCn, const int iSkillNo, const int iX, const int iY, const int targettype, const int iTargetID );
	int Skill_Snooping						(const int iCn, const int iSkillNo, const int iX, const int iY, const int targettype, const int iTargetID );
	int Skill_Makefire						(const int iCn, const int iSkillNo, const int iX, const int iY, const int targettype, const int iTargetID );
	int Skill_Taming						(const int iCn, const int iSkillNo, const int iX, const int iY, const int targettype, const int iTargetID );
	int Skill_Evaluate_inteligence			(const int iCn, const int iSkillNo, const int iX, const int iY, const int targettype, const int iTargetID );
	int Skill_Evaluate_wisdom				(const int iCn, const int iSkillNo, const int iX, const int iY, const int targettype, const int iTargetID );
	int Skill_Anatomy_judgement				(const int iCn, const int iSkillNo, const int iX, const int iY, const int targettype, const int iTargetID );
	int Skill_Item_identification			(const int iCn, const int iSkillNo, const int iX, const int iY, const int targettype, const int iTargetID );
	int Tactics_crapple						(const int iCn, const int iSkillNo, const int iX, const int iY, const int targettype, const int iTargetID );
	int Tactics_swordmanship				(const int iCn, const int iSkillNo, const int iX, const int iY, const int targettype, const int iTargetID );
	int Tactics_archery						(const int iCn, const int iSkillNo, const int iX, const int iY, const int targettype, const int iTargetID );
	int Tactics_fencing						(const int iCn, const int iSkillNo, const int iX, const int iY, const int targettype, const int iTargetID );
	int Tactics_mace_fighting				(const int iCn, const int iSkillNo, const int iX, const int iY, const int targettype, const int iTargetID );
	int Tactics_pierce						(const int iCn, const int iSkillNo, const int iX, const int iY, const int targettype, const int iTargetID );
	int Tactics_whirl						(const int iCn, const int iSkillNo, const int iX, const int iY, const int targettype, const int iTargetID );
	int Tactics_hurl						(const int iCn, const int iSkillNo, const int iX, const int iY, const int targettype, const int iTargetID );
	int Tactics_parrying					(const int iCn, const int iSkillNo, const int iX, const int iY, const int targettype, const int iTargetID );
	int Tactics_double_swordmanship			(const int iCn, const int iSkillNo, const int iX, const int iY, const int targettype, const int iTargetID );
	int Tactics_double_macefighting			(const int iCn, const int iSkillNo, const int iX, const int iY, const int targettype, const int iTargetID );
	int Tactics_magery						(const int iCn, const int iSkillNo, const int iX, const int iY, const int targettype, const int iTargetID );
	int Tactics_orison						(const int iCn, const int iSkillNo, const int iX, const int iY, const int targettype, const int iTargetID );
	int Skill_Ghost_resurrection			(const int iCn, const int iSkillNo, const int iX, const int iY, const int targettype, const int iTargetID );
	int Skill_Gm_carpenter					(const int iCn, const int iSkillNo, const int iX, const int iY, const int targettype, const int iTargetID );
	int Skill_Gm_blacksmith					(const int iCn, const int iSkillNo, const int iX, const int iY, const int targettype, const int iTargetID );
	int Skill_Gm_cook						(const int iCn, const int iSkillNo, const int iX, const int iY, const int targettype, const int iTargetID );
	int Skill_Gm_tailor						(const int iCn, const int iSkillNo, const int iX, const int iY, const int targettype, const int iTargetID );
	int Skill_Gm_bowcraft					(const int iCn, const int iSkillNo, const int iX, const int iY, const int targettype, const int iTargetID );
	int Skill_Gm_alchemist					(const int iCn, const int iSkillNo, const int iX, const int iY, const int targettype, const int iTargetID );
	int Skill_Gm_candlemaker				(const int iCn, const int iSkillNo, const int iX, const int iY, const int targettype, const int iTargetID );
};

extern CSkillMgr  SkillMgr;

extern CItem_Join	item_join[ ITEM_JOIN_MAX];
extern lpMAPSKILLTABLE	Header[8][8];
extern t_earthpower EarthPower;
extern int GiveSpecialItem(int NPCno,int dx,int dy,int MapNo,int How);
extern void SendCharacterCondition( CHARLIST* lpChar, int change_HP );
extern int Npc_Item_Table[NPC_ITEM_TABLE_X][NPC_ITEM_TABLE_Y];	//npc啊 磷阑锭 唱棵 酒捞袍甸捞 葛咯乐绰 抛捞喉
extern void RecvSkillInfo( int cn, t_client_skill_info *sp);
extern void RecvSkillCursorView( int cn, t_client_skill_cursor_view  *p);
extern BOOL LoadSkillMapTable(void);
extern bool LoadItemJoinTable( void );
extern void RecvCMD_FOOT_ON_TRAP_0_ITEM( int cn, t_client_foot_on_trap0 *p );
extern void RecvCMD_FOOT_ON_TRAP_1_ITEM( int cn, t_client_foot_on_trap1 *p );
extern void RecvSkillGauge( int cn, t_client_skill_gauge *p );
extern int AddSkillExp( int cn, int skillno, int hitrate );
extern void CheckSkillTimeElapsed( void );
extern DWORD ReturnHowLongTimeGrow( LPITEMLIST i );
extern bool youvegotitInventory( int cn, ItemAttr *item );
extern void RecvDebugChangeSkillExp( t_debug_change_skill_exp *tp );
extern int OutMessage(int cn, DWORD para1, DWORD para2);
extern int OutMessage( LPCHARLIST ch, DWORD para1, DWORD para2);
extern int OutSound(LPCHARLIST ch, const int iFileType, const int iNo);
extern void SendSkillResult( int cn, int skillno, int target_id, int x, int y, int result );
extern int GiveBasicItem(const int cn,const int iSkillTooltype,const int subType);
extern int ReturnDemandFromSkillMapTable( const int iSkillToolType, const int iTableno, const int iHitrate );
extern int ReturnFromSkillMapTable(const int cn, const int iSkillToolType, const int iTableno, const int iHitrate ,int iReturnType);
extern void SkillMapper( const int cn, const int iSkillNo, const int x, const int y, const int targettype, const int target_id, POS s );
extern int TryRareItem(int cn, const int iSkillNo, CItem_Join join, const int iTryRare, const int iRareGruop, const int iMakeCount,const int iSuccess);//020530 lsw
extern void SendViewTypeChange(const int cn, int viewtype );
extern void DecreaseEquipDuration( CHARLIST *ch, const DWORD dwDecValue, const int iItemPos, const int iTargetSprNo, const bool bIsAttacker= true,bool bIsNoCount= false);
extern bool exist(int, int, POS &) ;
extern int exchangePOS_of_Item(const int char_id, t_chr_status_info *cstatus, const POS source, const POS dest);
extern void aliveCharacter(CHARLIST *d);
extern void SendServerEachItem( const POS *pos, const ItemAttr *item, const int cn );			// 弊磊府俊 嫩 麦绢辑 蔼阑 焊郴霖促.
extern void SendServerEachItem( const ItemAttr *item, const CHARLIST *ch );	// 器牢磐肺 茫阑锭
extern bool LoadItemTable( void );
extern bool LoadRareItemBag();
extern bool LoadItemControlPercent();
extern bool LoadItemFallPercent();
extern bool LoadBasicItemBag();
extern bool LoadItemControl();
extern t_RareItemBag RareItemBag[MAX_RAREITEMBAG];
extern t_BasicItemBag BasicItemBag[MAX_BASICITEMBAG];
extern t_ItemControlPercent ItemControlPercent[MAX_ITEMCONTROLPERCENT];
extern t_ItemFallPercent ItemFallPercent[MAX_ITEMFALLPERCENT];
extern t_ItemControl ItemControl[MAX_ITEMCONTROL];
extern bool IsEquipAbleCheckAbleDay(const int start, const int end);
#endif // !defined(AFX_SKILLMGR_H__6108FBB6_55CB_4499_832C_6B1598CC6824__INCLUDED_)

⌨️ 快捷键说明

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