Skip to content

Commit

Permalink
Fix for ISBoxer and /click
Browse files Browse the repository at this point in the history
  • Loading branch information
mooreatv committed Oct 29, 2022
1 parent 8324baf commit 8648959
Show file tree
Hide file tree
Showing 3 changed files with 26 additions and 1 deletion.
4 changes: 4 additions & 0 deletions ChangeLog.txt
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,10 @@ Coming next:
- Your input/suggestions welcome !
- See open issues for ideas https://github.com/mooreatv/DynamicBoxer/issues

v3.10.03 Oct 29th 2022
- Fix for ISBoxer new team/macro style.
- Workaround for /click not working before

v3.10.02 Oct 29th 2022
- Fixed the Dragonflight option config `/dbox config` error.

Expand Down
2 changes: 2 additions & 0 deletions DynamicBoxer/DBoxInit.lua
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,8 @@ if C_CVar then
-- bfa onward
C_CVar.SetCVar("scriptErrors", 1)
C_CVar.SetCVar("fstack_preferParentKeys", 0)
-- horrible hack to get /click to work for DragonFlight 10.00.00 until they fix it
C_CVar.SetCVar("ActionButtonUseKeyDown", 0)
elseif SetCVar then
-- classic version
SetCVar("scriptErrors", 1)
Expand Down
21 changes: 20 additions & 1 deletion DynamicBoxer/DynamicBoxer.lua
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
--[[
DynamicBoxer: Dynamic Team Multiboxing by MooreaTV moorea@ymail.com (c) 2019 All rights reserved
DynamicBoxer: Dynamic Team Multiboxing by MooreaTV moorea@ymail.com (c) 2019-2022 All rights reserved
Licensed under LGPLv3 - No Warranty
(contact the author if you need a different license)
Expand Down Expand Up @@ -303,6 +303,7 @@ function DB:ReconstructTeam()
DB.IsbAssistMacro = "<not found>"
-- parse the text which looks like (note the ]xxx; delimiters for most but \n at the end)
-- "/assist [nomod:alt,mod:lshift,nomod:ctrl]FIRST;[nomod:alt,mod:rshift,nomod:ctrl]SECOND;...[nomod:alt...,mod:lctrl]LAST\n"
-- this changed for dragonflight - we could try to use FLAssist1...N instead.
isboxer.SetMacro = function(macro, key, text)
if macro ~= "FTLAssist" then
return
Expand Down Expand Up @@ -333,6 +334,24 @@ function DB:ReconstructTeam()
DB:ManualSetup()
end
isboxer.SetMacro = prev
-- Dragonflight way/fallback, try just the isboxer.CharacterSet.Members
if DB.ISBIndex <= 0 and isboxer.CharacterSet and isboxer.CharacterSet.Members then
searchingFor = isboxer.Character.QualifiedName or isboxer.Character.ActualName
DB:Debug(3, "Searching for % in isboxer.CharacterSet.Members is %", searchingFor, isboxer.CharacterSet.Members)
for i, v in ipairs(isboxer.CharacterSet.Members) do
DB:Debug(3, "isboxer.CharacterSet.Members[%] = %", i, v)
table.insert(DB.ISBTeam, v)
if v == searchingFor then
if DB.ISBIndex > 0 then
DB:Warning("Duplicate entry for % found in isboxer.CharacterSet.Members! team so far %", searchingFor,
DB.ISBTeam)
else
DB.ISBIndex = i
DB.watched.slot = DB.ISBIndex
end
end
end
end
if DB.ISBIndex <= 0 then
DB.ISBIndex = nil -- set if back to unset
DB:Error("Problem identifying this character isboxer.Character.ActualName=% " ..
Expand Down

0 comments on commit 8648959

Please sign in to comment.