From 06916f6bc6033a2a64304ee9dc4549e9a5726969 Mon Sep 17 00:00:00 2001 From: 4n0n <4n0n@tinkr.site> Date: Tue, 1 Aug 2023 13:35:57 -0500 Subject: [PATCH] Spellbook and Itembook no longer shared through the engine --- scripts/ExampleModule.lua | 5 ++++- src/_bastion.lua | 4 ++-- 2 files changed, 6 insertions(+), 3 deletions(-) diff --git a/scripts/ExampleModule.lua b/scripts/ExampleModule.lua index d6879e8..e7a5fcc 100644 --- a/scripts/ExampleModule.lua +++ b/scripts/ExampleModule.lua @@ -2,7 +2,10 @@ local Tinkr, Bastion = ... local ExampleModule = Bastion.Module:New('ExampleModule') local Player = Bastion.UnitManager:Get('player') -local FlashHeal = Bastion.SpellBook:GetSpell(2061) +-- Create a local spellbook +local SpellBook = Bastion.SpellBook:New() + +local FlashHeal = SpellBook:GetSpell(2061) local AdvancedMath = Bastion:Import('AdvancedMath') diff --git a/src/_bastion.lua b/src/_bastion.lua index 1185846..0341772 100644 --- a/src/_bastion.lua +++ b/src/_bastion.lua @@ -47,11 +47,11 @@ Bastion.EventManager = Bastion.require("EventManager"):New() ---@type Spell Bastion.Spell = Bastion.require("Spell") ---@type SpellBook -Bastion.SpellBook = Bastion.require("SpellBook"):New() +Bastion.SpellBook = Bastion.require("SpellBook") ---@type Item Bastion.Item = Bastion.require("Item") ---@type ItemBook -Bastion.ItemBook = Bastion.require("ItemBook"):New() +Bastion.ItemBook = Bastion.require("ItemBook") ---@type AuraTable Bastion.AuraTable = Bastion.require("AuraTable") ---@type Class