This reverts commit 179cb50557.
This commit is contained in:
parent
179cb50557
commit
c2ecc76457
588 changed files with 16260 additions and 10926 deletions
|
|
@ -1,5 +1,4 @@
|
|||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using Server.Targeting;
|
||||
|
||||
namespace Server.Items
|
||||
|
|
@ -110,7 +109,14 @@ namespace Server.Items
|
|||
UpdateItemID();
|
||||
}
|
||||
|
||||
public bool ContainsKey(uint keyValue) => Keys.Any(key => key.KeyValue == keyValue);
|
||||
public bool ContainsKey(uint keyValue)
|
||||
{
|
||||
foreach (Key key in Keys)
|
||||
if (key.KeyValue == keyValue)
|
||||
return true;
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
private void UpdateItemID()
|
||||
{
|
||||
|
|
@ -163,7 +169,9 @@ namespace Server.Items
|
|||
}
|
||||
else if (targeted is ILockable o)
|
||||
{
|
||||
if (m_KeyRing.Keys.Any(key => key.UseOn(from, o))) return;
|
||||
foreach (Key key in m_KeyRing.Keys)
|
||||
if (key.UseOn(from, o))
|
||||
return;
|
||||
|
||||
from.SendLocalizedMessage(1008140); // You do not have a key for that.
|
||||
}
|
||||
|
|
@ -174,4 +182,4 @@ namespace Server.Items
|
|||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue