51523 {
51524
51525
51526
51527
51529 {
51530 return 0;
51531 }
51532 if (Main.rand == null)
51533 {
51535 }
51537 {
51538 return Main.maxItems;
51539 }
51540 if (Main.tenthAnniversaryWorld)
51541 {
51542 if (Type == 58)
51543 {
51544 Type = Main.rand.NextFromList(new short[3] { 1734, 1867, 58 });
51545 }
51546 if (Type == 184)
51547 {
51548 Type = Main.rand.NextFromList(new short[3] { 1735, 1868, 184 });
51549 }
51550 }
51551 if (Main.halloween)
51552 {
51553 if (Type == 58)
51554 {
51555 Type = 1734;
51556 }
51557 if (Type == 184)
51558 {
51559 Type = 1735;
51560 }
51561 }
51562 if (Main.xMas)
51563 {
51564 if (Type == 58)
51565 {
51566 Type = 1867;
51567 }
51568 if (Type == 184)
51569 {
51570 Type = 1868;
51571 }
51572 }
51574 {
51576 return 400;
51577 }
51578 Main.item[400] =
new Item();
51580 if (Main.netMode != 1)
51581 {
51583 }
51584 Main.timeItemSlotCannotBeReusedFor[
num] = 0;
51588 {
51590 item = Main.item[
num];
51592 }
51593 else
51594 {
51595 item.SetDefaults(Type);
51597 item.stack =
Stack;
51598 }
51599 item.position.X = X + Width / 2 - item.width / 2;
51600 item.position.Y = Y + Height / 2 - item.height / 2;
51601 item.wet = Collision.WetCollision(item.position, item.width, item.height);
51602 item.velocity.X = (float)Main.rand.Next(-30, 31) * 0.1f;
51603 item.velocity.Y = (float)Main.rand.Next(-40, -15) * 0.1f;
51604 if (Type == 859 || Type == 4743)
51605 {
51607 item2.velocity *= 0
f;
51608 }
51610 {
51611 item.velocity.X = (float)Main.rand.Next(-30, 31) * 0.1f;
51612 item.velocity.Y = (float)Main.rand.Next(-30, 31) * 0.1f;
51613 }
51614 item.active = true;
51618 {
51619 item.newAndShiny = true;
51620 }
51623 {
51624 NetMessage.SendData(21, -1, -1,
null,
num,
noGrabDelay.ToInt());
51625 }
51626 else if (Main.netMode == 0)
51627 {
51628 item.playerIndexTheItemIsReservedFor = Main.myPlayer;
51629 }
51631 }
static bool[] NeverAppearsAsNewInInventory
If true for a given item type (F:Terraria.Item.type), then that item will never be highlighted (F:Ter...
static int[] OverflowProtectionTimeOffset
If != 0 for a given item type (F:Terraria.Item.type), then that item will spawn with F:Terraria....
static bool[] NebulaPickup
Do not add items to this set. If true for a given item type (F:Terraria.Item.type),...
static int numberOfNewItems
static int PickAnItemSlotToSpawnItemOn(bool reverseLookup, int nextItem)
static int[] cachedItemSpawnsByType
The number of cached item spawns by type. A value of -1 means that an item type is not being cached....
static bool newItemDisabled
int IEntityWithGlobals< GlobalItem >. Type
int noGrabDelay
The delay, in ticks, before players can pick up this item. Usually set to 100 (approximately 1....
static void OnSpawn(Item item, IEntitySource source)
This serves as the central class from which item-related functions are carried out....
static readonly IList< int > blockLoot
Allows you to stop an NPC from dropping loot by adding item IDs to this list. This list will be clear...
This serves as the central class from which NPC-related functions are carried out....
static bool HighlightNewItems