📄 iteminfo.h
字号:
//////////////////////////////////////////////////////////////////////////////// Filename : ItemInfo.h// Written By : Elca// Description ://////////////////////////////////////////////////////////////////////////////#ifndef __ITEM_INFO_H__#define __ITEM_INFO_H__#include "Types.h"#include "Item.h"//////////////////////////////////////////////////////////////////////////////// class ItemInfo//////////////////////////////////////////////////////////////////////////////class ItemInfo {// constructor & destructorpublic: ItemInfo() throw(); virtual ~ItemInfo() throw();// 傍烹 沥焊public: virtual Item::ItemClass getItemClass() const throw() = 0; string getItemClassName() const throw() { return ItemClass2String[getItemClass()]; } ItemType_t getItemType() const throw() { return m_ItemType; } void setItemType(ItemType_t itemType) throw() { m_ItemType = itemType; } string getName() const throw() { return m_Name; } void setName(const string & name) throw() { m_Name = name; } string getEName() const throw() { return m_EName; } void setEName(const string & ename) throw() { m_EName = ename; } Price_t getPrice() const throw() { return m_Price; } void setPrice(Price_t Price) throw(){ m_Price = Price; } VolumeType_t getVolumeType() const throw() { return m_VolumeType; } void setVolumeType(VolumeType_t VolumeType) throw() { m_VolumeType = VolumeType; } VolumeWidth_t getVolumeWidth() const throw(); VolumeHeight_t getVolumeHeight() const throw(); Weight_t getWeight() const throw() { return m_Weight; } void setWeight(Weight_t weight) throw() { m_Weight = weight; } Ratio_t getRatio() const throw() { return m_Ratio; } void setRatio(Ratio_t Ratio) throw() { m_Ratio = Ratio; } string getDescription() const throw() { return m_Description; } void setDescription(const string& description) throw() { m_Description = description ; } virtual Attr_t getReqSTR(void) const throw() { return m_ReqSTR; } virtual Attr_t getReqDEX(void) const throw() { return m_ReqDEX; } virtual Attr_t getReqINT(void) const throw() { return m_ReqINT; } virtual Attr_t getReqSum(void) const throw() { return m_ReqSum; } virtual Level_t getReqLevel(void) const throw() { return m_ReqLevel; } virtual Attr_t getReqGender(void) const throw() { return m_ReqGender; } virtual void setReqSTR(Attr_t req) throw() { m_ReqSTR = req; } virtual void setReqDEX(Attr_t req) throw() { m_ReqDEX = req; } virtual void setReqINT(Attr_t req) throw() { m_ReqINT = req; } virtual void setReqSum(Attr_t req) throw() { m_ReqSum = req; } virtual void setReqLevel(Level_t req) throw() { m_ReqLevel = req; } virtual void setReqGender(Attr_t req) throw() { m_ReqGender = req; } virtual void setReqAbility(const string& req) throw(); virtual string toString() const throw() = 0;// 俺喊 沥焊. 祈狼惑 海捞胶 努贰胶俊 沥狼秦霖促.public: virtual Durability_t getDurability() const throw() { return 1; } virtual void setDurability(Durability_t durability) throw() {} virtual Damage_t getMinDamage() const throw() { return 0; } virtual void setMinDamage(Damage_t damage) throw() {} virtual Damage_t getMaxDamage() const throw() { return 0; } virtual void setMaxDamage(Damage_t damage) throw() {} virtual Range_t getRange() const throw() { return 0; } virtual void setRange(Range_t range) throw() {} virtual ToHit_t getToHitBonus() const throw() { return 0; } virtual void setToHitBonus(ToHit_t tohit) throw() {} virtual Defense_t getDefenseBonus() const throw() { return 0; } virtual void setDefenseBonus(Defense_t defense) throw() {} virtual Protection_t getProtectionBonus() const throw() { return 0; } virtual void setProtectionBonus(Protection_t defense) throw() {} virtual MP_t getMPBonus() const throw() { return 0;} virtual void setMPBonus(MP_t bonus) throw() { } virtual Silver_t getMaxSilver() const throw() { return 0; } virtual void setMaxSilver(Silver_t amount) throw() { } virtual Speed_t getSpeed(void) const throw() { return 0; } virtual void setSpeed(Speed_t speed) throw() { } virtual uint getItemLevel(void) const throw() { return 99; } virtual void setItemLevel(uint level) throw() { } virtual int getCriticalBonus(void) const throw() { return 0; } virtual void setCriticalBonus(int bonus) throw() { }; virtual ElementalType getElementalType() const { return ELEMENTAL_MAX; } virtual Elemental_t getElemental() const { return 0; } // ItemType俊 蝶弗 扁夯 可记 virtual void setDefaultOptions(const string& options) throw(Error); void addDefaultOptions(OptionType_t optionType) throw(); void clearDefaultOptions() throw(); bool hasDefaultOptions() const { return m_bDefaultOptions; } const list<OptionType_t>& getDefaultOptions() const { return m_DefaultOptions; } Ratio_t getUpgradeRatio(void) const { return m_UpgradeRatio; } void setUpgradeRatio(Ratio_t ratio) { m_UpgradeRatio = ratio; } bool isUpgradeSucceed() const; int getUpgradeCrashPercent(void) const { return m_UpgradeCrashPercent; } void setUpgradeCrashPercent(int per) { m_UpgradeCrashPercent = per; } bool isUpgradeCrash() const; int isUnique() const { return m_bUnique; } void setUnique(bool bUnique=true) { m_bUnique = bUnique; } Ratio_t getNextOptionRatio(void) const { return m_NextOptionRatio; } void setNextOptionRatio(Ratio_t ratio) { m_NextOptionRatio = ratio; } ItemType_t getNextItemType() const { return m_NextItemType; } void setNextItemType(ItemType_t nextItemType) { m_NextItemType = nextItemType; } Ratio_t getDowngradeRatio() const { return m_DowngradeRatio; } void setDowngradeRatio( Ratio_t ratio ) { m_DowngradeRatio = ratio; }// member dataprotected: ItemType_t m_ItemType; // 酒捞袍 鸥涝 string m_Name; // 捞抚 string m_EName; // 康巩 捞抚 Price_t m_Price; // 啊拜 VolumeType_t m_VolumeType; // 何乔 Weight_t m_Weight; // 公霸 Ratio_t m_Ratio; // 酒捞袍 殿厘 犬伏(胺喉 犬伏) string m_Description; // 酒捞袍 汲疙 Attr_t m_ReqSTR; // 鞘夸茄 STR Attr_t m_ReqDEX; // 鞘夸茄 DEX Attr_t m_ReqINT; // 鞘夸茄 INT Attr_t m_ReqSum; // 鞘夸茄 瓷仿摹狼 钦 Level_t m_ReqLevel; // 鞘夸茄 饭骇 Attr_t m_ReqGender; // 鞘夸茄 己 bool m_bDefaultOptions; // 扁夯 可记捞 乐唱? list<OptionType_t> m_DefaultOptions; // 扁夯 可记 Ratio_t m_UpgradeRatio; // enchant秦辑 己傍且 犬伏 int m_UpgradeCrashPercent; // upgrade啊 角菩秦辑 何辑龙 犬伏 = m_UpgradeCrashPercent% bool m_bUnique; // unique item 牢啊? Ratio_t m_NextOptionRatio; // 促弗 可记捞 嘿阑 犬伏 ItemType_t m_NextItemType; Ratio_t m_DowngradeRatio;};#endif // __ITEM_INFO_H__
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -