mirror of
https://github.com/OpenMW/openmw.git
synced 2025-01-21 09:23:53 +00:00
Use single implementation to check whether marker is hidden
This commit is contained in:
parent
cec7f1e7bc
commit
4613840914
2 changed files with 6 additions and 3 deletions
|
@ -2,6 +2,8 @@
|
|||
|
||||
#include "types/types.hpp"
|
||||
|
||||
#include <components/misc/resourcehelpers.hpp>
|
||||
|
||||
namespace MWLua
|
||||
{
|
||||
|
||||
|
@ -12,8 +14,7 @@ namespace MWLua
|
|||
|
||||
bool isMarker(const MWWorld::Ptr& ptr)
|
||||
{
|
||||
std::string_view id = ptr.getCellRef().getRefId();
|
||||
return id == "prisonmarker" || id == "divinemarker" || id == "templemarker" || id == "northmarker";
|
||||
return Misc::ResourceHelpers::isHiddenMarker(ptr.getCellRef().getRefId());
|
||||
}
|
||||
|
||||
std::string ptrToString(const MWWorld::Ptr& ptr)
|
||||
|
|
|
@ -7,6 +7,8 @@
|
|||
#include <string_view>
|
||||
#include <sstream>
|
||||
|
||||
#include <components/misc/resourcehelpers.hpp>
|
||||
|
||||
#include "livecellref.hpp"
|
||||
|
||||
namespace MWWorld
|
||||
|
@ -58,7 +60,7 @@ namespace MWWorld
|
|||
std::string_view id = mRef->mRef.getRefId();
|
||||
if (id == "player")
|
||||
return ESM::REC_INTERNAL_PLAYER;
|
||||
else if (id == "prisonmarker" || id == "divinemarker" || id == "templemarker" || id == "northmarker")
|
||||
else if (Misc::ResourceHelpers::isHiddenMarker(id))
|
||||
return ESM::REC_INTERNAL_MARKER;
|
||||
else
|
||||
return mRef->getType();
|
||||
|
|
Loading…
Reference in a new issue