fix: Reverts change for trade window that causes an exploit (#2189)
This commit is contained in:
parent
c1d8606167
commit
972e7723ae
1 changed files with 22 additions and 1 deletions
|
|
@ -343,7 +343,28 @@ public partial class NetState : IComparable<NetState>, IValueLinkListNode<NetSta
|
|||
return null;
|
||||
}
|
||||
|
||||
public SecureTradeContainer FindTradeContainer(Mobile m) => FindTrade(m)?.From.Container;
|
||||
public SecureTradeContainer FindTradeContainer(Mobile m)
|
||||
{
|
||||
for (var i = 0; i < Trades.Count; ++i)
|
||||
{
|
||||
var trade = Trades[i];
|
||||
|
||||
var from = trade.From;
|
||||
var to = trade.To;
|
||||
|
||||
if (from.Mobile == Mobile && to.Mobile == m)
|
||||
{
|
||||
return from.Container;
|
||||
}
|
||||
|
||||
if (from.Mobile == m && to.Mobile == Mobile)
|
||||
{
|
||||
return to.Container;
|
||||
}
|
||||
}
|
||||
|
||||
return null;
|
||||
}
|
||||
|
||||
public SecureTradeContainer AddTrade(NetState state)
|
||||
{
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue