forked from mirror/openmw-tes3mp
Accept a ConstPtr in getServices
This commit is contained in:
parent
648ee6e7fb
commit
09bdb0ad4b
6 changed files with 8 additions and 8 deletions
|
@ -545,9 +545,9 @@ namespace MWClass
|
||||||
return static_cast<float>(stats.getAttribute(0).getModified() * 5);
|
return static_cast<float>(stats.getAttribute(0).getModified() * 5);
|
||||||
}
|
}
|
||||||
|
|
||||||
int Creature::getServices(const MWWorld::Ptr &actor) const
|
int Creature::getServices(const MWWorld::ConstPtr &actor) const
|
||||||
{
|
{
|
||||||
MWWorld::LiveCellRef<ESM::Creature>* ref = actor.get<ESM::Creature>();
|
const MWWorld::LiveCellRef<ESM::Creature>* ref = actor.get<ESM::Creature>();
|
||||||
if (ref->mBase->mHasAI)
|
if (ref->mBase->mHasAI)
|
||||||
return ref->mBase->mAiData.mServices;
|
return ref->mBase->mAiData.mServices;
|
||||||
else
|
else
|
||||||
|
|
|
@ -86,7 +86,7 @@ namespace MWClass
|
||||||
virtual bool isEssential (const MWWorld::ConstPtr& ptr) const;
|
virtual bool isEssential (const MWWorld::ConstPtr& ptr) const;
|
||||||
///< Is \a ptr essential? (i.e. may losing \a ptr make the game unwinnable)
|
///< Is \a ptr essential? (i.e. may losing \a ptr make the game unwinnable)
|
||||||
|
|
||||||
virtual int getServices (const MWWorld::Ptr& actor) const;
|
virtual int getServices (const MWWorld::ConstPtr& actor) const;
|
||||||
|
|
||||||
virtual bool isPersistent (const MWWorld::ConstPtr& ptr) const;
|
virtual bool isPersistent (const MWWorld::ConstPtr& ptr) const;
|
||||||
|
|
||||||
|
|
|
@ -1046,9 +1046,9 @@ namespace MWClass
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
int Npc::getServices(const MWWorld::Ptr &actor) const
|
int Npc::getServices(const MWWorld::ConstPtr &actor) const
|
||||||
{
|
{
|
||||||
MWWorld::LiveCellRef<ESM::NPC>* ref = actor.get<ESM::NPC>();
|
const MWWorld::LiveCellRef<ESM::NPC>* ref = actor.get<ESM::NPC>();
|
||||||
if (ref->mBase->mHasAI)
|
if (ref->mBase->mHasAI)
|
||||||
return ref->mBase->mAiData.mServices;
|
return ref->mBase->mAiData.mServices;
|
||||||
else
|
else
|
||||||
|
|
|
@ -117,7 +117,7 @@ namespace MWClass
|
||||||
virtual bool isEssential (const MWWorld::ConstPtr& ptr) const;
|
virtual bool isEssential (const MWWorld::ConstPtr& ptr) const;
|
||||||
///< Is \a ptr essential? (i.e. may losing \a ptr make the game unwinnable)
|
///< Is \a ptr essential? (i.e. may losing \a ptr make the game unwinnable)
|
||||||
|
|
||||||
virtual int getServices (const MWWorld::Ptr& actor) const;
|
virtual int getServices (const MWWorld::ConstPtr& actor) const;
|
||||||
|
|
||||||
virtual bool isPersistent (const MWWorld::ConstPtr& ptr) const;
|
virtual bool isPersistent (const MWWorld::ConstPtr& ptr) const;
|
||||||
|
|
||||||
|
|
|
@ -60,7 +60,7 @@ namespace MWWorld
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
int Class::getServices(const Ptr &actor) const
|
int Class::getServices(const ConstPtr &actor) const
|
||||||
{
|
{
|
||||||
throw std::runtime_error ("class does not have services");
|
throw std::runtime_error ("class does not have services");
|
||||||
}
|
}
|
||||||
|
|
|
@ -264,7 +264,7 @@ namespace MWWorld
|
||||||
virtual bool canSell (const MWWorld::ConstPtr& item, int npcServices) const;
|
virtual bool canSell (const MWWorld::ConstPtr& item, int npcServices) const;
|
||||||
///< Determine whether or not \a item can be sold to an npc with the given \a npcServices
|
///< Determine whether or not \a item can be sold to an npc with the given \a npcServices
|
||||||
|
|
||||||
virtual int getServices (const MWWorld::Ptr& actor) const;
|
virtual int getServices (const MWWorld::ConstPtr& actor) const;
|
||||||
|
|
||||||
virtual std::string getModel(const MWWorld::ConstPtr &ptr) const;
|
virtual std::string getModel(const MWWorld::ConstPtr &ptr) const;
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue