Skip to content
This repository was archived by the owner on May 13, 2026. It is now read-only.
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion .luacheckrc
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,8 @@ globals = {
"TooltipBackdropTemplateMixin", "NORMAL_FONT_COLOR", "HIGHLIGHT_FONT_COLOR", "GameTooltip_SetDefaultAnchor", "ChatFrame1", "UISpecialFrames", "GetMouseFocus", "ShowUIPanel", "tremove", "min", "max",
"GetMinimapShape", "GetMinimapShape", "PanelTemplates_TabResize", "GetGuildRosterShowOffline", "SetGuildRosterShowOffline", "IsInGuild", "GetGuildInfo", "SetGuildRosterShowOffline", "PLAYER", "INVENTORY_TOOLTIP",
"BAGSLOT", "UNKNOWN", "UnitIsDead", "ShowPrompt", "_MB_GetOrCreateShamanPos", "ensureHiddenTooltip", "MB_TAB_TITLE_DEFAULT", "SPELLBOOK", "MB_PAGE_DEFAULT", "SPELLBOOK_END_NON_SPELL_STREAK", "sendInventoryItemCommand",
"RAID_CLASS_COLORS", "INSPECT", "MB_INVENTORY_LABEL", "LOADING", "ITEM", "ITEMS", "SEARCH", "NO_QUESTS_LABEL", "QUESTS_LABEL", "QUEST_LOG", "UnitIsUnit"
"RAID_CLASS_COLORS", "INSPECT", "MB_INVENTORY_LABEL", "LOADING", "ITEM", "ITEMS", "SEARCH", "NO_QUESTS_LABEL", "QUESTS_LABEL", "QUEST_LOG", "UnitIsUnit", "ITEM_STARTS_QUEST", "TRACKER_HEADER_QUESTS",
"GetItemInfoInstant", "LE_ITEM_CLASS_QUESTITEM"
}

