1
0
mirror of https://gitlab.com/OpenMW/openmw.git synced 2025-01-10 06:39:49 +00:00
OpenMW/apps/openmw/mwmechanics/enchanting.hpp

49 lines
1.6 KiB
C++
Raw Normal View History

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
int mCastStyle;
2013-03-28 16:41:00 +00:00
2013-03-30 18:08:42 +00:00
bool mSelfEnchanting;
2013-03-28 16:41:00 +00:00
ESM::EffectList mEffectList;
std::string mNewItemName;
std::string mObjectType;
std::string mOldItemId;
2013-03-31 21:18:23 +00:00
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(const std::string& s);
2013-03-28 16:41:00 +00:00
void setEffect(ESM::EffectList effectList);
void setSoulGem(MWWorld::Ptr soulGem);
bool create(); //Return true if created, false if failed.
void nextCastStyle(); //Set enchant type to next possible type (for mOldItemPtr object)
int getCastStyle() const;
2013-05-27 18:23:04 +00:00
float getEnchantPoints() const;
2013-05-27 16:08:12 +00:00
float getCastCost() const;
2013-04-02 18:46:48 +00:00
int getEnchantPrice() const;
2013-04-29 08:19:09 +00:00
float getMaxEnchantValue() const;
int getGemCharge() const;
float getEnchantChance() const;
bool soulEmpty() const; //Return true if empty
bool itemEmpty() const; //Return true if empty
2013-04-02 18:46:48 +00:00
void payForEnchantment() const;
2013-03-28 16:41:00 +00:00
};
}
#endif