View Single Post
06/21/17, 03:33 AM   #1
Letho
AddOn Author - Click to view addons
Join Date: Apr 2016
Posts: 238
[implemented] GetWeaponPairInfo() to get backbar slot data

Hey chip and others, I would love to get a function that returns data of ALL sloted abilities (including the ones sloted on the backbar), because I need a representation of a player's the total skill layout after ADDON_LOADED.

I am currently waiting for the user to switch to his backbar (2nd weapon pair) to get the information. This is a very bad approach though, as I would need the backbar info earlier:

Code:
function AuraMastery:GetActionbarSetup()
	local activeActionBar = GetActiveWeaponPairInfo()
	for n = 3, 8 do
		AuraMastery.actionbarData[activeActionBar][n] = GetSlotBoundId(n)
	end
end

function AuraMastery.OnActionSlotsFullUpdate()
	--d("FULL UPDATE");
	AuraMastery:GetActionbarSetup();
end

EVENT_MANAGER:RegisterForEvent(AuraMastery.name, EVENT_ACTION_SLOTS_FULL_UPDATE, AuraMastery.OnActionSlotsFullUpdate)

I would love to get sth. like:
Code:
GetSlotedAbilitiesInfo(optional parameter: weaponPairId=frontbar or backbar)

returns: 
table {
  [1] = {
    [1] = SlotBoundId for slot 1 on weaponpair 1 ...
    [2] = SlotBoundId for slot 2 on weaponpair 1 ...
    ...
  },
  [2] = {
    [1] = SlotBoundId for slot 1 on weaponpair 2 ...
    [2] = SlotBoundId for slot 2 on weaponpair 2 ...
    ...
  }
}
Would an implementation like this cause much work?

Cheers,
Letho