示例#1
0
        public ushort CloseCellWithoutEntitiesPositions(ushort cellId)
        {
            var cells = CloseCells(cellId);

            if (cells.Count() == 0)
            {
                return(0);
            }
            else
            {
                return(cells.FirstOrDefault(x => !Instance.GetEntities().ToList().ConvertAll <ushort>(w => w.CellId).Contains(x)));
            }
        }
示例#2
0
 public void RemoveGroup(AbstractMapInstance instance, MonsterRecord[] monsterRecords)
 {
     foreach (var group in instance.GetEntities <MonsterGroup>())
     {
         if (group.GetMonsters().All(x => monsterRecords.Contains(x.Template)))
         {
             instance.RemoveEntity(group);
             break;
         }
     }
 }
示例#3
0
 public bool GroupExist(AbstractMapInstance instance, MonsterRecord[] monsterRecords)
 {
     foreach (var group in instance.GetEntities <MonsterGroup>())
     {
         if (group.GetMonsters().All(x => monsterRecords.Contains(x.Template)))
         {
             return(true);
         }
     }
     return(false);
 }