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

📄 citem.h

📁 国内著名网络游戏dragon的服务端完整源码 内附完整数据库结构
💻 H
📖 第 1 页 / 共 4 页
字号:
#if !defined(AFX_CITEM_H__3DCF6E55_A881_498E_9E4E_A342F8E62D81__INCLUDED_)
#define AFX_CITEM_H__3DCF6E55_A881_498E_9E4E_A342F8E62D81__INCLUDED_

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

#include <stdio.h>
#ifndef _DRAGON_PROTOCOL_
#include "dr_network.h"
#endif
	
#include "kein_item.h"
//11025 lsw >
#include "skill_lsw.h"
//11025 lsw <

#define		ITEM_NAME_MAX		31

#define OK			1
#define NOT		0	


////////////////////////////////////////////
// 公扁 厘馒 (equip) 
enum eWTTypes
{
	WT_WEAPON	= 0,
	WT_SHIELD	= 1,
	WT_HELMET	= 2,
	WT_ARMOR	= 3,
	WT_NECK		= 4,
	WT_SHOES	= 5,
	WT_UNIQUE1	= 6,
	WT_UNIQUE2	= 7, 
	WT_POTION	= 8,
};

enum WearTypeGroup
{
	WEAR_ANYTHING				=0,
	WEAR_ONLY_INVEN				=1,
	WEAR_RIGHT_HAND				=2,
	WEAR_LEFT_HAND				=3,
	WEAR_HEAD					=4,
	WEAR_BODY					=5,
	WEAR_NECK					=6,
	WEAR_SHOES					=7,
	WEAR_UNIQUE					=8,
	WEAR_BELT					=9,
	WEAR_TWO_HAND				=10
};
//////////////////////////////////////////////
#define	PLANT			0
#define	MINERAL			1
#define	HERB			2
#define	COOK			3 
#define	POTION			4
#define	TOOL			5
#define	WEAPON			6
#define	DISPOSABLE		7
#define	ARMOR			8
#define	ACCESSORY		9
#define	ETC				10	//扁鸥 拱前

#define OBJECTITEM		13

const int IATTR_ITEMNO		=	-1;
enum IA2_TYPE
{
	IA2_HIDE			= 0x00000001,
	IA2_NOTMOVE			= 0x00000002,
	IA2_POISONED		= 0x00000004,
	IA2_OPENED			= 0x00000008,
	IA2_BROKEN			= 0x00000010,
	IA2_HOUSE			= 0x00000020,
	IA2_MAGICED			= 0x00000040,
	IA2_CANNOTUSE		= 0x00000080,
	IA2_NOIDENTIFIED	= 0x00000100,
	IA2_DOOR			= 0x00000200,
	IA2_BOX				= 0x00000400,
	IA2_CHAIR			= 0x00000800,
	IA2_TABLE			= 0x00001000,
	IA2_FARM0			= 0x00002000,
	IA2_FARM1			= 0x00004000,
	IA2_FARM2			= 0x00008000,
	IA2_FARM3			= 0x00010000,
	IA2_FARM4			= 0x00020000,
	IA2_FARM5			= 0x00040000,
	IA2_FARM6			= 0x00080000,
	IA2_FARM7			= 0x00100000,
	IA2_FIRE			= 0x00200000,
	IA2_TRAPED0			= 0x00400000,
	IA2_TRAPED1			= 0x00800000,
	IA2_TRAPED2			= 0x01000000,
	IA2_FIRST_ITEM		= 0x02000000,
	IA2_SEAL_NOR		= 0x04000000,
	IA2_SEAL_SPC		= 0x08000000,
	IA2_COLOSSUS_STONE	= 0x10000000,
	IA2_SCENARIO_POTAL	= 0x20000000,
};

