|
|
@ -13,12 +13,12 @@ local Bastion = { |
|
|
|
Tick = GetGameTick() |
|
|
|
Tick = GetGameTick() |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Bastion.__index = Bastion |
|
|
|
|
|
|
|
|
|
|
|
local BastionBase = string.format("%s/%s", "scripts", "bastion") |
|
|
|
local BastionBase = string.format("%s/%s", "scripts", "bastion") |
|
|
|
local BastionScriptsBase = string.format("%s/%s", BastionBase, "scripts") |
|
|
|
local BastionScriptsBase = string.format("%s/%s", BastionBase, "scripts") |
|
|
|
local ThirdPartyModulesBase = string.format("%s/%s", "scripts", "BastionScripts") |
|
|
|
local ThirdPartyModulesBase = string.format("%s/%s", "scripts", "BastionScripts") |
|
|
|
|
|
|
|
|
|
|
|
Bastion.__index = Bastion |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
---@class Bastion.LoadedFiles.Table |
|
|
|
---@class Bastion.LoadedFiles.Table |
|
|
|
---@field [number] { originalPath: string, loadedPath: string, reloadable: boolean, order: number, newPath: string } |
|
|
|
---@field [number] { originalPath: string, loadedPath: string, reloadable: boolean, order: number, newPath: string } |
|
|
|
Bastion.LoadedFiles = {} |
|
|
|
Bastion.LoadedFiles = {} |
|
|
@ -164,6 +164,7 @@ local bastionFiles = { |
|
|
|
"~/src/Cache/Cache", |
|
|
|
"~/src/Cache/Cache", |
|
|
|
"~/src/Cacheable/Cacheable", |
|
|
|
"~/src/Cacheable/Cacheable", |
|
|
|
"~/src/Refreshable/Refreshable", |
|
|
|
"~/src/Refreshable/Refreshable", |
|
|
|
|
|
|
|
"~/src/EventManager/EventManager", |
|
|
|
"~/src/Unit/Unit", |
|
|
|
"~/src/Unit/Unit", |
|
|
|
"~/src/Aura/Aura", |
|
|
|
"~/src/Aura/Aura", |
|
|
|
"~/src/APLTrait/APLTrait", |
|
|
|
"~/src/APLTrait/APLTrait", |
|
|
@ -172,7 +173,6 @@ local bastionFiles = { |
|
|
|
"~/src/Module/Module", |
|
|
|
"~/src/Module/Module", |
|
|
|
"~/src/UnitManager/UnitManager", |
|
|
|
"~/src/UnitManager/UnitManager", |
|
|
|
"~/src/ObjectManager/ObjectManager", |
|
|
|
"~/src/ObjectManager/ObjectManager", |
|
|
|
"~/src/EventManager/EventManager", |
|
|
|
|
|
|
|
"~/src/Spell/Spell", |
|
|
|
"~/src/Spell/Spell", |
|
|
|
"~/src/SpellBook/SpellBook", |
|
|
|
"~/src/SpellBook/SpellBook", |
|
|
|
"~/src/Item/Item", |
|
|
|
"~/src/Item/Item", |
|
|
@ -243,15 +243,10 @@ local missed = {} |
|
|
|
Bastion.Globals.EventManager:RegisterWoWEvent("COMBAT_LOG_EVENT_UNFILTERED", function() |
|
|
|
Bastion.Globals.EventManager:RegisterWoWEvent("COMBAT_LOG_EVENT_UNFILTERED", function() |
|
|
|
local args = { CombatLogGetCurrentEventInfo() } |
|
|
|
local args = { CombatLogGetCurrentEventInfo() } |
|
|
|
|
|
|
|
|
|
|
|
---@type string |
|
|
|
|
|
|
|
local subEvent = args[2] |
|
|
|
local subEvent = args[2] |
|
|
|
---@type string |
|
|
|
|
|
|
|
local sourceGUID = args[4] |
|
|
|
local sourceGUID = args[4] |
|
|
|
---@type string |
|
|
|
|
|
|
|
local destGUID = args[8] |
|
|
|
local destGUID = args[8] |
|
|
|
---@type number |
|
|
|
|
|
|
|
local spellID = args[12] |
|
|
|
local spellID = args[12] |
|
|
|
---@type string |
|
|
|
|
|
|
|
local spellName = args[13] |
|
|
|
local spellName = args[13] |
|
|
|
|
|
|
|
|
|
|
|
if subEvent == "SPELL_CAST_SUCCESS" then |
|
|
|
if subEvent == "SPELL_CAST_SUCCESS" then |
|
|
@ -260,23 +255,20 @@ Bastion.Globals.EventManager:RegisterWoWEvent("COMBAT_LOG_EVENT_UNFILTERED", fun |
|
|
|
end |
|
|
|
end |
|
|
|
end |
|
|
|
end |
|
|
|
|
|
|
|
|
|
|
|
---@type Bastion.Unit? |
|
|
|
|
|
|
|
local u = Bastion.UnitManager[sourceGUID] |
|
|
|
local u = Bastion.UnitManager[sourceGUID] |
|
|
|
---@type Bastion.Unit |
|
|
|
|
|
|
|
local u2 = Bastion.UnitManager[destGUID] |
|
|
|
local u2 = Bastion.UnitManager[destGUID] |
|
|
|
|
|
|
|
|
|
|
|
local t = GetTime() |
|
|
|
local t = GetTime() |
|
|
|
|
|
|
|
|
|
|
|
if type(u) ~= "nil" then |
|
|
|
if u then |
|
|
|
u:SetLastCombatTime(t) |
|
|
|
u:SetLastCombatTime(t) |
|
|
|
end |
|
|
|
end |
|
|
|
|
|
|
|
|
|
|
|
if type(u2) ~= "nil" then |
|
|
|
if u2 then |
|
|
|
u2:SetLastCombatTime(t) |
|
|
|
u2:SetLastCombatTime(t) |
|
|
|
if subEvent == "SPELL_MISSED" and sourceGUID == playerGuid and spellID == 408 then |
|
|
|
if subEvent == "SPELL_MISSED" and sourceGUID == playerGuid and spellID == 408 then |
|
|
|
local missType = args[15] |
|
|
|
local missType = args[15] |
|
|
|
|
|
|
|
|
|
|
|
if type(u) ~= "nil" and missType == "IMMUNE" then |
|
|
|
if missType == "IMMUNE" then |
|
|
|
local castingSpell = u:GetCastingOrChannelingSpell() |
|
|
|
local castingSpell = u:GetCastingOrChannelingSpell() |
|
|
|
|
|
|
|
|
|
|
|
if castingSpell and type(castingSpell) == "table" then |
|
|
|
if castingSpell and type(castingSpell) == "table" then |
|
|
|