internal void SetNpc(int id) { if (npcs == null) { npcs = new SortedList <int, L2Citizen>(); } NpcTemplate t = NpcTable.Instance.getNpcTemplate(id); L2Citizen npc = null; switch (t.NpcId) { case 35461: npc = new L2HideoutManager(this); break; case 35462: npc = new L2Doormen(this); break; } npc.setTemplate(t); StructureSpawn ss = StructureTable.Instance.GetSpawn(id); npc.X = ss.x; npc.Y = ss.y; npc.Z = ss.z; npc.Heading = ss.heading; npcs.Add(t.NpcId, npc); }
internal void SetNpc(int id) { if (npcs == null) { npcs = new SortedList <int, L2Npc>(); } NpcTemplate t = new NpcTemplate(new StatsSet()); //NpcTable.Instance.GetNpcTemplate(id); L2Npc npc = null; switch (t.NpcId) { case 35461: npc = new L2HideoutManager(this); break; case 35462: npc = new L2Doormen(this); break; } //npc.setTemplate(t); if (npc == null) { return; } StructureSpawn ss = StructureTable.Instance.GetSpawn(id); npc.X = ss.X; npc.Y = ss.Y; npc.Z = ss.Z; npc.Heading = ss.Heading; npcs.Add(t.NpcId, npc); }