enum ITEM_STRUCT_INDEX
{
	IATTR_DURATION		=0,
	IATTR_LIMIT			=1,
	IATTR_ATTR			=2,
	IATTR_ID			=3,
	IATTR_RESERVED0		=4,
	IATTR_RESERVED1		=5,
};
const int IATTR_MUCH			= IATTR_DURATION;
const int IATTR_SEAL_STONE_NO	= IATTR_LIMIT; 
const int IATTR_SPRITE_TYPE		= IATTR_LIMIT;
const int IATTR_RARE_MAIN		= IATTR_ID;
const int IATTR_TREASURE_MAP	= IATTR_RESERVED0;	// 040105 YGI 焊拱

// 酒捞袍 Type捞 13捞惑牢 版快 秦寸
#define ITEMTYPE_NORMAL		0
#define ITEMTYPE_CHAIR		1
#define ITEMTYPE_TABLE		2
#define ITEMTYPE_DOOR		3
#define ITEMTYPE_BOX		4

#define ITEMTYPE_SEAL_NOR	79
#define ITEMTYPE_SEAL_SPC	80

#define ITEMTYPE_COLOSSUS_STONE		87




#define Num_Of_Item_Type		11
#define MAX_ITEM_NUM			1000

#define Num_Of_CItem_Plant		14
#define Num_Of_CItem_Mineral	12
#define Num_Of_CItem_Herb		20
#define Num_Of_CItem_Cook		27
#define Num_Of_CItem_Potion		6 
#define Num_Of_CItem_Tool		27
#define Num_Of_CItem_Weapon		50
#define Num_Of_CItem_Disposable	19
#define Num_Of_CItem_Armor		40
#define Num_Of_CItem_Accessory	18
#define Num_Of_CItem_Etc		47
                                  

//########### 坷弗率 付快胶 滚瓢 努腐饶 角青窍绰 辆幅 沥狼 ###########
#define		USE_ITEM			1		// 家厚登绢 荤扼柳促.
#define		DIVIDE_ITEM			3		// 酒捞袍狼 肮荐甫 盒府茄促.
#define		REMAIN_ITEM			4		// 后捍 贸府
#define		MAGIC_BOOK_ITEM		5		// 付过氓捞 夺促
#define		DIARY_ITEM			6		// 老扁氓捞 夺促.
#define		BOX_ITEM			7		// 冠胶啊 凯赴促.
#define		DUAL_CHANGE_ITEM	8

class CItem
{	
public:
	//int Item_id ;
	int m_Much;			//1214
	int ThisMapValue;
	int cur_value;
	
protected :	
	
	// 31
public:
	virtual int getAllData(void) { printf("\nCITEM") ; return 1 ; }
	virtual void print_data(void) { printf("\nCITEM_PRINT_DATA") ; }
	virtual int is_equipable(int a, t_chr_status_info *b, POS c, POS d) { return 0 ; }
	virtual int use(int a, t_chr_status_info *b, POS c, POS d) { return 0 ; }
	virtual int GetValue() { return 0 ; }
	virtual int GetDuration() { return 1; }
	virtual int GetCirculation() { return 1;}
	
	virtual int UseItem( CHARLIST *ch) 	{ return 0;	}
	virtual int EatItem( CHARLIST *ch) 	{ return 0;	}
	virtual int GetUseJunk()			{ return 0; }
	virtual int GetRbutton()			{ return 0; }
	virtual int GetItemDuration()		{ return 1; }
	virtual int GetItemKind()			{ return 0; }
	virtual int GetKindOfMagic()		{ return 0; }
	virtual int GetIncrDamage()			{ return 0; }
	
	virtual int GetLevel()				{ return 0; }
	virtual int EquipItem(CHARLIST *ch) { return 0; }		// 001219_2 YGI
	virtual int PlusHp(CHARLIST *ch) { return 0; }		
	virtual int ReleaseItem(CHARLIST *ch ){return 0;}	//020314 lsw
	virtual int GetWearAble()			{ return 0; }
	
	// 1221 KHS
	virtual int Getbody() { return  0; }
	virtual int Getarms() { return  0; }
	virtual int Gethead() { return  0; }
	virtual int Getleg () { return  0; }
	virtual int Getneck() { return  0; }
	virtual int Gethand() { return  0; }
	virtual int GetDamage		() { return  0; }
	virtual int GetHit_rate		() { return  0; }
	virtual int GetDefense_rate	() { return  0; }
	virtual int GetAR_or_DH		() { return  0; }
	virtual int GetDefense_power() { return  0; }
	
