Example #1
0
 public bool CheckIfRingInSetAlredyEquiped(ItemSet itemSet)
 {
     return DatabaseProvider.InventoryItems.Any(
         x =>
             x.Character == this && x.IsEquiped() &&
             (x.ItemPosition == StatsManager.Position.Anneau1 ||
              x.ItemPosition == StatsManager.Position.Anneau2) &&
             x.ItemInfos.GetSet() == itemSet);
 }
Example #2
0
 public List<InventoryItem> GetAllItemsEquipedInSet(ItemSet itemSet)
 {
     return
         DatabaseProvider.InventoryItems.FindAll(
             x => x.Character == this && x.IsEquiped() && x.ItemInfos.GetSet() == itemSet);
 }
Example #3
0
        private void SendItemSetBonnus(ItemSet set)
        {
            var itemsInTheSameSet = _client.Character.GetAllItemsEquipedInSet(set);

            _client.SendPackets(string.Format("{0}+{1}|{2}|{3}", Packet.ObjectItemSet, set.Id,
                string.Join(",", itemsInTheSameSet.Select(x => x.Id)),
                itemsInTheSameSet.Count > 1
                    ? string.Join(",", set.BonusesDictionary[itemsInTheSameSet.Count].Select(x => x.ToString()))
                    : ""));
        }