Skip to content

Commit

Permalink
Core/BossPrototype: Force cache the items we use for range checking
Browse files Browse the repository at this point in the history
  • Loading branch information
funkydude committed Jul 5, 2024
1 parent ccb7863 commit 48ce7ae
Show file tree
Hide file tree
Showing 4 changed files with 10 additions and 1 deletion.
3 changes: 3 additions & 0 deletions .luacheckrc
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@ files["**/Loader.lua"].ignore = {
"113/C_ChatInfo",
"113/C_CVar",
"113/C_EventUtils",
"113/C_Item",
"113/C_Map",
"11[23]/C_PartyInfo",
"113/C_Spell",
Expand Down Expand Up @@ -54,6 +55,7 @@ files["**/AutoRole.lua"].ignore = {
"113/UnitSetRole",
}
files["**/Core/BossPrototype.lua"].ignore = {
"113/C_Item",
"113/C_UIWidgetManager",
"113/C_UnitAuras",
"113/GetNumGroupMembers",
Expand All @@ -65,6 +67,7 @@ files["**/Core/BossPrototype.lua"].ignore = {
"113/UnitGroupRolesAssigned",
}
files["**/Core/BossPrototype_Classic.lua"].ignore = {
"113/C_Item",
"113/C_UIWidgetManager",
"113/C_UnitAuras",
"113/GetNumGroupMembers",
Expand Down
3 changes: 3 additions & 0 deletions Core/BossPrototype.lua
Original file line number Diff line number Diff line change
Expand Up @@ -1503,6 +1503,9 @@ do
[60] = 32825, -- Soul Cannon (TBC+ only)
[100] = 33119, -- Malister's Frost Wand (WotlK+ only)
}
for _,v in next, items do
C_Item.RequestLoadItemDataByID(v)
end
--- Check whether a hostile unit is within a specific range, check is performed based on specific item ranges.
-- Available Ranges: 10, 20, 30, 35, (TBC+: 40, 45, 60), (WotlK+: 100)
-- @string unit unit token or name
Expand Down
3 changes: 3 additions & 0 deletions Core/BossPrototype_Classic.lua
Original file line number Diff line number Diff line change
Expand Up @@ -1580,6 +1580,9 @@ do
[60] = 32825, -- Soul Cannon (TBC+ only)
[100] = 33119, -- Malister's Frost Wand (WotlK+ only)
}
for _,v in next, items do
C_Item.RequestLoadItemDataByID(v)
end
--- Check whether a hostile unit is within a specific range, check is performed based on specific item ranges.
-- Available Ranges: 10, 20, 30, 35, (TBC+: 40, 45, 60), (WotlK+: 100)
-- @string unit unit token or name
Expand Down
2 changes: 1 addition & 1 deletion Loader.lua
Original file line number Diff line number Diff line change
Expand Up @@ -107,7 +107,7 @@ public.GetSpellDescription = C_Spell and C_Spell.GetSpellDescription or GetSpell
public.GetSpellLink = C_Spell and C_Spell.GetSpellLink or GetSpellLink
public.GetSpellName = C_Spell and C_Spell.GetSpellName or GetSpellInfo
public.GetSpellTexture = C_Spell and C_Spell.GetSpellTexture or GetSpellTexture
public.IsItemInRange = IsItemInRange
public.IsItemInRange = C_Item and C_Item.IsItemInRange or IsItemInRange
public.PlaySoundFile = PlaySoundFile
public.RegisterAddonMessagePrefix = RegisterAddonMessagePrefix
public.SendAddonMessage = SendAddonMessage
Expand Down

0 comments on commit 48ce7ae

Please sign in to comment.