	virtual int GetSkill_Ability(){ return  0; }
	virtual int GetRepairAble() { return 0; }
	
	virtual int Getrange() { return 0; }
	virtual int GetWeight() { return 0; }
	virtual int GetItemShow( int is_man ) { return 0; }
	
	virtual int GetItemImage() { return 0; }
	virtual char *GetHanName() { return NULL; }

  virtual int GetPlusLife() const { return 0; }
  virtual int GetPlusMana() const { return 0; }
  virtual int GetPlusDivine() const { return 0; }
  virtual int GetPlusHungry() const { return 0; }

	virtual int GetObjectNumber() { return 0; }
	virtual int Getmouse_MRD(){ return 0;}
	virtual int Getmouse_MR_Effect(){ return 0;}
	virtual int GetItemQuantity(){ return 0; }
	// 001220 zhh
	virtual int Getmouse_Mr_Wave(){ return 0; }
	virtual int GetCureDisease1(){ return 0; }
	virtual int GetCureDisease2(){ return 0; }
	virtual int GetImunityCure2(){ return 0; }
	virtual int GetImunityCure3(){ return 0; }
	virtual int GetNeed3Lv(){ return 0; }
	virtual int GetLegendAble(){ return 0; }
	virtual int GetLegendGroup(){ return 0; }
	virtual int GetNeedDualStep(){ return 0; }

	virtual int GetClassWarriorAble(){ return 0;}
	virtual int GetClassArcherAble(){ return 0;}
	virtual int GetClassThiefAble(){ return 0;}
	virtual int GetClassWizardAble(){ return 0;}
	virtual int GetClassClericAble(){ return 0;}
	virtual int GetStaticFunctionNo(){ return 0;}//030327 lsw
};	
	
	
	
	
	
class CItem_Plant :	public CItem
{	
//protected:			
public:
	int Item_id   ;
	char Name[ITEM_NAME_MAX] ;
	char Han_Name[ITEM_NAME_MAX] ;
	int lv   ;
	int Image_Number   ;
	int hp   ;
	int ap   ;
	int mp   ;
	int nutrition1   ;
	int nutrition2   ;
	int nutrition3   ;
	int anti_poison   ;
	int anti_paralysis   ;
	int anti_magic   ;
	int anti_fire   ;
	int anti_ice   ;
	int anti_electric   ;
	int Time_maintain   ;
	int cure_disease1   ;
	int cure_disease2   ;
	int cure_disease3   ;
	int cure_disease4   ;
	int cure_disease5   ;
	int take_disease1   ;
	int take_disease2   ;
	int take_disease3   ;
	int take_disease4   ;
	int take_disease5   ;
	int weight   ;
	int circulation_limit   ;
	int max_duration   ;
	int Maximum   ;
	int object   ;
	int wear_able   ;
	int base_value   ;
	int base_store   ;
	int store_const   ;
	int store_plus_const   ;
	int Mouse_MR;
	int Mouse_MRD;
	int Mouse_MR_Effect;
	int Mouse_Mr_Wave;
	int	Item_kind;
	
public:
	virtual int getAllData(void) ;
	virtual void print_data(void) {
		printf("\n%d %s %s %d", Item_id, Name, Han_Name, lv) ;
	}
	virtual int use(int a, t_chr_status_info *b, POS c, POS d) ;
	
	virtual int GetValue() 
	{
		int value;
		value =  base_value -( m_Much * store_const / 100000);
		return value; 
	}
	virtual int GetDuration() { return max_duration; }
	virtual int GetCirculation() { return circulation_limit;}
	virtual int EatItem( CHARLIST *ch);
	virtual int GetRbutton() { return Mouse_MR; }
	virtual int GetItemKind() { return Item_kind; }
	virtual int GetLevel() { return lv; }
	virtual int GetWearAble() { return wear_able; }
	virtual int GetWeight() { return weight; }
	virtual int GetItemImage() { return Image_Number; }
	
