mirror of
https://gitlab.com/OpenMW/openmw.git
synced 2025-02-10 03:39:55 +00:00
added getEquipmentSkill function to Class hierarchy
This commit is contained in:
parent
ea336214de
commit
c314cddb1c
@ -127,11 +127,16 @@ namespace MWWorld
|
||||
return Ogre::Vector3 (0, 0, 0);
|
||||
}
|
||||
|
||||
std::pair<std::vector<int>, bool> Class::getEquipmentSlots (const Ptr& pt) const
|
||||
std::pair<std::vector<int>, bool> Class::getEquipmentSlots (const Ptr& ptr) const
|
||||
{
|
||||
return std::make_pair (std::vector<int>(), false);
|
||||
}
|
||||
|
||||
int Class::getEuqipmentSkill (const Ptr& ptr, const Environment& environment) const
|
||||
{
|
||||
return -1;
|
||||
}
|
||||
|
||||
const Class& Class::get (const std::string& key)
|
||||
{
|
||||
std::map<std::string, boost::shared_ptr<Class> >::const_iterator iter = sClasses.find (key);
|
||||
|
@ -143,12 +143,18 @@ namespace MWWorld
|
||||
///< Return desired movement vector (determined based on movement settings,
|
||||
/// stance and stats).
|
||||
|
||||
virtual std::pair<std::vector<int>, bool> getEquipmentSlots (const Ptr& pt) const;
|
||||
virtual std::pair<std::vector<int>, bool> getEquipmentSlots (const Ptr& ptr) const;
|
||||
///< \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).
|
||||
|
||||
virtual int getEuqipmentSkill (const Ptr& ptr, const Environment& environment)
|
||||
const;
|
||||
/// Return the index of the skill this item corresponds to when equiopped or -1, if there is
|
||||
/// no such skill.
|
||||
/// (default implementation: return -1)
|
||||
|
||||
static const Class& get (const std::string& key);
|
||||
///< If there is no class for this \a key, an exception is thrown.
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user