public async Task showOneItemAsync(int i) { player p = player.get_player(Context.User.Id); if (p != null) { if (i > p.inventory.Count) { await Context.Channel.SendMessageAsync(Context.User.Mention + ", sorry you don't have that many items in your inventory"); } else { var inv = p.inventory[i]; armorItem aI = inv as armorItem; if (aI != null) { await Context.Channel.SendMessageAsync("", false, aI.toArmorEmbed().Build()); return; } // INCLUDE WEAPONS await Context.Channel.SendMessageAsync("", false, inv.toItemEmbed().Build()); } } else { await Context.Channel.SendMessageAsync(Context.User.Mention + ", you need to register an account with `bg!player \"First Last\" \"Race\" \"Class (With Subclass)\" [HP] [AC]`"); } }
public async Task addArmorItemAsync(string name, string description, double value, double weight, int ac, bool stealth, string type) { if (Context.User.Id != 106768024857501696) { return; } armorItem i = new armorItem(name, description, value, weight, ac, stealth, armorItem.stringToArmor(type)); armorItem.insert_armorItem(i); await Context.Channel.SendMessageAsync("Armor Added", false, i.toArmorEmbed().Build()); }
public async Task showArmorItemAsync(int i) { armorItem display = armorItem.get_armorItem(i); if (display != null) { await Context.Channel.SendMessageAsync("", false, display.toArmorEmbed().Build()); } else { await Context.Channel.SendMessageAsync(Context.User.Mention + ", sorry that ID doesn't match an item. Please use `bg!armor` for a list of items"); } }