Initial commit
Update README.md Added new keybinding and function to seleft QA Target\nRemoved debug/print messages Update README.md Update README.md Update README.md Update README.md New keybindings for Setting and clearing the Assist target Added Clear Assist Target for self unit dropdown (player's self right click menu, whatever) Just changed version in the toc file Update README.md
This commit is contained in:
@@ -0,0 +1,17 @@
|
|||||||
|
<Bindings>
|
||||||
|
<Binding name="QUICKASSIST" header="QUICKASSIST">
|
||||||
|
QAAssistBinding();
|
||||||
|
</Binding>
|
||||||
|
|
||||||
|
<Binding name="SELECTTARGET" header="QUICKASSIST">
|
||||||
|
QASelectTargetBinding();
|
||||||
|
</Binding>
|
||||||
|
|
||||||
|
<Binding name="CLEARTARGET" header="QUICKASSIST">
|
||||||
|
QAClearTargetBinding();
|
||||||
|
</Binding>
|
||||||
|
|
||||||
|
<Binding name="SETTARGET" header="QUICKASSIST">
|
||||||
|
QASetTargetBinding();
|
||||||
|
</Binding>
|
||||||
|
</Bindings>
|
||||||
+155
@@ -0,0 +1,155 @@
|
|||||||
|
-- Create main addon frame
|
||||||
|
local QuickAssist = CreateFrame("Frame", "QuickAssistAddon")
|
||||||
|
QuickAssist:RegisterEvent("VARIABLES_LOADED")
|
||||||
|
|
||||||
|
-- Variables
|
||||||
|
QuickAssist.targetName = nil
|
||||||
|
|
||||||
|
-- Initialize DB immediately
|
||||||
|
QuickAssistDB = QuickAssistDB or {}
|
||||||
|
|
||||||
|
-- print("QuickAssist: Addon loaded")
|
||||||
|
|
||||||
|
-- Slash commands
|
||||||
|
SLASH_QUICKASSIST1 = "/qa"
|
||||||
|
SLASH_QUICKASSIST2 = "/quickassist"
|
||||||
|
|
||||||
|
-- Save variables between sessions
|
||||||
|
function QuickAssist_OnLoad()
|
||||||
|
-- print("QuickAssist: OnLoad called")
|
||||||
|
|
||||||
|
-- Ensure DB exists
|
||||||
|
QuickAssistDB = QuickAssistDB or {}
|
||||||
|
QuickAssistDB.targetName = QuickAssistDB.targetName or nil
|
||||||
|
|
||||||
|
QuickAssist.targetName = QuickAssistDB.targetName
|
||||||
|
-- print("QuickAssist: Local targetName set to:", tostring(QuickAssist.targetName))
|
||||||
|
end
|
||||||
|
|
||||||
|
-- Event handler
|
||||||
|
QuickAssist:SetScript("OnEvent", function(self, event)
|
||||||
|
-- print("QuickAssist: Event fired:", event)
|
||||||
|
if event == "VARIABLES_LOADED" then
|
||||||
|
QuickAssist_OnLoad()
|
||||||
|
end
|
||||||
|
end)
|
||||||
|
|
||||||
|
-- Function to set target
|
||||||
|
function QuickAssist:SetTarget(name)
|
||||||
|
-- print("QuickAssist: SetTarget called with name:", tostring(name))
|
||||||
|
|
||||||
|
-- Ensure DB exists before setting
|
||||||
|
QuickAssistDB = QuickAssistDB or {}
|
||||||
|
|
||||||
|
self.targetName = name
|
||||||
|
QuickAssistDB.targetName = name
|
||||||
|
|
||||||
|
if name then
|
||||||
|
DEFAULT_CHAT_FRAME:AddMessage("QuickAssist: Target set to " .. name, 1, 1, 0)
|
||||||
|
else
|
||||||
|
DEFAULT_CHAT_FRAME:AddMessage("QuickAssist: Target cleared", 1, 1, 0)
|
||||||
|
end
|
||||||
|
end
|
||||||
|
|
||||||
|
-- Function to assist target
|
||||||
|
function QuickAssist:AssistTarget()
|
||||||
|
if self.targetName then
|
||||||
|
TargetByName(self.targetName)
|
||||||
|
AssistUnit("target")
|
||||||
|
else
|
||||||
|
-- If no "assist" target is set, assist current target
|
||||||
|
if UnitExists("target") then
|
||||||
|
AssistUnit("target")
|
||||||
|
else
|
||||||
|
DEFAULT_CHAT_FRAME:AddMessage("QuickAssist: No assist target set and no target selected", 1, 0, 0)
|
||||||
|
end
|
||||||
|
end
|
||||||
|
end
|
||||||
|
|
||||||
|
function QuickAssist:SelectTarget()
|
||||||
|
if self.targetName then
|
||||||
|
TargetByName(self.targetName)
|
||||||
|
else
|
||||||
|
DEFAULT_CHAT_FRAME:AddMessage("QuickAssist: No assist target set", 1, 0, 0)
|
||||||
|
end
|
||||||
|
end
|
||||||
|
|
||||||
|
-- Slash command handler
|
||||||
|
function SlashCmdList.QUICKASSIST(msg)
|
||||||
|
if msg == "clear" then
|
||||||
|
QuickAssist:SetTarget(nil)
|
||||||
|
else
|
||||||
|
DEFAULT_CHAT_FRAME:AddMessage("QuickAssist commands:", 1, 1, 0)
|
||||||
|
DEFAULT_CHAT_FRAME:AddMessage("/qa clear - Clear current assist target", 1, 1, 0)
|
||||||
|
-- Show current target with green color
|
||||||
|
local targetText = QuickAssist.targetName and ("|cFF00FF00" .. QuickAssist.targetName .. "|r") or "None"
|
||||||
|
DEFAULT_CHAT_FRAME:AddMessage("Current Assist Target: " .. targetText, 1, 1, 0)
|
||||||
|
end
|
||||||
|
end
|
||||||
|
|
||||||
|
-- Hook the UnitPopup_OnClick function
|
||||||
|
local original_UnitPopup_OnClick = UnitPopup_OnClick
|
||||||
|
function UnitPopup_OnClick()
|
||||||
|
if this and this.value == "SET_ASSIST_TARGET" then
|
||||||
|
local dropdownFrame = getglobal(UIDROPDOWNMENU_INIT_MENU)
|
||||||
|
if dropdownFrame then
|
||||||
|
local unit = dropdownFrame.unit
|
||||||
|
if unit then
|
||||||
|
local name = UnitName(unit)
|
||||||
|
if name then
|
||||||
|
QuickAssist:SetTarget(name)
|
||||||
|
end
|
||||||
|
end
|
||||||
|
end
|
||||||
|
PlaySound("UChatScrollButton")
|
||||||
|
CloseDropDownMenus()
|
||||||
|
|
||||||
|
elseif this and this.value == "CLEAR_ASSIST_TARGET" then
|
||||||
|
QuickAssist:SetTarget(nil)
|
||||||
|
else
|
||||||
|
original_UnitPopup_OnClick()
|
||||||
|
end
|
||||||
|
end
|
||||||
|
|
||||||
|
-- Add option to UnitPopupMenus
|
||||||
|
UnitPopupButtons["SET_ASSIST_TARGET"] = { text = "Set as Assist Target", dist = 0 }
|
||||||
|
UnitPopupButtons["CLEAR_ASSIST_TARGET"] = { text = "Clear Assist Target", dist = 0 }
|
||||||
|
|
||||||
|
-- Make sure menus are defined before adding our option
|
||||||
|
if not UnitPopupMenus["SELF"] then UnitPopupMenus["SELF"] = {} end
|
||||||
|
if not UnitPopupMenus["PARTY"] then UnitPopupMenus["PARTY"] = {} end
|
||||||
|
if not UnitPopupMenus["PLAYER"] then UnitPopupMenus["PLAYER"] = {} end
|
||||||
|
if not UnitPopupMenus["RAID"] then UnitPopupMenus["RAID"] = {} end
|
||||||
|
|
||||||
|
-- Add our option to various menus
|
||||||
|
table.insert(UnitPopupMenus["SELF"], "SET_ASSIST_TARGET")
|
||||||
|
table.insert(UnitPopupMenus["SELF"], "CLEAR_ASSIST_TARGET")
|
||||||
|
|
||||||
|
table.insert(UnitPopupMenus["PARTY"], "SET_ASSIST_TARGET")
|
||||||
|
table.insert(UnitPopupMenus["PLAYER"], "SET_ASSIST_TARGET")
|
||||||
|
table.insert(UnitPopupMenus["RAID"], "SET_ASSIST_TARGET")
|
||||||
|
|
||||||
|
-- Binding functions
|
||||||
|
BINDING_HEADER_QUICKASSIST = "QuickAssist"
|
||||||
|
BINDING_NAME_QUICKASSIST = "Assist Target"
|
||||||
|
BINDING_NAME_SELECTTARGET = "Select Assist Target"
|
||||||
|
BINDING_NAME_CLEARTARGET = "Clear Assist Target"
|
||||||
|
BINDING_NAME_SETTARGET = "Set as Assist Target"
|
||||||
|
|
||||||
|
function QAAssistBinding()
|
||||||
|
QuickAssist:AssistTarget()
|
||||||
|
end
|
||||||
|
|
||||||
|
function QASelectTargetBinding()
|
||||||
|
QuickAssist:SelectTarget()
|
||||||
|
end
|
||||||
|
|
||||||
|
function QAClearTargetBinding()
|
||||||
|
QuickAssist:SetTarget(nil)
|
||||||
|
end
|
||||||
|
|
||||||
|
function QASetTargetBinding()
|
||||||
|
if UnitExists("target") then
|
||||||
|
QuickAssist:SetTarget(UnitName("target"))
|
||||||
|
end
|
||||||
|
end
|
||||||
@@ -0,0 +1,8 @@
|
|||||||
|
## Interface: 11200
|
||||||
|
## Title: QuickAssist
|
||||||
|
## Notes: Quickly assist targets with a single key press
|
||||||
|
## SavedVariables: QuickAssistDB
|
||||||
|
## Version: 1.2
|
||||||
|
|
||||||
|
QuickAssist.lua
|
||||||
|
Bindings.xml
|
||||||
@@ -0,0 +1,55 @@
|
|||||||
|
# QuickAssist
|
||||||
|
|
||||||
|
A simple World of Warcraft Classic addon that allows you to designate a player as your assist target and quickly assist them with a single keypress. Perfect for raid environments where you need to quickly switch targets to match your tank or raid leader.
|
||||||
|
|
||||||
|
## Features
|
||||||
|
|
||||||
|
- Designate any player as your assist target through a right-click menu option
|
||||||
|
- Quickly assist your designated target with a single keybind
|
||||||
|
- If no target is set, the keybind will assist your current target instead
|
||||||
|
- Settings persist between game sessions
|
||||||
|
- Works with party members, raid members, and any targetable players
|
||||||
|
|
||||||
|
## Commands
|
||||||
|
|
||||||
|
- `/qa` or `/quickassist` - Shows commands and current assist target
|
||||||
|
- `/qa clear` - Clears current assist target
|
||||||
|
|
||||||
|
## Usage
|
||||||
|
|
||||||
|
1. Right-click on any player, party member, or raid member
|
||||||
|
2. Select "Set as Assist Target" from the menu
|
||||||
|
3. Use your assigned keybind to quickly assist their target
|
||||||
|
4. You can also set another key for selecting you current QA Target
|
||||||
|
|
||||||
|
## Installation
|
||||||
|
|
||||||
|
1. Download the addon from [this link](https://github.com/Eureka-Games/WoW-QuickAssist/releases/download/v1.2/QuickAssist.zip) or visit [Releases](https://github.com/Eureka-Games/WoW-QuickAssist/releases) section
|
||||||
|
2. Extract to your `World of Warcraft\Interface\AddOns` folder
|
||||||
|
3. The folder structure should look like: `Interface\AddOns\QuickAssist\`
|
||||||
|
4. Restart World of Warcraft if it's running
|
||||||
|
5. Set up your keybind in the game's Key Bindings menu
|
||||||
|
|
||||||
|
## Configuration
|
||||||
|
|
||||||
|
Set up your assist keybind through the standard WoW interface:
|
||||||
|
1. Open Game Menu
|
||||||
|
2. Go to Key Bindings
|
||||||
|
3. Look for "QuickAssist" section
|
||||||
|
4. Set your preferred key for "Assist Target" and "Select QA Target"
|
||||||
|
|
||||||
|
## Use Cases
|
||||||
|
|
||||||
|
- Raid tanks following main tank targets
|
||||||
|
- DPS players following tank or raid leader targets
|
||||||
|
- PvP groups coordinating target switching
|
||||||
|
- Any situation where quick target switching is needed
|
||||||
|
|
||||||
|
## Contributing
|
||||||
|
|
||||||
|
Feel free to submit issues or pull requests if you have suggestions for improvements.
|
||||||
|
|
||||||
|
## License
|
||||||
|
|
||||||
|
This addon is free software: you can freely use, modify, and share it.
|
||||||
|
Do whatever you want with it. No attribution required.
|
||||||
Reference in New Issue
Block a user