本文整理汇总了C#中Core.getAllInvItems方法的典型用法代码示例。如果您正苦于以下问题:C# Core.getAllInvItems方法的具体用法?C# Core.getAllInvItems怎么用?C# Core.getAllInvItems使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Core
的用法示例。
在下文中一共展示了Core.getAllInvItems方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: SetCore
public void SetCore(Core core)
{
this.core = core;
prefs = new Preferences();
purseList = new List<uint>() { 29203, 35462, 35469, 29204, 35463, 35470, 29205, 35464, 35471, 29206, 35465, 35472, 29207, 35466, 35473, 35461, 34853, 35474, 34915, 35467, 35476, 32059, 34281, 35475, 34916, 35468, 35477 };
tokenList = new List<uint>() { 26056, 26055, 35525, 26057, 26053, 26054, 26058, 29612 };
// scan inventory for flute/lute/pets and add them to the dropdown
dropdownFlute.Items.Add(new ComboBoxItem("Don't use flute", 0));
dropdownLute.Items.Add(new ComboBoxItem("Don't use lute", 0));
dropdownPet.Items.Add(new ComboBoxItem("Don't use a pet", 0));
List<Item> inventory = core.getAllInvItems();
inventory.AddRange(core.me.getAllEquipedItems());
foreach (Item item in inventory)
{
if (item.weaponType == WeaponType.TubeInstrument)
dropdownFlute.Items.Add(new ComboBoxItem(item.name, item.id));
else if (item.weaponType == WeaponType.StringInstument)
dropdownLute.Items.Add(new ComboBoxItem(item.name, item.id));
else if (item.mountLevel > 0)
dropdownPet.Items.Add(new ComboBoxItem(item.name, item.id));
}
LoadSettings();
btnCheckPots_Click();
if (prefs.autoLoot)
btnLoot_Click();
if (prefs.autoFight)
btnCombat_Click();
core.onKeyDown += core_onKeyDown;
core.onExpChanged += core_onExpChanged;
core.onNewInvItem += core_onNewInvItem;
core.onCreatureDied += core_onCreatureDied;
}