public void GiveSpecialItems() { if (level == 15 || level == 30 || level == 40) { var item = new Item(ItemDataBase.ItemBaseByName("Heart of Purity")); item.level = 1; if (!Inventory.Instance.AddItem(item)) { NetworkManager.SendItemDrop(item, LocalPlayer.Transform.position + Vector3.up * 2); } } else if (level == 50 || level == 65 || level == 75) { var item = new Item(ItemDataBase.ItemBaseByName("Greater Mutated Heart")); item.level = 1; if (!Inventory.Instance.AddItem(item)) { NetworkManager.SendItemDrop(item, LocalPlayer.Transform.position + Vector3.up * 2); } } }
public void GiveSpecialItems() { if ((level % 10) == 0 && level > 1) { var item = new Item(ItemDataBase.ItemBaseByName("Heart of Purity")); item.level = 1; if (!Inventory.Instance.AddItem(item)) { NetworkManager.SendItemDrop(item, LocalPlayer.Transform.position + Vector3.up * 2, ItemPickUp.DropSource.PlayerDeath); } } else if (level >= 10 && level % 20 == 5) { var item = new Item(ItemDataBase.ItemBaseByName("Greater Mutated Heart")); item.level = 1; if (!Inventory.Instance.AddItem(item)) { NetworkManager.SendItemDrop(item, LocalPlayer.Transform.position + Vector3.up * 2, ItemPickUp.DropSource.PlayerDeath); } } }