OpenMW
apps/openmw/mwmechanics/mechanicsmanagerimp.hpp
Go to the documentation of this file.
00001 #ifndef GAME_MWMECHANICS_MECHANICSMANAGERIMP_H
00002 #define GAME_MWMECHANICS_MECHANICSMANAGERIMP_H
00003 
00004 #include "../mwbase/mechanicsmanager.hpp"
00005 
00006 #include "../mwworld/ptr.hpp"
00007 
00008 #include "creaturestats.hpp"
00009 #include "npcstats.hpp"
00010 #include "objects.hpp"
00011 #include "actors.hpp"
00012 
00013 namespace Ogre
00014 {
00015     class Vector3;
00016 }
00017 
00018 namespace MWWorld
00019 {
00020     class CellStore;
00021 }
00022 
00023 namespace MWMechanics
00024 {
00025     class MechanicsManager : public MWBase::MechanicsManager
00026     {
00027             MWWorld::Ptr mWatched;
00028             NpcStats mWatchedStats;
00029             bool mUpdatePlayer;
00030             bool mClassSelected;
00031             bool mRaceSelected;
00032             bool mAI;
00033 
00034             Objects mObjects;
00035             Actors mActors;
00036 
00037         public:
00038 
00039             void buildPlayer();
00042 
00043             MechanicsManager();
00044 
00045             virtual void add (const MWWorld::Ptr& ptr);
00047 
00048             virtual void remove (const MWWorld::Ptr& ptr);
00050 
00051             virtual void updateCell(const MWWorld::Ptr &old, const MWWorld::Ptr &ptr);
00053 
00054             virtual void drop(const MWWorld::CellStore *cellStore);
00056 
00057             virtual void watchActor(const MWWorld::Ptr& ptr);
00060 
00061             virtual void update (float duration, bool paused);
00066 
00067             virtual void advanceTime (float duration);
00068 
00069             virtual void setPlayerName (const std::string& name);
00071 
00072             virtual void setPlayerRace (const std::string& id, bool male, const std::string &head, const std::string &hair);
00074 
00075             virtual void setPlayerBirthsign (const std::string& id);
00077 
00078             virtual void setPlayerClass (const std::string& id);
00080 
00081             virtual void setPlayerClass (const ESM::Class& class_);
00083 
00084             virtual void restoreDynamicStats();
00086 
00087             virtual int getBarterOffer(const MWWorld::Ptr& ptr,int basePrice, bool buying);
00089 
00090             virtual int getDerivedDisposition(const MWWorld::Ptr& ptr);
00092 
00093             virtual int countDeaths (const std::string& id) const;
00095 
00096             virtual void getPersuasionDispositionChange (const MWWorld::Ptr& npc, PersuasionType type,
00097                 float currentTemporaryDispositionDelta, bool& success, float& tempChange, float& permChange);
00098             void toLower(std::string npcFaction);
00100 
00101         virtual void forceStateUpdate(const MWWorld::Ptr &ptr);
00102 
00103         virtual void playAnimationGroup(const MWWorld::Ptr& ptr, const std::string& groupName, int mode, int number);
00104         virtual void skipAnimation(const MWWorld::Ptr& ptr);
00105         virtual bool checkAnimationPlaying(const MWWorld::Ptr& ptr, const std::string &groupName);
00106 
00109             virtual void updateMagicEffects (const MWWorld::Ptr& ptr);
00110 
00111         virtual void toggleAI();
00112         virtual bool isAIActive();
00113     };
00114 }
00115 
00116 #endif