OpenMW
|
00001 #ifndef GAME_MWMECHANICS_ENCHANTING_H 00002 #define GAME_MWMECHANICS_ENCHANTING_H 00003 #include <string> 00004 #include "../mwworld/ptr.hpp" 00005 #include <components/esm/effectlist.hpp> 00006 #include "../mwbase/world.hpp" 00007 #include "../mwbase/environment.hpp" 00008 namespace MWMechanics 00009 { 00010 class Enchanting 00011 { 00012 MWWorld::Ptr mOldItemPtr; 00013 MWWorld::Ptr mSoulGemPtr; 00014 MWWorld::Ptr mEnchanter; 00015 00016 int mCastStyle; 00017 00018 bool mSelfEnchanting; 00019 00020 ESM::EffectList mEffectList; 00021 00022 std::string mNewItemName; 00023 std::string mObjectType; 00024 std::string mOldItemId; 00025 00026 public: 00027 Enchanting(); 00028 void setEnchanter(MWWorld::Ptr enchanter); 00029 void setSelfEnchanting(bool selfEnchanting); 00030 void setOldItem(MWWorld::Ptr oldItem); 00031 void setNewItemName(const std::string& s); 00032 void setEffect(ESM::EffectList effectList); 00033 void setSoulGem(MWWorld::Ptr soulGem); 00034 bool create(); //Return true if created, false if failed. 00035 void nextCastStyle(); //Set enchant type to next possible type (for mOldItemPtr object) 00036 int getCastStyle() const; 00037 float getEnchantPoints() const; 00038 float getCastCost() const; 00039 int getEnchantPrice() const; 00040 float getMaxEnchantValue() const; 00041 int getGemCharge() const; 00042 float getEnchantChance() const; 00043 bool soulEmpty() const; //Return true if empty 00044 bool itemEmpty() const; //Return true if empty 00045 void payForEnchantment() const; 00046 }; 00047 } 00048 #endif