예제 #1
0
        public void RemoveMonstersGroup(MonstersGroup group)
        {
            Send(string.Concat("GM|-", group.ID));

            lock (MonstersGroups)
                MonstersGroups.Remove(group);
        }
예제 #2
0
        public void AddMonstersGroup()
        {
            if (MonstersGroups.Count >= Model.MaxMonstersGroup)
            {
                return;
            }

            lock (MonstersGroups)
                MonstersGroups.Add(new Monsters.MonstersGroup(Model.Monsters, this));
        }
예제 #3
0
        public int NextNpcID()
        {
            var i = -1;

            while (Npcs.Any(x => x.ID == i) || MonstersGroups.Any(x => x.ID == i) || Fights.Any(x => x.GetFighters().ToList().Any(y => y.ID == i)))
            {
                i -= 1;
            }

            return(i);
        }