OpenMW
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
Public Member Functions | Static Public Member Functions | Protected Member Functions | Private Member Functions | Private Attributes | Static Private Attributes | List of all members
MWWorld::Class Class Referenceabstract

Base class for referenceable esm records. More...

#include <class.hpp>

Inheritance diagram for MWWorld::Class:
Collaboration diagram for MWWorld::Class:

Public Member Functions

virtual ~Class ()
 
const std::string & getTypeName () const
 
virtual void insertObjectRendering (const Ptr &ptr, const std::string &mesh, MWRender::RenderingInterface &renderingInterface) const
 
virtual void insertObject (const Ptr &ptr, const std::string &mesh, MWPhysics::PhysicsSystem &physics) const
 Add reference into a cell for rendering (default implementation: don't render anything). More...
 
virtual std::string getName (const ConstPtr &ptr) const =0
 
virtual void adjustPosition (const MWWorld::Ptr &ptr, bool force) const
 
virtual
MWMechanics::CreatureStats
getCreatureStats (const Ptr &ptr) const
 
virtual bool hasToolTip (const ConstPtr &ptr) const
 
virtual MWGui::ToolTipInfo getToolTipInfo (const ConstPtr &ptr, int count) const
 
virtual bool showsInInventory (const ConstPtr &ptr) const
 
virtual MWMechanics::NpcStatsgetNpcStats (const Ptr &ptr) const
 
virtual bool hasItemHealth (const ConstPtr &ptr) const
 
virtual int getItemHealth (const ConstPtr &ptr) const
 Return current item health or throw an exception if class does not have item health. More...
 
virtual int getItemMaxHealth (const ConstPtr &ptr) const
 
virtual void hit (const Ptr &ptr, float attackStrength, int type=-1) const
 
virtual void onHit (const MWWorld::Ptr &ptr, float damage, bool ishealth, const MWWorld::Ptr &object, const MWWorld::Ptr &attacker, const osg::Vec3f &hitPosition, bool successful) const
 
virtual void block (const Ptr &ptr) const
 
virtual bool canBeActivated (const Ptr &ptr) const
 
virtual boost::shared_ptr< Actionactivate (const Ptr &ptr, const Ptr &actor) const
 Generate action for activation (default implementation: return a null action). More...
 
virtual boost::shared_ptr< Actionuse (const Ptr &ptr) const
 
virtual ContainerStoregetContainerStore (const Ptr &ptr) const
 
virtual InventoryStoregetInventoryStore (const Ptr &ptr) const
 
virtual bool hasInventoryStore (const Ptr &ptr) const
 Does this object have an inventory store, i.e. equipment slots? (default implementation: false) More...
 
virtual void lock (const Ptr &ptr, int lockLevel) const
 Lock object (default implementation: throw an exception) More...
 
virtual void unlock (const Ptr &ptr) const
 Unlock object (default implementation: throw an exception) More...
 
virtual bool canLock (const ConstPtr &ptr) const
 
virtual void setRemainingUsageTime (const Ptr &ptr, float duration) const
 
virtual float getRemainingUsageTime (const ConstPtr &ptr) const
 
virtual std::string getScript (const ConstPtr &ptr) const
 
virtual float getSpeed (const Ptr &ptr) const
 Return movement speed. More...
 
virtual float getJump (const MWWorld::Ptr &ptr) const
 Return jump velocity (not accounting for movement) More...
 
virtual MWMechanics::MovementgetMovementSettings (const Ptr &ptr) const
 Return desired movement. More...
 
virtual osg::Vec3f getRotationVector (const Ptr &ptr) const
 Return desired rotations, as euler angles. More...
 
virtual std::pair< std::vector
< int >, bool
getEquipmentSlots (const ConstPtr &ptr) const
 
virtual int getEquipmentSkill (const ConstPtr &ptr) const
 
virtual int getValue (const ConstPtr &ptr) const
 
virtual float getCapacity (const MWWorld::Ptr &ptr) const
 
virtual float getEncumbrance (const MWWorld::Ptr &ptr) const
 
virtual float getNormalizedEncumbrance (const MWWorld::Ptr &ptr) const
 Returns encumbrance re-scaled to capacity. More...
 
virtual bool apply (const MWWorld::Ptr &ptr, const std::string &id, const MWWorld::Ptr &actor) const
 
virtual void skillUsageSucceeded (const MWWorld::Ptr &ptr, int skill, int usageType, float extraFactor=1.f) const
 
virtual bool isEssential (const MWWorld::ConstPtr &ptr) const
 
virtual std::string getUpSoundId (const ConstPtr &ptr) const
 
virtual std::string getDownSoundId (const ConstPtr &ptr) const
 
virtual std::string getSoundIdFromSndGen (const Ptr &ptr, const std::string &type) const
 Returns the sound ID for ptr of the given soundgen type. More...
 
virtual float getArmorRating (const MWWorld::Ptr &ptr) const
 
virtual std::string getInventoryIcon (const MWWorld::ConstPtr &ptr) const
 Return name of inventory icon. More...
 
virtual std::string getEnchantment (const MWWorld::ConstPtr &ptr) const
 
virtual int getEnchantmentPoints (const MWWorld::ConstPtr &ptr) const
 
virtual void adjustScale (const MWWorld::ConstPtr &ptr, osg::Vec3f &scale, bool rendering) const
 
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. More...
 
virtual int getServices (const MWWorld::ConstPtr &actor) const
 
virtual std::string getModel (const MWWorld::ConstPtr &ptr) const
 
virtual void getModelsToPreload (const MWWorld::Ptr &ptr, std::vector< std::string > &models) const
 Get a list of models to preload that this object may use (directly or indirectly). default implementation: list getModel(). More...
 
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 it. More...
 
virtual std::pair< int,
std::string > 
canBeEquipped (const MWWorld::ConstPtr &ptr, const MWWorld::Ptr &npc) const
 
virtual float getWeight (const MWWorld::ConstPtr &ptr) const
 
virtual bool isPersistent (const MWWorld::ConstPtr &ptr) const
 
virtual bool isKey (const MWWorld::ConstPtr &ptr) const
 
virtual bool isGold (const MWWorld::ConstPtr &ptr) const
 
virtual bool allowTelekinesis (const MWWorld::ConstPtr &ptr) const
 Return whether this class of object can be activated with telekinesis. More...
 
virtual int getBloodTexture (const MWWorld::ConstPtr &ptr) const
 Get a blood texture suitable for ptr (see Blood Texture 0-2 in Morrowind.ini) More...
 
virtual Ptr copyToCell (const ConstPtr &ptr, CellStore &cell, int count) const
 
virtual Ptr copyToCell (const ConstPtr &ptr, CellStore &cell, const ESM::Position &pos, int count) const
 
virtual bool isActor () const
 
virtual bool isNpc () const
 
virtual bool isBipedal (const MWWorld::ConstPtr &ptr) const
 
virtual bool canFly (const MWWorld::ConstPtr &ptr) const
 
virtual bool canSwim (const MWWorld::ConstPtr &ptr) const
 
virtual bool canWalk (const MWWorld::ConstPtr &ptr) const
 
bool isPureWaterCreature (const MWWorld::Ptr &ptr) const
 
bool isPureFlyingCreature (const MWWorld::Ptr &ptr) const
 
bool isPureLandCreature (const MWWorld::Ptr &ptr) const
 
bool isMobile (const MWWorld::Ptr &ptr) const
 
virtual int getSkill (const MWWorld::Ptr &ptr, int skill) const
 
virtual void readAdditionalState (const MWWorld::Ptr &ptr, const ESM::ObjectState &state) const
 Read additional state from state into ptr. More...
 
virtual void writeAdditionalState (const MWWorld::ConstPtr &ptr, ESM::ObjectState &state) const
 Write additional state from ptr into state. More...
 
virtual int getBaseGold (const MWWorld::ConstPtr &ptr) const
 
virtual bool isClass (const MWWorld::ConstPtr &ptr, const std::string &className) const
 
virtual int getDoorState (const MWWorld::ConstPtr &ptr) const
 0 = nothing, 1 = opening, 2 = closing More...
 
virtual void setDoorState (const MWWorld::Ptr &ptr, int state) const
 This does not actually cause the door to move. Use World::activateDoor instead. More...
 
virtual void respawn (const MWWorld::Ptr &ptr) const
 
virtual void restock (const MWWorld::Ptr &ptr) const
 
virtual std::string getSound (const MWWorld::ConstPtr &ptr) const
 Returns sound id. More...
 
virtual int getBaseFightRating (const MWWorld::ConstPtr &ptr) const
 
virtual std::string getPrimaryFaction (const MWWorld::ConstPtr &ptr) const
 
virtual int getPrimaryFactionRank (const MWWorld::ConstPtr &ptr) const
 
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. More...
 

Static Public Member Functions

static const Classget (const std::string &key)
 If there is no class for this key, an exception is thrown. More...
 
static void registerClass (const std::string &key, boost::shared_ptr< Class > instance)
 

Protected Member Functions

 Class ()
 
boost::shared_ptr< ActiondefaultItemActivate (const Ptr &ptr, const Ptr &actor) const
 Generate default action for activating inventory items. More...
 
virtual Ptr copyToCellImpl (const ConstPtr &ptr, CellStore &cell) const
 

Private Member Functions

 Class (const Class &)
 
Classoperator= (const Class &)
 

Private Attributes

std::string mTypeName
 

Static Private Attributes

static std::map< std::string,
boost::shared_ptr< Class > > 
sClasses
 

Detailed Description

Base class for referenceable esm records.

Constructor & Destructor Documentation

MWWorld::Class::Class ( const Class )
private
MWWorld::Class::Class ( )
protected
MWWorld::Class::~Class ( )
virtual

Member Function Documentation

boost::shared_ptr< Action > MWWorld::Class::activate ( const Ptr ptr,
const Ptr actor 
) const
virtual

Generate action for activation (default implementation: return a null action).

Reimplemented in MWClass::Npc, MWClass::Creature, MWClass::Activator, MWClass::Light, MWClass::Door, MWClass::Apparatus, MWClass::Container, MWClass::Armor, MWClass::Weapon, MWClass::Book, MWClass::Clothing, MWClass::Ingredient, MWClass::Lockpick, MWClass::Miscellaneous, MWClass::Potion, MWClass::Probe, and MWClass::Repair.

Here is the caller graph for this function:

void MWWorld::Class::adjustPosition ( const MWWorld::Ptr ptr,
bool  force 
) const
virtual

Adjust position to stand on ground. Must be called post model load

Parameters
forcedo this even if the ptr is flying

Reimplemented in MWClass::Actor.

Here is the caller graph for this function:

void MWWorld::Class::adjustScale ( const MWWorld::ConstPtr ptr,
osg::Vec3f &  scale,
bool  rendering 
) const
virtual

Reimplemented in MWClass::Creature, and MWClass::Npc.

Here is the caller graph for this function:

virtual bool MWWorld::Class::allowTelekinesis ( const MWWorld::ConstPtr ptr) const
inlinevirtual

Return whether this class of object can be activated with telekinesis.

Reimplemented in MWClass::Door, MWClass::Actor, and MWClass::Activator.

Here is the caller graph for this function:

bool MWWorld::Class::apply ( const MWWorld::Ptr ptr,
const std::string &  id,
const MWWorld::Ptr actor 
) const
virtual

Apply id on ptr.

Parameters
actorActor that is resposible for the ID being applied to ptr.
Returns
Any effect?

(default implementation: ignore and return false)

Reimplemented in MWClass::Npc.

Here is the caller graph for this function:

std::string MWWorld::Class::applyEnchantment ( const MWWorld::ConstPtr ptr,
const std::string &  enchId,
int  enchCharge,
const std::string &  newName 
) const
virtual

Creates a new record using ptr as template, with the given name and the given enchantment applied to it.

Reimplemented in MWClass::Armor, MWClass::Weapon, MWClass::Clothing, and MWClass::Book.

Here is the caller graph for this function:

void MWWorld::Class::block ( const Ptr ptr) const
virtual

Play the appropriate sound for a blocked attack, depending on the currently equipped shield (default implementation: throw an exception)

Reimplemented in MWClass::Actor.

Here is the caller graph for this function:

bool MWWorld::Class::canBeActivated ( const Ptr ptr) const
virtual
Returns
Can the player activate this object? (default implementation: true if object's user-readable name is not empty, false otherwise)

Reimplemented in MWClass::Actor.

Here is the call graph for this function:

Here is the caller graph for this function:

std::pair< int, std::string > MWWorld::Class::canBeEquipped ( const MWWorld::ConstPtr ptr,
const MWWorld::Ptr npc 
) const
virtual

Return 0 if player cannot equip item. 1 if can equip. 2 if it's twohanded weapon. 3 if twohanded weapon conflicts with that. Second item in the pair specifies the error message

Reimplemented in MWClass::Armor, MWClass::Light, MWClass::Weapon, and MWClass::Clothing.

Here is the caller graph for this function:

bool MWWorld::Class::canFly ( const MWWorld::ConstPtr ptr) const
virtual

Reimplemented in MWClass::Creature.

Here is the caller graph for this function:

bool MWWorld::Class::canLock ( const ConstPtr ptr) const
virtual

Reimplemented in MWClass::Container, and MWClass::Door.

Here is the caller graph for this function:

bool MWWorld::Class::canSell ( const MWWorld::ConstPtr item,
int  npcServices 
) const
virtual

Determine whether or not item can be sold to an npc with the given npcServices.

Parameters
renderingIndicates if the scale to adjust is for the rendering mesh, or for the collision mesh

Reimplemented in MWClass::Armor, MWClass::Weapon, MWClass::Clothing, MWClass::Light, MWClass::Repair, MWClass::Book, MWClass::Lockpick, MWClass::Probe, MWClass::Apparatus, MWClass::Ingredient, MWClass::Miscellaneous, and MWClass::Potion.

Here is the caller graph for this function:

bool MWWorld::Class::canSwim ( const MWWorld::ConstPtr ptr) const
virtual

Reimplemented in MWClass::Npc, and MWClass::Creature.

Here is the caller graph for this function:

bool MWWorld::Class::canWalk ( const MWWorld::ConstPtr ptr) const
virtual

Reimplemented in MWClass::Npc, and MWClass::Creature.

Here is the caller graph for this function:

MWWorld::Ptr MWWorld::Class::copyToCell ( const ConstPtr ptr,
CellStore cell,
int  count 
) const
virtual

Reimplemented in MWClass::Miscellaneous.

Here is the call graph for this function:

Here is the caller graph for this function:

MWWorld::Ptr MWWorld::Class::copyToCell ( const ConstPtr ptr,
CellStore cell,
const ESM::Position pos,
int  count 
) const
virtual

Here is the call graph for this function:

MWWorld::Ptr MWWorld::Class::copyToCellImpl ( const ConstPtr ptr,
CellStore cell 
) const
protectedvirtual

Reimplemented in MWClass::Creature, MWClass::Npc, MWClass::Door, MWClass::Container, MWClass::Activator, MWClass::Apparatus, MWClass::BodyPart, MWClass::Weapon, MWClass::Armor, MWClass::Book, MWClass::Clothing, MWClass::Ingredient, MWClass::Light, MWClass::Lockpick, MWClass::Potion, MWClass::Probe, MWClass::Repair, and MWClass::Static.

Here is the caller graph for this function:

boost::shared_ptr< Action > MWWorld::Class::defaultItemActivate ( const Ptr ptr,
const Ptr actor 
) const
protected

Generate default action for activating inventory items.

Here is the call graph for this function:

Here is the caller graph for this function:

const Class & MWWorld::Class::get ( const std::string &  key)
static

If there is no class for this key, an exception is thrown.

float MWWorld::Class::getArmorRating ( const MWWorld::Ptr ptr) const
virtual
Returns
combined armor rating of this actor

Reimplemented in MWClass::Npc, and MWClass::Creature.

Here is the caller graph for this function:

int MWWorld::Class::getBaseFightRating ( const MWWorld::ConstPtr ptr) const
virtual

Reimplemented in MWClass::Npc, and MWClass::Creature.

Here is the caller graph for this function:

int MWWorld::Class::getBaseGold ( const MWWorld::ConstPtr ptr) const
virtual

Reimplemented in MWClass::Npc, and MWClass::Creature.

Here is the caller graph for this function:

int MWWorld::Class::getBloodTexture ( const MWWorld::ConstPtr ptr) const
virtual

Get a blood texture suitable for ptr (see Blood Texture 0-2 in Morrowind.ini)

Reimplemented in MWClass::Npc, and MWClass::Creature.

Here is the caller graph for this function:

float MWWorld::Class::getCapacity ( const MWWorld::Ptr ptr) const
virtual

Return total weight that fits into the object. Throws an exception, if the object can't hold other objects. (default implementation: throws an exception)

Reimplemented in MWClass::Npc, MWClass::Creature, and MWClass::Container.

Here is the caller graph for this function:

ContainerStore & MWWorld::Class::getContainerStore ( const Ptr ptr) const
virtual

Return container store or throw an exception, if class does not have a container store (default implementation: throw an exception)

Reimplemented in MWClass::Creature, MWClass::Npc, and MWClass::Container.

MWMechanics::CreatureStats & MWWorld::Class::getCreatureStats ( const Ptr ptr) const
virtual

Return creature stats or throw an exception, if class does not have creature stats (default implementation: throw an exception)

Reimplemented in MWClass::Creature, and MWClass::Npc.

int MWWorld::Class::getDoorState ( const MWWorld::ConstPtr ptr) const
virtual

0 = nothing, 1 = opening, 2 = closing

Reimplemented in MWClass::Door.

Here is the caller graph for this function:

std::string MWWorld::Class::getDownSoundId ( const ConstPtr ptr) const
virtual

Return the down sound ID of ptr or throw an exception, if class does not support ID retrieval (default implementation: throw an exception)

Reimplemented in MWClass::Armor, MWClass::Weapon, MWClass::Clothing, MWClass::Light, MWClass::Ingredient, MWClass::Lockpick, MWClass::Probe, MWClass::Apparatus, MWClass::Potion, MWClass::Book, MWClass::Miscellaneous, and MWClass::Repair.

Here is the caller graph for this function:

int MWWorld::Class::getEffectiveArmorRating ( const MWWorld::ConstPtr armor,
const MWWorld::Ptr actor 
) const
virtual

Get the effective armor rating, factoring in the actor's skills, for the given armor.

Reimplemented in MWClass::Armor.

Here is the caller graph for this function:

std::string MWWorld::Class::getEnchantment ( const MWWorld::ConstPtr ptr) const
virtual
Returns
the enchantment ID if the object is enchanted, otherwise an empty string (default implementation: return empty string)

Reimplemented in MWClass::Armor, MWClass::Weapon, MWClass::Clothing, and MWClass::Book.

Here is the caller graph for this function:

int MWWorld::Class::getEnchantmentPoints ( const MWWorld::ConstPtr ptr) const
virtual
Returns
the number of enchantment points available for possible enchanting

Reimplemented in MWClass::Weapon, MWClass::Armor, MWClass::Clothing, and MWClass::Book.

Here is the caller graph for this function:

float MWWorld::Class::getEncumbrance ( const MWWorld::Ptr ptr) const
virtual

Returns total weight of objects inside this object (including modifications from magic effects). Throws an exception, if the object can't hold other objects. (default implementation: throws an exception)

Reimplemented in MWClass::Npc, MWClass::Container, and MWClass::Actor.

Here is the caller graph for this function:

int MWWorld::Class::getEquipmentSkill ( const ConstPtr ptr) const
virtual

Reimplemented in MWClass::Weapon, MWClass::Armor, and MWClass::Clothing.

Here is the caller graph for this function:

std::pair< std::vector< int >, bool > MWWorld::Class::getEquipmentSlots ( const ConstPtr ptr) const
virtual
Returns
first: Return IDs of the slot this object can be equipped in; second: can object stay stacked when equipped?

Default implementation: return (empty vector, false).

Reimplemented in MWClass::Weapon, MWClass::Armor, MWClass::Light, MWClass::Lockpick, MWClass::Probe, and MWClass::Clothing.

Here is the caller graph for this function:

std::string MWWorld::Class::getInventoryIcon ( const MWWorld::ConstPtr ptr) const
virtual

Return name of inventory icon.

Reimplemented in MWClass::Armor, MWClass::Weapon, MWClass::Clothing, MWClass::Light, MWClass::Ingredient, MWClass::Lockpick, MWClass::Probe, MWClass::Apparatus, MWClass::Potion, MWClass::Book, MWClass::Miscellaneous, and MWClass::Repair.

Here is the caller graph for this function:

InventoryStore & MWWorld::Class::getInventoryStore ( const Ptr ptr) const
virtual

Return inventory store or throw an exception, if class does not have a inventory store (default implementation: throw an exception)

Reimplemented in MWClass::Creature, and MWClass::Npc.

int MWWorld::Class::getItemHealth ( const ConstPtr ptr) const
virtual

Return current item health or throw an exception if class does not have item health.

Here is the call graph for this function:

Here is the caller graph for this function:

int MWWorld::Class::getItemMaxHealth ( const ConstPtr ptr) const
virtual

Return item max health or throw an exception, if class does not have item health (default implementation: throw an exception)

Reimplemented in MWClass::Lockpick, MWClass::Probe, MWClass::Repair, MWClass::Weapon, and MWClass::Armor.

Here is the caller graph for this function:

float MWWorld::Class::getJump ( const MWWorld::Ptr ptr) const
virtual

Return jump velocity (not accounting for movement)

Reimplemented in MWClass::Npc.

Here is the caller graph for this function:

std::string MWWorld::Class::getModel ( const MWWorld::ConstPtr ptr) const
virtual

Reimplemented in MWClass::Npc, MWClass::Creature, MWClass::Armor, MWClass::Weapon, MWClass::Clothing, MWClass::Container, MWClass::Light, MWClass::Book, MWClass::Lockpick, MWClass::Probe, MWClass::Apparatus, MWClass::Door, MWClass::Ingredient, MWClass::Potion, MWClass::Miscellaneous, MWClass::Repair, MWClass::Activator, MWClass::BodyPart, and MWClass::Static.

Here is the caller graph for this function:

void MWWorld::Class::getModelsToPreload ( const MWWorld::Ptr ptr,
std::vector< std::string > &  models 
) const
virtual

Get a list of models to preload that this object may use (directly or indirectly). default implementation: list getModel().

Reimplemented in MWClass::Creature, MWClass::Npc, and MWClass::CreatureLevList.

Here is the call graph for this function:

Here is the caller graph for this function:

MWMechanics::Movement & MWWorld::Class::getMovementSettings ( const Ptr ptr) const
virtual

Return desired movement.

Reimplemented in MWClass::Creature, and MWClass::Npc.

Here is the caller graph for this function:

virtual std::string MWWorld::Class::getName ( const ConstPtr ptr) const
pure virtual
Returns
name (the one that is to be presented to the user; not the internal one); can return an empty string.

Implemented in MWClass::Npc, MWClass::Creature, MWClass::Door, MWClass::Apparatus, MWClass::Container, MWClass::Armor, MWClass::Activator, MWClass::BodyPart, MWClass::Weapon, MWClass::Book, MWClass::Clothing, MWClass::Ingredient, MWClass::Light, MWClass::Lockpick, MWClass::Miscellaneous, MWClass::Potion, MWClass::Probe, MWClass::Repair, MWClass::Static, MWClass::CreatureLevList, and MWClass::ItemLevList.

Here is the caller graph for this function:

float MWWorld::Class::getNormalizedEncumbrance ( const MWWorld::Ptr ptr) const
virtual

Returns encumbrance re-scaled to capacity.

Here is the call graph for this function:

Here is the caller graph for this function:

MWMechanics::NpcStats & MWWorld::Class::getNpcStats ( const Ptr ptr) const
virtual

Return NPC stats or throw an exception, if class does not have NPC stats (default implementation: throw an exception)

Reimplemented in MWClass::Npc.

std::string MWWorld::Class::getPrimaryFaction ( const MWWorld::ConstPtr ptr) const
virtual

Reimplemented in MWClass::Npc.

Here is the caller graph for this function:

int MWWorld::Class::getPrimaryFactionRank ( const MWWorld::ConstPtr ptr) const
virtual

Reimplemented in MWClass::Npc.

Here is the caller graph for this function:

float MWWorld::Class::getRemainingUsageTime ( const ConstPtr ptr) const
virtual

Returns the remaining duration of the object, such as an equippable light source. (default implementation: -1, i.e. infinite)

Reimplemented in MWClass::Light.

Here is the caller graph for this function:

osg::Vec3f MWWorld::Class::getRotationVector ( const Ptr ptr) const
virtual

Return desired rotations, as euler angles.

Reimplemented in MWClass::Actor.

Here is the caller graph for this function:

std::string MWWorld::Class::getScript ( const ConstPtr ptr) const
virtual

Return name of the script attached to ptr (default implementation: return an empty string).

Reimplemented in MWClass::Npc, MWClass::Creature, MWClass::Door, MWClass::Weapon, MWClass::Container, MWClass::Armor, MWClass::Light, MWClass::Activator, MWClass::Ingredient, MWClass::Lockpick, MWClass::Miscellaneous, MWClass::Potion, MWClass::Probe, MWClass::Repair, MWClass::Apparatus, MWClass::Book, and MWClass::Clothing.

Here is the caller graph for this function:

int MWWorld::Class::getServices ( const MWWorld::ConstPtr actor) const
virtual

Reimplemented in MWClass::Npc, and MWClass::Creature.

Here is the caller graph for this function:

int MWWorld::Class::getSkill ( const MWWorld::Ptr ptr,
int  skill 
) const
virtual

Reimplemented in MWClass::Npc, and MWClass::Creature.

Here is the caller graph for this function:

std::string MWWorld::Class::getSound ( const MWWorld::ConstPtr ptr) const
virtual

Returns sound id.

Reimplemented in MWClass::Light.

Here is the caller graph for this function:

std::string MWWorld::Class::getSoundIdFromSndGen ( const Ptr ptr,
const std::string &  type 
) const
virtual

Returns the sound ID for ptr of the given soundgen type.

Reimplemented in MWClass::Npc, and MWClass::Creature.

Here is the caller graph for this function:

float MWWorld::Class::getSpeed ( const Ptr ptr) const
virtual

Return movement speed.

Reimplemented in MWClass::Creature, and MWClass::Npc.

Here is the caller graph for this function:

MWGui::ToolTipInfo MWWorld::Class::getToolTipInfo ( const ConstPtr ptr,
int  count 
) const
virtual
const std::string& MWWorld::Class::getTypeName ( ) const
inline

Here is the caller graph for this function:

std::string MWWorld::Class::getUpSoundId ( const ConstPtr ptr) const
virtual

Return the up sound ID of ptr or throw an exception, if class does not support ID retrieval (default implementation: throw an exception)

Reimplemented in MWClass::Armor, MWClass::Weapon, MWClass::Clothing, MWClass::Light, MWClass::Ingredient, MWClass::Lockpick, MWClass::Probe, MWClass::Apparatus, MWClass::Potion, MWClass::Book, MWClass::Miscellaneous, and MWClass::Repair.

Here is the caller graph for this function:

int MWWorld::Class::getValue ( const ConstPtr ptr) const
virtual

Return the index of the skill this item corresponds to when equipped or -1, if there is no such skill. (default implementation: return -1) Return trade value of the object. Throws an exception, if the object can't be traded. (default implementation: throws an exception)

Reimplemented in MWClass::Armor, MWClass::Weapon, MWClass::Clothing, MWClass::Light, MWClass::Lockpick, MWClass::Probe, MWClass::Book, MWClass::Ingredient, MWClass::Miscellaneous, MWClass::Potion, MWClass::Repair, and MWClass::Apparatus.

Here is the caller graph for this function:

float MWWorld::Class::getWeight ( const MWWorld::ConstPtr ptr) const
virtual

Reimplemented in MWClass::Weapon, MWClass::Clothing, MWClass::Light, MWClass::Repair, MWClass::Book, MWClass::Lockpick, MWClass::Probe, MWClass::Ingredient, MWClass::Miscellaneous, MWClass::Potion, MWClass::Apparatus, and MWClass::Armor.

Here is the caller graph for this function:

bool MWWorld::Class::hasInventoryStore ( const Ptr ptr) const
virtual

Does this object have an inventory store, i.e. equipment slots? (default implementation: false)

Reimplemented in MWClass::Creature, and MWClass::Npc.

Here is the caller graph for this function:

bool MWWorld::Class::hasItemHealth ( const ConstPtr ptr) const
virtual
Returns
Item health data available? (default implementation: false)

Reimplemented in MWClass::Lockpick, MWClass::Probe, MWClass::Repair, MWClass::Weapon, and MWClass::Armor.

Here is the caller graph for this function:

bool MWWorld::Class::hasToolTip ( const ConstPtr ptr) const
virtual
Returns
true if this object has a tooltip when focused (default implementation: false)

Reimplemented in MWClass::Npc, MWClass::Creature, MWClass::Armor, MWClass::Clothing, MWClass::Apparatus, MWClass::Door, MWClass::Book, MWClass::Container, MWClass::Weapon, MWClass::Ingredient, MWClass::Lockpick, MWClass::Miscellaneous, MWClass::Potion, MWClass::Probe, MWClass::Repair, MWClass::Activator, and MWClass::Light.

Here is the caller graph for this function:

void MWWorld::Class::hit ( const Ptr ptr,
float  attackStrength,
int  type = -1 
) const
virtual

Execute a melee hit, using the current weapon. This will check the relevant skills of the given attacker, and whoever is hit.

Parameters
attackStrengthhow long the attack was charged for, a value in 0-1 range.
type- type of attack, one of the MWMechanics::CreatureStats::AttackType enums. ignored for creature attacks. (default implementation: throw an exception)

Reimplemented in MWClass::Npc, and MWClass::Creature.

Here is the caller graph for this function:

void MWWorld::Class::insertObject ( const Ptr ptr,
const std::string &  mesh,
MWPhysics::PhysicsSystem physics 
) const
virtual

Add reference into a cell for rendering (default implementation: don't render anything).

Reimplemented in MWClass::Actor, MWClass::Door, MWClass::Apparatus, MWClass::Container, MWClass::Armor, MWClass::Activator, MWClass::BodyPart, MWClass::Weapon, MWClass::Book, MWClass::Clothing, MWClass::Ingredient, MWClass::Light, MWClass::Lockpick, MWClass::Miscellaneous, MWClass::Potion, MWClass::Probe, MWClass::Repair, and MWClass::Static.

Here is the caller graph for this function:

void MWWorld::Class::insertObjectRendering ( const Ptr ptr,
const std::string &  mesh,
MWRender::RenderingInterface renderingInterface 
) const
virtual
virtual bool MWWorld::Class::isActor ( ) const
inlinevirtual

Reimplemented in MWClass::Actor.

Here is the caller graph for this function:

bool MWWorld::Class::isBipedal ( const MWWorld::ConstPtr ptr) const
virtual

Reimplemented in MWClass::Npc, and MWClass::Creature.

Here is the caller graph for this function:

bool MWWorld::Class::isClass ( const MWWorld::ConstPtr ptr,
const std::string &  className 
) const
virtual

Reimplemented in MWClass::Npc.

Here is the caller graph for this function:

bool MWWorld::Class::isEssential ( const MWWorld::ConstPtr ptr) const
virtual

Is ptr essential? (i.e. may losing ptr make the game unwinnable)

(default implementation: return false)

Reimplemented in MWClass::Npc, and MWClass::Creature.

Here is the caller graph for this function:

virtual bool MWWorld::Class::isGold ( const MWWorld::ConstPtr ptr) const
inlinevirtual

Reimplemented in MWClass::Miscellaneous.

Here is the caller graph for this function:

virtual bool MWWorld::Class::isKey ( const MWWorld::ConstPtr ptr) const
inlinevirtual

Reimplemented in MWClass::Miscellaneous.

Here is the caller graph for this function:

bool MWWorld::Class::isMobile ( const MWWorld::Ptr ptr) const

Here is the call graph for this function:

Here is the caller graph for this function:

virtual bool MWWorld::Class::isNpc ( ) const
inlinevirtual

Reimplemented in MWClass::Npc.

Here is the caller graph for this function:

bool MWWorld::Class::isPersistent ( const MWWorld::ConstPtr ptr) const
virtual

Reimplemented in MWClass::Npc, and MWClass::Creature.

Here is the caller graph for this function:

bool MWWorld::Class::isPureFlyingCreature ( const MWWorld::Ptr ptr) const

Here is the call graph for this function:

Here is the caller graph for this function:

bool MWWorld::Class::isPureLandCreature ( const MWWorld::Ptr ptr) const

Here is the call graph for this function:

Here is the caller graph for this function:

bool MWWorld::Class::isPureWaterCreature ( const MWWorld::Ptr ptr) const

Here is the call graph for this function:

Here is the caller graph for this function:

void MWWorld::Class::lock ( const Ptr ptr,
int  lockLevel 
) const
virtual

Lock object (default implementation: throw an exception)

Reimplemented in MWClass::Container, and MWClass::Door.

Here is the caller graph for this function:

void MWWorld::Class::onHit ( const MWWorld::Ptr ptr,
float  damage,
bool  ishealth,
const MWWorld::Ptr object,
const MWWorld::Ptr attacker,
const osg::Vec3f &  hitPosition,
bool  successful 
) const
virtual

Alerts ptr that it's being hit for damage points to health if ishealth is true (else fatigue) by object (sword, arrow, etc). attacker specifies the actor responsible for the attack, and successful specifies if the hit is successful or not.

Reimplemented in MWClass::Npc, and MWClass::Creature.

Here is the caller graph for this function:

Class& MWWorld::Class::operator= ( const Class )
private
void MWWorld::Class::readAdditionalState ( const MWWorld::Ptr ptr,
const ESM::ObjectState state 
) const
virtual

Read additional state from state into ptr.

Reimplemented in MWClass::Npc, MWClass::Creature, MWClass::Door, MWClass::Container, and MWClass::CreatureLevList.

void MWWorld::Class::registerClass ( const std::string &  key,
boost::shared_ptr< Class instance 
)
static

Here is the caller graph for this function:

virtual void MWWorld::Class::respawn ( const MWWorld::Ptr ptr) const
inlinevirtual

Reimplemented in MWClass::Npc, MWClass::Creature, MWClass::Container, and MWClass::CreatureLevList.

Here is the caller graph for this function:

virtual void MWWorld::Class::restock ( const MWWorld::Ptr ptr) const
inlinevirtual

Reimplemented in MWClass::Npc, MWClass::Creature, and MWClass::Container.

Here is the caller graph for this function:

void MWWorld::Class::setDoorState ( const MWWorld::Ptr ptr,
int  state 
) const
virtual

This does not actually cause the door to move. Use World::activateDoor instead.

Reimplemented in MWClass::Door.

Here is the caller graph for this function:

void MWWorld::Class::setRemainingUsageTime ( const Ptr ptr,
float  duration 
) const
virtual

Sets the remaining duration of the object, such as an equippable light source. (default implementation: throw an exception)

Reimplemented in MWClass::Light.

Here is the caller graph for this function:

bool MWWorld::Class::showsInInventory ( const ConstPtr ptr) const
virtual

Return whether ptr shows in inventory views. Hidden items are not displayed and cannot be (re)moved by the user.

Returns
True if shown, false if hidden.

Reimplemented in MWClass::Light.

Here is the call graph for this function:

Here is the caller graph for this function:

void MWWorld::Class::skillUsageSucceeded ( const MWWorld::Ptr ptr,
int  skill,
int  usageType,
float  extraFactor = 1.f 
) const
virtual

Inform actor ptr that a skill use has succeeded.

(default implementations: throws an exception)

Reimplemented in MWClass::Npc.

Here is the caller graph for this function:

void MWWorld::Class::unlock ( const Ptr ptr) const
virtual

Unlock object (default implementation: throw an exception)

Reimplemented in MWClass::Container, and MWClass::Door.

Here is the caller graph for this function:

boost::shared_ptr< Action > MWWorld::Class::use ( const Ptr ptr) const
virtual

Generate action for using via inventory menu (default implementation: return a null action).

Reimplemented in MWClass::Armor, MWClass::Weapon, MWClass::Clothing, MWClass::Book, MWClass::Light, MWClass::Lockpick, MWClass::Probe, MWClass::Apparatus, MWClass::Miscellaneous, MWClass::Repair, MWClass::Ingredient, and MWClass::Potion.

Here is the caller graph for this function:

void MWWorld::Class::writeAdditionalState ( const MWWorld::ConstPtr ptr,
ESM::ObjectState state 
) const
virtual

Write additional state from ptr into state.

Reimplemented in MWClass::Npc, MWClass::Creature, MWClass::Door, MWClass::Container, and MWClass::CreatureLevList.

Member Data Documentation

std::string MWWorld::Class::mTypeName
private
std::map< std::string, boost::shared_ptr< Class > > MWWorld::Class::sClasses
staticprivate

The documentation for this class was generated from the following files: