/branches
if (IsMounted()) then |
Dismount(); |
else |
local companionID = GetCompanionID(self.Action.DA_ActionSubType, self.Action.DA_ActionData); |
local companionID = DagAssistGetCompanionID(self.Action.DA_ActionSubType, self.Action.DA_ActionData); |
CallCompanion(self.Action.DA_ActionSubType, companionID); |
end |
end); |
* Added move up/down buttons to the section editor |
* Pressing ESC will now close the menu except while in combat |
* Menu items are prepopulated with some defaults when first installed |
* Fixed bug preventing the pickup of spells once placed in the menu |
* Fixed taint issue if you tried to change the menu items while in combat |
4.01 |
* Configurable! |
--]] |
function DagAssistRetrieveCursorItem(self, event, ...) |
if (InCombatLockdown() == 1) then |
return; |
end |
if (GetCursorInfo()) then |
local oldActionType, oldActionData, oldActionSubType; |
if (self.DA_ActionData) then |
elseif actionType == "macro" then |
PickupMacro(actionData); |
elseif actionType == "spell" then |
local spellBookID = DagAssistGetSpellBookID(actionData, actionSubType); |
if (spellBookID) then |
PickupSpell(spellBookID, actionSubType); |
end |
PickupSpell(actionData); |
end |
end |
end |
end |
function DagAssistGetSpellBookID(spellID, actionSubType) |
local i = 1; |
local link = GetSpellLink(i, actionSubType); |
while (link) do |
local absoluteID = string.match(link, "Hspell:([^\124]+)\124"); |
if (absoluteID == spellID) then |
return i; |
end |
i = i + 1; |
link = GetSpellLink(i, actionSubType); |
end |
end |
function DagAssistOnDragStart(self, event, ...) |
if (InCombatLockdown() == 1) then |
return; |
end |
local cursorType, cursorData, cursorSubType; |
if (GetCursorInfo()) then |
cursorType, cursorData, cursorSubType = GetCursorInfo(); |