9685 {
9686 if (Owner == -1)
9687 {
9688 Owner = Main.myPlayer;
9689 }
9690 int num = 1000;
9691 for (
int i = 0;
i < 1000;
i++)
9692 {
9693 if (!Main.projectile[i].active)
9694 {
9696 break;
9697 }
9698 }
9699 if (num == 1000)
9700 {
9702 }
9703 Projectile projectile = Main.projectile[num];
9704 projectile.SetDefaults(
Type);
9705 projectile.position.X =
X - (float)projectile.width * 0.5f;
9706 projectile.position.Y =
Y - (float)projectile.height * 0.5f;
9707 projectile.owner =
Owner;
9708 projectile.velocity.X =
SpeedX;
9709 projectile.velocity.Y =
SpeedY;
9710 projectile.damage =
Damage;
9712 projectile.identity = num;
9713 projectile.gfxOffY = 0f;
9714 projectile.stepSpeed = 1f;
9715 projectile.wet = Collision.WetCollision(projectile.position, projectile.width, projectile.height);
9716 if (projectile.ignoreWater)
9717 {
9718 projectile.wet = false;
9719 }
9720 projectile.honeyWet = Collision.honey;
9721 projectile.shimmerWet = Collision.shimmer;
9722 Main.projectileIdentity[
Owner, num] = num;
9724 if (projectile.aiStyle == 1)
9725 {
9726 while (projectile.velocity.X >= 16f || projectile.velocity.X <= -16f || projectile.velocity.Y >= 16f || projectile.velocity.Y < -16f)
9727 {
9728 projectile.velocity.X *= 0.97f;
9729 projectile.velocity.Y *= 0.97f;
9730 }
9731 }
9732 if (Owner == Main.myPlayer)
9733 {
9735 {
9736 case 206:
9737 projectile.ai[0] = (float)Main.rand.Next(-100, 101) * 0.0005f;
9738 projectile.ai[1] = (float)Main.rand.Next(-100, 101) * 0.0005f;
9739 break;
9740 case 335:
9741 projectile.ai[1] = Main.rand.Next(4);
9742 break;
9743 case 358:
9744 projectile.ai[1] = (float)Main.rand.Next(10, 31) * 0.1f;
9745 break;
9746 case 406:
9747 projectile.ai[1] = (float)Main.rand.Next(10, 21) * 0.1f;
9748 break;
9749 default:
9750 projectile.ai[0] =
ai0;
9751 projectile.ai[1] =
ai1;
9752 projectile.ai[2] =
ai2;
9753 break;
9754 }
9755 }
9757 {
9758 projectile.ai[0] = projectile.position.X;
9759 projectile.ai[1] = projectile.position.Y;
9760 }
9762 {
9764 {
9765 projectile.projUUID = projectile.identity;
9766 }
9768 {
9769 int num2 = Main.projectile[(int)projectile.ai[0]].projUUID;
9771 {
9772 projectile.ai[0] =
num2;
9773 }
9774 }
9775 }
9776 if (Main.netMode != 0 && Owner == Main.myPlayer)
9777 {
9778 NetMessage.SendData(27, -1, -1, null, num);
9779 }
9780 if (Owner == Main.myPlayer)
9781 {
9783 {
9786 int num5 = 99999999;
9787 for (
int j = 0;
j < 1000;
j++)
9788 {
9789 if (Main.projectile[
j].active &&
ProjectileID.
Sets.
IsAGolfBall[Main.projectile[
j].type] && Main.projectile[
j].owner == Owner && Main.projectile[
j].damage <= 0)
9790 {
9792 if (
num5 > Main.projectile[
j].timeLeft)
9793 {
9795 num5 = Main.projectile[
j].timeLeft;
9796 }
9797 }
9798 }
9800 {
9801 Main.projectile[
num4].Kill();
9802 }
9803 }
9805 {
9806 projectile.timeLeft = 180;
9807 }
9809 {
9810 projectile.timeLeft = 180;
9811 }
9813 {
9814 projectile.timeLeft = 180;
9815 }
9817 {
9818 projectile.timeLeft = 300;
9819 }
9821 {
9822 projectile.timeLeft = 300;
9823 }
9825 {
9826 projectile.timeLeft = 300;
9827 }
9829 {
9830 projectile.timeLeft = 180;
9831 }
9833 {
9834 projectile.timeLeft = 180;
9835 }
9837 {
9838 projectile.timeLeft = 180;
9839 }
9841 {
9842 projectile.timeLeft = 180;
9843 }
9845 {
9846 projectile.timeLeft = 180;
9847 }
9849 {
9850 projectile.timeLeft = 180;
9851 }
9853 {
9854 projectile.timeLeft = 180;
9855 }
9857 {
9858 projectile.timeLeft = 180;
9859 }
9861 {
9862 projectile.timeLeft = 180;
9863 }
9865 {
9866 projectile.timeLeft = 180;
9867 }
9869 {
9870 projectile.timeLeft = 600;
9871 }
9873 {
9874 projectile.timeLeft = 600;
9875 }
9877 {
9878 projectile.timeLeft = 600;
9879 }
9881 {
9882 projectile.timeLeft = 600;
9883 }
9885 {
9886 projectile.timeLeft = 180;
9887 }
9889 {
9890 projectile.timeLeft = 60;
9891 }
9893 {
9894 projectile.timeLeft = 60;
9895 }
9897 {
9898 projectile.timeLeft = 60;
9899 }
9901 {
9902 projectile.timeLeft = 300;
9903 }
9905 {
9906 projectile.timeLeft = 600;
9907 }
9909 {
9910 projectile.timeLeft = 60;
9911 }
9913 {
9914 projectile.timeLeft = 120;
9915 }
9916 if (
Type == 680 && Main.player[projectile.owner].setSquireT2)
9917 {
9918 projectile.penetrate = 7;
9919 }
9921 {
9922 projectile.timeLeft = 180;
9923 }
9924 }
9926 {
9927 projectile.frame = Main.rand.Next(5);
9928 }
9929 if (Owner == Main.myPlayer)
9930 {
9931 Main.player[
Owner].TryUpdateChannel(projectile);
9932 }
9933 return num;
9934 }
static bool[] StardustDragon
static bool[] IsAGolfBall
static readonly short Count
static void FindBannerToAssociateTo(IEntitySource spawnSource, Projectile next)
static int FindOldestProjectile()