|
|
@ -19,6 +19,9 @@ function Class:__index(k) |
|
|
|
end |
|
|
|
end |
|
|
|
|
|
|
|
|
|
|
|
-- Constructor |
|
|
|
-- Constructor |
|
|
|
|
|
|
|
---@param locale string |
|
|
|
|
|
|
|
---@param name string |
|
|
|
|
|
|
|
---@param id number |
|
|
|
function Class:New(locale, name, id) |
|
|
|
function Class:New(locale, name, id) |
|
|
|
local self = setmetatable({}, Class) |
|
|
|
local self = setmetatable({}, Class) |
|
|
|
self.class = { |
|
|
|
self.class = { |
|
|
@ -30,21 +33,25 @@ function Class:New(locale, name, id) |
|
|
|
end |
|
|
|
end |
|
|
|
|
|
|
|
|
|
|
|
-- Get the classes locale |
|
|
|
-- Get the classes locale |
|
|
|
|
|
|
|
---@return string |
|
|
|
function Class:GetLocale() |
|
|
|
function Class:GetLocale() |
|
|
|
return self.class.locale |
|
|
|
return self.class.locale |
|
|
|
end |
|
|
|
end |
|
|
|
|
|
|
|
|
|
|
|
-- Get the classes name |
|
|
|
-- Get the classes name |
|
|
|
|
|
|
|
---@return string |
|
|
|
function Class:GetName() |
|
|
|
function Class:GetName() |
|
|
|
return self.class.name |
|
|
|
return self.class.name |
|
|
|
end |
|
|
|
end |
|
|
|
|
|
|
|
|
|
|
|
-- Get the classes id |
|
|
|
-- Get the classes id |
|
|
|
|
|
|
|
---@return number |
|
|
|
function Class:GetID() |
|
|
|
function Class:GetID() |
|
|
|
return self.class.id |
|
|
|
return self.class.id |
|
|
|
end |
|
|
|
end |
|
|
|
|
|
|
|
|
|
|
|
-- Return the classes color |
|
|
|
-- Return the classes color |
|
|
|
|
|
|
|
---@return ColorMixin classColor |
|
|
|
function Class:GetColor() |
|
|
|
function Class:GetColor() |
|
|
|
return C_ClassColor.GetClassColor(self.class.name) |
|
|
|
return C_ClassColor.GetClassColor(self.class.name) |
|
|
|
end |
|
|
|
end |
|
|
|