	virtual char *GetHanName() { return Han_Name; }
	virtual int GetObjectNumber() { return object; }
	virtual int Getmouse_MRD(){ return Mouse_MRD;}
	virtual int Getmouse_MR_Effect(){ return Mouse_MR_Effect;}
	
	virtual int Getmouse_Mr_Wave(){ return Mouse_Mr_Wave; }

	virtual int GetCureDisease1(){ return cure_disease1; }//020528 lsw
	virtual int GetCureDisease2(){ return cure_disease2; }//020610 lsw
	
};	
	
	
	
	
	

class CItem_Mineral : public CItem
{
//protected :
public :
	int Item_id   ;
	char Name[ITEM_NAME_MAX] ;
	char Han_Name[ITEM_NAME_MAX]  ;
	int lv   ;
	int Image_Number   ;
	int weight   ;
	int object   ;
	int wear_able   ;
	int base_value   ;
	int base_store   ;
	int store_const   ;
	int store_plus_const   ;
	int Mouse_MR;
	int Mouse_MRD;
	int Mouse_MR_Effect;
	int Mouse_Mr_Wave;
	int Item_kind;



public:
	virtual int getAllData(void) ;
 	virtual void print_data(void) {
		printf("\n%d %s %s %d", Item_id, Name, Han_Name, lv) ;
	}
	virtual int use(int a, t_chr_status_info *b, POS c, POS d) ;
	virtual int GetValue() 
	{
							int value;
							value =  base_value -( m_Much * store_const / 100000);
							return value; 
	}
	virtual int GetRbutton() { return Mouse_MR; }

	virtual int GetItemKind() { return Item_kind; }
	virtual int GetLevel() { return lv; }
	virtual int GetWearAble() { return wear_able; }
	virtual int GetWeight() { return weight; }
	virtual int GetItemImage() { return Image_Number; }
	virtual char *GetHanName() { return Han_Name; }
	virtual int GetObjectNumber() { return object; }
	virtual int Getmouse_MRD(){ return Mouse_MRD;}
	virtual int Getmouse_MR_Effect(){ return Mouse_MR_Effect;}

};










class CItem_Herb : public CItem
{
//protected :
public :
	int Item_id   ;
	char Name[ITEM_NAME_MAX]  ;
	char Han_Name[ITEM_NAME_MAX]  ;
	int lv   ;
	int Image_Number   ;
	int hp   ;
	int ap   ;
	int mp   ;
	int nutrition1   ;
	int nutrition2   ;
	int nutrition3   ;
	int anti_poison   ;
	int anti_paralysis   ;
	int anti_magic   ;
	int anti_fire   ;
	int anti_ice   ;
	int anti_electric   ;
	int Time_maintain   ;
	int cure_disease1   ;
	int cure_disease2   ;
	int cure_disease3   ;
	int cure_disease4   ;
	int cure_disease5   ;
	int cure_disease6   ;
	int take_disease1   ;
	int take_disease2   ;
	int take_disease3   ;
	int take_disease4   ;
	int take_disease5   ;
	int take_disease6   ;
	int Change_str   ;
	int Change_dex   ;
	int Change_con   ;
	int Change_wis   ;
	int Change_int   ;
	int Change_cha   ;
	int Change_Movp   ;
	int Change_end   ;
	int Change_mor   ;
	int Change_luc   ;
	int Change_WS   ;
	int Change_PS   ;
	int Time_maintain2   ;
	int Cure_poison   ;
	int Cure_stone_paralysis   ;
	int Cure_Mad   ;
	int Cure_sluggish   ;
	int Cure_Active   ;
	int ChangeNatural2   ;
	int Time_maintain3   ;
	int weight   ;
	int circulation_limit   ;
	int object   ;
	int wear_able   ;
	int base_value   ;
	int base_store   ;
	int store_const   ;
	int store_plus_const   ;
	int Mouse_MR;
	int Mouse_MRD;
	int Mouse_MR_Effect;
	int Mouse_Mr_Wave;
	int Item_kind;

⌨️ 快捷键说明

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