diff --git a/UI.lua b/UI.lua index 66089c4..bdd8606 100644 --- a/UI.lua +++ b/UI.lua @@ -125,6 +125,12 @@ function WellEater:initSettingsMenu() }, "general", i) end + MakeControlEntry(sTable,{ + type = "checkbox", + name = L.useCrownFoodTitle, + tooltip = L.useCrownFoodTitle_TT, + }, "general", "useCrownFood") + sTable = MakeSubmenu(optionsTable,L.weaponSetupHeader, L.weaponSetupDescription) MakeControlEntry(sTable,{ @@ -152,6 +158,12 @@ function WellEater:initSettingsMenu() }, "slots", EQUIP_SLOT_BACKUP_OFF) MakeControlEntry(sTable,{ + type = "checkbox", + name = L.useCrownGemsTitle, + tooltip = L.useCrownGemsTitle_TT, + }, "general", "useCrownGems") + + MakeControlEntry(sTable,{ type = "slider", name = L.minCharges, tooltip = L.minCharges, diff --git a/WellEater.lua b/WellEater.lua index 7dce5b1..87c056a 100644 --- a/WellEater.lua +++ b/WellEater.lua @@ -2,7 +2,7 @@ WellEater = WellEater or {} WellEater.WELLEATER_SAVED_VERSION = 1 WellEater.AddonName = "WellEater" WellEater.DisplayName = "|cFFFFFFWell |c0099FFEater|r" -WellEater.Version = "1.0.6" +WellEater.Version = "1.0.7" WellEater.Author = "|c5EFFF5esorochinskiy|r" local NAMESPACE = {} NAMESPACE.settingsDefaults = { @@ -22,6 +22,8 @@ NAMESPACE.settingsDefaults = { [EQUIP_SLOT_BACKUP_OFF] = true, }, minCharges = 300, + useCrownGems = true, + useCrownFood = false, } NAMESPACE.conversation = false NAMESPACE.notifications = {} @@ -181,13 +183,16 @@ local function processAutoEat() local locSettings = WellEater:getAllUserPreferences() local useFood = locSettings.useFood local useDrink = locSettings.useDrink + local useCrownFood = locSettings.useCrownFood local slotId = itemInfo.slotIndex if not itemInfo.stolen then local itemType, specialType = GetItemType(bagId, slotId) + local useThisFood = (specialType ~= SPECIALIZED_ITEMTYPE_CROWN_ITEM or + (useCrownFood and specialType == SPECIALIZED_ITEMTYPE_CROWN_ITEM)) local itemId = GetItemId(bagId, slotId) if ((useFood and itemType == ITEMTYPE_FOOD) or (useDrink and itemType == ITEMTYPE_DRINK)) and - not SkillUpItem(itemId) then + useThisFood and not SkillUpItem(itemId) then local icon, stack, sellPrice, meetsUsageRequirement, locked, equipType, itemStyleId, quality = GetItemInfo(bagId, slotId) if meetsUsageRequirement and locSettings and locSettings[quality] then @@ -238,9 +243,13 @@ local function checkEquippedWeapon() for _, itemInfo in pairs(bagC) do local slotId = itemInfo.slotIndex - if not itemInfo.stolen then - local itemType, specialType = GetItemType(BAG_BACKPACK, slotId) - if itemType == ITEMTYPE_SOUL_GEM then + if not itemInfo.stolen and IsItemSoulGem(SOUL_GEM_TYPE_FILLED, BAG_BACKPACK, slotId) then + local specializedItemType = select(2, GetItemType(BAG_BACKPACK, slotId)) + local useCrownGems = locSettings.useCrownGems + + local useThis = (specializedItemType ~= SPECIALIZED_ITEMTYPE_CROWN_ITEM or + (useCrownGems and specializedItemType == SPECIALIZED_ITEMTYPE_CROWN_ITEM)) + if useThis then ChargeItemWithSoulGem(BAG_WORN, testSlot, BAG_BACKPACK, slotId) local iName = GetItemLinkName(GetItemLink(BAG_WORN, testSlot)) local locale = WellEater:getLocale() diff --git a/WellEater.txt b/WellEater.txt index 8bd0a06..a46ab89 100644 --- a/WellEater.txt +++ b/WellEater.txt @@ -31,7 +31,7 @@ ## Author: |c5EFFF5esorochinskiy|r ## APIVersion: 101033 101034 ## Description: Auto eat your preferred meals provided by your inventory after food or drink buff expiration. Provides weapon autoload -## Version: 1.0.6 +## Version: 1.0.7 ## SavedVariables: WellEater_Settings ## DependsOn: LibAddonMenu-2.0>=28 diff --git a/lang/de.lua b/lang/de.lua index e111d9d..09c3916 100644 --- a/lang/de.lua +++ b/lang/de.lua @@ -5,10 +5,10 @@ local L = { foodQualityHeader = "Die Qualität der suchenden Lebensmittel", foodQualityDescription = "Lasst die Qualität der Lebensmittel auswahlen", foods = { - [ITEM_QUALITY_MAGIC] = "Gut (grün)", - [ITEM_QUALITY_ARCANE] = "Ausgezeichnet (blau)", - [ITEM_QUALITY_ARTIFACT] = "Episch (lila)", - [ITEM_QUALITY_LEGENDARY] = "Legendär (gold)", + [ITEM_QUALITY_MAGIC] = "|c00FB00Gut|r", + [ITEM_QUALITY_ARCANE] = "|c0000FFAusgezeichnet|r", + [ITEM_QUALITY_ARTIFACT] = "|c9400D3Episch|r", + [ITEM_QUALITY_LEGENDARY] = "|cFFFF00Legendär|r", }, timerSetupHeader = "Abfragezeitmeter für den Charakterstatus", timerSetupLabel = "Zeitintervall, ms", @@ -39,6 +39,12 @@ local L = { weaponSetupEnchantMainHandBack = "Haupthande Waffe zweitrangig", weaponSetupEnchantOffHandBack = "Ergänzendhande Waffe zweitrangig", minCharges = "Minimalgebühranzahl", + useCrownGemsTitle = "Kroneseelensteine benutzen", + useCrownGemsTitle_TT = "Gefundene Kroneseelensteine benutzt werden", + + useCrownFoodTitle = "Kronessen benutzen", + useCrownFoodTitle_TT = "Das gefundene Kronessen benutzt wird", + } diff --git a/lang/en.lua b/lang/en.lua index a6eda5d..06e34a9 100644 --- a/lang/en.lua +++ b/lang/en.lua @@ -5,10 +5,10 @@ local L = { foodQualityHeader = "Quality of food to search", foodQualityDescription = "Allows to choose the quality of the food", foods = { - [ITEM_QUALITY_MAGIC] = "Normal (green)", - [ITEM_QUALITY_ARCANE] = "Excellent (blue)", - [ITEM_QUALITY_ARTIFACT] = "Artifact (cyan)", - [ITEM_QUALITY_LEGENDARY] = "Legendary (gold)", + [ITEM_QUALITY_MAGIC] = "|c00FB00Normal|r", + [ITEM_QUALITY_ARCANE] = "|c0000FFExcellent|r", + [ITEM_QUALITY_ARTIFACT] = "|c9400D3Artifact|r", + [ITEM_QUALITY_LEGENDARY] = "|cFFFF00Legendary|r", }, timerSetupHeader = "Character status scan timer", timerSetupLabel = "Scan period, ms", @@ -36,6 +36,13 @@ local L = { weaponSetupEnchantOffHandBack = "Off hand weapon secondary", minCharges = "Minimum number of charges", + useCrownGemsTitle = "Use crown soul gems", + useCrownGemsTitle_TT = "While searching for a soul gem crown ones are taken into the account", + + useCrownFoodTitle = "Use crown food", + useCrownFoodTitle_TT = "While searching for a food crown meals are taken into the account", + + } diff --git a/lang/ru.lua b/lang/ru.lua index 28d57b7..f1be70b 100644 --- a/lang/ru.lua +++ b/lang/ru.lua @@ -5,10 +5,10 @@ local L = { foodQualityHeader = "Качество искомой еды", foodQualityDescription = "Позволяет выбрать качество еды", foods = { - [ITEM_QUALITY_MAGIC] = "Хорошее (зеленое)", - [ITEM_QUALITY_ARCANE] = "Превосходное (синее)", - [ITEM_QUALITY_ARTIFACT] = "Эпическое (фиолетовое)", - [ITEM_QUALITY_LEGENDARY] = "Легендарное (золотое)", + [ITEM_QUALITY_MAGIC] = "|c00FB00Хорошее|r", + [ITEM_QUALITY_ARCANE] = "|c0000FFПревосходное|r", + [ITEM_QUALITY_ARTIFACT] = "|c9400D3Эпическое|r", + [ITEM_QUALITY_LEGENDARY] = "|cFFFF00Легендарное|r", }, timerSetupHeader = "Таймер опроса состояния персонажа", timerSetupLabel = "Период опроса, мс", @@ -39,6 +39,11 @@ local L = { weaponSetupEnchantOffHandBack = "Оружие в дополнительной руке, вторая панель", minCharges = "Минимальное количество зарядов", + useCrownGemsTitle = "Использовать кронные камни душ", + useCrownGemsTitle_TT = "При поиске камня душ в инвентаре учитывать и кронные камни", + + useCrownFoodTitle = "Использовать кронную еду", + useCrownFoodTitle_TT = "При поиске камня душ в инвентаре учитывать и кронную еду", }