1
Fork 0

Added ownership checks to _00E_ContainerController

development
Eddoursul 4 months ago
parent cf1b5371c2
commit dcaa1ae6b6
  1. BIN
      Enderal - Forgotten Stories.esm
  2. BIN
      scripts/_00E_ContainerController.pex
  3. 9
      source/scripts/_00E_ContainerController.psc

Binary file not shown.

@ -54,10 +54,10 @@ event OnMenuOpen(String MenuName)
return return
endif endif
if ! ( lootMenuRef.GetBaseObject() as Container ) || lootMenuRef.IsLocked() || lootMenuRef.IsActivationBlocked() if ! ( lootMenuRef.GetBaseObject() as Container ) || lootMenuRef.IsLocked() || lootMenuRef.IsActivationBlocked() || lootMenuRef.GetActorOwner() == Player
return return
endif endif
bLmHasGold = lootMenuRef.GetItemCount(Gold001) >= 5 bLmHasGold = lootMenuRef.GetItemCount(Gold001) >= 5
bLmHasSlot = false bLmHasSlot = false
@ -78,10 +78,10 @@ event OnMenuOpen(String MenuName)
if MenuName == "ContainerMenu" if MenuName == "ContainerMenu"
ObjectReference currentContainer = EnderalFunctions.GetCurrentContainer() ObjectReference currentContainer = EnderalFunctions.GetCurrentContainer()
if ! currentContainer || currentContainer as Actor if ! currentContainer || currentContainer as Actor || currentContainer.GetActorOwner() == Player || currentContainer.GetParentCell() != PlayerREF.GetParentCell()
return return
endif endif
if currentContainer == containerToFill if currentContainer == containerToFill
; Opened hidden container ; Opened hidden container
Utility.Wait(0.1) Utility.Wait(0.1)
@ -359,6 +359,7 @@ bool bLmHasGold
bool bLmHasSlot bool bLmHasSlot
Actor Property PlayerRef Auto Actor Property PlayerRef Auto
ActorBase Property Player Auto
GlobalVariable Property PlayerLevel Auto GlobalVariable Property PlayerLevel Auto
GlobalVariable Property _00E_HiddenSlotAchievementUnlocked Auto GlobalVariable Property _00E_HiddenSlotAchievementUnlocked Auto

Loading…
Cancel
Save