OpenMW
|
#include <npc.hpp>
Public Member Functions | |
virtual std::string | getId (const MWWorld::Ptr &ptr) const |
Return ID of ptr. | |
virtual void | insertObjectRendering (const MWWorld::Ptr &ptr, MWRender::RenderingInterface &renderingInterface) const |
Add reference into a cell for rendering. | |
virtual void | insertObject (const MWWorld::Ptr &ptr, MWWorld::PhysicsSystem &physics) const |
Add reference into a cell for rendering (default implementation: don't render anything). | |
virtual void | adjustPosition (const MWWorld::Ptr &ptr) const |
Adjust position to stand on ground. Must be called post model load. | |
virtual std::string | getName (const MWWorld::Ptr &ptr) const |
virtual MWMechanics::CreatureStats & | getCreatureStats (const MWWorld::Ptr &ptr) const |
Return creature stats. | |
virtual MWMechanics::NpcStats & | getNpcStats (const MWWorld::Ptr &ptr) const |
Return NPC stats. | |
virtual MWWorld::ContainerStore & | getContainerStore (const MWWorld::Ptr &ptr) const |
Return container store. | |
virtual bool | hasToolTip (const MWWorld::Ptr &ptr) const |
virtual MWGui::ToolTipInfo | getToolTipInfo (const MWWorld::Ptr &ptr) const |
virtual MWWorld::InventoryStore & | getInventoryStore (const MWWorld::Ptr &ptr) const |
Return inventory store. | |
virtual void | hit (const MWWorld::Ptr &ptr, int type) const |
virtual void | onHit (const MWWorld::Ptr &ptr, float damage, bool ishealth, const MWWorld::Ptr &object, const MWWorld::Ptr &attacker, bool successful) const |
virtual void | setActorHealth (const MWWorld::Ptr &ptr, float health, const MWWorld::Ptr &attacker) const |
virtual boost::shared_ptr < MWWorld::Action > | activate (const MWWorld::Ptr &ptr, const MWWorld::Ptr &actor) const |
Generate action for activation. | |
virtual std::string | getScript (const MWWorld::Ptr &ptr) const |
Return name of the script attached to ptr. | |
virtual void | setForceStance (const MWWorld::Ptr &ptr, Stance stance, bool force) const |
Force or unforce a stance. | |
virtual void | setStance (const MWWorld::Ptr &ptr, Stance stance, bool set) const |
Set or unset a stance. | |
virtual bool | getStance (const MWWorld::Ptr &ptr, Stance stance, bool ignoreForce=false) const |
Check if a stance is active or not. | |
virtual float | getSpeed (const MWWorld::Ptr &ptr) const |
Return movement speed. | |
virtual float | getJump (const MWWorld::Ptr &ptr) const |
Return jump velocity (not accounting for movement) | |
virtual float | getFallDamage (const MWWorld::Ptr &ptr, float fallHeight) const |
Return amount of health points lost when falling. | |
virtual MWMechanics::Movement & | getMovementSettings (const MWWorld::Ptr &ptr) const |
Return desired movement. | |
virtual Ogre::Vector3 | getMovementVector (const MWWorld::Ptr &ptr) const |
virtual Ogre::Vector3 | getRotationVector (const MWWorld::Ptr &ptr) const |
Return desired rotations, as euler angles. | |
virtual float | getCapacity (const MWWorld::Ptr &ptr) const |
virtual float | getEncumbrance (const MWWorld::Ptr &ptr) const |
virtual float | getArmorRating (const MWWorld::Ptr &ptr) const |
virtual bool | apply (const MWWorld::Ptr &ptr, const std::string &id, const MWWorld::Ptr &actor) const |
virtual void | adjustScale (const MWWorld::Ptr &ptr, float &scale) const |
virtual void | skillUsageSucceeded (const MWWorld::Ptr &ptr, int skill, int usageType) const |
Inform actor ptr that a skill use has succeeded. | |
virtual void | adjustRotation (const MWWorld::Ptr &ptr, float &x, float &y, float &z) const |
virtual bool | isEssential (const MWWorld::Ptr &ptr) const |
Is ptr essential? (i.e. may losing ptr make the game unwinnable) | |
virtual int | getServices (const MWWorld::Ptr &actor) const |
virtual bool | isPersistent (const MWWorld::Ptr &ptr) const |
virtual std::string | getSoundIdFromSndGen (const MWWorld::Ptr &ptr, const std::string &name) const |
Returns the sound ID for ptr of the given soundgen type. | |
virtual std::string | getModel (const MWWorld::Ptr &ptr) const |
virtual bool | isActor () const |
virtual bool | isNpc () const |
Static Public Member Functions | |
static void | registerSelf () |
Private Member Functions | |
void | ensureCustomData (const MWWorld::Ptr &ptr) const |
virtual MWWorld::Ptr | copyToCellImpl (const MWWorld::Ptr &ptr, MWWorld::CellStore &cell) const |
Static Private Attributes | |
static const ESM::GameSetting * | fMinWalkSpeed |
static const ESM::GameSetting * | fMaxWalkSpeed |
static const ESM::GameSetting * | fEncumberedMoveEffect |
static const ESM::GameSetting * | fSneakSpeedMultiplier |
static const ESM::GameSetting * | fAthleticsRunBonus |
static const ESM::GameSetting * | fBaseRunMultiplier |
static const ESM::GameSetting * | fMinFlySpeed |
static const ESM::GameSetting * | fMaxFlySpeed |
static const ESM::GameSetting * | fSwimRunBase |
static const ESM::GameSetting * | fSwimRunAthleticsMult |
static const ESM::GameSetting * | fJumpEncumbranceBase |
static const ESM::GameSetting * | fJumpEncumbranceMultiplier |
static const ESM::GameSetting * | fJumpAcrobaticsBase |
static const ESM::GameSetting * | fJumpAcroMultiplier |
static const ESM::GameSetting * | fJumpRunMultiplier |
static const ESM::GameSetting * | fWereWolfRunMult |
boost::shared_ptr< MWWorld::Action > MWClass::Npc::activate | ( | const MWWorld::Ptr & | ptr, |
const MWWorld::Ptr & | actor | ||
) | const [virtual] |
Generate action for activation.
Reimplemented from MWWorld::Class.
void MWClass::Npc::adjustPosition | ( | const MWWorld::Ptr & | ptr | ) | const [virtual] |
Adjust position to stand on ground. Must be called post model load.
Reimplemented from MWWorld::Class.
void MWClass::Npc::adjustRotation | ( | const MWWorld::Ptr & | ptr, |
float & | x, | ||
float & | y, | ||
float & | z | ||
) | const [virtual] |
Reimplemented from MWWorld::Class.
void MWClass::Npc::adjustScale | ( | const MWWorld::Ptr & | ptr, |
float & | scale | ||
) | const [virtual] |
Reimplemented from MWWorld::Class.
bool MWClass::Npc::apply | ( | const MWWorld::Ptr & | ptr, |
const std::string & | id, | ||
const MWWorld::Ptr & | actor | ||
) | const [virtual] |
Apply id on ptr.
actor | Actor that is resposible for the ID being applied to ptr. |
Reimplemented from MWWorld::Class.
MWWorld::Ptr MWClass::Npc::copyToCellImpl | ( | const MWWorld::Ptr & | ptr, |
MWWorld::CellStore & | cell | ||
) | const [private, virtual] |
Reimplemented from MWWorld::Class.
void MWClass::Npc::ensureCustomData | ( | const MWWorld::Ptr & | ptr | ) | const [private] |
float MWClass::Npc::getArmorRating | ( | const MWWorld::Ptr & | ptr | ) | const [virtual] |
Reimplemented from MWWorld::Class.
float MWClass::Npc::getCapacity | ( | const MWWorld::Ptr & | ptr | ) | const [virtual] |
Return total weight that fits into the object. Throws an exception, if the object can't hold other objects.
Reimplemented from MWWorld::Class.
MWWorld::ContainerStore & MWClass::Npc::getContainerStore | ( | const MWWorld::Ptr & | ptr | ) | const [virtual] |
Return container store.
Reimplemented from MWWorld::Class.
MWMechanics::CreatureStats & MWClass::Npc::getCreatureStats | ( | const MWWorld::Ptr & | ptr | ) | const [virtual] |
Return creature stats.
Reimplemented from MWWorld::Class.
float MWClass::Npc::getEncumbrance | ( | const MWWorld::Ptr & | ptr | ) | const [virtual] |
Returns total weight of objects inside this object (including modifications from magic effects). Throws an exception, if the object can't hold other objects.
Reimplemented from MWWorld::Class.
float MWClass::Npc::getFallDamage | ( | const MWWorld::Ptr & | ptr, |
float | fallHeight | ||
) | const [virtual] |
Return amount of health points lost when falling.
Reimplemented from MWWorld::Class.
std::string MWClass::Npc::getId | ( | const MWWorld::Ptr & | ptr | ) | const [virtual] |
Return ID of ptr.
Reimplemented from MWWorld::Class.
MWWorld::InventoryStore & MWClass::Npc::getInventoryStore | ( | const MWWorld::Ptr & | ptr | ) | const [virtual] |
Return inventory store.
Reimplemented from MWWorld::Class.
float MWClass::Npc::getJump | ( | const MWWorld::Ptr & | ptr | ) | const [virtual] |
Return jump velocity (not accounting for movement)
Reimplemented from MWWorld::Class.
std::string MWClass::Npc::getModel | ( | const MWWorld::Ptr & | ptr | ) | const [virtual] |
Reimplemented from MWWorld::Class.
MWMechanics::Movement & MWClass::Npc::getMovementSettings | ( | const MWWorld::Ptr & | ptr | ) | const [virtual] |
Return desired movement.
Reimplemented from MWWorld::Class.
Ogre::Vector3 MWClass::Npc::getMovementVector | ( | const MWWorld::Ptr & | ptr | ) | const [virtual] |
Return desired movement vector (determined based on movement settings, stance and stats).
Reimplemented from MWWorld::Class.
std::string MWClass::Npc::getName | ( | const MWWorld::Ptr & | ptr | ) | const [virtual] |
Implements MWWorld::Class.
MWMechanics::NpcStats & MWClass::Npc::getNpcStats | ( | const MWWorld::Ptr & | ptr | ) | const [virtual] |
Return NPC stats.
Reimplemented from MWWorld::Class.
Ogre::Vector3 MWClass::Npc::getRotationVector | ( | const MWWorld::Ptr & | ptr | ) | const [virtual] |
Return desired rotations, as euler angles.
Reimplemented from MWWorld::Class.
std::string MWClass::Npc::getScript | ( | const MWWorld::Ptr & | ptr | ) | const [virtual] |
Return name of the script attached to ptr.
Reimplemented from MWWorld::Class.
int MWClass::Npc::getServices | ( | const MWWorld::Ptr & | actor | ) | const [virtual] |
Reimplemented from MWWorld::Class.
std::string MWClass::Npc::getSoundIdFromSndGen | ( | const MWWorld::Ptr & | ptr, |
const std::string & | type | ||
) | const [virtual] |
Returns the sound ID for ptr of the given soundgen type.
Reimplemented from MWWorld::Class.
float MWClass::Npc::getSpeed | ( | const MWWorld::Ptr & | ptr | ) | const [virtual] |
Return movement speed.
Reimplemented from MWWorld::Class.
bool MWClass::Npc::getStance | ( | const MWWorld::Ptr & | ptr, |
Stance | stance, | ||
bool | ignoreForce = false |
||
) | const [virtual] |
Check if a stance is active or not.
Reimplemented from MWWorld::Class.
MWGui::ToolTipInfo MWClass::Npc::getToolTipInfo | ( | const MWWorld::Ptr & | ptr | ) | const [virtual] |
Reimplemented from MWWorld::Class.
bool MWClass::Npc::hasToolTip | ( | const MWWorld::Ptr & | ptr | ) | const [virtual] |
Reimplemented from MWWorld::Class.
void MWClass::Npc::hit | ( | const MWWorld::Ptr & | ptr, |
int | type | ||
) | const [virtual] |
Execute a melee hit, using the current weapon. This will check the relevant skills of the given attacker, and whoever is hit.
type | - type of attack, one of the MWMechanics::CreatureStats::AttackType enums. ignored for creature attacks. (default implementation: throw an exceoption) |
Reimplemented from MWWorld::Class.
void MWClass::Npc::insertObject | ( | const MWWorld::Ptr & | ptr, |
MWWorld::PhysicsSystem & | physics | ||
) | const [virtual] |
Add reference into a cell for rendering (default implementation: don't render anything).
Reimplemented from MWWorld::Class.
void MWClass::Npc::insertObjectRendering | ( | const MWWorld::Ptr & | ptr, |
MWRender::RenderingInterface & | renderingInterface | ||
) | const [virtual] |
Add reference into a cell for rendering.
Reimplemented from MWWorld::Class.
virtual bool MWClass::Npc::isActor | ( | ) | const [inline, virtual] |
Reimplemented from MWWorld::Class.
bool MWClass::Npc::isEssential | ( | const MWWorld::Ptr & | ptr | ) | const [virtual] |
Is ptr essential? (i.e. may losing ptr make the game unwinnable)
Reimplemented from MWWorld::Class.
virtual bool MWClass::Npc::isNpc | ( | ) | const [inline, virtual] |
Reimplemented from MWWorld::Class.
bool MWClass::Npc::isPersistent | ( | const MWWorld::Ptr & | ptr | ) | const [virtual] |
Reimplemented from MWWorld::Class.
void MWClass::Npc::onHit | ( | const MWWorld::Ptr & | ptr, |
float | damage, | ||
bool | ishealth, | ||
const MWWorld::Ptr & | object, | ||
const MWWorld::Ptr & | attacker, | ||
bool | successful | ||
) | const [virtual] |
Alerts ptr that it's being hit for damage points to health if ishealth is true (else fatigue) by object (sword, arrow, etc). attacker specifies the actor responsible for the attack, and successful specifies if the hit is successful or not.
Reimplemented from MWWorld::Class.
void MWClass::Npc::registerSelf | ( | ) | [static] |
void MWClass::Npc::setActorHealth | ( | const MWWorld::Ptr & | ptr, |
float | health, | ||
const MWWorld::Ptr & | attacker | ||
) | const [virtual] |
Sets a new current health value for the actor, optionally specifying the object causing the change. Use this instead of using CreatureStats directly as this will make sure the correct dialog and actor states are properly handled when being hurt or healed. (default implementation: throw an exceoption)
Reimplemented from MWWorld::Class.
void MWClass::Npc::setForceStance | ( | const MWWorld::Ptr & | ptr, |
Stance | stance, | ||
bool | force | ||
) | const [virtual] |
Force or unforce a stance.
Reimplemented from MWWorld::Class.
void MWClass::Npc::setStance | ( | const MWWorld::Ptr & | ptr, |
Stance | stance, | ||
bool | set | ||
) | const [virtual] |
Set or unset a stance.
Reimplemented from MWWorld::Class.
void MWClass::Npc::skillUsageSucceeded | ( | const MWWorld::Ptr & | ptr, |
int | skill, | ||
int | usageType | ||
) | const [virtual] |
Inform actor ptr that a skill use has succeeded.
Reimplemented from MWWorld::Class.
const ESM::GameSetting * MWClass::Npc::fAthleticsRunBonus [static, private] |
const ESM::GameSetting * MWClass::Npc::fBaseRunMultiplier [static, private] |
const ESM::GameSetting * MWClass::Npc::fEncumberedMoveEffect [static, private] |
const ESM::GameSetting * MWClass::Npc::fJumpAcrobaticsBase [static, private] |
const ESM::GameSetting * MWClass::Npc::fJumpAcroMultiplier [static, private] |
const ESM::GameSetting * MWClass::Npc::fJumpEncumbranceBase [static, private] |
const ESM::GameSetting * MWClass::Npc::fJumpEncumbranceMultiplier [static, private] |
const ESM::GameSetting * MWClass::Npc::fJumpRunMultiplier [static, private] |
const ESM::GameSetting * MWClass::Npc::fMaxFlySpeed [static, private] |
const ESM::GameSetting * MWClass::Npc::fMaxWalkSpeed [static, private] |
const ESM::GameSetting * MWClass::Npc::fMinFlySpeed [static, private] |
const ESM::GameSetting * MWClass::Npc::fMinWalkSpeed [static, private] |
const ESM::GameSetting * MWClass::Npc::fSneakSpeedMultiplier [static, private] |
const ESM::GameSetting * MWClass::Npc::fSwimRunAthleticsMult [static, private] |
const ESM::GameSetting * MWClass::Npc::fSwimRunBase [static, private] |
const ESM::GameSetting * MWClass::Npc::fWereWolfRunMult [static, private] |