public override bool OnPickup(Player player) { for (int i = 0; i < player.inventory.Length; i++) { Item items = player.inventory[i]; if (items.modItem is SoulCrystal) { SoulCrystal sc = items.modItem as SoulCrystal; if (Equals(sc) && !sc.isFull()) { sc.currentSoul++; item.TurnToAir(); return(false); } } } return(true); }
private bool Equals(SoulCrystal sc) { return(mobID == sc.mobID); }