48703 {
48705 bool flag = true;
48706 int num2 = (int)((
float)Main.mouseX + Main.screenPosition.X) / 16;
48707 int num3 = (int)((
float)Main.mouseY + Main.screenPosition.Y) / 16;
48709 {
48710 num3 = (int)(Main.screenPosition.Y + (
float)Main.screenHeight - (float)Main.mouseY) / 16;
48711 }
48713 {
48714 flag = false;
48715 }
48717 {
48718 flag = false;
48719 }
48721 {
48722 flag = false;
48723 }
48725 {
48726 flag = false;
48727 }
48729 {
48730 flag = false;
48731 }
48733 {
48734 flag = false;
48735 }
48737 {
48738 flag = false;
48739 }
48741 {
48742 flag = false;
48743 }
48745 {
48748 {
48749 flag = false;
48750 }
48751 }
48753 {
48759 {
48761 {
48762 flag = false;
48763 }
48764 }
48766 {
48767 flag = false;
48768 }
48769 }
48771 {
48772 flag = false;
48773 }
48775 {
48776 flag = false;
48777 }
48778 if (
whoAmI == Main.myPlayer &&
sItem.type == 603 && !Main.runningCollectorsEdition)
48779 {
48780 flag = false;
48781 }
48782 if (
sItem.type == 1071 ||
sItem.type == 1072)
48783 {
48784 bool flag2 =
false;
48785 for (
int i = 0;
i < 58;
i++)
48786 {
48788 {
48790 break;
48791 }
48792 }
48794 {
48795 flag = false;
48796 }
48797 }
48799 {
48800 flag = false;
48801 }
48802 if (
sItem.tileWand > 0)
48803 {
48804 int tileWand =
sItem.tileWand;
48805 flag = false;
48806 for (
int j = 0;
j < 58;
j++)
48807 {
48809 {
48810 flag = true;
48811 break;
48812 }
48813 }
48814 }
48816 {
48817 for (
int k = 0;
k < 1000;
k++)
48818 {
48819 if (Main.projectile[
k].active && Main.projectile[
k].owner == Main.myPlayer && Main.projectile[
k].type ==
sItem.shoot)
48820 {
48821 flag = false;
48822 }
48823 }
48824 }
48825 if (
sItem.shoot == 106)
48826 {
48828 for (
int l = 0;
l < 1000;
l++)
48829 {
48830 if (Main.projectile[
l].active && Main.projectile[
l].owner == Main.myPlayer && Main.projectile[
l].type ==
sItem.shoot)
48831 {
48833 }
48834 }
48836 {
48837 flag = false;
48838 }
48839 }
48840 if (
sItem.shoot == 272)
48841 {
48843 for (
int m = 0;
m < 1000;
m++)
48844 {
48845 if (Main.projectile[
m].active && Main.projectile[
m].owner == Main.myPlayer && Main.projectile[
m].type ==
sItem.shoot)
48846 {
48848 }
48849 }
48851 {
48852 flag = false;
48853 }
48854 }
48855 if (
sItem.shoot == 1000)
48856 {
48858 for (
int n = 0;
n < 1000;
n++)
48859 {
48860 if (Main.projectile[
n].active && Main.projectile[
n].owner == Main.myPlayer && Main.projectile[
n].type ==
sItem.shoot)
48861 {
48863 }
48864 }
48866 {
48867 flag = false;
48868 }
48869 }
48871 {
48873 {
48874 if (Main.projectile[
num7].active && Main.projectile[
num7].owner == Main.myPlayer && Main.projectile[
num7].type ==
sItem.shoot && Main.projectile[
num7].ai[0] != 2f)
48875 {
48876 flag = false;
48877 }
48878 }
48879 }
48880 if (
sItem.shoot == 332)
48881 {
48884 {
48885 if (Main.projectile[
num9].active && Main.projectile[
num9].owner == Main.myPlayer && Main.projectile[
num9].type ==
sItem.shoot && Main.projectile[
num9].ai[0] != 2f)
48886 {
48888 }
48889 }
48891 {
48892 flag = false;
48893 }
48894 }
48896 {
48897 flag = false;
48898 }
48900 {
48901 flag = false;
48902 }
48903 if (
sItem.mana > 0 && flag)
48904 {
48906 }
48907 if (
sItem.type == 43 && Main.IsItDay())
48908 {
48909 flag = false;
48910 }
48911 if (
sItem.type == 544 && Main.IsItDay())
48912 {
48913 flag = false;
48914 }
48915 if (
sItem.type == 556 && Main.IsItDay())
48916 {
48917 flag = false;
48918 }
48919 if (
sItem.type == 557 && Main.IsItDay())
48920 {
48921 flag = false;
48922 }
48924 {
48925 flag = false;
48926 }
48928 {
48929 flag = false;
48930 }
48932 {
48933 flag = false;
48934 }
48935 if (
sItem.type == 1844 && (Main.dayTime || Main.pumpkinMoon || Main.snowMoon ||
DD2Event.
Ongoing))
48936 {
48937 flag = false;
48938 }
48939 if (
sItem.type == 1958 && (Main.dayTime || Main.pumpkinMoon || Main.snowMoon ||
DD2Event.
Ongoing))
48940 {
48941 flag = false;
48942 }
48943 if (
sItem.type == 2767 && (!Main.dayTime || Main.eclipse || !Main.hardMode))
48944 {
48945 flag = false;
48946 }
48947 if (
sItem.type == 4271 && (Main.dayTime || Main.bloodMoon))
48948 {
48949 flag = false;
48950 }
48951 if (
sItem.type == 3601 && (!
NPC.downedGolemBoss || !Main.hardMode ||
NPC.AnyDanger() ||
NPC.AnyoneNearCultists()))
48952 {
48953 flag = false;
48954 }
48956 {
48957 flag = false;
48958 }
48960 {
48961 flag = false;
48962 }
48963 if (
sItem.chlorophyteExtractinatorConsumable && flag && num == Main.myPlayer)
48964 {
48966 if (!tile.active() || (tile.type != 642 && tile.type != 219))
48967 {
48968 flag = false;
48969 }
48970 }
48971 if (
sItem.fishingPole > 0)
48972 {
48974 }
48976 {
48978 }
48979 if (
sItem.shoot == 17 && flag && num == Main.myPlayer)
48980 {
48982 {
48984 if (!Main.tile[
num2,
num3].active())
48985 {
48986 if (Main.netMode == 1)
48987 {
48988 NetMessage.SendData(17, -1, -1,
null, 4,
num2,
num3);
48989 }
48990 }
48991 else
48992 {
48993 flag = false;
48994 }
48995 }
48996 else
48997 {
48998 flag = false;
48999 }
49000 }
49001 if (flag)
49002 {
49004 }
49005 return flag;
49006 }
static MultiToolMode ToolMode
static bool[] HasAProjectileThatHasAUsabilityCheck
static bool[] IsADD2Turret
bool ItemCheck_CheckUsabilityOfProjectiles(bool canUse)
static bool WouldSpotOverlapWithSentry(int worldX, int worldY, bool lightningAura)
bool downedDD2EventAnyDifficulty
int wireOperationsCooldown
void FindSentryRestingSpot(int checkProj, out int worldX, out int worldY, out int pushYUp)
bool CheckDD2CrystalPaymentLock(Item item)
bool SummonItemCheck(Item item)
bool ItemCheck_CheckFishingBobbers(bool canUse)
bool HasAmmo(Item sItem, bool canUse)
int[] ownedProjectileCounts
static bool ItemCheck_IsValidDirtRodTarget(Tile t)
bool ItemCheck_PayMana(Item sItem, bool canUse)