2013-03-28 16:41:00 +00:00
|
|
|
#ifndef GAME_MWMECHANICS_ENCHANTING_H
|
|
|
|
#define GAME_MWMECHANICS_ENCHANTING_H
|
|
|
|
#include <string>
|
|
|
|
#include "../mwworld/ptr.hpp"
|
|
|
|
#include <components/esm/effectlist.hpp>
|
|
|
|
#include "../mwbase/world.hpp"
|
|
|
|
#include "../mwbase/environment.hpp"
|
|
|
|
namespace MWMechanics
|
|
|
|
{
|
|
|
|
class Enchanting
|
|
|
|
{
|
|
|
|
|
|
|
|
MWWorld::Ptr mOldItemPtr;
|
|
|
|
MWWorld::Ptr mSoulGemPtr;
|
|
|
|
MWWorld::Ptr mEnchanter;
|
2013-03-31 21:18:23 +00:00
|
|
|
|
2013-03-28 16:41:00 +00:00
|
|
|
int mEnchantType;
|
|
|
|
|
2013-03-30 18:08:42 +00:00
|
|
|
bool mSelfEnchanting;
|
|
|
|
|
2013-03-28 16:41:00 +00:00
|
|
|
ESM::EffectList mEffectList;
|
|
|
|
ESM::Enchantment mEnchantment;
|
|
|
|
|
|
|
|
std::string mNewItemName;
|
|
|
|
std::string mObjectType;
|
|
|
|
std::string mOldItemId;
|
2013-03-31 21:18:23 +00:00
|
|
|
int mOldItemCount;
|
|
|
|
|
2013-03-28 16:41:00 +00:00
|
|
|
public:
|
2013-03-30 18:08:42 +00:00
|
|
|
Enchanting();
|
|
|
|
void setEnchanter(MWWorld::Ptr enchanter);
|
|
|
|
void setSelfEnchanting(bool selfEnchanting);
|
2013-03-28 16:41:00 +00:00
|
|
|
void setOldItem(MWWorld::Ptr oldItem);
|
|
|
|
void setNewItemName(std::string s);
|
|
|
|
void setEffect(ESM::EffectList effectList);
|
|
|
|
void setSoulGem(MWWorld::Ptr soulGem);
|
2013-03-30 18:08:42 +00:00
|
|
|
int create();
|
2013-03-28 16:41:00 +00:00
|
|
|
void nextEnchantType();
|
|
|
|
int getEnchantType();
|
|
|
|
int getEnchantCost();
|
|
|
|
int getMaxEnchantValue();
|
|
|
|
int getGemCharge();
|
2013-03-30 18:08:42 +00:00
|
|
|
float getEnchantChance();
|
2013-03-28 16:41:00 +00:00
|
|
|
bool soulEmpty();
|
|
|
|
bool itemEmpty();
|
|
|
|
};
|
|
|
|
}
|
|
|
|
#endif
|