mirror of
https://github.com/islehorse/HISP.git
synced 2025-04-10 07:05:41 +12:00
Fix trading not working if inv full
This commit is contained in:
parent
40f76ede4f
commit
2d234bdc1c
1 changed files with 17 additions and 11 deletions
|
@ -130,6 +130,8 @@ namespace HISP.Player
|
||||||
*/
|
*/
|
||||||
|
|
||||||
bool itemYouFail = false;
|
bool itemYouFail = false;
|
||||||
|
if (OtherTrade.ItemsOffered.Length > 0)
|
||||||
|
{
|
||||||
foreach (ItemInstance[] inst in OtherTrade.ItemsOffered)
|
foreach (ItemInstance[] inst in OtherTrade.ItemsOffered)
|
||||||
{
|
{
|
||||||
if (Trader.Inventory.HasItemId(inst[0].ItemId))
|
if (Trader.Inventory.HasItemId(inst[0].ItemId))
|
||||||
|
@ -141,7 +143,7 @@ namespace HISP.Player
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
}
|
||||||
if (itemYouFail)
|
if (itemYouFail)
|
||||||
{
|
{
|
||||||
fail = true;
|
fail = true;
|
||||||
|
@ -150,6 +152,9 @@ namespace HISP.Player
|
||||||
}
|
}
|
||||||
|
|
||||||
bool itemOtherFail = false;
|
bool itemOtherFail = false;
|
||||||
|
if (ItemsOffered.Length > 0)
|
||||||
|
{
|
||||||
|
|
||||||
foreach (ItemInstance[] inst in ItemsOffered)
|
foreach (ItemInstance[] inst in ItemsOffered)
|
||||||
{
|
{
|
||||||
if (OtherTrade.Trader.Inventory.HasItemId(inst[0].ItemId))
|
if (OtherTrade.Trader.Inventory.HasItemId(inst[0].ItemId))
|
||||||
|
@ -161,6 +166,7 @@ namespace HISP.Player
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
if (itemOtherFail)
|
if (itemOtherFail)
|
||||||
{
|
{
|
||||||
|
|
Loading…
Add table
Reference in a new issue