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

📄 itemmgr.h

📁 国内著名网络游戏dragon的服务端完整源码 内附完整数据库结构
💻 H
📖 第 1 页 / 共 2 页
字号:
	short	nLucky				;//luck 刘啊	////////////////////////////
	short	nWizard				;//WS 刘啊	// 付过 刘气 加己
	short	nPriest				;//PS 刘啊		char	cAmpIce		;
//	short	nMagic_power		;//困磊靛 拌凯 付过 单固瘤 刘气		char	cAmpElect	;
	short	nMagic_vigor		;//困磊靛 拌凯 付过 单固瘤 00% 刘气		char	cAmpFire		;
	short	nMagic_stay			;//困磊靛 拌凯 付过 瘤加 矫埃 刘气		char	cAmpHoly		;
//	short	nNature_power		;//橇府胶飘 拌凯 付过 单固瘤 刘气		char	cAmpPoison	;
	short	nNature_vigor		;//橇府胶飘 拌凯 付过 单固瘤 00% 刘气		char	cAmpCurse	;
	short	nNature_stay		;//橇府胶飘 拌凯 付过 瘤加矫埃 刘气	
	short	nLife_recovery		;//Life 磊悼 雀汗樊 弥措摹 刘啊 (傈眉狼 00%鳖瘤 磊悼 雀汗)////////////////////////////
	short	nMana_recovery		;//Mana 磊悼 雀汗樊 弥措摹 刘啊 (傈眉狼 00%鳖瘤 磊悼 雀汗)// 软趋 加己
	short	nCritical			;//农府萍拿 单固瘤 唱棵 犬伏 00% 刘啊		short	HpSteal;
//	short	nGuardian			;//某腐磐狼 拱府利 规绢仿 刘啊		short	ManaSteal;
	short	nEvasion			;//傍拜 付过 雀乔啦 刘啊 (惑措狼 傍拜 付过 公瓤拳 犬伏)		short	DivineSteal;
//		56					//
//		57					//
//		58					//
//		59					//
//		60					//
//		61					//
//		62					//
//		63					//
//		64					//
//		65					//
//		66					//
//		67					//
	short	nWitch				;//鸥拜 矫 惑措狼 Mana甫 00父怒 化绢咳		short	CastingTimeReduceRate;
	short	nDevil				;//鸥拜 矫 惑措狼 Mana甫 00% 父怒 化绢咳		short	CastingTimeKeepRate;
	short	nDesire				;//鸥拜 矫 惑措狼 Life甫 何啊利栏肺 00父怒 化绢咳		short	MagicContinueTimeRate;
	short	nRobber				;//鸥拜 矫 惑措狼 Life甫 何啊利栏肺 00% 父怒 化绢咳	////////////////////////////
	short	nEvil				;//鸥拜 矫 惑措狼 Divine阑 何啊利栏肺 00父怒 化绢咳	// 雀汗 加己
	short	nSatan				;//鸥拜 矫 惑措狼 Divine阑 何啊利栏肺 00% 父怒 化绢咳		short	HpRecoverSpeed; 
	short	nWeary				;//鸥拜 矫 惑措狼 Health甫 何啊利栏肺 00父怒 化绢咳		short	ManaRecoverSpeed; 
	short	nFatigue			;//鸥拜 矫 惑措狼 Health甫 何啊利栏肺 00% 父怒 化绢咳		short	DivineRecoverSpeed; 
	short	nCounterattack		;//傍拜磊俊霸 00狼 单固瘤甫 倒妨淋	////////////////////////////
	short	nStrike				;//傍拜磊狼 单固瘤俊辑 00%甫 倒妨淋	// 馆拜 加己
	short	nSnag				;//鸥拜 矫 惑措甫 00(矫埃)悼救 付厚矫糯		short	DmgReturn;
	short	nVertigly			;//鸥拜 矫 惑措甫 00(矫埃)悼救 去鄂俊 吧府霸 窃		short	DmgReturnRate;
	short	nPoison				;//鸥拜 矫 惑措甫 00(矫埃)悼救 吝刀俊 吧府霸 窃	
	short	nStiff				;//鸥拜 矫 惑措甫 00(矫埃)悼救 籍拳俊 吧府霸 窃	
	short	nSlack				;//鸥拜 矫 惑措甫 00(矫埃)悼救 加档历窍俊 吧府霸 窃	//011025 lsw <
