Bastion aims to serve as a highly performant, simplisitic, and expandable World of Warcraft data visualization framework.
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
Bastion/src/ItemBook/ItemBook.lua

24 lines
450 B

local Tinkr, Bastion = ...
-- Create a new ItemBook class
---@class ItemBook
local ItemBook = {}
ItemBook.__index = ItemBook
-- Constructor
function ItemBook:New()
local self = setmetatable({}, ItemBook)
self.items = {}
return self
end
-- Get a spell from the ItemBook
function ItemBook:GetItem(id)
if self.items[id] == nil then
self.items[id] = Bastion.Item:New(id)
end
return self.items[id]
end
return ItemBook