Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion addons/GearSwap/gearswap.lua
Original file line number Diff line number Diff line change
Expand Up @@ -113,7 +113,7 @@ require 'actions'
packets = require 'packets'

-- Resources Checks
if res.items and res.bags and res.slots and res.statuses and res.jobs and res.elements and res.skills and res.buffs and res.spells and res.job_abilities and res.weapon_skills and res.monster_skills and res.action_messages and res.skills and res.monstrosity and res.weather and res.moon_phases and res.races then
if res.items and res.bags and res.slots and res.statuses and res.jobs and res.elements and res.skills and res.buffs and res.spells and res.job_abilities and res.weapon_skills and res.monster_skills and res.action_messages and res.skills and res.monstrosity and res.weather and res.moon_phases and res.races and res.monster_abilities then
else
error('Missing resources!')
end
Expand Down
8 changes: 8 additions & 0 deletions addons/libs/actions.lua
Original file line number Diff line number Diff line change
Expand Up @@ -356,6 +356,14 @@ local cat_to_res_map = {['weaponskill_finish']='weapon_skills', ['spell_finish']
['casting_begin']='spells', ['item_begin']='items', ['mob_tp_finish']='monster_abilities',
['avatar_tp_finish']='job_abilities', ['job_ability_unblinkable']='job_abilities',
['job_ability_run']='job_abilities'}
-- This library uses rawget() to index the resources for performance reasons.
-- However, the resources library lazy-loads resources using its metatable.
-- Thus we need to index each of the required resources once to force an eager-load.
for _,resource_name in pairs(cat_to_res_map) do
if not res[resource_name] then
print(resource_name.." not detected.")
end
end
local begin_categories = {['weaponskill_begin']=true, ['casting_begin']=true, ['item_begin']=true, ['ranged_begin']=true}
local finish_categories = {['melee']=true,['ranged_finish']=true,['weaponskill_finish']=true, ['spell_finish']=true, ['item_finish']=true,
['job_ability']=true, ['mob_tp_finish']=true, ['avatar_tp_finish']=true, ['job_ability_unblinkable']=true,
Expand Down