mirror of
https://github.com/TES3MP/openmw-tes3mp.git
synced 2025-03-28 23:06:43 +00:00
Issue #314: added skillUsageSucceeded function to Class
This commit is contained in:
parent
7a2d613043
commit
805b81bf6e
2 changed files with 10 additions and 0 deletions
|
@ -39,6 +39,11 @@ namespace MWWorld
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void Class::skillUsageSucceeded (const MWWorld::Ptr& ptr, int skill, int usageType) const
|
||||||
|
{
|
||||||
|
throw std::runtime_error ("class does not represent an actor");
|
||||||
|
}
|
||||||
|
|
||||||
MWMechanics::CreatureStats& Class::getCreatureStats (const Ptr& ptr) const
|
MWMechanics::CreatureStats& Class::getCreatureStats (const Ptr& ptr) const
|
||||||
{
|
{
|
||||||
throw std::runtime_error ("class does not have creature stats");
|
throw std::runtime_error ("class does not have creature stats");
|
||||||
|
|
|
@ -173,6 +173,11 @@ namespace MWWorld
|
||||||
///
|
///
|
||||||
/// (default implementation: ignore and return false)
|
/// (default implementation: ignore and return false)
|
||||||
|
|
||||||
|
virtual void skillUsageSucceeded (const MWWorld::Ptr& ptr, int skill, int usageType) const;
|
||||||
|
///< Inform actor \a ptr that a skill use has succeeded.
|
||||||
|
///
|
||||||
|
/// (default implementations: throws an exception)
|
||||||
|
|
||||||
static const Class& get (const std::string& key);
|
static const Class& get (const std::string& key);
|
||||||
///< If there is no class for this \a key, an exception is thrown.
|
///< If there is no class for this \a key, an exception is thrown.
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue