public void RemoveMonstersGroup(MonstersGroup group) { Send(string.Concat("GM|-", group.ID)); lock (MonstersGroups) MonstersGroups.Remove(group); }
public void AddMonstersGroup() { if (MonstersGroups.Count >= Model.MaxMonstersGroup) { return; } lock (MonstersGroups) MonstersGroups.Add(new Monsters.MonstersGroup(Model.Monsters, this)); }
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); }