Fix GetPcRank and PcExpelled not accepting Faction IDs properly (Fixes #1709)

This commit is contained in:
scrawl 2014-08-02 22:31:14 +02:00
parent ef78ae22f6
commit eb1888a540

View file

@ -637,8 +637,6 @@ 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)
{ {
@ -647,6 +645,8 @@ 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 = "";
@ -913,8 +913,6 @@ 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 )
{ {
@ -923,6 +921,8 @@ 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 = "";