44736 {
44737
44738
44739
44740
44741
44742
44743
44744
44745
44746
44747
44748
44749
44750
44751
44752
44753
44754
44755
44756
44757
44758
44759
44760
44761
44762
44763
44764
44765
44766
44767
44768
44769
44770
44771
44772
44773
44774
44775
44776
44777
44778
44779
44780
44781
44782
44783
44786 if (!Main.dedServ)
44787 {
44790 switch (
sItem.type)
44791 {
44792 case 5094:
44795 break;
44796 case 5095:
44799 break;
44800 case 5096:
44803 break;
44804 case 5097:
44807 break;
44808 }
44810 }
44815 {
44817 }
44819 {
44821 }
44822 if (
sItem.useStyle == 1)
44823 {
44825 {
44827 {
44828 itemRectangle.X -= (int)((
double)itemRectangle.Width * 1.4 - (double)
itemRectangle.Width);
44829 }
44830 itemRectangle.Width = (int)((double)itemRectangle.Width * 1.4);
44831 itemRectangle.Y += (int)((
double)itemRectangle.Height * 0.5 * (double)
gravDir);
44832 itemRectangle.Height = (int)((double)itemRectangle.Height * 1.1);
44833 }
44835 {
44837 {
44838 itemRectangle.X -= (int)((double)itemRectangle.Width * 1.2);
44839 }
44840 itemRectangle.Width *= 2;
44841 itemRectangle.Y -= (int)(((
double)itemRectangle.Height * 1.4 - (double)
itemRectangle.Height) * (double)
gravDir);
44842 itemRectangle.Height = (int)((double)itemRectangle.Height * 1.4);
44843 }
44844 }
44845 else if (
sItem.useStyle == 3)
44846 {
44848 {
44850 }
44851 else
44852 {
44854 {
44855 itemRectangle.X -= (int)((
double)itemRectangle.Width * 1.4 - (double)
itemRectangle.Width);
44856 }
44857 itemRectangle.Width = (int)((double)itemRectangle.Width * 1.4);
44858 itemRectangle.Y += (int)((double)itemRectangle.Height * 0.6);
44859 itemRectangle.Height = (int)((double)itemRectangle.Height * 0.6);
44860 if (
sItem.type == 946 ||
sItem.type == 4707)
44861 {
44862 itemRectangle.Height += 14;
44863 itemRectangle.Width -= 10;
44865 {
44866 itemRectangle.X += 10;
44867 }
44868 }
44869 }
44870 }
44872 if (
sItem.type == 1450 && Main.rand.Next(3) == 0)
44873 {
44875 float x = itemRectangle.X + Main.rand.Next(
itemRectangle.Width);
44876 float y = itemRectangle.Y + Main.rand.Next(
itemRectangle.Height);
44877 if (Main.rand.Next(500) == 0)
44878 {
44879 num3 = Gore.NewGore(
new Vector2(x, y),
default(Vector2), 415, (float)Main.rand.Next(51, 101) * 0.01f);
44880 }
44881 else if (Main.rand.Next(250) == 0)
44882 {
44883 num3 = Gore.NewGore(
new Vector2(x, y),
default(Vector2), 414, (float)Main.rand.Next(51, 101) * 0.01f);
44884 }
44885 else if (Main.rand.Next(80) == 0)
44886 {
44887 num3 = Gore.NewGore(
new Vector2(x, y),
default(Vector2), 413, (float)Main.rand.Next(51, 101) * 0.01f);
44888 }
44889 else if (Main.rand.Next(10) == 0)
44890 {
44891 num3 = Gore.NewGore(
new Vector2(x, y),
default(Vector2), 412, (float)Main.rand.Next(51, 101) * 0.01f);
44892 }
44893 else if (Main.rand.Next(3) == 0)
44894 {
44895 num3 = Gore.NewGore(
new Vector2(x, y),
default(Vector2), 411, (float)Main.rand.Next(51, 101) * 0.01f);
44896 }
44898 {
44900 Main.gore[
num3].velocity.Y *= 0.3f;
44901 }
44902 }
44903 if (
sItem.type == 3542)
44904 {
44906 }
44907 if (
sItem.type == 3779)
44908 {
44913 {
44915 Dust
obj = Main.dust[Dust.NewDust(
vector - Vector2.One * 8
f, 16, 16, 27, 0
f, -2
f)];
44916 obj.noGravity = true;
44918 obj.velocity =
new Vector2(0
f, (0
f -
gravDir) * 2
f);
44919 obj.scale = 1.2f;
44920 obj.alpha = 200;
44921 }
44922 }
44923 }
Vector2 position
The position of this Entity in world coordinates.
static void UseItemHitbox(Item item, Player player, ref Rectangle hitbox, ref bool noHitbox)
Calls ModItem.UseItemHitbox, then all GlobalItem.UseItemHitbox hooks.
This serves as the central class from which item-related functions are carried out....
float gfxOffY
An offset from the actual position of the player that will be added to the draw position....
float GetAdjustedItemScale(Item item)
Used to determine what the overall scale of an item should be. M:Terraria.ModLoader....