Terraria v1.4.4.9
Terraria source code documentation
Loading...
Searching...
No Matches

◆ Remove()

int Terraria.GameContent.ItemShopSellbackHelper.Remove ( Item item)
inline

Definition at line 57 of file ItemShopSellbackHelper.cs.

58 {
59 ItemMemo itemMemo = _memos.Find((ItemMemo x) => x.Matches(item));
60 if (itemMemo == null)
61 {
62 return 0;
63 }
64 int stack = itemMemo.stack;
65 itemMemo.stack -= item.stack;
66 if (itemMemo.stack <= 0)
67 {
69 return stack;
70 }
71 return stack - itemMemo.stack;
72 }
bool ICollection< KeyValuePair< TKey, TValue > >. Remove(KeyValuePair< TKey, TValue > keyValuePair)

References Terraria.GameContent.ItemShopSellbackHelper._memos, Terraria.GameContent.ItemShopSellbackHelper.ItemMemo.Matches(), and System.Collections.Generic.Dictionary< TKey, TValue >.Remove().