mirror of
https://github.com/OpenMW/openmw.git
synced 2025-12-01 17:34:33 +00:00
Unnecessary ptrClass
This commit is contained in:
parent
cef1807536
commit
87e41425bb
1 changed files with 3 additions and 6 deletions
|
|
@ -302,8 +302,7 @@ namespace MWScript
|
||||||
std::string_view InterpreterContext::getNPCFaction() const
|
std::string_view InterpreterContext::getNPCFaction() const
|
||||||
{
|
{
|
||||||
const MWWorld::Ptr& ptr = getReferenceImp();
|
const MWWorld::Ptr& ptr = getReferenceImp();
|
||||||
const MWWorld::Class& ptrClass = ptr.getClass();
|
const ESM::RefId& factionId = ptr.getClass().getPrimaryFaction(ptr);
|
||||||
const ESM::RefId& factionId = ptrClass.getPrimaryFaction(ptr);
|
|
||||||
if (factionId.empty())
|
if (factionId.empty())
|
||||||
{
|
{
|
||||||
Log(Debug::Warning) << "getNPCFaction(): NPC " << ptr.mRef->mRef.getRefId() << " has no primary faction";
|
Log(Debug::Warning) << "getNPCFaction(): NPC " << ptr.mRef->mRef.getRefId() << " has no primary faction";
|
||||||
|
|
@ -363,8 +362,7 @@ namespace MWScript
|
||||||
std::string_view InterpreterContext::getPCRank() const
|
std::string_view InterpreterContext::getPCRank() const
|
||||||
{
|
{
|
||||||
const MWWorld::Ptr& ptr = getReferenceImp();
|
const MWWorld::Ptr& ptr = getReferenceImp();
|
||||||
const MWWorld::Class& ptrClass = ptr.getClass();
|
const ESM::RefId& factionId = ptr.getClass().getPrimaryFaction(ptr);
|
||||||
const ESM::RefId& factionId = ptrClass.getPrimaryFaction(ptr);
|
|
||||||
if (factionId.empty())
|
if (factionId.empty())
|
||||||
{
|
{
|
||||||
Log(Debug::Warning) << "getPCRank(): NPC " << ptr.mRef->mRef.getRefId() << " has no primary faction";
|
Log(Debug::Warning) << "getPCRank(): NPC " << ptr.mRef->mRef.getRefId() << " has no primary faction";
|
||||||
|
|
@ -396,8 +394,7 @@ namespace MWScript
|
||||||
std::string_view InterpreterContext::getPCNextRank() const
|
std::string_view InterpreterContext::getPCNextRank() const
|
||||||
{
|
{
|
||||||
const MWWorld::Ptr& ptr = getReferenceImp();
|
const MWWorld::Ptr& ptr = getReferenceImp();
|
||||||
const MWWorld::Class& ptrClass = ptr.getClass();
|
const ESM::RefId& factionId = ptr.getClass().getPrimaryFaction(ptr);
|
||||||
const ESM::RefId& factionId = ptrClass.getPrimaryFaction(ptr);
|
|
||||||
if (factionId.empty())
|
if (factionId.empty())
|
||||||
{
|
{
|
||||||
Log(Debug::Warning) << "getPCNextRank(): NPC " << ptr.mRef->mRef.getRefId() << " has no primary faction";
|
Log(Debug::Warning) << "getPCNextRank(): NPC " << ptr.mRef->mRef.getRefId() << " has no primary faction";
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue