From cef180753667b0e0eab744cf099c02ea6218caa2 Mon Sep 17 00:00:00 2001 From: Aussiemon Date: Sun, 13 Jul 2025 02:30:55 -0600 Subject: [PATCH] Use RefId instead of name --- apps/openmw/mwscript/interpretercontext.cpp | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/apps/openmw/mwscript/interpretercontext.cpp b/apps/openmw/mwscript/interpretercontext.cpp index 3063e8b6bb..dbd139d180 100644 --- a/apps/openmw/mwscript/interpretercontext.cpp +++ b/apps/openmw/mwscript/interpretercontext.cpp @@ -306,7 +306,7 @@ namespace MWScript const ESM::RefId& factionId = ptrClass.getPrimaryFaction(ptr); if (factionId.empty()) { - Log(Debug::Warning) << "getNPCFaction(): NPC " << ptrClass.getName(ptr) << " has no primary faction"; + Log(Debug::Warning) << "getNPCFaction(): NPC " << ptr.mRef->mRef.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 " << ptrClass.getName(ptr) << " has no primary faction"; + Log(Debug::Warning) << "getNPCRank(): NPC " << ptr.mRef->mRef.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 " << ptrClass.getName(ptr) << " has invalid rank " << rank + Log(Debug::Warning) << "getNPCRank(): NPC " << ptr.mRef->mRef.getRefId() << " has invalid rank " << rank << " in faction " << faction->mName; return "%"; } @@ -367,7 +367,7 @@ namespace MWScript const ESM::RefId& factionId = ptrClass.getPrimaryFaction(ptr); if (factionId.empty()) { - Log(Debug::Warning) << "getPCRank(): NPC " << ptrClass.getName(ptr) << " has no primary faction"; + Log(Debug::Warning) << "getPCRank(): NPC " << ptr.mRef->mRef.getRefId() << " has no primary faction"; return "%"; } @@ -400,7 +400,7 @@ namespace MWScript const ESM::RefId& factionId = ptrClass.getPrimaryFaction(ptr); if (factionId.empty()) { - Log(Debug::Warning) << "getPCNextRank(): NPC " << ptrClass.getName(ptr) << " has no primary faction"; + Log(Debug::Warning) << "getPCNextRank(): NPC " << ptr.mRef->mRef.getRefId() << " has no primary faction"; return "%"; }