Class emmy lua

4n0n-patch-1
4n0n 2 years ago
parent fa5a42b0fb
commit 7d1b7560fa
  1. 3
      .gitignore
  2. 7
      src/Class/Class.lua

3
.gitignore vendored

@ -7,3 +7,6 @@ DS_Store
## ignore all files in scripts
scripts/*
## ignore vscode settings
.vscode/*

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

Loading…
Cancel
Save