1 #ifndef GAME_MWBASE_MECHANICSMANAGER_H
2 #define GAME_MWBASE_MECHANICSMANAGER_H
68 virtual void update (
float duration,
bool paused) = 0;
79 virtual void setPlayerRace (
const std::string&
id,
bool male,
const std::string &head,
const std::string &hair) = 0;
91 virtual void rest(
bool sleep) = 0;
104 virtual int countDeaths (
const std::string&
id)
const = 0;
130 OffenseType type,
int arg=0,
bool victimAware=
false) = 0;
189 virtual void getObjectsInRange (
const osg::Vec3f& position,
float radius, std::vector<MWWorld::Ptr>& objects) = 0;
190 virtual void getActorsInRange(
const osg::Vec3f &position,
float radius, std::vector<MWWorld::Ptr> &objects) = 0;
216 virtual void clear() = 0;
229 virtual std::vector<std::pair<std::string, int> >
getStolenItemOwners(
const std::string& itemid) = 0;
232 virtual bool isItemStolenFrom(
const std::string& itemid,
const std::string& ownerid) = 0;
virtual int getHoursToRest() const =0
Calculate how many hours the player needs to rest in order to be fully healed.
Definition: mechanicsmanager.hpp:150
Encapsulated variant of ESM::CellRef with change tracking.
Definition: cellref.hpp:15
MechanicsManager & operator=(const MechanicsManager &)
not implemented
virtual void setPlayerRace(const std::string &id, bool male, const std::string &head, const std::string &hair)=0
Set player race.
virtual void update(float duration, bool paused)=0
virtual void setPlayerClass(const std::string &id)=0
Set player class to stock class.
virtual void keepPlayerAlive()=0
Resurrects the player if necessary.
virtual int countSavedGameRecords() const =0
virtual void setPlayerBirthsign(const std::string &id)=0
Set player birthsign.
virtual std::list< MWWorld::Ptr > getEnemiesNearby(const MWWorld::Ptr &actor)=0
Definition: esmreader.hpp:21
virtual void setWerewolf(const MWWorld::Ptr &actor, bool werewolf)=0
Turn actor into werewolf or normal form.
PersuasionType
Definition: mechanicsmanager.hpp:148
virtual void setPlayerName(const std::string &name)=0
Set player name.
virtual void cleanupSummonedCreature(const MWWorld::Ptr &caster, int creatureActorId)=0
virtual bool checkAnimationPlaying(const MWWorld::Ptr &ptr, const std::string &groupName)=0
virtual bool isReadyToBlock(const MWWorld::Ptr &ptr) const =0
Definition: mechanicsmanager.hpp:152
virtual bool isItemStolenFrom(const std::string &itemid, const std::string &ownerid)=0
Has the player stolen this item from the given owner?
virtual bool isAggressive(const MWWorld::Ptr &ptr, const MWWorld::Ptr &target)=0
Definition: mechanicsmanager.hpp:120
Definition: mechanicsmanager.hpp:119
virtual void persistAnimationStates()=0
Save the current animation state of managed references to their RefData.
Definition: loadinglistener.hpp:8
virtual bool actorAttacked(const MWWorld::Ptr &victim, const MWWorld::Ptr &attacker)=0
MechanicsManager()
Definition: mechanicsmanager.hpp:48
Definition: esmwriter.hpp:17
virtual bool awarenessCheck(const MWWorld::Ptr &ptr, const MWWorld::Ptr &observer)=0
Check if observer is potentially aware of ptr. Does not do a line of sight check! ...
virtual void actorKilled(const MWWorld::Ptr &victim, const MWWorld::Ptr &attacker)=0
virtual void getObjectsInRange(const osg::Vec3f &position, float radius, std::vector< MWWorld::Ptr > &objects)=0
virtual void getActorsInRange(const osg::Vec3f &position, float radius, std::vector< MWWorld::Ptr > &objects)=0
virtual void getPersuasionDispositionChange(const MWWorld::Ptr &npc, PersuasionType type, bool &success, float &tempChange, float &permChange)=0
Perform a persuasion action on NPC.
virtual int countDeaths(const std::string &id) const =0
Return the number of deaths for actors with the given ID.
virtual std::list< int > getActorsFollowingIndices(const MWWorld::Ptr &actor)=0
virtual void skipAnimation(const MWWorld::Ptr &ptr)=0
Definition: mechanicsmanager.hpp:151
virtual void drop(const MWWorld::CellStore *cellStore)=0
Deregister all objects in the given cell.
virtual void updateCell(const MWWorld::Ptr &old, const MWWorld::Ptr &ptr)=0
Moves an object to a new cell.
virtual int getDerivedDisposition(const MWWorld::Ptr &ptr, bool addTemporaryDispositionChange=true)=0
Calculate the diposition of an NPC toward the player.
virtual void updateMagicEffects(const MWWorld::Ptr &ptr)=0
virtual void objectOpened(const MWWorld::Ptr &ptr, const MWWorld::Ptr &item)=0
Utility to check if opening (i.e. unlocking) this object is illegal and calling commitCrime if so...
Mutable state of a cell.
Definition: cellstore.hpp:53
virtual bool playAnimationGroup(const MWWorld::Ptr &ptr, const std::string &groupName, int mode, int number=1, bool persist=false)=0
virtual void advanceTime(float duration)=0
virtual std::list< MWWorld::Ptr > getActorsFollowing(const MWWorld::Ptr &actor)=0
virtual void itemTaken(const MWWorld::Ptr &ptr, const MWWorld::Ptr &item, const MWWorld::Ptr &container, int count)=0
virtual void rest(bool sleep)=0
Definition: mechanicsmanager.hpp:117
virtual std::list< MWWorld::Ptr > getActorsSidingWith(const MWWorld::Ptr &actor)=0
Returns the list of actors which are siding with the given actor in fights.
virtual void applyWerewolfAcrobatics(const MWWorld::Ptr &actor)=0
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 playe...
virtual void watchActor(const MWWorld::Ptr &ptr)=0
virtual bool toggleAI()=0
Definition: mechanicsmanager.hpp:153
virtual bool commitCrime(const MWWorld::Ptr &ptr, const MWWorld::Ptr &victim, OffenseType type, int arg=0, bool victimAware=false)=0
virtual bool isAllowedToUse(const MWWorld::Ptr &ptr, const MWWorld::CellRef &cellref, MWWorld::Ptr &victim)=0
Definition: loadclas.hpp:18
virtual void confiscateStolenItems(const MWWorld::Ptr &player, const MWWorld::Ptr &targetContainer)=0
Interface for game mechanics manager (implemented in MWMechanics)
Definition: mechanicsmanager.hpp:38
Definition: mechanicsmanager.hpp:118
virtual std::vector< std::pair< std::string, int > > getStolenItemOwners(const std::string &itemid)=0
virtual void forceStateUpdate(const MWWorld::Ptr &ptr)=0
Forces an object to refresh its animation state.
Pointer to a LiveCellRef.
Definition: ptr.hpp:19
Definition: mechanicsmanager.hpp:154
virtual void add(const MWWorld::Ptr &ptr)=0
Register an object for management.
Definition: mechanicsmanager.hpp:116
Definition: mechanicsmanager.hpp:115
Definition: mechanicsmanager.hpp:155
virtual std::list< MWWorld::Ptr > getActorsFighting(const MWWorld::Ptr &actor)=0
Returns a list of actors who are fighting the given actor within the fAlarmDistance.
virtual void playerLoaded()=0
virtual ~MechanicsManager()
Definition: mechanicsmanager.hpp:50
virtual bool sleepInBed(const MWWorld::Ptr &ptr, const MWWorld::Ptr &bed)=0
virtual void startCombat(const MWWorld::Ptr &ptr, const MWWorld::Ptr &target)=0
Makes ptr fight target. Also shouts a combat taunt.
OffenseType
Definition: mechanicsmanager.hpp:113
virtual void write(ESM::ESMWriter &writer, Loading::Listener &listener) const =0
virtual bool isAIActive()=0
const char * name
Definition: crashcatcher.cpp:59
virtual void readRecord(ESM::ESMReader &reader, uint32_t type)=0