public static ModNPC GetNPC(int type)
{
return type >= NPCID.Count && type < NPCCount ? npcs[type - NPCID.Count] : null;
}
/// <summary> /// Gets the ModNPC instance corresponding to the specified type. /// </summary> /// <param name="type">The type of the npc</param> /// <returns>The ModNPC instance in the npcs array, null if not found.</returns> public static ModNPC GetModNPC(int type) => NPCLoader.GetNPC(type);