OpenMW
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
armor.hpp
Go to the documentation of this file.
1 #ifndef GAME_MWCLASS_ARMOR_H
2 #define GAME_MWCLASS_ARMOR_H
3 
4 #include "../mwworld/class.hpp"
5 
6 namespace MWClass
7 {
8  class Armor : public MWWorld::Class
9  {
10  virtual MWWorld::Ptr copyToCellImpl(const MWWorld::ConstPtr &ptr, MWWorld::CellStore &cell) const;
11 
12  public:
13 
14  virtual float getWeight (const MWWorld::ConstPtr& ptr) const;
15 
16  virtual void insertObjectRendering (const MWWorld::Ptr& ptr, const std::string& model, MWRender::RenderingInterface& renderingInterface) const;
18 
19  virtual void insertObject(const MWWorld::Ptr& ptr, const std::string& model, MWPhysics::PhysicsSystem& physics) const;
20 
21  virtual std::string getName (const MWWorld::ConstPtr& ptr) const;
24 
25  virtual boost::shared_ptr<MWWorld::Action> activate (const MWWorld::Ptr& ptr,
26  const MWWorld::Ptr& actor) const;
28 
29  virtual bool hasItemHealth (const MWWorld::ConstPtr& ptr) const;
31 
32  virtual int getItemMaxHealth (const MWWorld::ConstPtr& ptr) const;
34 
35  virtual std::string getScript (const MWWorld::ConstPtr& ptr) const;
37 
38  virtual std::pair<std::vector<int>, bool> getEquipmentSlots (const MWWorld::ConstPtr& ptr) const;
41 
42  virtual int getEquipmentSkill (const MWWorld::ConstPtr& ptr) const;
45 
46  virtual bool hasToolTip (const MWWorld::ConstPtr& ptr) const;
48 
49  virtual MWGui::ToolTipInfo getToolTipInfo (const MWWorld::ConstPtr& ptr, int count) const;
51 
52  virtual int getValue (const MWWorld::ConstPtr& ptr) const;
54 
55  static void registerSelf();
56 
57  virtual std::string getUpSoundId (const MWWorld::ConstPtr& ptr) const;
59 
60  virtual std::string getDownSoundId (const MWWorld::ConstPtr& ptr) const;
62 
63  virtual std::string getInventoryIcon (const MWWorld::ConstPtr& ptr) const;
65 
66  virtual std::string getEnchantment (const MWWorld::ConstPtr& ptr) const;
68 
69  virtual std::string applyEnchantment(const MWWorld::ConstPtr &ptr, const std::string& enchId, int enchCharge, const std::string& newName) const;
71 
72  virtual std::pair<int, std::string> canBeEquipped(const MWWorld::ConstPtr &ptr, const MWWorld::Ptr &npc) const;
75 
76  virtual boost::shared_ptr<MWWorld::Action> use (const MWWorld::Ptr& ptr)
77  const;
79 
80  virtual std::string getModel(const MWWorld::ConstPtr &ptr) const;
81 
82  virtual int getEnchantmentPoints (const MWWorld::ConstPtr& ptr) const;
83 
84  virtual bool canSell (const MWWorld::ConstPtr& item, int npcServices) const;
85 
87  virtual int getEffectiveArmorRating(const MWWorld::ConstPtr& armor, const MWWorld::Ptr& actor) const;
88  };
89 }
90 
91 #endif
virtual std::string getUpSoundId(const MWWorld::ConstPtr &ptr) const
Return the pick up sound Id.
Definition: armor.cpp:173
Definition: tooltips.hpp:18
virtual float getWeight(const MWWorld::ConstPtr &ptr) const
Definition: armor.cpp:386
virtual MWGui::ToolTipInfo getToolTipInfo(const MWWorld::ConstPtr &ptr, int count) const
Definition: armor.cpp:209
virtual MWWorld::Ptr copyToCellImpl(const MWWorld::ConstPtr &ptr, MWWorld::CellStore &cell) const
Definition: armor.cpp:366
virtual std::string getEnchantment(const MWWorld::ConstPtr &ptr) const
Definition: armor.cpp:260
Definition: armor.hpp:8
virtual bool hasToolTip(const MWWorld::ConstPtr &ptr) const
Definition: armor.cpp:202
virtual int getEnchantmentPoints(const MWWorld::ConstPtr &ptr) const
Definition: armor.cpp:373
Definition: renderinginterface.hpp:9
virtual std::string applyEnchantment(const MWWorld::ConstPtr &ptr, const std::string &enchId, int enchCharge, const std::string &newName) const
Creates a new record using ptr as template, with the given name and the given enchantment applied to ...
Definition: armor.cpp:267
Definition: physicssystem.hpp:51
virtual std::string getName(const MWWorld::ConstPtr &ptr) const
Definition: armor.cpp:53
virtual std::string getScript(const MWWorld::ConstPtr &ptr) const
Return name of the script attached to ptr.
Definition: armor.cpp:78
Base class for referenceable esm records.
Definition: class.hpp:52
virtual std::string getDownSoundId(const MWWorld::ConstPtr &ptr) const
Return the put down sound Id.
Definition: armor.cpp:184
virtual std::pair< int, std::string > canBeEquipped(const MWWorld::ConstPtr &ptr, const MWWorld::Ptr &npc) const
Definition: armor.cpp:296
virtual bool canSell(const MWWorld::ConstPtr &item, int npcServices) const
Determine whether or not item can be sold to an npc with the given npcServices.
Definition: armor.cpp:380
Mutable state of a cell.
Definition: cellstore.hpp:53
virtual int getItemMaxHealth(const MWWorld::ConstPtr &ptr) const
Return item max health or throw an exception, if class does not have item health. ...
Definition: armor.cpp:71
Pointer to a const LiveCellRef.
Definition: ptr.hpp:90
virtual int getEffectiveArmorRating(const MWWorld::ConstPtr &armor, const MWWorld::Ptr &actor) const
Get the effective armor rating, factoring in the actor's skills, for the given armor.
Definition: armor.cpp:280
virtual boost::shared_ptr< MWWorld::Action > activate(const MWWorld::Ptr &ptr, const MWWorld::Ptr &actor) const
Generate action for activation.
Definition: armor.cpp:60
virtual boost::shared_ptr< MWWorld::Action > use(const MWWorld::Ptr &ptr) const
Generate action for using via inventory menu.
Definition: armor.cpp:357
virtual std::pair< std::vector< int >, bool > getEquipmentSlots(const MWWorld::ConstPtr &ptr) const
Definition: armor.cpp:85
virtual void insertObject(const MWWorld::Ptr &ptr, const std::string &model, MWPhysics::PhysicsSystem &physics) const
Add reference into a cell for rendering (default implementation: don't render anything).
Definition: armor.cpp:37
virtual std::string getModel(const MWWorld::ConstPtr &ptr) const
Definition: armor.cpp:42
static void registerSelf()
Definition: armor.cpp:166
virtual bool hasItemHealth(const MWWorld::ConstPtr &ptr) const
Definition: armor.cpp:66
virtual int getEquipmentSkill(const MWWorld::ConstPtr &ptr) const
Definition: armor.cpp:118
Pointer to a LiveCellRef.
Definition: ptr.hpp:19
virtual void insertObjectRendering(const MWWorld::Ptr &ptr, const std::string &model, MWRender::RenderingInterface &renderingInterface) const
Add reference into a cell for rendering.
Definition: armor.cpp:30
virtual std::string getInventoryIcon(const MWWorld::ConstPtr &ptr) const
Return name of inventory icon.
Definition: armor.cpp:195
virtual int getValue(const MWWorld::ConstPtr &ptr) const
Return trade value of the object. Throws an exception, if the object can't be traded.
Definition: armor.cpp:159