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

◆ AccCheck()

static bool Terraria.UI.ItemSlot.AccCheck ( Item[] itemCollection,
Item item,
int slot )
inlinestatic

Definition at line 2654 of file ItemSlot.cs.

2655 {
2656 if (isEquipLocked(item.type))
2657 {
2658 return true;
2659 }
2660 if (slot != -1)
2661 {
2662 if (itemCollection[slot].IsTheSameAs(item))
2663 {
2664 return false;
2665 }
2666 if (itemCollection[slot].wingSlot > 0 && item.wingSlot > 0)
2667 {
2668 return false;
2669 }
2670 }
2671 for (int i = 0; i < itemCollection.Length; i++)
2672 {
2673 if (slot < 10 && i < 10)
2674 {
2675 if (item.wingSlot > 0 && itemCollection[i].wingSlot > 0)
2676 {
2677 return true;
2678 }
2679 if (slot >= 10 && i >= 10 && item.wingSlot > 0 && itemCollection[i].wingSlot > 0)
2680 {
2681 return true;
2682 }
2683 }
2684 if (item.IsTheSameAs(itemCollection[i]))
2685 {
2686 return true;
2687 }
2688 }
2689 return false;
2690 }
static bool isEquipLocked(int type)
Definition ItemSlot.cs:329

References Terraria.UI.ItemSlot.isEquipLocked(), System.item, and Terraria.Item.wingSlot.

Referenced by Terraria.UI.ItemSlot.PickItemMovementAction(), and Terraria.GameContent.Tile_Entities.TEDisplayDoll.TryFitting().