From 0d8bfbfa9b8c373208ec3b61832e8e5b6d64481b Mon Sep 17 00:00:00 2001 From: Marc Zinnschlag Date: Sat, 23 Aug 2014 18:22:09 +0200 Subject: [PATCH] getpcrank did not read the explicit reference in some cases (Fixed #1767) --- apps/openmw/mwscript/statsextensions.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/apps/openmw/mwscript/statsextensions.cpp b/apps/openmw/mwscript/statsextensions.cpp index 49a483f278..84d9c4d7e0 100644 --- a/apps/openmw/mwscript/statsextensions.cpp +++ b/apps/openmw/mwscript/statsextensions.cpp @@ -637,6 +637,8 @@ namespace MWScript virtual void execute (Interpreter::Runtime& runtime, unsigned int arg0) { + MWWorld::Ptr ptr = R()(runtime); + std::string factionID = ""; if(arg0 >0) { @@ -645,8 +647,6 @@ namespace MWScript } else { - MWWorld::Ptr ptr = R()(runtime); - if(ptr.getClass().getNpcStats(ptr).getFactionRanks().empty()) { factionID = "";