1556 {
1557 if (Main.npcShop > 0 || ((inv[slot].type <= 0 || inv[slot].stack <= 0) && (inv[slot - 10].type <= 0 || inv[slot - 10].stack <= 0)))
1558 {
1559 return;
1560 }
1562 bool flag = context != 11 || item.FitsAccessoryVanitySlot ||
item.IsAir;
1563 if (flag && context == 11 && inv[slot].wingSlot > 0)
1564 {
1565 for (
int i = 3;
i < 10;
i++)
1566 {
1567 if (inv[i].wingSlot > 0 && i != slot - 10)
1568 {
1569 flag = false;
1570 }
1571 }
1572 }
1573 if (!flag)
1574 {
1575 return;
1576 }
1577 Utils.Swap(ref inv[slot], ref inv[slot - 10]);
1579 Recipe.FindRecipes();
1580 if (inv[slot].stack > 0)
1581 {
1582 switch (context)
1583 {
1584 case 0:
1586 break;
1587 case 8:
1588 case 9:
1589 case 10:
1590 case 11:
1591 case 12:
1592 case 16:
1593 case 17:
1594 case 25:
1595 case 27:
1596 case 33:
1598 break;
1599 }
1600 }
1601 }
static void PlaySound(int type, Vector2 position, int style=1)
static void NotifyItemPickup(Player player, Item item)
static void HandleOnEquip(Player player, Item item, int context)