1
0
Fork 1
mirror of https://github.com/TES3MP/openmw-tes3mp.git synced 2025-01-15 21:49:56 +00:00
openmw-tes3mp/apps/openmw/mwmechanics/enchanting.hpp

59 lines
2.1 KiB
C++
Raw Normal View History

2013-03-28 16:41:00 +00:00
#ifndef GAME_MWMECHANICS_ENCHANTING_H
#define GAME_MWMECHANICS_ENCHANTING_H
2016-06-17 14:07:16 +00:00
2013-03-28 16:41:00 +00:00
#include <string>
2016-06-17 14:07:16 +00:00
2013-03-28 16:41:00 +00:00
#include <components/esm/effectlist.hpp>
#include <components/esm/loadench.hpp>
2016-06-17 14:07:16 +00:00
#include "../mwworld/ptr.hpp"
2013-03-28 16:41:00 +00:00
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;
int mWeaponType;
2013-03-31 21:18:23 +00:00
const ESM::Enchantment* getRecord(const ESM::Enchantment& newEnchantment) const;
2013-03-28 16:41:00 +00:00
public:
2013-03-30 18:08:42 +00:00
Enchanting();
2017-04-20 11:36:14 +00:00
void setEnchanter(const MWWorld::Ptr& enchanter);
2013-03-30 18:08:42 +00:00
void setSelfEnchanting(bool selfEnchanting);
2017-04-20 11:36:14 +00:00
void setOldItem(const MWWorld::Ptr& oldItem);
MWWorld::Ptr getOldItem() { return mOldItemPtr; }
MWWorld::Ptr getGem() { return mSoulGemPtr; }
void setNewItemName(const std::string& s);
2017-04-20 11:36:14 +00:00
void setEffect(const ESM::EffectList& effectList);
void setSoulGem(const 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;
float getEnchantPoints(bool precise = true) const;
int getBaseCastCost() const; // To be saved in the enchantment's record
int getEffectiveCastCost() const; // Effective cost taking player Enchant skill into account, used for preview purposes in the UI
2013-04-02 18:46:48 +00:00
int getEnchantPrice() const;
int getMaxEnchantValue() const;
int getGemCharge() const;
int getEnchantChance() const;
int getEnchantItemsCount() const;
float getTypeMultiplier() 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