mirror of
https://gitlab.com/OpenMW/openmw.git
synced 2025-09-09 04:15:40 -04:00
Unnecessary ptrClass
This commit is contained in:
parent
cef1807536
commit
87e41425bb
@ -302,8 +302,7 @@ namespace MWScript
|
|||||||
std::string_view InterpreterContext::getNPCFaction() const
|
std::string_view InterpreterContext::getNPCFaction() const
|
||||||
{
|
{
|
||||||
const MWWorld::Ptr& ptr = getReferenceImp();
|
const MWWorld::Ptr& ptr = getReferenceImp();
|
||||||
const MWWorld::Class& ptrClass = ptr.getClass();
|
const ESM::RefId& factionId = ptr.getClass().getPrimaryFaction(ptr);
|
||||||
const ESM::RefId& factionId = ptrClass.getPrimaryFaction(ptr);
|
|
||||||
if (factionId.empty())
|
if (factionId.empty())
|
||||||
{
|
{
|
||||||
Log(Debug::Warning) << "getNPCFaction(): NPC " << ptr.mRef->mRef.getRefId() << " has no primary faction";
|
Log(Debug::Warning) << "getNPCFaction(): NPC " << ptr.mRef->mRef.getRefId() << " has no primary faction";
|
||||||
@ -363,8 +362,7 @@ namespace MWScript
|
|||||||
std::string_view InterpreterContext::getPCRank() const
|
std::string_view InterpreterContext::getPCRank() const
|
||||||
{
|
{
|
||||||
const MWWorld::Ptr& ptr = getReferenceImp();
|
const MWWorld::Ptr& ptr = getReferenceImp();
|
||||||
const MWWorld::Class& ptrClass = ptr.getClass();
|
const ESM::RefId& factionId = ptr.getClass().getPrimaryFaction(ptr);
|
||||||
const ESM::RefId& factionId = ptrClass.getPrimaryFaction(ptr);
|
|
||||||
if (factionId.empty())
|
if (factionId.empty())
|
||||||
{
|
{
|
||||||
Log(Debug::Warning) << "getPCRank(): NPC " << ptr.mRef->mRef.getRefId() << " has no primary faction";
|
Log(Debug::Warning) << "getPCRank(): NPC " << ptr.mRef->mRef.getRefId() << " has no primary faction";
|
||||||
@ -396,8 +394,7 @@ namespace MWScript
|
|||||||
std::string_view InterpreterContext::getPCNextRank() const
|
std::string_view InterpreterContext::getPCNextRank() const
|
||||||
{
|
{
|
||||||
const MWWorld::Ptr& ptr = getReferenceImp();
|
const MWWorld::Ptr& ptr = getReferenceImp();
|
||||||
const MWWorld::Class& ptrClass = ptr.getClass();
|
const ESM::RefId& factionId = ptr.getClass().getPrimaryFaction(ptr);
|
||||||
const ESM::RefId& factionId = ptrClass.getPrimaryFaction(ptr);
|
|
||||||
if (factionId.empty())
|
if (factionId.empty())
|
||||||
{
|
{
|
||||||
Log(Debug::Warning) << "getPCNextRank(): NPC " << ptr.mRef->mRef.getRefId() << " has no primary faction";
|
Log(Debug::Warning) << "getPCNextRank(): NPC " << ptr.mRef->mRef.getRefId() << " has no primary faction";
|
||||||
|
Loading…
x
Reference in New Issue
Block a user