diff --git a/apps/openmw/mwscript/interpretercontext.cpp b/apps/openmw/mwscript/interpretercontext.cpp index 546968ebf7..f6c20c9c10 100644 --- a/apps/openmw/mwscript/interpretercontext.cpp +++ b/apps/openmw/mwscript/interpretercontext.cpp @@ -305,7 +305,7 @@ namespace MWScript const ESM::RefId& factionId = ptr.getClass().getPrimaryFaction(ptr); if (factionId.empty()) { - Log(Debug::Warning) << "getNPCFaction(): NPC " << ptr.mRef->mRef.getRefId() << " has no primary faction"; + Log(Debug::Warning) << "getNPCFaction(): NPC " << ptr.getCellRef().getRefId() << " has no primary faction"; return "%"; } @@ -322,7 +322,7 @@ namespace MWScript const ESM::RefId& factionId = ptrClass.getPrimaryFaction(ptr); if (factionId.empty()) { - Log(Debug::Warning) << "getNPCRank(): NPC " << ptr.mRef->mRef.getRefId() << " has no primary faction"; + Log(Debug::Warning) << "getNPCRank(): NPC " << ptr.getCellRef().getRefId() << " has no primary faction"; return "%"; } @@ -333,7 +333,7 @@ namespace MWScript int rank = ptrClass.getPrimaryFactionRank(ptr); if (rank < 0 || rank > 9) { - Log(Debug::Warning) << "getNPCRank(): NPC " << ptr.mRef->mRef.getRefId() << " has invalid rank " << rank + Log(Debug::Warning) << "getNPCRank(): NPC " << ptr.getCellRef().getRefId() << " has invalid rank " << rank << " in faction " << factionId; return "%"; } @@ -366,7 +366,7 @@ namespace MWScript const ESM::RefId& factionId = ptr.getClass().getPrimaryFaction(ptr); if (factionId.empty()) { - Log(Debug::Warning) << "getPCRank(): NPC " << ptr.mRef->mRef.getRefId() << " has no primary faction"; + Log(Debug::Warning) << "getPCRank(): NPC " << ptr.getCellRef().getRefId() << " has no primary faction"; return "%"; } @@ -398,7 +398,7 @@ namespace MWScript const ESM::RefId& factionId = ptr.getClass().getPrimaryFaction(ptr); if (factionId.empty()) { - Log(Debug::Warning) << "getPCNextRank(): NPC " << ptr.mRef->mRef.getRefId() << " has no primary faction"; + Log(Debug::Warning) << "getPCNextRank(): NPC " << ptr.getCellRef().getRefId() << " has no primary faction"; return "%"; }