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

◆ GetDrawHitbox()

static Rectangle Terraria.Item.GetDrawHitbox ( int type,
Player user )
inlinestatic

Definition at line 51432 of file Item.cs.

51433 {
51434 //IL_0007: Unknown result type (might be due to invalid IL or missing references)
51435 //IL_002e: Unknown result type (might be due to invalid IL or missing references)
51436 //IL_0096: Unknown result type (might be due to invalid IL or missing references)
51437 //IL_00a9: Unknown result type (might be due to invalid IL or missing references)
51438 //IL_00da: Unknown result type (might be due to invalid IL or missing references)
51439 //IL_00c7: Unknown result type (might be due to invalid IL or missing references)
51440 if (Main.dedServ)
51441 {
51442 return Rectangle.Empty;
51443 }
51444 Main.instance.LoadItem(type);
51445 if (ItemID.Sets.IsFood[type])
51446 {
51447 return TextureAssets.Item[type].Frame(1, 3, 0, 1);
51448 }
51449 switch (type)
51450 {
51451 case 75:
51452 return TextureAssets.Item[type].Frame(1, 8);
51453 case 520:
51454 case 521:
51455 case 547:
51456 case 548:
51457 case 549:
51458 case 575:
51459 case 3453:
51460 case 3454:
51461 case 3455:
51462 case 3580:
51463 case 3581:
51464 case 4068:
51465 case 4069:
51466 case 4070:
51467 return TextureAssets.Item[type].Frame(1, 4);
51468 default:
51469 return Main.itemAnimations[type]?.GetFrame(TextureAssets.Item[type].Value) ?? TextureAssets.Item[type].Frame();
51470 }
51471 }
static Asset< Texture2D >[] Item
static bool[] IsFood
If true for a given item type (F:Terraria.Item.type), then that item is food. Food items can be pla...
Definition ItemID.cs:446
int type
The Item ID of this item. The Item ID is a unique number assigned to each Item loaded into the game....
Definition Item.cs:345

References Terraria.Main.dedServ, Terraria.Main.instance, Terraria.ID.ItemID.Sets.IsFood, Terraria.GameContent.TextureAssets.Item, Terraria.Main.itemAnimations, and Terraria.Item.type.

Referenced by Terraria.Main.DrawInterface_40_InteractItemIcon(), Terraria.Main.DrawMouseOver(), Terraria.Player.ItemCheck_Inner(), and Terraria.Player.PlayerFrame().

+ Here is the caller graph for this function: