1
0
Fork 0
mirror of https://github.com/OpenMW/openmw.git synced 2025-01-30 18:45:38 +00:00

Shuffle code around

This commit is contained in:
Evil Eye 2024-06-19 16:47:58 +02:00
parent d6fc0744c7
commit 6aa52c09da

View file

@ -158,11 +158,13 @@ namespace MWLua
int factionRank = npcStats.getFactionRank(factionId);
return LuaUtil::toLuaIndex(factionRank);
}
return 0;
}
else
{
ESM::RefId primaryFactionId = ptr.getClass().getPrimaryFaction(ptr);
if (factionId == primaryFactionId)
return LuaUtil::toLuaIndex(ptr.getClass().getPrimaryFactionRank(ptr));
}
return 0;
};