OpenMW
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
enchanting.hpp
Go to the documentation of this file.
1 #ifndef GAME_MWMECHANICS_ENCHANTING_H
2 #define GAME_MWMECHANICS_ENCHANTING_H
3 
4 #include <string>
5 
7 
8 #include "../mwworld/ptr.hpp"
9 
10 #include "../mwbase/world.hpp"
11 #include "../mwbase/environment.hpp"
12 
13 namespace MWMechanics
14 {
15  class Enchanting
16  {
20 
22 
24 
26 
27  std::string mNewItemName;
28  std::string mObjectType;
29 
30  public:
31  Enchanting();
32  void setEnchanter(MWWorld::Ptr enchanter);
33  void setSelfEnchanting(bool selfEnchanting);
34  void setOldItem(MWWorld::Ptr oldItem);
37  void setNewItemName(const std::string& s);
38  void setEffect(ESM::EffectList effectList);
39  void setSoulGem(MWWorld::Ptr soulGem);
40  bool create(); //Return true if created, false if failed.
41  void nextCastStyle(); //Set enchant type to next possible type (for mOldItemPtr object)
42  int getCastStyle() const;
43  int getEnchantPoints() const;
44  int getBaseCastCost() const; // To be saved in the enchantment's record
45  int getEffectiveCastCost() const; // Effective cost taking player Enchant skill into account, used for preview purposes in the UI
46  int getEnchantPrice() const;
47  int getMaxEnchantValue() const;
48  int getGemCharge() const;
49  float getEnchantChance() const;
50  bool soulEmpty() const; //Return true if empty
51  bool itemEmpty() const; //Return true if empty
52  void payForEnchantment() const;
53  };
54 }
55 #endif
void setEnchanter(MWWorld::Ptr enchanter)
Definition: enchanting.cpp:272
int getBaseCastCost() const
Definition: enchanting.cpp:211
MWWorld::Ptr mOldItemPtr
Definition: enchanting.hpp:17
int getMaxEnchantValue() const
Definition: enchanting.cpp:248
MWWorld::Ptr mSoulGemPtr
Definition: enchanting.hpp:18
float getEnchantChance() const
Definition: enchanting.cpp:277
int getEffectiveCastCost() const
Definition: enchanting.cpp:219
ESM::EffectList mEffectList
Definition: enchanting.hpp:25
void payForEnchantment() const
Definition: enchanting.cpp:294
int mCastStyle
Definition: enchanting.hpp:21
MWWorld::Ptr getOldItem()
Definition: enchanting.hpp:35
Enchanting()
Definition: enchanting.cpp:19
bool mSelfEnchanting
Definition: enchanting.hpp:23
int getCastStyle() const
Definition: enchanting.cpp:47
std::string mObjectType
Definition: enchanting.hpp:28
void setEffect(ESM::EffectList effectList)
Definition: enchanting.cpp:42
void setNewItemName(const std::string &s)
Definition: enchanting.cpp:37
bool itemEmpty() const
Definition: enchanting.cpp:262
MWWorld::Ptr getGem()
Definition: enchanting.hpp:36
Definition: enchanting.hpp:15
bool soulEmpty() const
Definition: enchanting.cpp:257
bool create()
Definition: enchanting.cpp:57
std::string mNewItemName
Definition: enchanting.hpp:27
int getEnchantPoints() const
Definition: enchanting.cpp:166
void setSoulGem(MWWorld::Ptr soulGem)
Definition: enchanting.cpp:52
int getEnchantPrice() const
Definition: enchanting.cpp:227
void setOldItem(MWWorld::Ptr oldItem)
Definition: enchanting.cpp:24
void setSelfEnchanting(bool selfEnchanting)
Definition: enchanting.cpp:267
void nextCastStyle()
Definition: enchanting.cpp:101
Pointer to a LiveCellRef.
Definition: ptr.hpp:19
int getGemCharge() const
Definition: enchanting.cpp:237
MWWorld::Ptr mEnchanter
Definition: enchanting.hpp:19
EffectList, ENAM subrecord.
Definition: effectlist.hpp:33