public void MousePutDownInEq(EqSlot slot) { if (airItem == null) { return; } if (!(airItem.item is EquippableItem)) { airItem = null; return; } if (slot.parentEqPieceSlot.piece != ((EquippableItem)airItem.item).eqPiece) { airItem = null; return; } if (((EquippableItem)airItem.item).levelRequirement > myUI.playerUI.gameObject.GetComponent <PlayerRpg>().Level) { //level too low airItem = null; return; } if (slot.parentEqPieceSlot.item == null) { GenerateItemInEq(airItem.item, airItem.UpgradeLevel); int slotSize = SlotSize(airItem.item); ClearSlot(airItem.itemX, airItem.itemY, slotSize); Destroy(airItem.gameObject); myUI.playerUI.UpdatePlayerStats(); } airItem = null; }
public List <Item> FindItemsByType([FromQuery] EqSlot query) { var items = DB.GetItems().Where(x => x.Slot.Equals(query)); return(items.ToList()); }
//=================================================================================== GENERATOR SETTING =============================================================== public void Randomize() { genSlot = (EqSlot)Random.Range(0, 5); if (genSlot == EqSlot.MainHand) { genWeapon = (Weapon)Random.Range(2, 11); } }
void FilterEquipmentSlot(EqSlot filter) { int i = 0; foreach (Equipment model in PlayerSession.GetInventory().list) { if (model.slot == filter && !model.isUsed) { sorting.Add(i); } i++; } }
void OnEquipmentClicked(Text text, EqSlot slot, int indexSlot) { if (invUI.isActiveAndEnabled) { if (indexSlot == selectedSlot) { CloseSelection(); RemoveEquipment(indexSlot); text.text = "None"; LoadAllAttributes(); } else { selectedSlot = indexSlot; invUI.ChangeFilter(indexSlot); } } else { selectedSlot = indexSlot; ShowEquipmentSelection(indexSlot); } }
public EquipmentGenerator SetEquipmentSlot(EqSlot slot) { genSlot = slot; return(this); }