?? vampire.h
字號:
//////////////////////////////////////////////////////////////////////////////// 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 + -