//		83					//	
//		84					//	
	short	nGhost				;//馒侩窍霸 登搁 蜡飞阑 杭 荐 乐澜	
	short	nLandmine			;//老馆 飘乏阑 皑瘤且 荐 乐澜		
	short	nTraping			;//付过 飘乏阑 皑瘤且 荐 乐澜		
	short	nDetect				;//葛电 飘乏阑 皑瘤且 荐 乐澜	//困俊波 蝶促 靖 	
	
	short	nHighPower;
	short	nHighShield;
	short	nHighBlood;
	short	nHighMagic;
	short	nHighNature;
}t_StaticRareEffect,*lpStaticRareEffect;

typedef struct DYNAMICRAREEFFECT	
{	
	char	cRareType1;
	int 	iValue1;
	DWORD	iRareTime1;

	char	cRareType2;
	int 	iValue2;
	DWORD	iRareTime2;
	
	char	cRareType3;
	int 	iValue3;
	DWORD	iRareTime3;
}t_DynamicRareEffect,*lpDynamicRareEffect;

// 031009 CI YGI
struct k_item_limit_number
{
	DWORD who_make	:8;
	DWORD number 	:24;
};

///////////////////////////////////////////////////////////////////////////

const int MULTIPLE_USE_ONE_TIME_DEC_DUR =10;//咯矾锅 冈绰 酒捞袍 茄锅俊 别捞绰 郴备档
class CItem;
// 031009 CI YGI
class CItemLimitMgr
{
public :
	enum
	{
		LIMIT_OF_NO_HAVE_LIMIT_ITEM = 1004,			// 府固飘 逞滚甫 啊龙 荐 绝绰 酒捞袍甸狼 府固飘 锅龋
	};
private :
	int		m_nItemLimitCount;	// 绊蜡 府固飘 逞滚 // 墨款飘 登绰 蔼
	map<int, int> m_mapHaveLimitItem;		//  府固飘 蔼阑 啊廉具 窍绰 酒捞袍 锅龋 葛澜

public :
	CItemLimitMgr() {}
	~CItemLimitMgr() { m_mapHaveLimitItem.clear(); }

	int	GetLimitNumber( int item_no );	// 甘辑滚寸 啊瘤绊 乐绰 绊蜡狼 府固飘 逞滚 蔼
	int	GetLimitNumberDontCount() { return m_nItemLimitCount; };	// 墨款飘 窍瘤 臼绰促.
	void SetLimitCount( int count )
	{
		m_nItemLimitCount = count;
	}
	int	LoadHaveLimitItem();		// 叼厚俊辑 肺爹秦柯促.
	bool IsCanHaveLimitItem( int item_no )	// 府固飘 锅龋甫 啊龙荐 绝绰 酒捞袍 牢啊?
	{
		map<int, int>::iterator itor;
		if( m_mapHaveLimitItem.find( item_no ) == m_mapHaveLimitItem.end() )
		{
			return false;	// 府固飘 锅龋甫 啊龙 荐 绝绰 酒捞袍捞促.
		}
		return true;		// 府固飘 锅龋甫 啊龙 荐 乐绰 酒捞袍捞促.
	}
};
/////////////////////////////////////////////////

class CItemMgr  : public CItemLimitMgr	// 031009 CI YGI
{
private:
	ITEMATTR	NULLITEM;
public:
	CItemMgr();
	virtual ~CItemMgr();

public:
	
	CItem*		ConvertItemNoToCItem(const int iItemNo);
	CItem*		ConvertItemNoToCItem(const ITEMATTR item){return ConvertItemNoToCItem(item.item_no);}

	int			ChangeItemAttribute(ITEMATTR &TargetItem, const int iType, const int iAttr);
	int			ChangeItemAttribute(ITEMATTR &TargetItem, const ITEMATTR SourceItem);
	
	int			DeleteItem(ITEMATTR &item);
	
