1 #ifndef GAME_MWMECHANICS_MECHANICSMANAGERIMP_H
2 #define GAME_MWMECHANICS_MECHANICSMANAGERIMP_H
4 #include "../mwbase/mechanicsmanager.hpp"
6 #include "../mwworld/ptr.hpp"
42 typedef std::pair<std::string, bool>
Owner;
71 virtual void update (
float duration,
bool paused);
82 virtual void setPlayerRace (
const std::string&
id,
bool male,
const std::string &head,
const std::string &hair);
94 virtual void rest(
bool sleep);
107 virtual int countDeaths (
const std::string&
id)
const;
127 OffenseType type,
int arg=0,
bool victimAware=
false);
158 virtual void getObjectsInRange (
const osg::Vec3f& position,
float radius, std::vector<MWWorld::Ptr>& objects);
159 virtual void getActorsInRange(
const osg::Vec3f &position,
float radius, std::vector<MWWorld::Ptr> &objects);
184 virtual void clear();
196 virtual std::vector<std::pair<std::string, int> >
getStolenItemOwners(
const std::string& itemid);
199 virtual bool isItemStolenFrom(
const std::string& itemid,
const std::string& ownerid);
DynamicStat< float > mWatchedHealth
Definition: mechanicsmanagerimp.hpp:27
virtual bool isReadyToBlock(const MWWorld::Ptr &ptr) const
Definition: mechanicsmanagerimp.cpp:1504
virtual int getDerivedDisposition(const MWWorld::Ptr &ptr, bool addTemporaryDispositionChange=true)
Calculate the diposition of an NPC toward the player.
Definition: mechanicsmanagerimp.cpp:504
DynamicStat< float > mWatchedMagicka
Definition: mechanicsmanagerimp.hpp:28
Encapsulated variant of ESM::CellRef with change tracking.
Definition: cellref.hpp:15
virtual int getBarterOffer(const MWWorld::Ptr &ptr, int basePrice, bool buying)
This is used by every service to determine the price of objects given the trading skills of the playe...
Definition: mechanicsmanagerimp.cpp:583
virtual void setPlayerName(const std::string &name)
Set player name.
Definition: mechanicsmanagerimp.cpp:433
virtual std::list< MWWorld::Ptr > getEnemiesNearby(const MWWorld::Ptr &actor)
Definition: mechanicsmanagerimp.cpp:1424
virtual bool toggleAI()
Definition: mechanicsmanagerimp.cpp:801
bool mUpdatePlayer
Definition: mechanicsmanagerimp.hpp:34
Definition: esmreader.hpp:21
Definition: actors.hpp:25
PersuasionType
Definition: mechanicsmanager.hpp:148
virtual bool isAllowedToUse(const MWWorld::Ptr &ptr, const MWWorld::CellRef &cellref, MWWorld::Ptr &victim)
Definition: mechanicsmanagerimp.cpp:820
virtual bool playAnimationGroup(const MWWorld::Ptr &ptr, const std::string &groupName, int mode, int number, bool persist=false)
Definition: mechanicsmanagerimp.cpp:768
StolenItemsMap mStolenItems
Definition: mechanicsmanagerimp.hpp:45
virtual void add(const MWWorld::Ptr &ptr)
Register an object for management.
Definition: mechanicsmanagerimp.cpp:242
virtual void drop(const MWWorld::CellStore *cellStore)
Deregister all objects in the given cell.
Definition: mechanicsmanagerimp.cpp:270
virtual void skipAnimation(const MWWorld::Ptr &ptr)
Definition: mechanicsmanagerimp.cpp:775
virtual void advanceTime(float duration)
Definition: mechanicsmanagerimp.cpp:282
virtual void actorKilled(const MWWorld::Ptr &victim, const MWWorld::Ptr &attacker)
Definition: mechanicsmanagerimp.cpp:1270
virtual void setPlayerBirthsign(const std::string &id)
Set player birthsign.
Definition: mechanicsmanagerimp.cpp:465
virtual bool sleepInBed(const MWWorld::Ptr &ptr, const MWWorld::Ptr &bed)
Definition: mechanicsmanagerimp.cpp:849
Definition: loadinglistener.hpp:8
virtual void readRecord(ESM::ESMReader &reader, uint32_t type)
Definition: mechanicsmanagerimp.cpp:1453
virtual std::vector< std::pair< std::string, int > > getStolenItemOwners(const std::string &itemid)
Definition: mechanicsmanagerimp.cpp:883
Definition: objects.hpp:17
virtual int getHoursToRest() const
Calculate how many hours the player needs to rest in order to be fully healed.
Definition: mechanicsmanagerimp.cpp:428
virtual bool isAggressive(const MWWorld::Ptr &ptr, const MWWorld::Ptr &target)
Definition: mechanicsmanagerimp.cpp:1473
virtual void clear()
Definition: mechanicsmanagerimp.cpp:1465
virtual void confiscateStolenItems(const MWWorld::Ptr &player, const MWWorld::Ptr &targetContainer)
Definition: mechanicsmanagerimp.cpp:908
Definition: esmwriter.hpp:17
virtual void itemTaken(const MWWorld::Ptr &ptr, const MWWorld::Ptr &item, const MWWorld::Ptr &container, int count)
Definition: mechanicsmanagerimp.cpp:938
virtual void getPersuasionDispositionChange(const MWWorld::Ptr &npc, PersuasionType type, bool &success, float &tempChange, float &permChange)
Perform a persuasion action on NPC.
Definition: mechanicsmanagerimp.cpp:625
bool mClassSelected
Definition: mechanicsmanagerimp.hpp:35
void reportCrime(const MWWorld::Ptr &ptr, const MWWorld::Ptr &victim, OffenseType type, int arg=0)
Definition: mechanicsmanagerimp.cpp:1047
virtual std::list< MWWorld::Ptr > getActorsSidingWith(const MWWorld::Ptr &actor)
Returns the list of actors which are siding with the given actor in fights.
Definition: mechanicsmanagerimp.cpp:1405
virtual void rest(bool sleep)
Definition: mechanicsmanagerimp.cpp:423
virtual int countDeaths(const std::string &id) const
Return the number of deaths for actors with the given ID.
Definition: mechanicsmanagerimp.cpp:620
virtual bool awarenessCheck(const MWWorld::Ptr &ptr, const MWWorld::Ptr &observer)
Check if observer is potentially aware of ptr. Does not do a line of sight check! ...
Definition: mechanicsmanagerimp.cpp:1291
virtual void startCombat(const MWWorld::Ptr &ptr, const MWWorld::Ptr &target)
Makes ptr fight target. Also shouts a combat taunt.
Definition: mechanicsmanagerimp.cpp:1364
std::map< Owner, int > OwnerMap
Definition: mechanicsmanagerimp.hpp:43
bool mRaceSelected
Definition: mechanicsmanagerimp.hpp:36
bool mAI
is AI active?
Definition: mechanicsmanagerimp.hpp:37
virtual void updateMagicEffects(const MWWorld::Ptr &ptr)
Definition: mechanicsmanagerimp.cpp:796
DynamicStat< float > mWatchedFatigue
Definition: mechanicsmanagerimp.hpp:29
virtual bool isItemStolenFrom(const std::string &itemid, const std::string &ownerid)
Has the player stolen this item from the given owner?
Definition: mechanicsmanagerimp.cpp:898
virtual void updateCell(const MWWorld::Ptr &old, const MWWorld::Ptr &ptr)
Moves an object to a new cell.
Definition: mechanicsmanagerimp.cpp:258
virtual bool checkAnimationPlaying(const MWWorld::Ptr &ptr, const std::string &groupName)
Definition: mechanicsmanagerimp.cpp:782
Mutable state of a cell.
Definition: cellstore.hpp:53
virtual void watchActor(const MWWorld::Ptr &ptr)
Definition: mechanicsmanagerimp.cpp:277
bool mWatchedStatsEmpty
Definition: mechanicsmanagerimp.hpp:33
virtual int countSavedGameRecords() const
Definition: mechanicsmanagerimp.cpp:1436
virtual void playerLoaded()
Definition: mechanicsmanagerimp.cpp:812
virtual bool actorAttacked(const MWWorld::Ptr &victim, const MWWorld::Ptr &attacker)
Definition: mechanicsmanagerimp.cpp:1223
MechanicsManager()
Definition: mechanicsmanagerimp.cpp:235
virtual void write(ESM::ESMWriter &writer, Loading::Listener &listener) const
Definition: mechanicsmanagerimp.cpp:1442
Actors mActors
Definition: mechanicsmanagerimp.hpp:40
virtual std::list< MWWorld::Ptr > getActorsFollowing(const MWWorld::Ptr &actor)
Definition: mechanicsmanagerimp.cpp:1410
virtual void update(float duration, bool paused)
Definition: mechanicsmanagerimp.cpp:290
virtual void setPlayerRace(const std::string &id, bool male, const std::string &head, const std::string &hair)
Set player race.
Definition: mechanicsmanagerimp.cpp:446
Definition: mechanicsmanagerimp.hpp:20
virtual bool commitCrime(const MWWorld::Ptr &ptr, const MWWorld::Ptr &victim, OffenseType type, int arg=0, bool victimAware=false)
Definition: mechanicsmanagerimp.cpp:981
virtual void keepPlayerAlive()
Resurrects the player if necessary.
Definition: mechanicsmanagerimp.cpp:1496
virtual void persistAnimationStates()
Save the current animation state of managed references to their RefData.
Definition: mechanicsmanagerimp.cpp:790
virtual void setWerewolf(const MWWorld::Ptr &actor, bool werewolf)
Turn actor into werewolf or normal form.
Definition: mechanicsmanagerimp.cpp:1509
Objects mObjects
Definition: mechanicsmanagerimp.hpp:39
Definition: loadclas.hpp:18
virtual std::list< int > getActorsFollowingIndices(const MWWorld::Ptr &actor)
Definition: mechanicsmanagerimp.cpp:1415
Interface for game mechanics manager (implemented in MWMechanics)
Definition: mechanicsmanager.hpp:38
virtual void applyWerewolfAcrobatics(const MWWorld::Ptr &actor)
Definition: mechanicsmanagerimp.cpp:1604
void buildPlayer()
Definition: mechanicsmanagerimp.cpp:69
virtual bool isAIActive()
Definition: mechanicsmanagerimp.cpp:807
Pointer to a LiveCellRef.
Definition: ptr.hpp:19
virtual void forceStateUpdate(const MWWorld::Ptr &ptr)
Forces an object to refresh its animation state.
Definition: mechanicsmanagerimp.cpp:762
virtual void getActorsInRange(const osg::Vec3f &position, float radius, std::vector< MWWorld::Ptr > &objects)
Definition: mechanicsmanagerimp.cpp:1400
std::map< std::string, OwnerMap > StolenItemsMap
Definition: mechanicsmanagerimp.hpp:44
virtual void cleanupSummonedCreature(const MWWorld::Ptr &caster, int creatureActorId)
Definition: mechanicsmanagerimp.cpp:1612
virtual void setPlayerClass(const std::string &id)
Set player class to stock class.
Definition: mechanicsmanagerimp.cpp:472
MWWorld::Ptr mWatched
Definition: mechanicsmanagerimp.hpp:22
SkillValue mWatchedSkills[27]
Definition: mechanicsmanagerimp.hpp:25
virtual std::list< MWWorld::Ptr > getActorsFighting(const MWWorld::Ptr &actor)
Returns a list of actors who are fighting the given actor within the fAlarmDistance.
Definition: mechanicsmanagerimp.cpp:1420
virtual void getObjectsInRange(const osg::Vec3f &position, float radius, std::vector< MWWorld::Ptr > &objects)
Definition: mechanicsmanagerimp.cpp:1394
OffenseType
Definition: mechanicsmanager.hpp:113
std::pair< std::string, bool > Owner
Definition: mechanicsmanagerimp.hpp:42
float mWatchedTimeToStartDrowning
Definition: mechanicsmanagerimp.hpp:31
AttributeValue mWatchedAttributes[8]
Definition: mechanicsmanagerimp.hpp:24
const char * name
Definition: crashcatcher.cpp:59
virtual void objectOpened(const MWWorld::Ptr &ptr, const MWWorld::Ptr &item)
Utility to check if opening (i.e. unlocking) this object is illegal and calling commitCrime if so...
Definition: mechanicsmanagerimp.cpp:875