Ejemplo n.º 1
0
        public void AddInteractiveSpawn(InteractiveSpawn spawn, InteractiveCustomSkillRecord skill, InteractiveSpawnSkills spawnSkill)
        {
            Database.Insert(spawn);
            Database.Insert(skill);
            Database.Insert(spawnSkill);

            m_interactivesSpawns.Add(spawn.Id, spawn);

            spawn.GetMap().SpawnInteractive(spawn);
        }
Ejemplo n.º 2
0
        public void RemoveInteractiveSpawn(InteractiveSpawn spawn)
        {
            var skills = spawn.GetSkills();

            foreach (var skill in skills)
            {
                Database.Delete(skill);
                Database.Delete("interactives_spawns_skills", "SkillId", skill.Id);
            }
            var map = spawn.GetMap();

            foreach (var io in map.GetInteractiveObjects().Where(x => x.Spawn == spawn).ToArray())
            {
                map.UnSpawnInteractive(io);
            }

            Database.Delete(spawn);
            m_interactivesSpawns.Remove(spawn.Id);
        }