internal static void ResizeArrays() { Array.Resize(ref npcTexture, nextNPC); Array.Resize(ref TextureAssets.Npc, nextNPC); Array.Resize(ref Main.townNPCCanSpawn, nextNPC); Array.Resize(ref Main.slimeRainNPC, nextNPC); Array.Resize(ref Main.npcCatchable, nextNPC); Array.Resize(ref Main.npcFrameCount, nextNPC); Array.Resize(ref NPC.killCount, nextNPC); Array.Resize(ref NPC.npcsFoundForCheckActive, nextNPC); Array.Resize(ref Lang._npcNameCache, nextNPC); Array.Resize(ref EmoteBubble.CountNPCs, nextNPC); LoaderUtils.ResetStaticMembers(typeof(NPCID), true); for (int k = NPCID.Count; k < nextNPC; k++) { Main.npcFrameCount[k] = 1; Lang._npcNameCache[k] = LocalizedText.Empty; } }
internal static void ResizeArrays() { Array.Resize(ref itemTexture, nextItem); Array.Resize(ref TextureAssets.Item, nextItem); Array.Resize(ref TextureAssets.ItemFlame, nextItem); Array.Resize(ref Main.itemAnimations, nextItem); Array.Resize(ref Item.cachedItemSpawnsByType, nextItem); Array.Resize(ref Item.staff, nextItem); Array.Resize(ref Item.claw, nextItem); Array.Resize(ref Lang._itemNameCache, nextItem); Array.Resize(ref Lang._itemTooltipCache, nextItem); LoaderUtils.ResetStaticMembers(typeof(ItemID), true); for (int k = ItemID.Count; k < nextItem; k++) { Lang._itemNameCache[k] = LocalizedText.Empty; Lang._itemTooltipCache[k] = ItemTooltip.None; Item.cachedItemSpawnsByType[k] = -1; } Array.Resize(ref Main.anglerQuestItemNetIDs, 41); if (vanillaWings[1] != 0) { return; } Item item = new Item(); for (int k = 0; k < ItemID.Count; k++) { item.SetDefaults(k); if (item.wingSlot > 0) { vanillaWings[item.wingSlot] = k; } } }