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

◆ ItemCheck()

void Terraria.Player.ItemCheck ( )
inline

Definition at line 40653 of file Player.cs.

40654 {
40655 if (CCed)
40656 {
40657 channel = false;
40659 return;
40660 }
40663 ItemCheckContext context = default(ItemCheckContext);
40664 bool flag = false;
40665 if (Main.myPlayer == whoAmI)
40666 {
40668 {
40669 controlUseItem = true;
40670 flag = true;
40671 }
40672 if (!cursorItemIconEnabled && item.stack > 0 && item.fishingPole > 0)
40673 {
40675 if (baitType > 0)
40676 {
40677 cursorItemIconEnabled = true;
40680 }
40681 }
40682 if (!cursorItemIconEnabled && item.stack > 0 && (item.type == 779 || item.type == 5134))
40683 {
40684 for (int i = 54; i < 58; i++)
40685 {
40686 if (inventory[i].ammo == item.useAmmo && inventory[i].stack > 0)
40687 {
40688 cursorItemIconEnabled = true;
40690 cursorItemIconPush = 10;
40691 break;
40692 }
40693 }
40695 {
40696 for (int j = 0; j < 54; j++)
40697 {
40698 if (inventory[j].ammo == item.useAmmo && inventory[j].stack > 0)
40699 {
40700 cursorItemIconEnabled = true;
40702 cursorItemIconPush = 10;
40703 break;
40704 }
40705 }
40706 }
40707 }
40708 }
40713 if (itemAnimation < 0)
40714 {
40715 itemAnimation = 0;
40716 }
40717 if (itemTime < 0)
40718 {
40719 itemTime = 0;
40720 }
40721 if (itemAnimation == 0 && reuseDelay > 0)
40722 {
40724 }
40726 if (itemAnimation == 0 && altFunctionUse == 2)
40727 {
40728 altFunctionUse = 0;
40729 }
40730 bool flag2 = true;
40731 if (gravDir == -1f && GolfHelper.IsPlayerHoldingClub(this))
40732 {
40733 flag2 = false;
40734 }
40735 if (flag2 && controlUseItem && releaseUseItem && itemAnimation == 0 && item.useStyle != 0)
40736 {
40737 if (altFunctionUse == 1)
40738 {
40739 altFunctionUse = 2;
40740 }
40741 if (item.shoot == 0)
40742 {
40743 itemRotation = 0f;
40744 }
40746 if (item.potion && flag3)
40747 {
40749 }
40750 if (item.mana > 0 && flag3 && whoAmI == Main.myPlayer && item.buffType != 0 && item.buffTime != 0)
40751 {
40752 AddBuff(item.buffType, item.buffTime);
40753 }
40754 if (item.shoot <= 0 || !ProjectileID.Sets.MinionTargettingFeature[item.shoot] || altFunctionUse != 2)
40755 {
40757 }
40758 if (whoAmI == Main.myPlayer && gravDir == 1f && item.mountType != -1 && mount.CanMount(item.mountType, this))
40759 {
40760 mount.SetMount(item.mountType, this);
40761 }
40762 if ((item.shoot <= 0 || !ProjectileID.Sets.MinionTargettingFeature[item.shoot] || altFunctionUse != 2) && flag3 && whoAmI == Main.myPlayer && item.shoot >= 0 && item.shoot < ProjectileID.Count && (ProjectileID.Sets.LightPet[item.shoot] || Main.projPet[item.shoot]))
40763 {
40765 }
40766 if (flag3)
40767 {
40769 }
40770 }
40771 bool flag4 = controlUseItem;
40772 if (mount.Active && mount.Type == 8)
40773 {
40775 }
40776 if (!flag4)
40777 {
40778 channel = false;
40779 }
40781 Rectangle drawHitbox = Item.GetDrawHitbox(item2.type, this);
40782 compositeFrontArm.enabled = false;
40783 compositeBackArm.enabled = false;
40784 if (itemAnimation > 0)
40785 {
40786 if (item.mana > 0)
40787 {
40789 }
40790 if (Main.dedServ)
40791 {
40792 itemHeight = item.height;
40793 itemWidth = item.width;
40794 }
40795 else
40796 {
40797 itemHeight = drawHitbox.Height;
40798 itemWidth = drawHitbox.Width;
40799 }
40800 itemAnimation--;
40801 if (itemAnimation == 0 && whoAmI == Main.myPlayer)
40802 {
40804 }
40805 }
40807 if (itemTime > 0)
40808 {
40809 itemTime--;
40810 if (ItemTimeIsZero && whoAmI == Main.myPlayer && !JustDroppedAnItem)
40811 {
40812 int type = item.type;
40813 if (type == 65 || type == 724 || type == 989 || type == 1226)
40814 {
40816 }
40817 }
40818 }
40819 if (itemAnimation > 0)
40820 {
40822 }
40823 else
40824 {
40826 }
40827 if (!JustDroppedAnItem)
40828 {
40832 if (whoAmI == Main.myPlayer)
40833 {
40835 }
40836 if (ItemTimeIsZero && itemAnimation > 0)
40837 {
40838 if (item.hairDye >= 0)
40839 {
40841 if (whoAmI == Main.myPlayer)
40842 {
40843 hairDye = (byte)item.hairDye;
40844 NetMessage.SendData(4, -1, -1, null, whoAmI);
40845 }
40846 }
40847 if (item.healLife > 0 || item.healMana > 0)
40848 {
40851 if (Main.myPlayer == whoAmI && item.type == 126 && breath == 0)
40852 {
40854 }
40855 }
40856 if (item.buffType > 0)
40857 {
40858 if (whoAmI == Main.myPlayer && item.buffType != 90 && item.buffType != 27)
40859 {
40860 AddBuff(item.buffType, item.buffTime);
40861 }
40863 }
40864 if (item.type == 678)
40865 {
40866 if (Main.getGoodWorld)
40867 {
40869 if (whoAmI == Main.myPlayer)
40870 {
40871 for (int k = 0; k < 3; k++)
40872 {
40873 int type2 = 0;
40874 int timeToAdd = 108000;
40875 switch (Main.rand.Next(18))
40876 {
40877 case 0:
40878 type2 = 16;
40879 break;
40880 case 1:
40881 type2 = 111;
40882 break;
40883 case 2:
40884 type2 = 114;
40885 break;
40886 case 3:
40887 type2 = 8;
40888 break;
40889 case 4:
40890 type2 = 105;
40891 break;
40892 case 5:
40893 type2 = 17;
40894 break;
40895 case 6:
40896 type2 = 116;
40897 break;
40898 case 7:
40899 type2 = 5;
40900 break;
40901 case 8:
40902 type2 = 113;
40903 break;
40904 case 9:
40905 type2 = 7;
40906 break;
40907 case 10:
40908 type2 = 6;
40909 break;
40910 case 11:
40911 type2 = 104;
40912 break;
40913 case 12:
40914 type2 = 115;
40915 break;
40916 case 13:
40917 type2 = 2;
40918 break;
40919 case 14:
40920 type2 = 9;
40921 break;
40922 case 15:
40923 type2 = 3;
40924 break;
40925 case 16:
40926 type2 = 117;
40927 break;
40928 case 17:
40929 type2 = 1;
40930 break;
40931 }
40933 }
40934 }
40935 }
40936 else
40937 {
40939 if (whoAmI == Main.myPlayer)
40940 {
40941 AddBuff(20, 216000);
40942 AddBuff(22, 216000);
40943 AddBuff(23, 216000);
40944 AddBuff(24, 216000);
40945 AddBuff(30, 216000);
40946 AddBuff(31, 216000);
40947 AddBuff(32, 216000);
40948 AddBuff(33, 216000);
40949 AddBuff(35, 216000);
40950 AddBuff(36, 216000);
40951 AddBuff(68, 216000);
40952 }
40953 }
40954 }
40955 }
40956 if ((item.type == 50 || item.type == 3124 || item.type == 3199 || item.type == 5358) && itemAnimation > 0)
40957 {
40958 if (Main.rand.Next(2) == 0)
40959 {
40960 Dust.NewDust(position, width, height, 15, 0f, 0f, 150, default(Color), 1.1f);
40961 }
40962 if (ItemTimeIsZero)
40963 {
40965 }
40966 else if (itemTime == item.useTime / 2)
40967 {
40968 for (int l = 0; l < 70; l++)
40969 {
40970 Dust.NewDust(position, width, height, 15, velocity.X * 0.5f, velocity.Y * 0.5f, 150, default(Color), 1.5f);
40971 }
40973 Spawn(PlayerSpawnContext.RecallFromItem);
40974 for (int m = 0; m < 70; m++)
40975 {
40976 Dust.NewDust(position, width, height, 15, 0f, 0f, 150, default(Color), 1.5f);
40977 }
40978 }
40979 }
40980 if ((item.type == 4263 || item.type == 5360) && itemAnimation > 0)
40981 {
40982 Vector2 vector = Vector2.UnitY.RotatedBy((float)itemAnimation * ((float)Math.PI * 2f) / 30f) * new Vector2(15f, 0f);
40983 for (int n = 0; n < 2; n++)
40984 {
40985 if (Main.rand.Next(3) == 0)
40986 {
40987 Dust dust = Dust.NewDustPerfect(base.Bottom + vector, Dust.dustWater());
40988 dust.velocity.Y *= 0f;
40989 dust.velocity.Y -= 4.5f;
40990 dust.velocity.X *= 1.5f;
40991 dust.scale = 0.8f;
40992 dust.alpha = 130;
40993 dust.noGravity = true;
40994 dust.fadeIn = 1.1f;
40995 }
40996 }
40997 if (ItemTimeIsZero)
40998 {
41000 }
41001 else if (itemTime == item.useTime / 2)
41002 {
41003 if (Main.netMode == 0)
41004 {
41005 MagicConch();
41006 }
41007 else if (Main.netMode == 1 && whoAmI == Main.myPlayer)
41008 {
41009 NetMessage.SendData(73, -1, -1, null, 1);
41010 }
41011 }
41012 }
41013 if ((item.type == 4819 || item.type == 5361) && itemAnimation > 0)
41014 {
41015 Vector2 vector2 = Vector2.UnitY.RotatedBy((float)itemAnimation * ((float)Math.PI * 2f) / 30f) * new Vector2(15f, 0f);
41016 for (int num = 0; num < 2; num++)
41017 {
41018 if (Main.rand.Next(3) == 0)
41019 {
41020 Dust dust2 = Dust.NewDustPerfect(base.Bottom + vector2, 35);
41021 dust2.velocity.Y *= 0f;
41022 dust2.velocity.Y -= 4.5f;
41023 dust2.velocity.X *= 1.5f;
41024 dust2.scale = 0.8f;
41025 dust2.alpha = 130;
41026 dust2.noGravity = true;
41027 dust2.fadeIn = 1.1f;
41028 }
41029 }
41030 if (ItemTimeIsZero)
41031 {
41033 }
41034 else if (itemTime == item.useTime / 2)
41035 {
41036 if (Main.netMode == 0)
41037 {
41038 DemonConch();
41039 }
41040 else if (Main.netMode == 1 && whoAmI == Main.myPlayer)
41041 {
41042 NetMessage.SendData(73, -1, -1, null, 2);
41043 }
41044 }
41045 }
41046 if (item.type == 5359 && itemAnimation > 0)
41047 {
41048 if (Main.rand.Next(2) == 0)
41049 {
41050 int num2 = Main.rand.Next(4);
41051 Color color = Color.Green;
41052 switch (num2)
41053 {
41054 case 0:
41055 case 1:
41056 color = new Color(100, 255, 100);
41057 break;
41058 case 2:
41059 color = Color.Yellow;
41060 break;
41061 case 3:
41062 color = Color.White;
41063 break;
41064 }
41065 Dust dust3 = Dust.NewDustPerfect(Main.rand.NextVector2FromRectangle(base.Hitbox), 267);
41066 dust3.noGravity = true;
41067 dust3.color = color;
41068 dust3.velocity *= 2f;
41069 dust3.scale = 0.8f + Main.rand.NextFloat() * 0.6f;
41070 }
41071 if (ItemTimeIsZero)
41072 {
41074 }
41075 else if (itemTime == item.useTime / 2)
41076 {
41077 if (Main.netMode == 0)
41078 {
41080 }
41081 else if (Main.netMode == 1 && whoAmI == Main.myPlayer)
41082 {
41083 NetMessage.SendData(73, -1, -1, null, 3);
41084 }
41085 }
41086 }
41087 if (item.type == 2350 && itemAnimation > 0)
41088 {
41089 if (ItemTimeIsZero)
41090 {
41093 for (int num3 = 0; num3 < 10; num3++)
41094 {
41095 Main.dust[Dust.NewDust(position, width, height, 15, velocity.X * 0.2f, velocity.Y * 0.2f, 150, Color.Cyan, 1.2f)].velocity *= 0.5f;
41096 }
41097 }
41098 else if (itemTime == 20)
41099 {
41101 for (int num4 = 0; num4 < 70; num4++)
41102 {
41103 Main.dust[Dust.NewDust(position, width, height, 15, velocity.X * 0.2f, velocity.Y * 0.2f, 150, Color.Cyan, 1.2f)].velocity *= 0.5f;
41104 }
41106 bool flag5 = immune;
41107 int num5 = immuneTime;
41108 Spawn(PlayerSpawnContext.RecallFromItem);
41109 immune = flag5;
41110 immuneTime = num5;
41111 for (int num6 = 0; num6 < 70; num6++)
41112 {
41113 Main.dust[Dust.NewDust(position, width, height, 15, 0f, 0f, 150, Color.Cyan, 1.2f)].velocity *= 0.5f;
41114 }
41115 if (item.stack > 0)
41116 {
41117 item.stack--;
41118 }
41119 }
41120 }
41121 if (item.type == 4870 && itemAnimation > 0)
41122 {
41123 if (ItemTimeIsZero)
41124 {
41127 for (int num7 = 0; num7 < 10; num7++)
41128 {
41129 Main.dust[Dust.NewDust(position, width, height, 15, velocity.X * 0.2f, velocity.Y * 0.2f, 150, Color.Cyan, 1.2f)].velocity *= 0.5f;
41130 }
41131 }
41132 else if (itemTime == 20)
41133 {
41135 for (int num8 = 0; num8 < 70; num8++)
41136 {
41137 Main.dust[Dust.NewDust(position, width, height, 15, velocity.X * 0.2f, velocity.Y * 0.2f, 150, Color.Cyan, 1.2f)].velocity *= 0.5f;
41138 }
41139 if (whoAmI == Main.myPlayer)
41140 {
41142 }
41143 for (int num9 = 0; num9 < 70; num9++)
41144 {
41145 Main.dust[Dust.NewDust(position, width, height, 15, 0f, 0f, 150, Color.Cyan, 1.2f)].velocity *= 0.5f;
41146 }
41147 if (item.stack > 0)
41148 {
41149 item.stack--;
41150 }
41151 }
41152 }
41153 if (item.type == 2351 && itemAnimation > 0)
41154 {
41155 if (ItemTimeIsZero)
41156 {
41158 }
41159 else if (itemTime == 2)
41160 {
41161 if (Main.netMode == 0)
41162 {
41164 }
41165 else if (Main.netMode == 1 && whoAmI == Main.myPlayer)
41166 {
41167 NetMessage.SendData(73);
41168 }
41169 if (item.stack > 0)
41170 {
41171 item.stack--;
41172 }
41173 }
41174 }
41175 if (item.type == 2756 && itemAnimation > 0)
41176 {
41177 if (ItemTimeIsZero)
41178 {
41180 }
41181 else if (itemTime == 2)
41182 {
41183 if (whoAmI == Main.myPlayer)
41184 {
41185 Male = !Male;
41186 if (Main.netMode == 1)
41187 {
41188 NetMessage.SendData(4, -1, -1, null, whoAmI);
41189 }
41190 }
41191 if (item.stack > 0)
41192 {
41193 item.stack--;
41194 }
41195 }
41196 else
41197 {
41198 float num10 = item.useTime;
41199 num10 = (num10 - (float)itemTime) / num10;
41200 float num11 = 44f;
41201 float num12 = (float)Math.PI * 3f;
41202 Vector2 vector3 = new Vector2(15f, 0f).RotatedBy(num12 * num10);
41203 vector3.X *= direction;
41204 for (int num13 = 0; num13 < 2; num13++)
41205 {
41206 int type3 = 221;
41207 if (num13 == 1)
41208 {
41209 vector3.X *= -1f;
41210 type3 = 219;
41211 }
41212 Vector2 vector4 = new Vector2(vector3.X, num11 * (1f - num10) - num11 + (float)(height / 2));
41213 vector4 += base.Center;
41214 int num14 = Dust.NewDust(vector4, 0, 0, type3, 0f, 0f, 100);
41215 Main.dust[num14].position = vector4;
41216 Main.dust[num14].noGravity = true;
41217 Main.dust[num14].velocity = Vector2.Zero;
41218 Main.dust[num14].scale = 1.3f;
41219 Main.dust[num14].customData = this;
41220 }
41221 }
41222 }
41223 if (whoAmI == Main.myPlayer)
41224 {
41225 if ((itemTimeMax != 0 && itemTime == itemTimeMax) | (!item.IsAir && item.IsNotTheSameAs(lastVisualizedSelectedItem)))
41226 {
41228 }
41229 }
41230 else
41231 {
41233 }
41234 if (whoAmI == Main.myPlayer)
41235 {
41236 if (!dontConsumeWand && itemTime == (int)((float)item.useTime * tileSpeed) && item.tileWand > 0)
41237 {
41238 int tileWand = item.tileWand;
41239 for (int num15 = 0; num15 < 58; num15++)
41240 {
41241 if (tileWand == inventory[num15].type && inventory[num15].stack > 0)
41242 {
41244 if (inventory[num15].stack <= 0)
41245 {
41246 inventory[num15] = new Item();
41247 }
41248 break;
41249 }
41250 }
41251 }
41252 if (itemTimeMax != 0 && itemTime == itemTimeMax && item.consumable && !context.SkipItemConsumption)
41253 {
41254 bool flag6 = true;
41255 if (item.ranged)
41256 {
41257 if (huntressAmmoCost90 && Main.rand.Next(10) == 0)
41258 {
41259 flag6 = false;
41260 }
41261 if (chloroAmmoCost80 && Main.rand.Next(5) == 0)
41262 {
41263 flag6 = false;
41264 }
41265 if (ammoCost80 && Main.rand.Next(5) == 0)
41266 {
41267 flag6 = false;
41268 }
41269 if (ammoCost75 && Main.rand.Next(4) == 0)
41270 {
41271 flag6 = false;
41272 }
41273 }
41274 if (item.IsACoin)
41275 {
41276 flag6 = true;
41277 }
41278 bool? flag7 = ItemID.Sets.ForceConsumption[item.type];
41279 if (flag7.HasValue)
41280 {
41281 flag6 = flag7.Value;
41282 }
41283 if (flag6)
41284 {
41285 if (item.stack > 0)
41286 {
41287 item.stack--;
41288 }
41289 if (item.stack <= 0)
41290 {
41292 Main.blockMouse = true;
41293 }
41294 }
41295 }
41296 if (item.stack <= 0 && itemAnimation == 0)
41297 {
41298 inventory[selectedItem] = new Item();
41299 }
41300 if (selectedItem == 58 && itemAnimation != 0)
41301 {
41302 Main.mouseItem = item.Clone();
41303 }
41304 }
41305 }
41306 if (itemAnimation == 0)
41307 {
41308 JustDroppedAnItem = false;
41309 }
41310 if (whoAmI == Main.myPlayer && flag)
41311 {
41313 }
41314 }
const double PI
Definition Math.cs:16
static void PlaySound(int type, Vector2 position, int style=1)
Vector2 velocity
Definition Entity.cs:16
Vector2 position
Definition Entity.cs:14
static void HandleSpecialEvent(Player player, int eventID)
static bool IsPlayerHoldingClub(Player player)
static ? bool[] ForceConsumption
Definition ItemID.cs:132
static bool[] MinionTargettingFeature
static readonly short Count
static readonly LegacySoundStyle Item3
Definition SoundID.cs:420
Item Clone()
Definition Item.cs:49916
int tileWand
Definition Item.cs:89
int stack
Definition Item.cs:149
int useAmmo
Definition Item.cs:243
LegacySoundStyle UseSound
Definition Item.cs:191
bool CanMount(int m, Player mountingPlayer)
Definition Mount.cs:5452
bool Active
Definition Mount.cs:345
void SetMount(int m, Player mountedPlayer, bool faceLeft=false)
Definition Mount.cs:5258
void ItemCheck_EmitDrinkParticles(Item sItem)
Definition Player.cs:41543
void ItemCheck_ApplyManaRegenDelay(Item sItem)
Definition Player.cs:47674
void MagicConch()
Definition Player.cs:52512
void ApplyItemTime(Item sItem)
Definition Player.cs:3752
void Shellphone_Spawn()
Definition Player.cs:52577
int itemAnimationMax
Definition Player.cs:2567
bool cursorItemIconEnabled
Definition Player.cs:1489
int cursorItemIconID
Definition Player.cs:1493
void ItemCheck_HandleMount()
Definition Player.cs:49459
void ApplyPotionDelay(Item sItem)
Definition Player.cs:48616
float itemRotation
Definition Player.cs:1177
void EmitMaxManaEffect()
Definition Player.cs:46937
bool ItemTimeIsZero
Definition Player.cs:3525
int GetWeaponDamage(Item sItem)
Definition Player.cs:49909
void ApplyReuseDelay()
Definition Player.cs:49379
float tileSpeed
Definition Player.cs:2053
void ApplyLifeAndOrMana(Item item)
Definition Player.cs:48647
Item lastVisualizedSelectedItem
Definition Player.cs:1261
bool releaseUseItem
Definition Player.cs:1413
bool ItemCheck_CheckCanUse(Item sItem)
Definition Player.cs:48702
bool JustDroppedAnItem
Definition Player.cs:2015
void UpdatePlacementPreview(Item sItem)
Definition Player.cs:41316
void DoPotionOfReturnTeleportationAndSetTheComebackPoint()
Definition Player.cs:35664
void Fishing_GetBait(out int baitPower, out int baitType)
Definition Player.cs:40320
void RemoveAllGrapplingHooks()
Definition Player.cs:31290
void TeleportationPotion()
Definition Player.cs:52647
void ItemCheck_ApplyHoldStyle(float mountOffset, Item sItem, Rectangle heldItemFrame)
Definition Player.cs:47352
void ItemCheck_ApplyUseStyle(float mountOffset, Item sItem, Rectangle heldItemFrame)
Definition Player.cs:47744
void ItemCheck_EmitFoodParticles(Item sItem)
Definition Player.cs:41524
void ItemCheck_HackHoldStyles(Item sItem)
Definition Player.cs:49386
bool dontConsumeWand
Definition Player.cs:661
void ItemCheck_HandleMPItemAnimation(Item sItem)
Definition Player.cs:49421
void FreeUpPetsAndMinions(Item sItem)
Definition Player.cs:48495
void ItemCheck_OwnerOnlyCode(ref ItemCheckContext context, Item sItem, int weaponDamage, Rectangle heldItemFrame)
Definition Player.cs:41357
void ItemCheck_ApplyPetBuffs(Item sItem)
Definition Player.cs:49624
void AddBuff(int type, int timeToAdd, bool quiet=true, bool foodHack=false)
Definition Player.cs:4441
bool huntressAmmoCost90
Definition Player.cs:1591
bool chloroAmmoCost80
Definition Player.cs:1589
float HeightOffsetHitboxCenter
Definition Player.cs:2771
void DemonConch()
Definition Player.cs:52596
void Spawn(PlayerSpawnContext context)
Definition Player.cs:35701
int cursorItemIconPush
Definition Player.cs:1495
void ItemCheck_StartActualUse(Item sItem)
Definition Player.cs:48464
void ItemCheck_EmitHeldItemLight(Item sItem)
Definition Player.cs:46949
Item[] inventory
Definition Player.cs:1257
bool controlUseTile
Definition Player.cs:1393
bool controlUseItem
Definition Player.cs:1391