	ITEMATTR	GenerateItem(const int iItemNo);
	ITEMATTR	GenerateItem(const int iItemNo, const int iType , const int iCustomValue);//dwCustomDuration 掂饭捞记

//	int			CheckFaultItem(){return 0;}//傈眉 府胶飘 吝俊 捞惑茄 局甸阑 瘤况辰促 郴何俊绰 CheckFaultItem(ITEMATTR &item,bool bDeleteFlag)捞 倒酒埃促
	int			CheckFaultItem(ITEMATTR &item,bool bDeleteFlag);//iDeleteFlag 1阑 持栏搁 肋给等 酒捞袍老 版快 昏力 矫难滚赴促, 0阑 持栏搁 昏力绰 矫虐瘤 臼绰促.
	
	int			CheckAddAbleItem(const ITEMATTR SourceItem,const ITEMATTR TargetItem);

	int			CombineItem(ITEMATTR &SourceItem,ITEMATTR &TargetItem);//酒捞袍 荐樊 钦摹扁

	bool		SwapItem(ITEMATTR &src,ITEMATTR &target);

	int			GenerateItemLimitNumber( int item_no );	// 031009 CI YGI
	int			GenerateItemDuration(const int iItemNo);
	
	virtual int	GetItemByPosition(){return 0;}//const;
	virtual int	FindEmptyPosition(){return 0;}//const;
	
	virtual int	ItemListLineUp(int iType, int iLineUpStandard){return 0;}//const;
	virtual int	ItemListEmpty(int iType){return 0;} //const;//酒捞袍 府胶飘 彬阐窍霸 厚快扁
	
	virtual ITEMATTR	SearchItemByItemNo(int iType, int &iPos, int iItemNo){return NULLITEM;}//const;
	virtual ITEMATTR	SearchItemByItemKind(int iType, int &iPos, int iItemKind){return NULLITEM;}//const;
	virtual ITEMATTR	SearchItemByItemStruct(int iType, int &iPos, ItemAttr compare){return NULLITEM;}// const;

public://酒捞袍 沥焊 掘绰 努贰胶
	
	int	GetItemWeight(const int iItemNo);//酒捞袍 抛捞喉狼 秦寸 锅龋狼 扁夯 公霸 固备泅
	int	GetItemWeight(const ITEMATTR item);//酒捞袍 备炼眉 磊眉啊 啊瘤绰 公霸
	
	int	GetItemDur(const ITEMATTR item, unsigned short &NowDur,unsigned short &MaxDur);//郴备档侩 酒捞袍
	int	GetItemMuch(const ITEMATTR item, int &NowMuch);//唱穿绢 瘤绰 酒捞袍老 版快

	int	GetItemKind(const int iItemNo);
	int	GetItemKind(const ITEMATTR item){return GetItemKind(item.item_no);}

	int	GetItemTactic(const int iItemNo);
	int	GetItemTactic(const ITEMATTR item){return GetItemTactic(item.item_no);}
	
	int	GetItemValue(const int iItemNo);
	int	GetItemValue(const ITEMATTR item);

	int	GetItemMaxMuch(const int iItemNo);
	int	GetItemMaxMuch(const ITEMATTR item){return GetItemMaxMuch(item.item_no);}

	int DecItemDur(ITEMATTR &item,const DWORD iValue);
	
	ItemAttr	GiveRareItem(const int item_no, const int iDur,const int iCallType,const int iTryMulti, const int iGradeMin, const int iGradeMax, RareMain &RareAttr,const int iHighLevel);//020725 lsw
	ItemAttr	GiveLegendItem(const int item_no, const int iDur = 0);
	int			GetAbleRareKind(const int iCallType,const int iHighLevel);
	int			AbleMakeOnThisMap(const int iMapNation,const int iNo);
	bool		MakeRareAttr(unsigned int &attr3 ,const int iNowGrade,const int iSokSung1,const int iSokSung2,const int iSokSung3,const int iHighLevel,const bool bIsDynamicRare)const;
	int			MakeDefaultRareItem( ItemAttr *item, const int iItemNo, const int iSok1, const int iGrade, const int iTryMulti = 0);
	int			GetSkillPointByItem(const ITEMATTR &item)const;
	int			GetStaticFunctionNo(const ITEMATTR &item);
};
		
extern	CItemMgr	ItemMgr;
#endif // !defined(AFX_ITEMMGR_H__CA091E53_778D_4AE5_85BC_B3E5D27503CF__INCLUDED_)

⌨️ 快捷键说明

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