2010-08-03 11:14:57 +02:00
# ifndef GAME_MWWORLD_CLASS_H
# define GAME_MWWORLD_CLASS_H
# include <map>
2017-05-05 21:21:11 +02:00
# include <memory>
2010-08-03 11:14:57 +02:00
# include <string>
2012-03-13 13:45:50 +01:00
# include <vector>
2010-08-03 11:14:57 +02:00
2021-02-05 14:55:42 +01:00
# include <osg/Quat>
2019-08-07 08:51:46 +04:00
# include <osg/Vec4f>
2013-08-15 01:21:43 -07:00
# include "ptr.hpp"
2019-08-25 15:20:14 +02:00
# include "doorstate.hpp"
2022-07-16 16:37:31 +02:00
# include "../mwmechanics/aisetting.hpp"
2012-02-20 12:44:17 +01:00
2014-01-30 11:50:13 +01:00
namespace ESM
{
struct ObjectState ;
}
2010-08-14 09:20:47 +02:00
namespace MWRender
{
2012-07-03 13:15:20 +02:00
class RenderingInterface ;
2010-08-14 09:20:47 +02:00
}
2015-05-10 01:09:00 +02:00
namespace MWPhysics
{
class PhysicsSystem ;
}
2010-08-03 11:49:12 +02:00
namespace MWMechanics
{
2012-07-06 18:25:16 +02:00
class NpcStats ;
2011-02-03 11:37:17 +01:00
struct Movement ;
2022-07-16 16:37:31 +02:00
class CreatureStats ;
2010-08-03 11:49:12 +02:00
}
2012-07-03 13:15:20 +02:00
namespace MWGui
{
struct ToolTipInfo ;
}
2012-07-25 17:18:17 +04:00
namespace ESM
{
struct Position ;
}
2010-08-03 11:14:57 +02:00
namespace MWWorld
{
2012-02-20 12:44:17 +01:00
class ContainerStore ;
2012-03-10 12:49:54 +01:00
class InventoryStore ;
2012-07-25 17:18:17 +04:00
class CellStore ;
2013-08-15 01:21:43 -07:00
class Action ;
2010-08-03 11:49:12 +02:00
2010-08-03 11:14:57 +02:00
/// \brief Base class for referenceable esm records
class Class
{
2022-04-04 02:44:53 +02:00
const unsigned mType ;
static std : : map < unsigned , Class * > & getClasses ( ) ;
2013-08-16 04:18:48 -07:00
2010-08-03 11:14:57 +02:00
protected :
2022-04-04 02:44:53 +02:00
explicit Class ( unsigned type ) : mType ( type ) { }
2010-08-03 11:14:57 +02:00
2022-04-06 17:06:55 +02:00
std : : unique_ptr < Action > defaultItemActivate ( const Ptr & ptr , const Ptr & actor ) const ;
2013-08-08 22:34:53 -07:00
///< Generate default action for activating inventory items
2015-12-18 16:24:24 +01:00
virtual Ptr copyToCellImpl ( const ConstPtr & ptr , CellStore & cell ) const ;
2012-07-25 17:18:17 +04:00
2010-08-03 11:14:57 +02:00
public :
2021-02-05 14:55:42 +01:00
virtual ~ Class ( ) = default ;
Class ( const Class & ) = delete ;
Class & operator = ( const Class & ) = delete ;
2010-08-03 11:14:57 +02:00
2021-10-11 11:46:21 +00:00
unsigned int getType ( ) const {
return mType ;
2013-08-16 04:18:48 -07:00
}
2015-01-12 11:29:56 +01:00
virtual void insertObjectRendering ( const Ptr & ptr , const std : : string & mesh , MWRender : : RenderingInterface & renderingInterface ) const ;
2021-09-30 22:58:16 +02:00
virtual void insertObject ( const Ptr & ptr , const std : : string & mesh , const osg : : Quat & rotation , MWPhysics : : PhysicsSystem & physics ) const ;
2010-08-14 09:20:47 +02:00
///< Add reference into a cell for rendering (default implementation: don't render anything).
2021-09-30 22:58:16 +02:00
virtual void insertObjectPhysics ( const Ptr & ptr , const std : : string & mesh , const osg : : Quat & rotation , MWPhysics : : PhysicsSystem & physics ) const ;
2010-08-14 09:20:47 +02:00
2022-08-16 21:15:03 +02:00
virtual std : : string_view getName ( const ConstPtr & ptr ) const = 0 ;
2019-09-11 00:06:50 +03:00
///< \return name or ID; can return an empty string.
2010-08-03 17:11:41 +02:00
2014-07-31 04:24:45 +02:00
virtual void adjustPosition ( const MWWorld : : Ptr & ptr , bool force ) const ;
2013-04-03 23:55:57 +02:00
///< Adjust position to stand on ground. Must be called post model load
2014-07-31 04:24:45 +02:00
/// @param force do this even if the ptr is flying
2013-04-03 23:55:57 +02:00
2010-08-03 11:49:12 +02:00
virtual MWMechanics : : CreatureStats & getCreatureStats ( const Ptr & ptr ) const ;
///< Return creature stats or throw an exception, if class does not have creature stats
2014-10-05 17:59:53 -05:00
/// (default implementation: throw an exception)
2010-08-03 11:14:57 +02:00
2015-12-19 16:13:00 +01:00
virtual bool hasToolTip ( const ConstPtr & ptr ) const ;
2019-09-10 21:56:10 +03:00
///< @return true if this object has a tooltip when focused (default implementation: true)
2012-04-16 19:30:52 +02:00
2015-12-19 16:29:07 +01:00
virtual MWGui : : ToolTipInfo getToolTipInfo ( const ConstPtr & ptr , int count ) const ;
2012-04-16 19:30:52 +02:00
///< @return the content of the tool tip to be displayed. raises exception if the object has no tooltip.
2016-09-24 18:01:31 +02:00
virtual bool showsInInventory ( const ConstPtr & ptr ) const ;
///< Return whether ptr shows in inventory views.
/// Hidden items are not displayed and cannot be (re)moved by the user.
/// \return True if shown, false if hidden.
2010-08-19 12:49:13 +02:00
virtual MWMechanics : : NpcStats & getNpcStats ( const Ptr & ptr ) const ;
///< Return NPC stats or throw an exception, if class does not have NPC stats
2014-10-05 17:59:53 -05:00
/// (default implementation: throw an exception)
2010-08-19 12:49:13 +02:00
2015-12-18 16:06:31 +01:00
virtual bool hasItemHealth ( const ConstPtr & ptr ) const ;
2010-08-03 14:14:04 +02:00
///< \return Item health data available? (default implementation: false)
2015-12-18 15:27:06 +01:00
virtual int getItemHealth ( const ConstPtr & ptr ) const ;
2014-05-25 14:13:07 +02:00
///< Return current item health or throw an exception if class does not have item health
2018-10-25 15:45:31 +03:00
virtual float getItemNormalizedHealth ( const ConstPtr & ptr ) const ;
///< Return current item health re-scaled to maximum health
2015-12-18 15:27:06 +01:00
virtual int getItemMaxHealth ( const ConstPtr & ptr ) const ;
2010-08-03 14:14:04 +02:00
///< Return item max health or throw an exception, if class does not have item health
2014-05-25 14:13:07 +02:00
/// (default implementation: throw an exception)
2013-07-24 02:51:42 -07:00
2022-08-11 21:50:38 +03:00
virtual bool evaluateHit ( const Ptr & ptr , Ptr & victim , osg : : Vec3f & hitPosition ) const ;
///< Evaluate the victim of a melee hit produced by ptr in the current circumstances and return dice roll success.
/// (default implementation: throw an exception)
virtual void hit ( const Ptr & ptr , float attackStrength , int type = - 1 , const Ptr & victim = Ptr ( ) , const osg : : Vec3f & hitPosition = osg : : Vec3f ( ) , bool success = false ) const ;
///< Execute a melee hit on the victim at hitPosition, using the current weapon. If the hit was successful, apply damage and process corresponding events.
2015-06-26 05:15:07 +02:00
/// \param attackStrength how long the attack was charged for, a value in 0-1 range.
2013-07-25 00:30:01 -07:00
/// \param type - type of attack, one of the MWMechanics::CreatureStats::AttackType
/// enums. ignored for creature attacks.
2014-10-05 17:59:53 -05:00
/// (default implementation: throw an exception)
2013-07-24 02:51:42 -07:00
2016-09-13 00:49:31 +09:00
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 ;
2013-07-28 06:48:25 -07:00
///< Alerts \a ptr that it's being hit for \a damage points to health if \a ishealth is
/// true (else fatigue) by \a object (sword, arrow, etc). \a attacker specifies the
/// actor responsible for the attack, and \a successful specifies if the hit is
/// successful or not.
2013-07-26 03:21:54 -07:00
2014-01-21 01:01:21 +01:00
virtual void block ( const Ptr & ptr ) const ;
///< Play the appropriate sound for a blocked attack, depending on the currently equipped shield
/// (default implementation: throw an exception)
2022-04-06 17:06:55 +02:00
virtual std : : unique_ptr < Action > activate ( const Ptr & ptr , const Ptr & actor ) const ;
2010-08-03 18:20:15 +02:00
///< Generate action for activation (default implementation: return a null action).
2022-04-06 17:06:55 +02:00
virtual std : : unique_ptr < Action > use ( const Ptr & ptr , bool force = false )
2010-08-03 18:44:52 +02:00
const ;
2010-08-03 18:20:15 +02:00
///< Generate action for using via inventory menu (default implementation: return a
/// null action).
2012-01-28 11:45:55 +01:00
virtual ContainerStore & getContainerStore ( const Ptr & ptr ) const ;
2010-08-04 14:37:23 +02:00
///< Return container store or throw an exception, if class does not have a
2014-10-05 17:59:53 -05:00
/// container store (default implementation: throw an exception)
2010-08-04 14:37:23 +02:00
2012-03-10 12:49:54 +01:00
virtual InventoryStore & getInventoryStore ( const Ptr & ptr ) const ;
///< Return inventory store or throw an exception, if class does not have a
2014-10-05 17:59:53 -05:00
/// inventory store (default implementation: throw an exception)
2012-03-10 12:49:54 +01:00
2014-01-19 11:42:58 +01:00
virtual bool hasInventoryStore ( const Ptr & ptr ) const ;
///< Does this object have an inventory store, i.e. equipment slots? (default implementation: false)
2015-12-18 16:50:32 +01:00
virtual bool canLock ( const ConstPtr & ptr ) const ;
2015-08-04 17:33:34 +02:00
2013-10-15 15:23:42 -04:00
virtual void setRemainingUsageTime ( const Ptr & ptr , float duration ) const ;
///< Sets the remaining duration of the object, such as an equippable light
/// source. (default implementation: throw an exception)
2015-12-18 15:27:06 +01:00
virtual float getRemainingUsageTime ( const ConstPtr & ptr ) const ;
2013-10-15 15:23:42 -04:00
///< Returns the remaining duration of the object, such as an equippable light
2013-12-16 13:31:03 +01:00
/// source. (default implementation: -1, i.e. infinite)
2010-08-30 11:56:55 +02:00
2022-08-11 22:51:55 +02:00
virtual std : : string_view getScript ( const ConstPtr & ptr ) const ;
2010-08-05 15:40:03 +02:00
///< Return name of the script attached to ptr (default implementation: return an empty
/// string).
2020-08-27 11:48:59 +00:00
virtual float getWalkSpeed ( const Ptr & ptr ) const ;
virtual float getRunSpeed ( const Ptr & ptr ) const ;
virtual float getSwimSpeed ( const Ptr & ptr ) const ;
/// Return maximal movement speed for the current state.
virtual float getMaxSpeed ( const Ptr & ptr ) const ;
/// Return current movement speed.
virtual float getCurrentSpeed ( const Ptr & ptr ) const ;
2011-01-18 10:45:29 +01:00
2013-02-24 03:30:33 -08:00
virtual float getJump ( const MWWorld : : Ptr & ptr ) const ;
///< Return jump velocity (not accounting for movement)
2011-02-03 11:37:17 +01:00
virtual MWMechanics : : Movement & getMovementSettings ( const Ptr & ptr ) const ;
///< Return desired movement.
2015-06-03 19:41:19 +02:00
virtual osg : : Vec3f getRotationVector ( const Ptr & ptr ) const ;
2020-08-27 11:48:59 +00:00
///< Return desired rotations, as euler angles. Sets getMovementSettings(ptr).mRotation to zero.
2013-03-31 01:29:24 -07:00
2015-12-18 16:06:31 +01:00
virtual std : : pair < std : : vector < int > , bool > getEquipmentSlots ( const ConstPtr & ptr ) const ;
2012-03-13 13:45:50 +01:00
///< \return 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).
2015-12-18 15:27:06 +01:00
virtual int getEquipmentSkill ( const ConstPtr & ptr )
2012-03-13 14:12:07 +01:00
const ;
2015-12-19 15:50:13 +01:00
/// Return the index of the skill this item corresponds to when equipped or -1, if there is
2012-03-13 14:12:07 +01:00
/// no such skill.
/// (default implementation: return -1)
2015-12-18 15:27:06 +01:00
virtual int getValue ( const ConstPtr & ptr ) const ;
2012-04-07 19:53:49 +02:00
///< Return trade value of the object. Throws an exception, if the object can't be traded.
/// (default implementation: throws an exception)
2012-05-15 22:31:52 +02:00
virtual float getCapacity ( const MWWorld : : Ptr & ptr ) const ;
2012-05-15 21:34:00 +02:00
///< Return total weight that fits into the object. Throws an exception, if the object can't
/// hold other objects.
/// (default implementation: throws an exception)
virtual float getEncumbrance ( const MWWorld : : Ptr & ptr ) const ;
///< Returns total weight of objects inside this object (including modifications from magic
2012-05-15 21:17:00 +02:00
/// effects). Throws an exception, if the object can't hold other objects.
/// (default implementation: throws an exception)
2014-10-05 15:50:01 +02:00
virtual float getNormalizedEncumbrance ( const MWWorld : : Ptr & ptr ) const ;
///< Returns encumbrance re-scaled to capacity
2022-05-12 17:29:12 +02:00
virtual bool consume ( const MWWorld : : Ptr & consumable , const MWWorld : : Ptr & actor ) const ;
2022-06-19 17:31:18 +02:00
///< Consume an item, e. g. a potion.
2012-06-24 16:23:43 +02:00
2014-09-25 12:25:57 +02:00
virtual void skillUsageSucceeded ( const MWWorld : : Ptr & ptr , int skill , int usageType , float extraFactor = 1.f ) const ;
2012-07-13 09:03:17 +02:00
///< Inform actor \a ptr that a skill use has succeeded.
///
/// (default implementations: throws an exception)
2015-12-18 16:39:35 +01:00
virtual bool isEssential ( const MWWorld : : ConstPtr & ptr ) const ;
2012-10-27 13:33:54 +02:00
///< Is \a ptr essential? (i.e. may losing \a ptr make the game unwinnable)
///
/// (default implementation: return false)
2022-08-14 14:39:58 +02:00
virtual std : : string_view getUpSoundId ( const ConstPtr & ptr ) const ;
2012-03-13 18:05:38 +02:00
///< Return the up sound ID of \a ptr or throw an exception, if class does not support ID retrieval
/// (default implementation: throw an exception)
2022-08-14 14:39:58 +02:00
virtual std : : string_view getDownSoundId ( const ConstPtr & ptr ) const ;
2012-03-13 18:05:38 +02:00
///< Return the down sound ID of \a ptr or throw an exception, if class does not support ID retrieval
/// (default implementation: throw an exception)
2012-04-15 20:56:45 +02:00
2022-08-14 14:39:58 +02:00
virtual std : : string_view getSoundIdFromSndGen ( const Ptr & ptr , std : : string_view type ) const ;
2013-07-17 23:58:21 -07:00
///< Returns the sound ID for \a ptr of the given soundgen \a type.
2013-03-17 22:29:12 +01:00
virtual float getArmorRating ( const MWWorld : : Ptr & ptr ) const ;
///< @return combined armor rating of this actor
2022-08-22 16:55:53 +02:00
virtual const std : : string & getInventoryIcon ( const MWWorld : : ConstPtr & ptr ) const ;
2012-04-15 20:56:45 +02:00
///< Return name of inventory icon.
2012-05-12 18:32:06 +02:00
2022-08-22 16:55:53 +02:00
virtual std : : string_view getEnchantment ( const MWWorld : : ConstPtr & ptr ) const ;
2012-05-12 16:17:03 +02:00
///< @return the enchantment ID if the object is enchanted, otherwise an empty string
/// (default implementation: return empty string)
2012-05-21 10:58:04 +02:00
2015-12-18 16:48:19 +01:00
virtual int getEnchantmentPoints ( const MWWorld : : ConstPtr & ptr ) const ;
2013-03-16 19:00:14 +01:00
///< @return the number of enchantment points available for possible enchanting
2015-12-18 16:46:02 +01:00
virtual void adjustScale ( const MWWorld : : ConstPtr & ptr , osg : : Vec3f & scale , bool rendering ) const ;
2015-11-01 21:45:58 +01:00
/// @param rendering Indicates if the scale to adjust is for the rendering mesh, or for the collision mesh
2012-05-25 18:23:06 +02:00
2015-12-18 15:58:23 +01:00
virtual bool canSell ( const MWWorld : : ConstPtr & item , int npcServices ) const ;
2013-04-07 21:38:53 +02:00
///< Determine whether or not \a item can be sold to an npc with the given \a npcServices
2015-12-18 16:44:35 +01:00
virtual int getServices ( const MWWorld : : ConstPtr & actor ) const ;
2013-05-11 18:38:27 +02:00
2015-12-18 15:51:05 +01:00
virtual std : : string getModel ( const MWWorld : : ConstPtr & ptr ) const ;
2012-07-25 17:18:17 +04:00
2017-02-20 19:04:02 +01:00
virtual bool useAnim ( ) const ;
///< Whether or not to use animated variant of model (default false)
2016-02-08 20:52:32 +01:00
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().
2022-08-22 16:55:53 +02:00
virtual const std : : string & applyEnchantment ( const MWWorld : : ConstPtr & ptr , const std : : string & enchId , int enchCharge , const std : : string & newName ) const ;
2014-05-24 14:48:37 +02:00
///< Creates a new record using \a ptr as template, with the given name and the given enchantment applied to it.
2013-03-28 17:41:00 +01:00
2015-12-18 16:06:31 +01:00
virtual std : : pair < int , std : : string > canBeEquipped ( const MWWorld : : ConstPtr & ptr , const MWWorld : : Ptr & npc ) const ;
2013-04-08 22:10:55 +02:00
///< Return 0 if player cannot equip item. 1 if can equip. 2 if it's twohanded weapon. 3 if twohanded weapon conflicts with that.
2013-04-15 02:56:23 +02:00
/// Second item in the pair specifies the error message
2013-04-05 15:42:05 +02:00
2015-12-18 16:00:50 +01:00
virtual float getWeight ( const MWWorld : : ConstPtr & ptr ) const ;
2013-05-11 18:38:27 +02:00
2015-12-18 16:41:37 +01:00
virtual bool isPersistent ( const MWWorld : : ConstPtr & ptr ) const ;
2013-05-16 18:50:26 +02:00
2015-12-18 15:27:06 +01:00
virtual bool isKey ( const MWWorld : : ConstPtr & ptr ) const { return false ; }
2014-01-01 22:37:52 +01:00
2015-12-18 16:43:11 +01:00
virtual bool isGold ( const MWWorld : : ConstPtr & ptr ) const { return false ; }
2016-07-07 00:03:14 +09:00
virtual bool allowTelekinesis ( const MWWorld : : ConstPtr & ptr ) const { return true ; }
///< Return whether this class of object can be activated with telekinesis
2019-08-25 15:20:14 +02:00
2014-01-17 10:52:44 +01:00
/// Get a blood texture suitable for \a ptr (see Blood Texture 0-2 in Morrowind.ini)
2015-12-18 16:38:14 +01:00
virtual int getBloodTexture ( const MWWorld : : ConstPtr & ptr ) const ;
2014-01-17 10:52:44 +01:00
2015-12-19 16:47:55 +01:00
virtual Ptr copyToCell ( const ConstPtr & ptr , CellStore & cell , int count ) const ;
2012-07-25 17:18:17 +04:00
2015-12-19 16:47:55 +01:00
virtual Ptr copyToCell ( const ConstPtr & ptr , CellStore & cell , const ESM : : Position & pos , int count ) const ;
2013-08-08 22:34:53 -07:00
2017-08-18 17:06:47 +04:00
virtual bool isActivator ( ) const {
return false ;
}
2013-08-08 22:34:53 -07:00
virtual bool isActor ( ) const {
return false ;
}
virtual bool isNpc ( ) const {
2012-07-30 23:28:14 +04:00
return false ;
}
2013-08-15 01:21:43 -07:00
2017-08-18 17:06:47 +04:00
virtual bool isDoor ( ) const {
return false ;
}
2015-12-18 16:15:40 +01:00
virtual bool isBipedal ( const MWWorld : : ConstPtr & ptr ) const ;
2015-12-18 16:16:45 +01:00
virtual bool canFly ( const MWWorld : : ConstPtr & ptr ) const ;
virtual bool canSwim ( const MWWorld : : ConstPtr & ptr ) const ;
virtual bool canWalk ( const MWWorld : : ConstPtr & ptr ) const ;
2019-03-05 09:49:56 +03:00
bool isPureWaterCreature ( const MWWorld : : ConstPtr & ptr ) const ;
bool isPureFlyingCreature ( const MWWorld : : ConstPtr & ptr ) const ;
2016-11-16 20:15:25 +01:00
bool isPureLandCreature ( const MWWorld : : Ptr & ptr ) const ;
2015-01-09 21:40:53 +13:00
bool isMobile ( const MWWorld : : Ptr & ptr ) const ;
2014-01-05 15:38:12 +01:00
2018-12-23 15:18:33 +04:00
virtual float getSkill ( const MWWorld : : Ptr & ptr , int skill ) const ;
2014-01-15 15:50:45 +01:00
2014-01-30 11:50:13 +01:00
virtual void readAdditionalState ( const MWWorld : : Ptr & ptr , const ESM : : ObjectState & state )
const ;
///< Read additional state from \a state into \a ptr.
2015-12-18 00:18:06 +01:00
virtual void writeAdditionalState ( const MWWorld : : ConstPtr & ptr , ESM : : ObjectState & state )
2014-01-30 11:50:13 +01:00
const ;
///< Write additional state from \a ptr into \a state.
2021-10-11 11:46:21 +00:00
static const Class & get ( unsigned int key ) ;
2013-08-15 01:21:43 -07:00
///< If there is no class for this \a key, an exception is thrown.
2022-04-04 02:44:53 +02:00
static void registerClass ( Class & instance ) ;
2014-03-28 14:21:38 -04:00
2015-12-18 16:28:20 +01:00
virtual int getBaseGold ( const MWWorld : : ConstPtr & ptr ) const ;
2014-04-01 14:15:55 -04:00
2015-12-18 16:29:30 +01:00
virtual bool isClass ( const MWWorld : : ConstPtr & ptr , const std : : string & className ) const ;
2014-05-15 01:58:44 +02:00
2019-08-25 15:20:14 +02:00
virtual DoorState getDoorState ( const MWWorld : : ConstPtr & ptr ) const ;
2014-05-15 01:58:44 +02:00
/// This does not actually cause the door to move. Use World::activateDoor instead.
2019-08-25 15:20:14 +02:00
virtual void setDoorState ( const MWWorld : : Ptr & ptr , DoorState state ) const ;
2014-05-17 09:05:41 +02:00
virtual void respawn ( const MWWorld : : Ptr & ptr ) const { }
2014-05-17 14:30:31 +02:00
2014-10-12 11:40:14 +02:00
/// Returns sound id
2015-12-18 16:11:03 +01:00
virtual std : : string getSound ( const MWWorld : : ConstPtr & ptr ) const ;
2014-12-14 19:35:34 +01:00
2015-12-18 16:12:35 +01:00
virtual int getBaseFightRating ( const MWWorld : : ConstPtr & ptr ) const ;
2015-01-27 17:32:21 +01:00
2022-06-13 18:21:29 +02:00
virtual std : : string_view getPrimaryFaction ( const MWWorld : : ConstPtr & ptr ) const ;
2015-12-18 16:33:54 +01:00
virtual int getPrimaryFactionRank ( const MWWorld : : ConstPtr & ptr ) const ;
2015-03-01 19:28:20 +01:00
/// Get the effective armor rating, factoring in the actor's skills, for the given armor.
2017-02-17 03:11:37 +01:00
virtual float getEffectiveArmorRating ( const MWWorld : : ConstPtr & armor , const MWWorld : : Ptr & actor ) const ;
2019-08-07 08:51:46 +04:00
virtual osg : : Vec4f getEnchantmentColor ( const MWWorld : : ConstPtr & item ) const ;
2020-06-02 21:59:37 +02:00
2022-07-16 16:37:31 +02:00
virtual void setBaseAISetting ( const std : : string & id , MWMechanics : : AiSetting setting , int value ) const ;
2020-06-13 01:04:55 +02:00
2022-08-23 16:59:03 +02:00
virtual void modifyBaseInventory ( std : : string_view actorId , std : : string_view itemId , int amount ) const ;
2010-08-03 11:14:57 +02:00
} ;
}
# endif