References Terraria.Item.Clone(), Terraria.ID.ProjectileID.Count, Microsoft.Xna.Framework.Color.Cyan, Terraria.Main.dedServ, Terraria.Main.dust, Terraria.Dust.dustWater(), Terraria.ID.ItemID.Sets.ForceConsumption, Terraria.Item.GetDrawHitbox(), Terraria.Main.getGoodWorld, Microsoft.Xna.Framework.Color.Green, Terraria.GameContent.Achievements.AchievementsHelper.HandleSpecialEvent(), Terraria.GameContent.Golf.GolfHelper.IsPlayerHoldingClub(), System.item, Terraria.ID.SoundID.Item3, Terraria.ID.ProjectileID.Sets.LightPet, Terraria.ID.ProjectileID.Sets.MinionTargettingFeature, Terraria.Main.myPlayer, Terraria.Main.netMode, Terraria.Dust.NewDust(), Terraria.Dust.NewDustPerfect(), System.Math.PI, Terraria.Audio.SoundEngine.PlaySound(), Terraria.Main.projPet, Terraria.Main.rand, Terraria.NetMessage.SendData(), Terraria.GameInput.PlayerInput.ShouldFastUseItem, Terraria.Player.ItemCheckContext.SkipItemConsumption, Terraria.Item.stack, Terraria.Item.tileWand, Terraria.GameInput.PlayerInput.TryEndingFastUse(), System.type, Terraria.Item.type, Microsoft.Xna.Framework.Vector2.UnitY, Terraria.Item.useAmmo, Terraria.Item.UseSound, Microsoft.Xna.Framework.Color.White, Microsoft.Xna.Framework.Color.Yellow, and Microsoft.Xna.Framework.Vector2.Zero.