read_globals = {
Expand Down
28 changes: 28 additions & 0 deletions Core/MultiBotConfig.lua
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@ local THROTTLE_DEFAULTS = {
local UI_DEFAULTS = {
mainBar = {
moveLocked = true,
disableAutoCollapse = false,
},
}

Expand Down Expand Up @@ -79,6 +80,9 @@ local function migrateLegacyConfigIntoProfile(profile)
if type(profile.ui.mainBar.moveLocked) ~= "boolean" then
profile.ui.mainBar.moveLocked = UI_DEFAULTS.mainBar.moveLocked
end
if type(profile.ui.mainBar.disableAutoCollapse) ~= "boolean" then
profile.ui.mainBar.disableAutoCollapse = UI_DEFAULTS.mainBar.disableAutoCollapse
end
end

local function getConfigStore(createIfMissing)
Expand Down Expand Up @@ -140,6 +144,9 @@ function MultiBot.Config_Ensure()
if type(config.ui.mainBar.moveLocked) ~= "boolean" then
config.ui.mainBar.moveLocked = UI_DEFAULTS.mainBar.moveLocked
end
if type(config.ui.mainBar.disableAutoCollapse) ~= "boolean" then
config.ui.mainBar.disableAutoCollapse = UI_DEFAULTS.mainBar.disableAutoCollapse
end
end

-- Copy saved values into runtime timers.
Expand Down Expand Up @@ -251,5 +258,26 @@ function MultiBot.SetMainBarMoveLocked(value)
config.ui = config.ui or {}
config.ui.mainBar = config.ui.mainBar or {}
config.ui.mainBar.moveLocked = value and true or false
if MultiBot.ApplyMainBarMoveLockState then
MultiBot.ApplyMainBarMoveLockState(config.ui.mainBar.moveLocked)
end
return config.ui.mainBar.moveLocked
end

function MultiBot.GetDisableAutoCollapse()
local config = getConfigStore(false)
local value = config and config.ui and config.ui.mainBar and config.ui.mainBar.disableAutoCollapse
if type(value) == "boolean" then
return value
end

return UI_DEFAULTS.mainBar.disableAutoCollapse
end

function MultiBot.SetDisableAutoCollapse(value)
local config = getConfigStore(true)
config.ui = config.ui or {}
config.ui.mainBar = config.ui.mainBar or {}
config.ui.mainBar.disableAutoCollapse = value and true or false
return config.ui.mainBar.disableAutoCollapse
end
82 changes: 82 additions & 0 deletions Core/MultiBotEngine.lua
Original file line number Diff line number Diff line change
Expand Up @@ -563,16 +563,90 @@ end

MultiBot.ShowHideSwitch = function(pFrame)
if(pFrame:IsVisible()) then
if MultiBot.RestoreCollapsedUnitBarsFromDropdown then
MultiBot.RestoreCollapsedUnitBarsFromDropdown(pFrame)
end
pFrame:Hide()
if(MultiBot.RequestClickBlockerUpdate) then MultiBot.RequestClickBlockerUpdate(pFrame) end
return false
end

if MultiBot.CollapseOtherUnitBarsForDropdown then
MultiBot.CollapseOtherUnitBarsForDropdown(pFrame)
end

pFrame:Show()
if(MultiBot.RequestClickBlockerUpdate) then MultiBot.RequestClickBlockerUpdate(pFrame) end
return true
end

MultiBot.RestoreCollapsedUnitBarsFromDropdown = function(targetFrame)
if not targetFrame then
return
end

local collapsedBars = targetFrame._mbCollapsedBars
if type(collapsedBars) ~= "table" then
return
end

for index = 1, #collapsedBars do
local frame = collapsedBars[index]
if frame and frame.Show then
frame:Show()
end
end

targetFrame._mbCollapsedBars = nil
end

MultiBot.CollapseOtherUnitBarsForDropdown = function(targetFrame)
if not targetFrame or not targetFrame.parent then
return
end

if MultiBot.GetDisableAutoCollapse and MultiBot.GetDisableAutoCollapse() then
targetFrame._mbDropdownManaged = nil
targetFrame._mbCollapsedBars = nil
return
end

local unitsFrame = MultiBot.frames
and MultiBot.frames["MultiBar"]
and MultiBot.frames["MultiBar"].frames
and MultiBot.frames["MultiBar"].frames["Units"]
if not unitsFrame or not unitsFrame.frames then
return
end

local ownerBar = targetFrame.parent
while ownerBar and ownerBar.parent and ownerBar.parent ~= unitsFrame do
ownerBar = ownerBar.parent
end

if not ownerBar or ownerBar.parent ~= unitsFrame then
return
end

-- On ne collapse les autres barres que pour l'ouverture d'un sous-menu
-- (pas lors de l'ouverture/fermeture de la barre du bot elle-même).
if targetFrame == ownerBar then
return
end

local collapsedBars = {}
for key, frame in pairs(unitsFrame.frames) do
if frame ~= ownerBar and key ~= "Alliance" and key ~= "Control"
and frame and frame.Hide and frame.IsShown and frame:IsShown() then
table.insert(collapsedBars, frame)
frame:Hide()
end
end

targetFrame._mbDropdownManaged = true
targetFrame._mbCollapsedBars = collapsedBars
end

MultiBot.OnOffActionToTarget = function(pButton, pOn, pOff, pTarget)
if(pButton.state) then
MultiBot.ActionToTarget(pOff, pTarget)
Expand Down Expand Up @@ -1080,6 +1154,14 @@ MultiBot.newButton = function(pParent, pX, pY, pSize, pTexture, pTip, oTemplate)

if(pEvent == "RightButton" and button.doRight ~= nil) then button.doRight(button) end
if(pEvent == "LeftButton" and button.doLeft ~= nil) then button.doLeft(button) end

if button.parent and button.parent._mbDropdownManaged then
if MultiBot.RestoreCollapsedUnitBarsFromDropdown then
MultiBot.RestoreCollapsedUnitBarsFromDropdown(button.parent)
end
button.parent:Hide()
if(MultiBot.RequestClickBlockerUpdate) then MultiBot.RequestClickBlockerUpdate(button.parent) end
end
end)

return button
Expand Down
6 changes: 1 addition & 5 deletions Core/MultiBotEvery.lua
Original file line number Diff line number Diff line change
Expand Up @@ -26,11 +26,7 @@ MultiBot.addEvery = function(pFrame, pCombat, pNormal)
-- Bouton parent « Misc »
local btnMisc = pFrame.addButton("Misc", 64, 0, "inv_misc_enggizmos_swissarmy", MultiBot.L("tips.every.misc"))
btnMisc.doLeft = function(self)
if tMisc:IsShown() then
tMisc:Hide()
else
tMisc:Show()
end
MultiBot.ShowHideSwitch(tMisc)
end

-- Texture étoile
Expand Down
3 changes: 3 additions & 0 deletions Locales/MultiBotAceLocale-deDE.lua
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ local deDEValues = {
["info.itemdestroyalert"] = "Möchtest du diesen Gegenstand WIRKLICH zerstören?\n%s",
["info.keydestroyalert"] = "Ich verkaufe keine Schlüssel.",
["info.itemsellalert"] = "Ich kann diesen Gegenstand nicht verkaufen.",
["info.questitemsellalert"] = "Ich kann Questgegenstände nicht verkaufen.",
["info.inventoryvendortarget"] = "Sie müssen zuerst einen Händler auswählen.",
["info.butttitle"] = "|cffffd100MultiBot|r",
["info.buttontoggle"] = "|cff00ff00Linksklick: UI umschalten|r",
Expand Down Expand Up @@ -197,6 +198,8 @@ local deDEValues = {
["options.minimap.explainer"] = "Blendet den MultiBot-Minimap-Button ein oder aus.",
["options.layout.lock_mainbar"] = "Bewegung der Hauptleiste sperren",
["options.layout.lock_mainbar_desc"] = "Aktiviert: Strg + Rechtsklick zum Verschieben der Leiste. Deaktiviert: Rechtsklick genügt.",
["options.layout.disable_autocollapse"] = "Automatisches Einklappen für Bot-Leisten deaktivieren",
["options.layout.disable_autocollapse_desc"] = "Aktiviert: Das Öffnen von Bot-Untermenüs klappt andere Bot-Leisten nicht ein.",
["options.layout.owner_import"] = "Spieler-Layout zum Importieren",
["options.layout.export"] = "Layout exportieren",
["options.layout.import"] = "Layout importieren",
Expand Down
3 changes: 3 additions & 0 deletions Locales/MultiBotAceLocale-enGB.lua
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ local enGBValues = {
["info.itemdestroyalert"] = "Do you REALLY want to destroy this item?\n%s",
["info.keydestroyalert"] = "I will not sell Keys.",
["info.itemsellalert"] = "I cant sell this Item.",
["info.questitemsellalert"] = "I cannot sell quest items.",
["info.inventoryvendortarget"] = "You must select a vendor first.",
["info.butttitle"] = "|cffffd100MultiBot|r",
["info.buttontoggle"] = "|cff00ff00Left-click: toggle UI|r",
Expand Down Expand Up @@ -199,6 +200,8 @@ local enGBValues = {
["options.minimap.explainer"] = "Hide or show the MultiBot minimap button.",
["options.layout.lock_mainbar"] = "Lock main bar movement",
["options.layout.lock_mainbar_desc"] = "Checked: Ctrl + right-click to move the bar. Unchecked: right-click is enough.",
["options.layout.disable_autocollapse"] = "Disable auto-collapse for bot bars",
["options.layout.disable_autocollapse_desc"] = "Checked: opening bot submenus will not collapse other bot bars.",
["options.layout.owner_import"] = "Player layout to import",
["options.layout.export"] = "Export layout",
["options.layout.import"] = "Import layout",
Expand Down
3 changes: 3 additions & 0 deletions Locales/MultiBotAceLocale-enUS.lua
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ local enUSValues = {
["info.itemdestroyalert"] = "Do you REALLY want to destroy this item?\n%s",
["info.keydestroyalert"] = "I will not sell Keys.",
["info.itemsellalert"] = "I cant sell this Item.",
["info.questitemsellalert"] = "I cannot sell quest items.",
["info.inventoryvendortarget"] = "You must select a vendor first.",
["info.butttitle"] = "|cffffd100MultiBot|r",
["info.buttontoggle"] = "|cff00ff00Left-click: toggle UI|r",
Expand Down Expand Up @@ -199,6 +200,8 @@ local enUSValues = {
["options.minimap.explainer"] = "Hide or show the MultiBot minimap button.",
["options.layout.lock_mainbar"] = "Lock main bar movement",
["options.layout.lock_mainbar_desc"] = "Checked: Ctrl + right-click to move the bar. Unchecked: right-click is enough.",
["options.layout.disable_autocollapse"] = "Disable auto-collapse for bot bars",
["options.layout.disable_autocollapse_desc"] = "Checked: opening bot submenus will not collapse other bot bars.",
["options.layout.owner_import"] = "Player layout to import",
["options.layout.export"] = "Export layout",
["options.layout.import"] = "Import layout",
Expand Down
3 changes: 3 additions & 0 deletions Locales/MultiBotAceLocale-esES.lua
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ local esESValues = {
["info.itemdestroyalert"] = "¿REALMENTE quieres destruir este objeto?\n%s",
["info.keydestroyalert"] = "No venderé llaves.",
["info.itemsellalert"] = "No puedo vender este objeto.",
["info.questitemsellalert"] = "No puedo vender objetos de misión.",
["info.inventoryvendortarget"] = "Primero debes seleccionar un vendedor.",
["info.butttitle"] = "|cffffd100MultiBot|r",
["info.buttontoggle"] = "|cff00ff00Clic izquierdo: alternar la interfaz|r",
Expand Down Expand Up @@ -197,6 +198,8 @@ local esESValues = {
["options.minimap.explainer"] = "Muestra u oculta el botón del minimapa de MultiBot.",
["options.layout.lock_mainbar"] = "Bloquear movimiento de la barra principal",
["options.layout.lock_mainbar_desc"] = "Marcado: Ctrl + clic derecho para mover la barra. Desmarcado: clic derecho suficiente.",
["options.layout.disable_autocollapse"] = "Desactivar el auto-colapso de las barras de bots",
["options.layout.disable_autocollapse_desc"] = "Marcado: al abrir submenús de bots no se colapsarán otras barras de bots.",
["options.layout.owner_import"] = "Layout de jugador para importar",
["options.layout.export"] = "Exportar diseño",
["options.layout.import"] = "Importar diseño",
Expand Down
3 changes: 3 additions & 0 deletions Locales/MultiBotAceLocale-frFR.lua
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ local frFRValues = {
["info.itemdestroyalert"] = "Voulez-vous VRAIMENT détruire cet objet ?\n%s",
["info.keydestroyalert"] = "Je ne peux pas vendre des clés.",
["info.itemsellalert"] = "Je ne peux pas vendre cet item.",
["info.questitemsellalert"] = "Je ne peux pas vendre les objets de quête.",
["info.inventoryvendortarget"] = "Vous devez dabord sélectionner un vendeur.",
["info.butttitle"] = "|cffffd100MultiBot|r",
["info.buttontoggle"] = "|cff00ff00Clic gauche : afficher/masquer l’interface|r",
Expand Down Expand Up @@ -197,6 +198,8 @@ local frFRValues = {
["options.minimap.explainer"] = "Affiche ou masque le bouton minimap de MultiBot.",
["options.layout.lock_mainbar"] = "Verrouiller déplacement barre principale",
["options.layout.lock_mainbar_desc"] = "Coché : Ctrl + clic droit pour déplacer la barre. Décoché : clic droit suffit.",
["options.layout.disable_autocollapse"] = "Désactiver l'auto-repli des barres bots",
["options.layout.disable_autocollapse_desc"] = "Coché : l'ouverture d'un sous-menu bot ne replie plus les autres barres bots.",
["options.layout.owner_import"] = "Layout joueur à importer",
["options.layout.export"] = "Exporter le layout",
["options.layout.import"] = "Importer le layout",
Expand Down
3 changes: 3 additions & 0 deletions Locales/MultiBotAceLocale-koKR.lua
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ local koKRValues = {
["info.itemdestroyalert"] = "이 아이템을 정말로 파기하시겠습니까?\n%s",
["info.keydestroyalert"] = "열쇠는 판매하지 않습니다.",
["info.itemsellalert"] = "이 아이템은 판매할 수 없습니다.",
["info.questitemsellalert"] = "퀘스트 아이템은 판매할 수 없습니다.",
["info.inventoryvendortarget"] = "먼저 판매자를 선택해야 합니다.",
["info.butttitle"] = "|cffffd100MultiBot|r",
["info.buttontoggle"] = "|cff00ff00좌클릭: UI 전환|r",
Expand Down Expand Up @@ -196,6 +197,8 @@ local koKRValues = {
["options.minimap.explainer"] = "MultiBot 미니맵 버튼을 숨기거나 표시합니다.",
["options.layout.lock_mainbar"] = "기본 바 이동 잠금",
["options.layout.lock_mainbar_desc"] = "체크: Ctrl + 우클릭으로 바 이동. 해제: 우클릭만으로 이동.",
["options.layout.disable_autocollapse"] = "봇 바 자동 접기 비활성화",
["options.layout.disable_autocollapse_desc"] = "선택 시: 봇 하위 메뉴를 열어도 다른 봇 바가 접히지 않습니다.",
["options.layout.owner_import"] = "가져올 플레이어 레이아웃",
["options.layout.export"] = "레이아웃 내보내기",
["options.layout.import"] = "레이아웃 가져오기",
Expand Down
3 changes: 3 additions & 0 deletions Locales/MultiBotAceLocale-ruRU.lua
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ local ruRUValues = {
["info.itemdestroyalert"] = "Вы ДЕЙСТВИТЕЛЬНО хотите уничтожить этот предмет?\n%s",
["info.keydestroyalert"] = "Я не продаю ключи.",
["info.itemsellalert"] = "Я не могу продать этот предмет.",
["info.questitemsellalert"] = "Я не могу продавать предметы заданий.",
["info.inventoryvendortarget"] = "Сначала вы должны выбрать продавца.",
["info.butttitle"] = "|cffffd100MultiBot|r",
["info.buttontoggle"] = "|cff00ff00ЛКМ: переключить интерфейс|r",
Expand Down Expand Up @@ -197,6 +198,8 @@ local ruRUValues = {
["options.minimap.explainer"] = "Скрывает или показывает кнопку миникарты MultiBot.",
["options.layout.lock_mainbar"] = "Заблокировать перемещение главной панели",
["options.layout.lock_mainbar_desc"] = "Включено: Ctrl + ПКМ для перемещения панели. Выключено: достаточно ПКМ.",
["options.layout.disable_autocollapse"] = "Отключить авто-сворачивание панелей ботов",
["options.layout.disable_autocollapse_desc"] = "Включено: при открытии подменю ботов другие панели ботов не будут сворачиваться.",
["options.layout.owner_import"] = "Макет игрока для импорта",
["options.layout.export"] = "Экспорт макета",
["options.layout.import"] = "Импорт макета",
Expand Down
3 changes: 3 additions & 0 deletions Locales/MultiBotAceLocale-zhCN.lua
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ local zhCNValues = {
["info.itemdestroyalert"] = "你真的要销毁这个物品吗?\n%s",
["info.keydestroyalert"] = "我不会出售钥匙。",
["info.itemsellalert"] = "我无法出售该物品。",
["info.questitemsellalert"] = "无法出售任务物品。",
["info.inventoryvendortarget"] = "您必须先选择一位商人。",
["info.butttitle"] = "|cffffd100MultiBot|r",
["info.buttontoggle"] = "|cff00ff00左键:切换界面|r",
Expand Down Expand Up @@ -197,6 +198,8 @@ local zhCNValues = {
["options.minimap.explainer"] = "显示或隐藏 MultiBot 小地图按钮。",
["options.layout.lock_mainbar"] = "锁定主动作条移动",
["options.layout.lock_mainbar_desc"] = "勾选:Ctrl + 右键拖动动作条。取消勾选:仅右键即可。",
["options.layout.disable_autocollapse"] = "禁用机器人栏的自动折叠",
["options.layout.disable_autocollapse_desc"] = "勾选:打开机器人子菜单时不会折叠其他机器人栏。",
["options.layout.owner_import"] = "要导入的玩家布局",
["options.layout.export"] = "导出布局",
["options.layout.import"] = "导入布局",
Expand Down
Loading
Loading