4
Fork 0

Removed unused IsInRegion()

development
Eddoursul 2 months ago
parent 3447322d73
commit e36614f6d3
  1. BIN
      scripts/enderalfunctions.pex
  2. 27
      source/Enderal DLL/src/PapyrusFunctions.h
  3. 2
      source/scripts/enderalfunctions.psc

Binary file not shown.

@ -120,31 +120,6 @@ namespace Papyrus::PapyrusFunctions
return ComputeNeededExpPoints(CurrentLevel, Slope, Mult, fExpAcc, fExpAcc_Level20, fExpAcc_Level30, fExpAcc_Level40);
}
bool IsInRegion(RE::StaticFunctionTag*, RE::TESForm* playerRegion)
{
if (!playerRegion) {
return false;
}
auto* parentCell = RE::PlayerCharacter::GetSingleton()->parentCell;
if (!parentCell) {
return false;
}
auto regions = parentCell->GetRegionList(false);
if (regions) {
for (auto it = regions->begin(); it != regions->end(); it++) {
if ((*it) && (*it)->formID == playerRegion->formID) {
return true;
}
}
}
return false;
}
uint32_t MoveItemsToCountByKeyword(RE::StaticFunctionTag*, RE::TESObjectREFR* a_sourceRef, RE::TESObjectREFR* a_targetRef, RE::BGSKeyword* a_keyword, uint32_t a_count = 1)
{
const auto inv = a_sourceRef->GetInventory([&](RE::TESBoundObject& a_exform) {
@ -192,8 +167,6 @@ namespace Papyrus::PapyrusFunctions
logger::info("{}", "Registered EnableDialogueQuitting"sv);
BIND(ComputeNeededExp);
logger::info("{}", "Registered ComputeNeededExp"sv);
BIND(IsInRegion);
logger::info("{}", "Registered IsInRegion"sv);
BIND(MoveItemsToCountByKeyword);
logger::info("{}", "Registered MoveItemsToCountByKeyword"sv);
}

@ -18,8 +18,6 @@ float function ComputeNeededExp(int CurrentLevel, float Slope, float Mult, float
Function DisableDialogueQuitting() native global
Function EnableDialogueQuitting() native global
bool function IsInRegion(Form region) native global
int function MoveItemsToCountByKeyword(ObjectReference sourceRef, ObjectReference targetRef, Keyword kword, int iCount = 1) native global
bool function IsDLLLoaded() global

Loading…
Cancel
Save