- Custom display 'My Spells' now get the player role from the current spec the character is using.

- Framework: table copy won't try to copy '__index' meta table.
This commit is contained in:
Tercioo
2019-02-09 14:05:24 -02:00
parent a4833f966b
commit c018f4db29
7 changed files with 691 additions and 19 deletions
+5 -2
View File
@@ -1857,7 +1857,7 @@
desc = Loc ["STRING_CUSTOM_MYSPELLS_DESC"],
source = false,
target = false,
script_version = 5,
script_version = 6,
script = [[
--get the parameters passed
local combat, instance_container, instance = ...
@@ -1865,8 +1865,11 @@
local total, top, amount = 0, 0, 0
local player
local role = UnitGroupRolesAssigned ("player")
local pet_attribute
local role = UnitGroupRolesAssigned ("player")
local spec = GetSpecialization()
role = spec and GetSpecializationRole (spec) or role
if (role == "DAMAGER") then
player = combat (DETAILS_ATTRIBUTE_DAMAGE, _detalhes.playername)