Exemplo n.º 1
0
        public void TestRemove()
        {
            TestHelpers.InMethod();
//            log4net.Config.XmlConfigurator.Configure();

            SetUpScene();

            ScenePresence sp = SceneHelpers.AddScenePresence(m_scene, TestHelpers.ParseTail(0x1));
//            ScenePresence originalAvatar = scene.GetScenePresence(originalClient.AgentId);

            Vector3 startPos = new Vector3(128, 128, 30);
            UUID    npcId    = m_npcMod.CreateNPC("John", "Smith", startPos, UUID.Zero, true, m_scene, sp.Appearance);

            m_npcMod.DeleteNPC(npcId, m_scene);

            ScenePresence deletedNpc = m_scene.GetScenePresence(npcId);

            Assert.That(deletedNpc, Is.Null);
            IClientAPI client;

            Assert.That(m_scene.TryGetClient(npcId, out client), Is.False);

            // Have to account for SP still present.
            Assert.That(m_scene.AuthenticateHandler.GetAgentCircuits().Count, Is.EqualTo(1));
        }
Exemplo n.º 2
0
        public void TestRemove()
        {
            TestHelpers.InMethod();
//            log4net.Config.XmlConfigurator.Configure();

            ScenePresence sp = SceneHelpers.AddScenePresence(m_scene, TestHelpers.ParseTail(0x1));
//            ScenePresence originalAvatar = scene.GetScenePresence(originalClient.AgentId);

            Vector3 startPos = new Vector3(128, 128, 30);
            UUID    npcId    = m_npcMod.CreateNPC("John", "Smith", startPos, UUID.Zero, true, m_scene, sp.Appearance);

            m_npcMod.DeleteNPC(npcId, m_scene);

            ScenePresence deletedNpc = m_scene.GetScenePresence(npcId);

            Assert.That(deletedNpc, Is.Null);
        }
Exemplo n.º 3
0
 private void deleteActor(UUID uuid)
 {
     npc.DeleteNPC(actors[uuid].UUID, m_scene);
     actors.Remove(uuid);
 }