1
0
mirror of https://gitlab.com/OpenMW/openmw.git synced 2025-01-26 18:35:20 +00:00

getpcrank did not read the explicit reference in some cases (Fixed #1767)

This commit is contained in:
Marc Zinnschlag 2014-08-23 18:22:09 +02:00
parent 7c1b32ae62
commit 0d8bfbfa9b

View File

@ -637,6 +637,8 @@ namespace MWScript
virtual void execute (Interpreter::Runtime& runtime, unsigned int arg0) virtual void execute (Interpreter::Runtime& runtime, unsigned int arg0)
{ {
MWWorld::Ptr ptr = R()(runtime);
std::string factionID = ""; std::string factionID = "";
if(arg0 >0) if(arg0 >0)
{ {
@ -645,8 +647,6 @@ namespace MWScript
} }
else else
{ {
MWWorld::Ptr ptr = R()(runtime);
if(ptr.getClass().getNpcStats(ptr).getFactionRanks().empty()) if(ptr.getClass().getNpcStats(ptr).getFactionRanks().empty())
{ {
factionID = ""; factionID = "";