fix: Codegens lockable containers and cleans up lockpickable (#976)

This commit is contained in:
Kamron Batman 2022-03-26 21:48:18 -07:00 • committed by GitHub
parent fc0594f87c
commit 8f922c94ae
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
9 changed files with 762 additions and 833 deletions

View file

@ -30,13 +30,10 @@ namespace Server.Spells.Third
}
else if (BaseHouse.CheckLockedDownOrSecured(cont))
{
Caster.LocalOverheadMessage(
MessageType.Regular,
0x22,
501761
); // You cannot cast this on a locked down item.
// You cannot cast this on a locked down item.
Caster.LocalOverheadMessage(MessageType.Regular, 0x22, 501761);
}
else if (cont.Locked || cont.LockLevel == 0 || cont is ParagonChest)
else if (cont.Locked || cont.LockLevel == ILockpickable.CannotPick || cont is ParagonChest)
{
Caster.SendLocalizedMessage(501762); // Target must be an unlocked chest.
}
@ -59,7 +56,7 @@ namespace Server.Spells.Third
// The chest is now locked!
Caster.LocalOverheadMessage(MessageType.Regular, 0x3B2, 501763);
cont.LockLevel = -255; // signal magic lock
cont.LockLevel = ILockpickable.MagicLock; // signal magic lock
cont.Locked = true;
}