📄 ousters.h
字号:
//////////////////////////////////////////////////////////////////////////////// Filename : Ousters.h// Written By : Elca// Description ://////////////////////////////////////////////////////////////////////////////#ifndef __OUSTERS_H__#define __OUSTERS_H__#include "PlayerCreature.h"#include "Inventory.h"#include "Zone.h"#include "PCOustersInfo.h"#include "PCOustersInfo2.h"#include "PCOustersInfo3.h"#include "InventoryInfo.h"#include "GearInfo.h"#include "ExtraInfo.h"#include "OptionInfo.h"#include "OustersSkillInfo.h"#include "Mutex.h"#include "ModifyInfo.h"#include "CreatureUtil.h"#include <hash_map>#include "skill/OustersSkillSlot.h"#include "Gpackets/GCModifyInformation.h"class SkillInfo;#define OUSTERS_MAX_LEVEL 150 //abcd#define OUSTERS_MAX_RANK 50 // 拌鞭 max#define OUSTERS_MAX_SUM 492#define OUSTERS_MAX_ATTR 472#define BONUS_POINTS_PER_LEVEL1 3 // 饭骇诀矫 林绢瘤绰 瓷仿摹 point#define BONUS_POINTS_PER_LEVEL2 2 // 饭骇诀矫 林绢瘤绰 瓷仿摹 point#define BONUS_POINTS_PER_LEVEL3 1 // 饭骇诀矫 林绢瘤绰 瓷仿摹 point////////////////////////////////////////////////////////////////////////////////// 厘厚甫 涝绊 哈阑 锭 厘厚 涝绊 哈扁 傈狼 瓷仿摹甫 // 历厘秦 滴扁 困茄 滚欺(?) 努贰胶////////////////////////////////////////////////////////////////////////////////class OUSTERS_RECORD{public: Attr_t pSTR[3]; Attr_t pDEX[3]; Attr_t pINT[3]; Rank_t Rank; HP_t pHP[2]; MP_t pMP[2]; Damage_t pDamage[2]; Defense_t Defense; Protection_t Protection; ToHit_t ToHit; Speed_t AttackSpeed;};//////////////////////////////////////////////////////////////////////////////////// Class Ousters;//////////////////////////////////////////////////////////////////////////////////class Ousters : public PlayerCreature {////////////////////////////////////////////////////// 努贰胶 郴何 惑荐 急攫////////////////////////////////////////////////////public: // 厘馒 何困 enum WearPart { WEAR_CIRCLET, WEAR_COAT, WEAR_LEFTHAND, WEAR_RIGHTHAND, WEAR_BOOTS, WEAR_ARMSBAND1, WEAR_ARMSBAND2, WEAR_RING1, WEAR_RING2, WEAR_NECKLACE1, WEAR_NECKLACE2, WEAR_NECKLACE3, WEAR_STONE1, WEAR_STONE2, WEAR_STONE3, WEAR_STONE4, OUSTERS_WEAR_MAX }; ////////////////////////////////////////////////////// 积己磊/家戈磊////////////////////////////////////////////////////public: Ousters() throw(); virtual ~Ousters() throw (Error);////////////////////////////////////////////////////// 窍困 努贰胶(Creature) 惑加 窃荐////////////////////////////////////////////////////public: virtual CreatureClass getCreatureClass() const throw() { return CREATURE_CLASS_OUSTERS; } virtual string getCreatureClassString() const throw() { return "CREATURE_CLASS_OUSTERS"; } 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_OUSTERS; } virtual GuildID_t getCommonGuildID() const { return OustersCommon; }//////////////////////////////////////////////////////////////// 矫埃力茄 酒捞袍 包访 窃荐//////////////////////////////////////////////////////////////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; } 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_OustersInfo.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 getHairColor() const throw() { return m_HairColor; } void setHairColor(Color_t hairColor) throw() { m_HairColor = hairColor; }////////////////////////////////////////////////////// 瓷仿摹 包访 窃荐(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; } MP_t getMP(AttrType attrType = ATTR_CURRENT) const throw() { return m_MP[attrType]; } void setMP(MP_t hp, AttrType attrType = ATTR_CURRENT) throw() { m_MP[attrType] = hp; } void setMP(MP_t current, MP_t max) throw() { m_MP[ATTR_CURRENT] = current; m_MP[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; } SkillBonus_t getSkillBonus() const throw() { return m_SkillBonus; } void setSkillBonus( SkillBonus_t skillBonus ) throw() { m_SkillBonus = skillBonus; } SkillBonus_t getSumOfUsedSkillBonus() const throw();////////////////////////////////////////////////////// 胶懦 包访 窃荐////////////////////////////////////////////////////public: void addSkill(SkillType_t SkillType) throw(); void addSkill(OustersSkillSlot* pSkillSlot) throw(); OustersSkillSlot* hasSkill(SkillType_t SkillType) const throw() { return getSkill(SkillType); } OustersSkillSlot* getSkill(SkillType_t SkillType) const throw();////////////////////////////////////////////////////// 酒捞袍 馒/呕 包访 窃荐////////////////////////////////////////////////////public: bool isWear(WearPart Part) throw() { return m_pWearItem[Part] != NULL ? true : false; } void addWearItem(WearPart Part, Item* pItem) throw() { Assert(m_pWearItem[Part] != NULL); m_pWearItem[Part] = pItem; } void deleteWearItem(WearPart Part) throw() { m_pWearItem[Part] = NULL; } Item* getWearItem(WearPart Part) throw() { return m_pWearItem[Part]; } void wearItem(WearPart Part) throw(); void wearItem(WearPart Part, Item* pItem) throw(); void takeOffItem(WearPart Part, bool bAddOnMouse, bool bSendModifyInfo) throw(); bool addShape(Item::ItemClass IClass, ItemType_t IType, Color_t color); bool removeShape(Item::ItemClass IClass, bool bSendPacket=true); Color_t getItemShapeColor(Item* pItem, OptionInfo* pOptionInfo=NULL) const; void destroyGears() throw(); bool isRealWearing(WearPart Part) const throw(); bool isRealWearing(Item* pItem) const throw(); bool isRealWearingEx(WearPart Part) const; DWORD sendRealWearingInfo(void) const throw();
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -