fix: Fixes guardian lazy check on Treasure Map Chests (#2569)

### Summary

Fixes a crash bug from the lazy check on treasure map chest guardians.
This commit is contained in:
Kamron Batman 2026-08-10 09:06:43 -07:00 committed by GitHub
parent c1442aff3e
commit 1bc83339bb
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -304,7 +304,7 @@ public partial class TreasureMapChest : LockableContainer
if (_level == 0 && from.AccessLevel < AccessLevel.GameMaster)
{
if (_guardians.Count > 0)
if (_guardians != null)
{
for (var i = 0; i < _guardians.Count; i++)
{
@ -381,10 +381,8 @@ public partial class TreasureMapChest : LockableContainer
public override void OnItemLifted(Mobile from, Item item)
{
var notYetLifted = _lifted?.Contains(item) != true;
from.RevealingAction();
if (notYetLifted)
if (_lifted?.Contains(item) != true)
{
_lifted ??= [];
_lifted.Add(item);