OpenMW
|
Interface for game mechanics manager (implemented in MWMechanics) More...
#include <mechanicsmanager.hpp>
Public Types | |
enum | PersuasionType { PT_Admire, PT_Intimidate, PT_Taunt, PT_Bribe10, PT_Bribe100, PT_Bribe1000 } |
Public Member Functions | |
MechanicsManager () | |
virtual | ~MechanicsManager () |
virtual void | add (const MWWorld::Ptr &ptr)=0 |
Register an object for management. | |
virtual void | remove (const MWWorld::Ptr &ptr)=0 |
Deregister an object for management. | |
virtual void | updateCell (const MWWorld::Ptr &old, const MWWorld::Ptr &ptr)=0 |
Moves an object to a new cell. | |
virtual void | drop (const MWWorld::CellStore *cellStore)=0 |
Deregister all objects in the given cell. | |
virtual void | watchActor (const MWWorld::Ptr &ptr)=0 |
virtual void | update (float duration, bool paused)=0 |
virtual void | advanceTime (float duration)=0 |
virtual void | setPlayerName (const std::string &name)=0 |
Set player name. | |
virtual void | setPlayerRace (const std::string &id, bool male, const std::string &head, const std::string &hair)=0 |
Set player race. | |
virtual void | setPlayerBirthsign (const std::string &id)=0 |
Set player birthsign. | |
virtual void | setPlayerClass (const std::string &id)=0 |
Set player class to stock class. | |
virtual void | setPlayerClass (const ESM::Class &class_)=0 |
Set player class to custom class. | |
virtual void | restoreDynamicStats ()=0 |
If the player is sleeping, this should be called every hour. | |
virtual int | getBarterOffer (const MWWorld::Ptr &ptr, int basePrice, bool buying)=0 |
This is used by every service to determine the price of objects given the trading skills of the player and NPC. | |
virtual int | getDerivedDisposition (const MWWorld::Ptr &ptr)=0 |
Calculate the diposition of an NPC toward the player. | |
virtual int | countDeaths (const std::string &id) const =0 |
Return the number of deaths for actors with the given ID. | |
virtual void | getPersuasionDispositionChange (const MWWorld::Ptr &npc, PersuasionType type, float currentTemporaryDispositionDelta, bool &success, float &tempChange, float &permChange)=0 |
Perform a persuasion action on NPC. | |
virtual void | forceStateUpdate (const MWWorld::Ptr &ptr)=0 |
Forces an object to refresh its animation state. | |
virtual void | playAnimationGroup (const MWWorld::Ptr &ptr, const std::string &groupName, int mode, int number=1)=0 |
virtual void | skipAnimation (const MWWorld::Ptr &ptr)=0 |
virtual bool | checkAnimationPlaying (const MWWorld::Ptr &ptr, const std::string &groupName)=0 |
virtual void | updateMagicEffects (const MWWorld::Ptr &ptr)=0 |
virtual void | toggleAI ()=0 |
virtual bool | isAIActive ()=0 |
Private Member Functions | |
MechanicsManager (const MechanicsManager &) | |
not implemented | |
MechanicsManager & | operator= (const MechanicsManager &) |
not implemented |
Interface for game mechanics manager (implemented in MWMechanics)
MWBase::MechanicsManager::MechanicsManager | ( | const MechanicsManager & | ) | [private] |
not implemented
MWBase::MechanicsManager::MechanicsManager | ( | ) | [inline] |
Reimplemented in MWMechanics::MechanicsManager.
virtual MWBase::MechanicsManager::~MechanicsManager | ( | ) | [inline, virtual] |
virtual void MWBase::MechanicsManager::add | ( | const MWWorld::Ptr & | ptr | ) | [pure virtual] |
Register an object for management.
Implemented in MWMechanics::MechanicsManager.
virtual void MWBase::MechanicsManager::advanceTime | ( | float | duration | ) | [pure virtual] |
Implemented in MWMechanics::MechanicsManager.
virtual bool MWBase::MechanicsManager::checkAnimationPlaying | ( | const MWWorld::Ptr & | ptr, |
const std::string & | groupName | ||
) | [pure virtual] |
Implemented in MWMechanics::MechanicsManager.
virtual int MWBase::MechanicsManager::countDeaths | ( | const std::string & | id | ) | const [pure virtual] |
Return the number of deaths for actors with the given ID.
Implemented in MWMechanics::MechanicsManager.
virtual void MWBase::MechanicsManager::drop | ( | const MWWorld::CellStore * | cellStore | ) | [pure virtual] |
Deregister all objects in the given cell.
Implemented in MWMechanics::MechanicsManager.
virtual void MWBase::MechanicsManager::forceStateUpdate | ( | const MWWorld::Ptr & | ptr | ) | [pure virtual] |
Forces an object to refresh its animation state.
Implemented in MWMechanics::MechanicsManager.
virtual int MWBase::MechanicsManager::getBarterOffer | ( | const MWWorld::Ptr & | ptr, |
int | basePrice, | ||
bool | buying | ||
) | [pure virtual] |
This is used by every service to determine the price of objects given the trading skills of the player and NPC.
Implemented in MWMechanics::MechanicsManager.
virtual int MWBase::MechanicsManager::getDerivedDisposition | ( | const MWWorld::Ptr & | ptr | ) | [pure virtual] |
Calculate the diposition of an NPC toward the player.
Implemented in MWMechanics::MechanicsManager.
virtual void MWBase::MechanicsManager::getPersuasionDispositionChange | ( | const MWWorld::Ptr & | npc, |
PersuasionType | type, | ||
float | currentTemporaryDispositionDelta, | ||
bool & | success, | ||
float & | tempChange, | ||
float & | permChange | ||
) | [pure virtual] |
Perform a persuasion action on NPC.
Implemented in MWMechanics::MechanicsManager.
virtual bool MWBase::MechanicsManager::isAIActive | ( | ) | [pure virtual] |
Implemented in MWMechanics::MechanicsManager.
MechanicsManager& MWBase::MechanicsManager::operator= | ( | const MechanicsManager & | ) | [private] |
not implemented
virtual void MWBase::MechanicsManager::playAnimationGroup | ( | const MWWorld::Ptr & | ptr, |
const std::string & | groupName, | ||
int | mode, | ||
int | number = 1 |
||
) | [pure virtual] |
Run animation for a MW-reference. Calls to this function for references that are currently not in the scene should be ignored.
mode | 0 normal, 1 immediate start, 2 immediate loop |
count | How many times the animation should be run |
Implemented in MWMechanics::MechanicsManager.
virtual void MWBase::MechanicsManager::remove | ( | const MWWorld::Ptr & | ptr | ) | [pure virtual] |
Deregister an object for management.
Implemented in MWMechanics::MechanicsManager.
virtual void MWBase::MechanicsManager::restoreDynamicStats | ( | ) | [pure virtual] |
If the player is sleeping, this should be called every hour.
Implemented in MWMechanics::MechanicsManager.
virtual void MWBase::MechanicsManager::setPlayerBirthsign | ( | const std::string & | id | ) | [pure virtual] |
Set player birthsign.
Implemented in MWMechanics::MechanicsManager.
virtual void MWBase::MechanicsManager::setPlayerClass | ( | const std::string & | id | ) | [pure virtual] |
Set player class to stock class.
Implemented in MWMechanics::MechanicsManager.
virtual void MWBase::MechanicsManager::setPlayerClass | ( | const ESM::Class & | class_ | ) | [pure virtual] |
Set player class to custom class.
Implemented in MWMechanics::MechanicsManager.
virtual void MWBase::MechanicsManager::setPlayerName | ( | const std::string & | name | ) | [pure virtual] |
Set player name.
Implemented in MWMechanics::MechanicsManager.
virtual void MWBase::MechanicsManager::setPlayerRace | ( | const std::string & | id, |
bool | male, | ||
const std::string & | head, | ||
const std::string & | hair | ||
) | [pure virtual] |
Set player race.
Implemented in MWMechanics::MechanicsManager.
virtual void MWBase::MechanicsManager::skipAnimation | ( | const MWWorld::Ptr & | ptr | ) | [pure virtual] |
Skip the animation for the given MW-reference for one frame. Calls to this function for references that are currently not in the scene should be ignored.
Implemented in MWMechanics::MechanicsManager.
virtual void MWBase::MechanicsManager::toggleAI | ( | ) | [pure virtual] |
Implemented in MWMechanics::MechanicsManager.
virtual void MWBase::MechanicsManager::update | ( | float | duration, |
bool | paused | ||
) | [pure virtual] |
Update objects
paused | In game type does not currently advance (this usually means some GUI component is up). |
Implemented in MWMechanics::MechanicsManager.
virtual void MWBase::MechanicsManager::updateCell | ( | const MWWorld::Ptr & | old, |
const MWWorld::Ptr & | ptr | ||
) | [pure virtual] |
Moves an object to a new cell.
Implemented in MWMechanics::MechanicsManager.
virtual void MWBase::MechanicsManager::updateMagicEffects | ( | const MWWorld::Ptr & | ptr | ) | [pure virtual] |
Update magic effects for an actor. Usually done automatically once per frame, but if we're currently paused we may want to do it manually (after equipping permanent enchantment)
Implemented in MWMechanics::MechanicsManager.
virtual void MWBase::MechanicsManager::watchActor | ( | const MWWorld::Ptr & | ptr | ) | [pure virtual] |
On each update look for changes in a previously registered actor and update the GUI accordingly.
Implemented in MWMechanics::MechanicsManager.