Пример #1
0
        public void Push(SuitBuildableMyWorldObject item, EquippableSlotFlags slot)
        {
            cache[nextOpenCacheIndex].Piece      = item;
            cache[nextOpenCacheIndex].Slot       = slot;
            cache[nextOpenCacheIndex].SpellCount = item.SpellsToUseInSearch.Count;

            occupiedSlots |= slot;

            for (int i = 0; i < item.SpellsToUseInSearch.Count; i++)
            {
                spells[nextOpenSpellIndex] = item.SpellsToUseInSearch[i];
                nextOpenSpellIndex++;
            }

            nextOpenCacheIndex++;

            if (item.ItemSetId != -1)
            {
                armorSetCountById[item.ItemSetId]++;
            }

            if (item.CalcedStartingArmorLevel > 0)
            {
                TotalBaseArmorLevel += (item.CalcedStartingArmorLevel * slot.GetTotalBitsSet());
            }

            if (slot.IsBodyArmor())
            {
                TotalBodyArmorPieces++;
            }
        }
Пример #2
0
		public void Push(SuitBuildableMyWorldObject item, EquippableSlotFlags slot)
		{
			cache[nextOpenCacheIndex].Piece = item;
			cache[nextOpenCacheIndex].Slot = slot;
			cache[nextOpenCacheIndex].SpellCount = item.SpellsToUseInSearch.Count;

			occupiedSlots |= slot;

			for (int i = 0; i < item.SpellsToUseInSearch.Count; i++)
			{
				spells[nextOpenSpellIndex] = item.SpellsToUseInSearch[i];
				nextOpenSpellIndex++;
			}

			nextOpenCacheIndex++;

			if (item.ItemSetId != -1)
				armorSetCountById[item.ItemSetId]++;

			if (item.CalcedStartingArmorLevel > 0)
				TotalBaseArmorLevel += (item.CalcedStartingArmorLevel * slot.GetTotalBitsSet());

			if (slot.IsBodyArmor())
				TotalBodyArmorPieces++;
		}
Пример #3
0
        public void Push(LeanMyWorldObject item, EquippableSlotFlags slot)
        {
            slotCache[nextOpenCacheIndex].Piece = item;
            slotCache[nextOpenCacheIndex].Slot  = slot;
            //slotCache[nextOpenCacheIndex].SpellCount = item.SpellsToUseInSearch.Count; // Used for the old search compare method

            occupiedSlots |= slot;

            // Used for the old search compare method

            /*for (int i = 0; i < item.SpellsToUseInSearch.Count; i++)
             * {
             *      spells[nextOpenSpellIndex] = item.SpellsToUseInSearch[i];
             *      nextOpenSpellIndex++;
             * }*/

            if (nextOpenCacheIndex == 0)
            {
                spellBitmaps[nextOpenCacheIndex] = item.SpellBitmap;
            }
            else
            {
                spellBitmaps[nextOpenCacheIndex] = spellBitmaps[nextOpenCacheIndex - 1] | item.SpellBitmap;
            }

            nextOpenCacheIndex++;

            if (item.ItemSetId != -1)
            {
                armorSetCountById[item.ItemSetId]++;
            }

            if (item.CalcedStartingArmorLevel > 0)
            {
                TotalBaseArmorLevel += (item.CalcedStartingArmorLevel * slot.GetTotalBitsSet());
            }

            if (slot.IsBodyArmor())
            {
                TotalBodyArmorPieces++;
            }
        }