37831 {
37833 Vector2 center = player.RotatedRelativePoint(player.MountedCenter);
37835 player.heldProj =
whoAmI;
37836 player.MatchItemTimeToItemAnimation();
37838 bool flag = Main.player[
owner].itemAnimation < Main.player[
owner].itemAnimationMax / 3;
37839 int itemAnimationMax = player.itemAnimationMax;
37840 int itemAnimation = player.itemAnimation;
37841 int num = Main.player[
owner].itemAnimationMax / 3;
37843 float num3 = (float)itemAnimation -
num2;
37847 bool flag2 =
false;
37850 {
37851 case 46:
37855 break;
37856 case 105:
37860 break;
37861 case 367:
37865 break;
37866 case 368:
37870 break;
37871 case 222:
37875 break;
37876 case 342:
37880 break;
37881 case 47:
37885 break;
37886 case 153:
37890 break;
37891 case 49:
37895 break;
37896 case 730:
37900 break;
37901 case 877:
37902 case 878:
37903 case 879:
37906 {
37908 }
37913 break;
37914 case 64:
37915 case 215:
37920 break;
37921 case 66:
37922 case 97:
37923 case 212:
37924 case 218:
37928 break;
37929 case 130:
37933 break;
37934 }
37935 float num7 = (float)(itemAnimationMax - num) -
num3;
37940 {
37941 case 47:
37942 if (Main.player[
owner].wet && Main.rand.Next(2) == 0)
37943 {
37944 int num10 = Dust.NewDust(Main.player[
owner].position, Main.player[
owner].width, Main.player[
owner].height, 15, 0f, 0f, 100,
default(
Color), 0.8f);
37945 Main.dust[
num10].velocity *= 0.1f;
37946 }
37947 break;
37948 case 130:
37950 {
37952 }
37954 break;
37955 case 730:
37957 {
37961 }
37962 break;
37963 case 342:
37964 if (flag &&
localAI[0] == 0f && Main.myPlayer ==
owner)
37965 {
37967 if (Collision.CanHit(player.position, player.width, player.height,
position,
width,
height))
37968 {
37970 }
37971 }
37972 break;
37973 case 222:
37974 if (flag &&
localAI[0] == 0f && Main.myPlayer ==
owner)
37975 {
37978 }
37979 break;
37980 }
37981 if (
flag2 && player.channel && player.itemAnimation < num)
37982 {
37983 player.SetDummyItemTime(num);
37984 }
37987 {
37989 }
37992 {
37994 float num12 = 0.8f;
37996 float num14 = player.velocity.Length();
37998 {
38001 {
38003 }
38005 {
38007 }
38012 {
38015 }
38016 if (Main.rand.Next(
num15 + 3) == 0)
38017 {
38019 }
38020 if (Main.rand.Next(
num15) == 0)
38021 {
38023 Main.dust[
num19].noGravity =
true;
38024 Main.dust[
num19].velocity *= 0.25f;
38026 Main.dust[
num19].velocity *= 0.25f;
38027 }
38028 }
38029 }
38031 {
38032 if (Main.rand.Next(5) == 0)
38033 {
38035 }
38037 Main.dust[
num20].noGravity =
true;
38038 Main.dust[
num20].velocity /= 2f;
38040 Main.dust[
num20].velocity /= 5f;
38041 }
38043 {
38044 if (Main.rand.Next(5) == 0)
38045 {
38047 dust.noGravity = true;
38048 dust.velocity *= 1.4f;
38049 }
38050 if (Main.rand.Next(5) == 0)
38051 {
38053 }
38054 }
38055 else if (
type == 105)
38056 {
38057 if (Main.rand.Next(3) == 0)
38058 {
38061 Main.dust[
num21].velocity *= 0.2f;
38062 }
38063 if (Main.rand.Next(4) == 0)
38064 {
38067 Main.dust[
num22].velocity *= 0.5f;
38068 }
38069 }
38070 else if (
type == 153)
38071 {
38073 Main.dust[
num23].noGravity =
true;
38074 Main.dust[
num23].fadeIn = 1.25f;
38075 Main.dust[
num23].velocity *= 0.25f;
38076 }
38078 {
38079 Lighting.AddLight(
base.Center, 0.65f, 0.9f, 1f);
38081 {
38084 Main.dust[
num25].velocity *= 0.5f;
38086 }
38087 }
38089 bool flag3 =
ai[0] >= (float)itemAnimationMax;
38091 {
38092 flag3 &= !player.channel;
38093 }
38095 {
38097 }
38098 }
static float Min(float value1, float value2)
static double Atan2(double y, double x)
IEntitySource GetProjectileSource_FromThis()
bool AI_019_Spears_GetExtensionHitbox(out Rectangle extensionBox)
static int NewProjectile(IEntitySource spawnSource, Vector2 position, Vector2 velocity, int Type, int Damage, float KnockBack, int Owner=-1, float ai0=0f, float ai1=0f, float ai2=0f)
static float Dot(Vector2 value1, Vector2 value2)