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

📄 vampire.h

📁 天之炼狱1服务器端源文件游戏服务端不完整
💻 H
📖 第 1 页 / 共 2 页
字号:
//////////////////////////////////////////////////////////////////////////////// Filename    : Vampire.h// Written By  : Elca// Description ://////////////////////////////////////////////////////////////////////////////#ifndef __VAMPIRE_H__#define __VAMPIRE_H__#include "PlayerCreature.h"#include "Inventory.h"#include "Zone.h"#include "PCVampireInfo.h"#include "PCVampireInfo2.h"#include "PCVampireInfo3.h"#include "InventoryInfo.h"#include "GearInfo.h"#include "ExtraInfo.h"#include "OptionInfo.h"#include "VampireSkillInfo.h"#include "Mutex.h"#include "ModifyInfo.h"#include "CreatureUtil.h"//#include "RankExpTable.h"#include <hash_map>#include "skill/VampireSkillSlot.h"#include "Gpackets/GCModifyInformation.h"#define VAMPIRE_MAX_LEVEL				150		//abcd#define VAMPIRE_MAX_RANK				50		// 拌鞭 max#define BONUS_POINTS_PER_LEVEL1			3		// 饭骇诀矫 林绢瘤绰 瓷仿摹 point#define BONUS_POINTS_PER_LEVEL2			2		// 饭骇诀矫 林绢瘤绰 瓷仿摹 point#define BONUS_POINTS_PER_LEVEL3			1		// 饭骇诀矫 林绢瘤绰 瓷仿摹 point////////////////////////////////////////////////////////////////////////////////// 厘厚甫 涝绊 哈阑 锭 厘厚 涝绊 哈扁 傈狼 瓷仿摹甫 // 历厘秦 滴扁 困茄 滚欺(?) 努贰胶////////////////////////////////////////////////////////////////////////////////class VAMPIRE_RECORD{public:	Attr_t       pSTR[3];	Attr_t       pDEX[3];	Attr_t       pINT[3];	Rank_t    	 Rank;	HP_t         pHP[2];	Damage_t     pDamage[2];	Defense_t    Defense;	Protection_t Protection;	ToHit_t      ToHit;	Speed_t      AttackSpeed;};//////////////////////////////////////////////////////////////////////////////////// Class Vampire;//////////////////////////////////////////////////////////////////////////////////class Vampire : public PlayerCreature {////////////////////////////////////////////////////// 努贰胶 郴何 惑荐 急攫////////////////////////////////////////////////////public:public:	// 厘馒 何困	enum WearPart	{ 		WEAR_NECK, 		WEAR_BODY, 		WEAR_WRIST1, 		WEAR_WRIST2, 		WEAR_FINGER1,		WEAR_FINGER2, 		WEAR_FINGER3, 		WEAR_FINGER4, 		WEAR_EARRING1,		WEAR_EARRING2,		WEAR_LEFTHAND,		WEAR_RIGHTHAND,		WEAR_AMULET1,		WEAR_AMULET2,		WEAR_AMULET3,		WEAR_AMULET4,		VAMPIRE_WEAR_MAX 	};	////////////////////////////////////////////////////// 积己磊/家戈磊////////////////////////////////////////////////////public:	Vampire() throw();	virtual ~Vampire() throw (Error);////////////////////////////////////////////////////// 窍困 努贰胶(Creature) 惑加 窃荐////////////////////////////////////////////////////public:	virtual CreatureClass getCreatureClass() const throw() { return CREATURE_CLASS_VAMPIRE; }	virtual string getCreatureClassString() const throw() { return "CREATURE_CLASS_VAMPIRE"; }	virtual void registerObject() throw(Error);	virtual void registerInitObject() throw(Error);	virtual bool load() throw (InvalidProtocolException, Error);	void loadItem( bool checkTimeLimit = false ) throw (InvalidProtocolException, Error);	virtual void save() const throw (Error);	virtual void tinysave(const string & field) const throw (Error);//	virtual void tinysave(const char* field) const throw (Error);	void saveSkills(void) const throw (Error);	void saveGears(void) const throw (Error);	void saveExps(void) const throw (Error);	virtual void act(const Timeval& currentTime) throw(Error) {}	virtual string toString() const throw();	virtual Race_t getRace() const { return RACE_VAMPIRE; }	virtual GuildID_t getCommonGuildID() const { return VampireCommon; }//////////////////////////////////////////////////////////////// 矫埃力茄 酒捞袍 包访 窃荐//////////////////////////////////////////////////////////////public:	void checkItemTimeLimit() throw (Error);////////////////////////////////////////////////////// 惑怕 包访 窃荐(Dead or Alive!)////////////////////////////////////////////////////public:	bool isAlive() const throw() { return m_HP[ATTR_CURRENT] != 0; }	bool isDead() const throw() { return m_HP[ATTR_CURRENT] == 0; }////////////////////////////////////////////////////// 把葛嚼 包访 窃荐(捞抚, 鼻茄, 己喊, 赣府, 乔何)////////////////////////////////////////////////////public:	const string& getName() const throw() { return m_Name; }	void setName(const string & name) throw() { m_Name = name; m_Owner = name; }	BYTE getCompetence() const throw() { return m_Competence; }	void setCompetence(BYTE Competence) { m_Competence = Competence; }	BYTE getCompetenceShape() const throw() { return m_CompetenceShape; }	void setCompetenceShape(BYTE CompetenceShape) { m_CompetenceShape = CompetenceShape; }	Sex getSex() const throw() { return m_Sex; }	void setSex(Sex sex) throw() { m_Sex = sex; m_VampireInfo.setSex(sex); }	void setSex(const string & sex) throw(InvalidProtocolException) 	{		if(sex == Sex2String[MALE])			setSex(MALE);		else if(sex == Sex2String[FEMALE])			setSex(FEMALE);		else throw InvalidProtocolException("invalid sex");	}	Color_t getBatColor() const throw() { return m_BatColor; }	void setBatColor(Color_t batColor) throw() { m_BatColor = batColor; }	Color_t getSkinColor() const throw() { return m_SkinColor; }	void setSkinColor(Color_t skinColor) throw() { m_SkinColor = skinColor; }////////////////////////////////////////////////////// 瓷仿摹 包访 窃荐(STR, DEX, INT)////////////////////////////////////////////////////public:	Alignment_t getAlignment() const throw() { return m_Alignment; }	void setAlignment(Alignment_t Alignment) throw() { m_Alignment = Alignment; }	void saveAlignment(Alignment_t alignment) throw();	Attr_t getSTR(AttrType attrType = ATTR_CURRENT) const throw() { return m_STR[attrType]; }	void setSTR(Attr_t attr, AttrType attrType = ATTR_CURRENT) throw() { m_STR[attrType] = attr; }		Attr_t getDEX(AttrType attrType = ATTR_CURRENT) const throw() { return m_DEX[attrType]; }	void setDEX(Attr_t attr, AttrType attrType = ATTR_CURRENT) throw() { m_DEX[attrType] = attr; }	Attr_t getINT(AttrType attrType = ATTR_CURRENT) const throw() { return m_INT[attrType]; }	void setINT(Attr_t attr, AttrType attrType = ATTR_CURRENT) throw() { m_INT[attrType] = attr; }////////////////////////////////////////////////////// 瓷仿摹 包访 窃荐(HP)////////////////////////////////////////////////////public:	HP_t getHP(AttrType attrType = ATTR_CURRENT) const throw() { return m_HP[attrType]; }	void setHP(HP_t hp, AttrType attrType = ATTR_CURRENT) throw() { m_HP[attrType] = hp; }	void setHP(HP_t current, HP_t max) throw() { m_HP[ATTR_CURRENT] = current; m_HP[ATTR_MAX] = max; }////////////////////////////////////////////////////// 瓷仿摹 包访 窃荐(Damage, Protect, Defense, ToHit)////////////////////////////////////////////////////public:	Damage_t     getDamage(AttrType attrType = ATTR_CURRENT) const throw() { return m_Damage[attrType]; }	Protection_t getProtection(void) const throw() { return m_Protection[ATTR_CURRENT]; }	Defense_t    getDefense(void) const throw() { return m_Defense[ATTR_CURRENT]; }	ToHit_t      getToHit(void) const throw() { return m_ToHit[ATTR_CURRENT]; }	Speed_t      getAttackSpeed(void) const throw() { return m_AttackSpeed[ATTR_CURRENT]; }	////////////////////////////////////////////////////// 版氰摹 包访 窃荐////////////////////////////////////////////////////public://	Exp_t getExp() const throw() { return m_Exp; }//	void  setExp(Exp_t exp) throw() { m_Exp = exp; }	Exp_t getGoalExp() const throw() { return m_GoalExp; }	void  setGoalExp(Exp_t GoalExp) throw() { m_GoalExp = GoalExp; }//	Exp_t getExpOffset() const throw() { return m_ExpOffset; }//	void  setExpOffset(Exp_t expOffset) throw() { m_ExpOffset = expOffset; }//	void setExp(Exp_t exp, Exp_t expOffset) throw() { m_Exp = exp; m_ExpOffset = expOffset; }	Level_t getLevel() const throw() { return m_Level; }	void    setLevel(Level_t level) throw() { m_Level = level; }	int		getQuestLevel() const { return getLevel(); }	// 拌鞭. by sigi. 2002.8.30/*	Rank_t  getRank() const throw() { return m_Rank; }//	void    setRank(Rank_t rank) throw() { m_Rank = rank; }	RankExp_t   getRankExp() const throw() { return m_RankExp; }//	void    setRankExp(RankExp_t exp) throw() { m_RankExp = exp; }	RankExp_t   getRankGoalExp() const throw() { return m_RankGoalExp; }//	void    setRankGoalExp(RankExp_t RankGoalExp) throw() { m_RankGoalExp = RankGoalExp; }*/	Bonus_t getBonus() const throw() { return m_Bonus; }	void    setBonus(Bonus_t bonus) throw() { m_Bonus = bonus; }////////////////////////////////////////////////////// 胶懦 包访 窃荐////////////////////////////////////////////////////public:	void addSkill(SkillType_t SkillType) throw();    void addSkill(VampireSkillSlot* pSkillSlot) throw();	void removeCastleSkill(SkillType_t SkillType) throw();	void removeAllCastleSkill() throw();	VampireSkillSlot* hasSkill(SkillType_t SkillType) const throw() { return getSkill(SkillType); }	VampireSkillSlot* getSkill(SkillType_t SkillType) const throw();//	void setHotKey(BYTE pos, SkillType_t SkillType) throw() { m_HotKey[pos] = SkillType; }//	SkillType_t getHotKey(BYTE pos) const throw() { return m_HotKey[pos]; }////////////////////////////////////////////////////// 酒捞袍 馒/呕 包访 窃荐////////////////////////////////////////////////////public:

⌨️ 快捷键说明

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