mirror of
https://github.com/TES3MP/openmw-tes3mp.git
synced 2025-03-03 13:19:40 +00:00
Accept a ConstPtr in getBaseFightRating
This commit is contained in:
parent
d120f76031
commit
92a3acfa56
6 changed files with 8 additions and 8 deletions
|
@ -770,9 +770,9 @@ namespace MWClass
|
||||||
store.restock(list, ptr, ptr.getCellRef().getRefId());
|
store.restock(list, ptr, ptr.getCellRef().getRefId());
|
||||||
}
|
}
|
||||||
|
|
||||||
int Creature::getBaseFightRating(const MWWorld::Ptr &ptr) const
|
int Creature::getBaseFightRating(const MWWorld::ConstPtr &ptr) const
|
||||||
{
|
{
|
||||||
MWWorld::LiveCellRef<ESM::Creature> *ref = ptr.get<ESM::Creature>();
|
const MWWorld::LiveCellRef<ESM::Creature> *ref = ptr.get<ESM::Creature>();
|
||||||
return ref->mBase->mAiData.mFight;
|
return ref->mBase->mAiData.mFight;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -129,7 +129,7 @@ namespace MWClass
|
||||||
|
|
||||||
virtual void restock (const MWWorld::Ptr &ptr) const;
|
virtual void restock (const MWWorld::Ptr &ptr) const;
|
||||||
|
|
||||||
virtual int getBaseFightRating(const MWWorld::Ptr &ptr) const;
|
virtual int getBaseFightRating(const MWWorld::ConstPtr &ptr) const;
|
||||||
|
|
||||||
virtual void adjustScale(const MWWorld::Ptr& ptr, osg::Vec3f& scale, bool rendering) const;
|
virtual void adjustScale(const MWWorld::Ptr& ptr, osg::Vec3f& scale, bool rendering) const;
|
||||||
/// @param rendering Indicates if the scale to adjust is for the rendering mesh, or for the collision mesh
|
/// @param rendering Indicates if the scale to adjust is for the rendering mesh, or for the collision mesh
|
||||||
|
|
|
@ -1236,9 +1236,9 @@ namespace MWClass
|
||||||
store.restock(list, ptr, ptr.getCellRef().getRefId());
|
store.restock(list, ptr, ptr.getCellRef().getRefId());
|
||||||
}
|
}
|
||||||
|
|
||||||
int Npc::getBaseFightRating (const MWWorld::Ptr& ptr) const
|
int Npc::getBaseFightRating (const MWWorld::ConstPtr& ptr) const
|
||||||
{
|
{
|
||||||
MWWorld::LiveCellRef<ESM::NPC> *ref = ptr.get<ESM::NPC>();
|
const MWWorld::LiveCellRef<ESM::NPC> *ref = ptr.get<ESM::NPC>();
|
||||||
return ref->mBase->mAiData.mFight;
|
return ref->mBase->mAiData.mFight;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -167,7 +167,7 @@ namespace MWClass
|
||||||
|
|
||||||
virtual void restock (const MWWorld::Ptr& ptr) const;
|
virtual void restock (const MWWorld::Ptr& ptr) const;
|
||||||
|
|
||||||
virtual int getBaseFightRating (const MWWorld::Ptr& ptr) const;
|
virtual int getBaseFightRating (const MWWorld::ConstPtr& ptr) const;
|
||||||
|
|
||||||
virtual std::string getPrimaryFaction(const MWWorld::Ptr &ptr) const;
|
virtual std::string getPrimaryFaction(const MWWorld::Ptr &ptr) const;
|
||||||
virtual int getPrimaryFactionRank(const MWWorld::Ptr &ptr) const;
|
virtual int getPrimaryFactionRank(const MWWorld::Ptr &ptr) const;
|
||||||
|
|
|
@ -433,7 +433,7 @@ namespace MWWorld
|
||||||
return std::string();
|
return std::string();
|
||||||
}
|
}
|
||||||
|
|
||||||
int Class::getBaseFightRating(const Ptr &ptr) const
|
int Class::getBaseFightRating(const ConstPtr &ptr) const
|
||||||
{
|
{
|
||||||
throw std::runtime_error("class does not support fight rating");
|
throw std::runtime_error("class does not support fight rating");
|
||||||
}
|
}
|
||||||
|
|
|
@ -338,7 +338,7 @@ namespace MWWorld
|
||||||
/// Returns sound id
|
/// Returns sound id
|
||||||
virtual std::string getSound(const MWWorld::ConstPtr& ptr) const;
|
virtual std::string getSound(const MWWorld::ConstPtr& ptr) const;
|
||||||
|
|
||||||
virtual int getBaseFightRating (const MWWorld::Ptr& ptr) const;
|
virtual int getBaseFightRating (const MWWorld::ConstPtr& ptr) const;
|
||||||
|
|
||||||
virtual std::string getPrimaryFaction (const MWWorld::Ptr& ptr) const;
|
virtual std::string getPrimaryFaction (const MWWorld::Ptr& ptr) const;
|
||||||
virtual int getPrimaryFactionRank (const MWWorld::Ptr& ptr) const;
|
virtual int getPrimaryFactionRank (const MWWorld::Ptr& ptr) const;
|
||||||
|
|
Loading…
Reference in a new issue