Skip to content

Commit e15569d

Browse files
authored
Merge pull request #50 from Bezerck/main
Add id to export json
2 parents b2760e8 + b25e665 commit e15569d

1 file changed

Lines changed: 3 additions & 1 deletion

File tree

ExportStructures/Character.lua

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@ local Env = select(2, ...)
66
local CharacterMeta = {
77
version = "",
88
unit = "",
9+
id = 0,
910
name = "",
1011
realm = "",
1112
race = "",
@@ -40,7 +41,8 @@ end
4041
---@param unit "player"|"target" Target unit. "target" would need to be inspect target.
4142
function CharacterMeta:SetUnit(unit)
4243
local name, realm = UnitFullName(unit)
43-
local _, englishClass, _, englishRace = GetPlayerInfoByGUID(UnitGUID(unit))
44+
self.id = UnitGUID(unit)
45+
local _, englishClass, _, englishRace = GetPlayerInfoByGUID(self.id)
4446

4547
self.version = Env.VERSION
4648
self.unit = unit

0 commit comments

Comments
 (0)