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:
parent
c1442aff3e
commit
1bc83339bb
1 changed files with 2 additions and 4 deletions
|
|
@ -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);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue