module refactoring
This commit is contained in:
+15
-15
@@ -6,7 +6,7 @@ include 'aux'
|
||||
local persistence = require 'aux.util.persistence'
|
||||
local cache = require 'aux.core.cache'
|
||||
|
||||
aux_ignore_owner = true
|
||||
_G.aux_ignore_owner = true
|
||||
|
||||
SLASH_AUX1 = '/aux'
|
||||
function SlashCmdList.AUX(command)
|
||||
@@ -19,44 +19,44 @@ function SlashCmdList.AUX(command)
|
||||
persistence.dataset.post = nil
|
||||
print 'Post settings cleared.'
|
||||
elseif arguments[1] == 'clear' and arguments[2] == 'datasets' then
|
||||
aux_datasets = t
|
||||
_G.aux_datasets = t
|
||||
print 'Datasets cleared.'
|
||||
elseif arguments[1] == 'clear' and arguments[2] == 'merchant' and arguments[3] == 'buy' then
|
||||
aux_merchant_buy = t
|
||||
_G.aux_merchant_buy = t
|
||||
print 'Merchant buy prices cleared.'
|
||||
elseif arguments[1] == 'clear' and arguments[2] == 'merchant' and arguments[3] == 'sell' then
|
||||
aux_merchant_sell = t
|
||||
_G.aux_merchant_sell = t
|
||||
print 'Merchant sell prices cleared.'
|
||||
elseif arguments[1] == 'clear' and arguments[2] == 'item' and arguments[3] == 'cache' then
|
||||
aux_items = t
|
||||
aux_item_ids = t
|
||||
aux_auctionable_items = t
|
||||
_G.aux_items = t
|
||||
_G.aux_item_ids = t
|
||||
_G.aux_auctionable_items = t
|
||||
print 'Item cache cleared.'
|
||||
elseif arguments[1] == 'populate' and arguments[2] == 'wdb' then
|
||||
cache.populate_wdb()
|
||||
elseif arguments[1] == 'tooltip' and arguments[2] == 'value' then
|
||||
aux_tooltip_value = not aux_tooltip_value
|
||||
_G.aux_tooltip_value = not aux_tooltip_value
|
||||
print('Historical value in tooltip ' .. (aux_tooltip_value and 'enabled' or 'disabled') .. '.')
|
||||
elseif arguments[1] == 'tooltip' and arguments[2] == 'daily' then
|
||||
aux_tooltip_daily = not aux_tooltip_daily
|
||||
_G.aux_tooltip_daily = not aux_tooltip_daily
|
||||
print('Market value in tooltip ' .. (aux_tooltip_daily and 'enabled' or 'disabled') .. '.')
|
||||
elseif arguments[1] == 'tooltip' and arguments[2] == 'vendor' and arguments[3] == 'buy' then
|
||||
aux_tooltip_vendor_buy = not aux_tooltip_vendor_buy
|
||||
_G.aux_tooltip_vendor_buy = not aux_tooltip_vendor_buy
|
||||
print('Vendor buy price in tooltip ' .. (aux_tooltip_vendor_buy and 'enabled' or 'disabled') .. '.')
|
||||
elseif arguments[1] == 'tooltip' and arguments[2] == 'vendor' and arguments[3] == 'sell' then
|
||||
aux_tooltip_vendor_sell = not aux_tooltip_vendor_sell
|
||||
_G.aux_tooltip_vendor_sell = not aux_tooltip_vendor_sell
|
||||
print('Vendor sell price in tooltip ' .. (aux_tooltip_vendor_sell and 'enabled' or 'disabled') .. '.')
|
||||
elseif arguments[1] == 'tooltip' and arguments[2] == 'disenchant' and arguments[3] == 'value' then
|
||||
aux_tooltip_disenchant_value = not aux_tooltip_disenchant_value
|
||||
_G.aux_tooltip_disenchant_value = not aux_tooltip_disenchant_value
|
||||
print('Disenchant value in tooltip ' .. (aux_tooltip_disenchant_value and 'enabled' or 'disabled') .. '.')
|
||||
elseif arguments[1] == 'tooltip' and arguments[2] == 'disenchant' and arguments[3] == 'distribution' then
|
||||
aux_tooltip_disenchant_distribution = not aux_tooltip_disenchant_distribution
|
||||
_G.aux_tooltip_disenchant_distribution = not aux_tooltip_disenchant_distribution
|
||||
print('Disenchant distribution in tooltip ' .. (aux_tooltip_disenchant_distribution and 'enabled' or 'disabled') .. '.')
|
||||
elseif arguments[1] == 'tooltip' and arguments[2] == 'disenchant' and arguments[3] == 'source' then
|
||||
aux_tooltip_disenchant_source = not aux_tooltip_disenchant_source
|
||||
_G.aux_tooltip_disenchant_source = not aux_tooltip_disenchant_source
|
||||
print('Disenchant source in tooltip ' .. (aux_tooltip_disenchant_source and 'enabled' or 'disabled') .. '.')
|
||||
elseif arguments[1] == 'ignore' and arguments[2] == 'owner' then
|
||||
aux_ignore_owner = not aux_ignore_owner
|
||||
_G.aux_ignore_owner = not aux_ignore_owner
|
||||
print('Ignoring of owner ' .. (aux_ignore_owner and 'enabled' or 'disabled') .. '.')
|
||||
elseif arguments[1] == 'chars' and arguments[2] == 'add' then
|
||||
local realm = GetCVar('realmName')
|
||||
|
||||
Reference in New Issue
Block a user