public async Task <Item> CreateItem(Guid id, NewItem item) { Player player = await IP.GetPlayer(id); if (item.Type == 0 && player.level < 3) { throw new LevelUnderThree("Sword, Type 0 weapon, requires player level 3 or above!"); } Item createeItem = new Item(); createeItem.id = Guid.NewGuid(); createeItem.Level = item.Level; createeItem.Type = item.Type; createeItem.CreationTime = DateTime.Now; return(await IP.CreateItem(id, createeItem)); }
public Task <Item> CreateItem(Guid id, [FromBody] NewItem item) { return(IP.CreateItem(id, item)); }