private static void LoadNPCName() { string loaded; byte[] dec; System.IO.StreamReader temp_stream; System.IO.MemoryStream mem_stream; try { dec = GetData(data_npcname, "c8c2xagUga5enE7A"); mem_stream = new System.IO.MemoryStream(dec); temp_stream = new System.IO.StreamReader((System.IO.Stream)mem_stream); int version = Util.GetInt32(temp_stream.ReadLine()); if (version < Globals.MinDataPack) { System.Windows.Forms.MessageBox.Show("npcname.txt is too old for this version of L2.Net!"); System.Windows.Forms.Application.Exit(); } Globals.npcname = new SortedList(); Globals.npcname.Capacity = Globals.COUNT_NPCNAME; while ((loaded = temp_stream.ReadLine()) != null) { NPCName npcnm = new NPCName(); npcnm.Parse(loaded); Globals.npcname.Add(npcnm.ID, npcnm); } mem_stream.Close(); temp_stream.Close(); NPCName null_npc = new NPCName(); null_npc.ID = 0; null_npc.Name = "null npc"; Globals.npcname.Add((uint)0, null_npc); //Add_Text("loaded npcname", Globals.Red); } catch { Globals.l2net_home.Add_PopUpError("failed to load data\\npcname.txt"); } dec = null; }