|
|
@ -105,6 +105,10 @@ namespace Papyrus::PapyrusFunctions |
|
|
|
|
|
|
|
|
|
|
|
bool IsInRegion(RE::StaticFunctionTag*, RE::TESForm* playerRegion) |
|
|
|
bool IsInRegion(RE::StaticFunctionTag*, RE::TESForm* playerRegion) |
|
|
|
{ |
|
|
|
{ |
|
|
|
|
|
|
|
if (!playerRegion) { |
|
|
|
|
|
|
|
return false; |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
auto* parentCell = RE::PlayerCharacter::GetSingleton()->parentCell; |
|
|
|
auto* parentCell = RE::PlayerCharacter::GetSingleton()->parentCell; |
|
|
|
|
|
|
|
|
|
|
|
if (!parentCell) { |
|
|
|
if (!parentCell) { |
|
|
@ -113,9 +117,11 @@ namespace Papyrus::PapyrusFunctions |
|
|
|
|
|
|
|
|
|
|
|
auto regions = parentCell->GetRegionList(false); |
|
|
|
auto regions = parentCell->GetRegionList(false); |
|
|
|
|
|
|
|
|
|
|
|
for (auto it = regions->begin(); it != regions->end(); it++) { |
|
|
|
if (regions) { |
|
|
|
if ((*it)->formID == playerRegion->formID) { |
|
|
|
for (auto it = regions->begin(); it != regions->end(); it++) { |
|
|
|
return true; |
|
|
|
if ((*it) && (*it)->formID == playerRegion->formID) { |
|
|
|
|
|
|
|
return true; |
|
|
|
|
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|