Skip to content

Commit

Permalink
tbc update
Browse files Browse the repository at this point in the history
  • Loading branch information
shirsig committed May 13, 2021
1 parent 676c054 commit 1a3cc45
Show file tree
Hide file tree
Showing 15 changed files with 486 additions and 324 deletions.
4 changes: 2 additions & 2 deletions aux-addon.lua
Original file line number Diff line number Diff line change
Expand Up @@ -55,8 +55,8 @@ function event.AUX_LOADED()
ignore_owner = true,
action_shortcuts = false,
crafting_cost = true,
post_bid = false,
post_duration = post.DURATION_8,
post_bid = nil,
post_duration = post.DURATION_24,
items = {},
item_ids = {},
unused_item_ids = {},
Expand Down
2 changes: 1 addition & 1 deletion aux-addon.toc
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
## Interface: 11306
## Author: shirsig
## Title: aux
## Version: 1.1.6
## Version: 2.0.0
## Notes: Auction House replacement
## SavedVariables: aux

Expand Down
105 changes: 86 additions & 19 deletions core/disenchant.lua
Original file line number Diff line number Diff line change
Expand Up @@ -114,45 +114,112 @@ function M.distribution(slot, quality, level)
{ item_id = 16204, min_quantity = 1, max_quantity = 2, probability = probability(.75, .22) },
{ item_id = 16203, min_quantity = 1, max_quantity = 2, probability = probability(.2, .75) },
{ item_id = 14344, min_quantity = 1, max_quantity = 1, probability = probability(.05, .03) },
}
}
elseif level <= 65 then
return {
{ item_id = 16204, min_quantity = 2, max_quantity = 5, probability = probability(.75, .22) },
{ item_id = 16203, min_quantity = 2, max_quantity = 3, probability = probability(.2, .75) },
{ item_id = 14344, min_quantity = 1, max_quantity = 1, probability = probability(.05, .03) },
}
elseif level <= 79 then
return {
{ item_id = 22445, min_quantity = 1, max_quantity = 3, probability = probability(.75, .22) },
{ item_id = 22447, min_quantity = 1, max_quantity = 3, probability = probability(.22, .75) },
{ item_id = 22448, min_quantity = 1, max_quantity = 1, probability = probability(.03, .03) },
}
elseif level <= 99 then
return {
{ item_id = 22445, min_quantity = 2, max_quantity = 3, probability = probability(.75, .22) },
{ item_id = 22447, min_quantity = 2, max_quantity = 3, probability = probability(.22, .75) },
{ item_id = 22448, min_quantity = 1, max_quantity = 1, probability = probability(.03, .03) },
}
else
return {
{ item_id = 16204, min_quantity = 2, max_quantity = 5, probability = probability(.75, .22) },
{ item_id = 16203, min_quantity = 2, max_quantity = 3, probability = probability(.2, .75) },
{ item_id = 14344, min_quantity = 1, max_quantity = 1, probability = probability(.05, .03) },
{ item_id = 22445, min_quantity = 2, max_quantity = 5, probability = probability(.75, .22) },
{ item_id = 22446, min_quantity = 1, max_quantity = 2, probability = probability(.22, .75) },
{ item_id = 22449, min_quantity = 1, max_quantity = 1, probability = probability(.03, .03) },
}
end
elseif quality == RARE then
if level <= 25 then
return {{ item_id = 10978, min_quantity = 1, max_quantity = 1, probability = 1 }}
return {
{ item_id = 10978, min_quantity = 1, max_quantity = 1, probability = 1 },
}
elseif level <= 30 then
return {{ item_id = 11084, min_quantity = 1, max_quantity = 1, probability = 1 }}
return {
{ item_id = 11084, min_quantity = 1, max_quantity = 1, probability = 1 },
}
elseif level <= 35 then
return {{ item_id = 11138, min_quantity = 1, max_quantity = 1, probability = 1 }}
return {
{ item_id = 11138, min_quantity = 1, max_quantity = 1, probability = 1 },
}
elseif level <= 40 then
return {{ item_id = 11139, min_quantity = 1, max_quantity = 1, probability = 1 }}
return {
{ item_id = 11139, min_quantity = 1, max_quantity = 1, probability = 1 },
}
elseif level <= 45 then
return {{ item_id = 11177, min_quantity = 1, max_quantity = 1, probability = 1 }}
return {
{ item_id = 11177, min_quantity = 1, max_quantity = 1, probability = 1 },
}
elseif level <= 50 then
return {{ item_id = 11178, min_quantity = 1, max_quantity = 1, probability = 1 }}
return {
{ item_id = 11178, min_quantity = 1, max_quantity = 1, probability = 1 },
}
elseif level <= 55 then
return {{ item_id = 14343, min_quantity = 1, max_quantity = 1, probability = 1 }}
elseif level <= 60 then
return {{ item_id = 14344, min_quantity = 1, max_quantity = 1, probability = .995}, { item_id = 20725, min_quantity = 1, max_quantity = 1, probability = .005 }}
return {
{ item_id = 14343, min_quantity = 1, max_quantity = 1, probability = 1 },
}
elseif level <= 65 then
return {
{ item_id = 14344, min_quantity = 1, max_quantity = 1, probability = .995 },
{ item_id = 20725, min_quantity = 1, max_quantity = 1, probability = .005 },
}
elseif level <= 99 then
return {
{ item_id = 22448, min_quantity = 1, max_quantity = 1, probability = .995 },
{ item_id = 20725, min_quantity = 1, max_quantity = 1, probability = .005 },
}
else
return {{ item_id = 14344, min_quantity = 1, max_quantity = 1, probability = .995}, { item_id = 20725, min_quantity = 1, max_quantity = 1, probability = .005 }}
return {
{ item_id = 22449, min_quantity = 1, max_quantity = 1, probability = .995 },
{ item_id = 22450, min_quantity = 1, max_quantity = 1, probability = .005 },
}
end
elseif quality == EPIC then
if level <= 45 then
return {{ item_id = 11177, min_quantity = 2, max_quantity = 4, probability = 1 }}
return {
{ item_id = 11177, min_quantity = 2, max_quantity = 4, probability = 1 },
}
elseif level <= 50 then
return {{ item_id = 11178, min_quantity = 2, max_quantity = 4, probability = 1 }}
return {
{ item_id = 11178, min_quantity = 2, max_quantity = 4, probability = 1 },
}
elseif level <= 55 then
return {{ item_id = 14343, min_quantity = 2, max_quantity = 4, probability = 1 }}
return {
{ item_id = 14343, min_quantity = 2, max_quantity = 4, probability = 1 },
}
elseif level <= 60 then
return {{ item_id = 20725, min_quantity = 1, max_quantity = 1, probability = 1 }}
return {
{ item_id = 20725, min_quantity = 1, max_quantity = 1, probability = 1 },
}
elseif level <= 75 then
return {
{ item_id = 20725, min_quantity = 1, max_quantity = 2, probability = 1 },
}
elseif level <= 80 then
return {
{ item_id = 20725, min_quantity = 1, max_quantity = 1, probability = probability(.5, .33) },
{ item_id = 20725, min_quantity = 2, max_quantity = 2, probability = probability(.5, .67) },
}
elseif level <= 100 then
return {
{ item_id = 22450, min_quantity = 1, max_quantity = 2, probability = 1 },
}
else
return {{ item_id = 20725, min_quantity = 1, max_quantity = 2, probability = 1 }}
return {
{ item_id = 22450, min_quantity = 1, max_quantity = 1, probability = .33 },
{ item_id = 22450, min_quantity = 2, max_quantity = 2, probability = .67 },
}
end
end
return {}
Expand Down
10 changes: 5 additions & 5 deletions core/slash.lua
Original file line number Diff line number Diff line change
Expand Up @@ -25,10 +25,10 @@ function SlashCmdList.AUX(command)
aux.account_data.action_shortcuts = not aux.account_data.action_shortcuts
aux.print('action shortcuts ' .. status(aux.account_data.action_shortcuts))
elseif arguments[1] == 'post' and arguments[2] == 'bid' then
aux.account_data.post_bid = not aux.account_data.post_bid
aux.print('post bid ' .. status(aux.account_data.post_bid))
elseif arguments[1] == 'post' and arguments[2] == 'duration' and ({['2'] = post.DURATION_2, ['8'] = post.DURATION_8, ['24'] = post.DURATION_24})[arguments[3]] then
aux.account_data.post_duration = ({['2'] = post.DURATION_2, ['8'] = post.DURATION_8, ['24'] = post.DURATION_24})[arguments[3]]
aux.account_data.post_bid = ({ unit = 'unit', stack = 'stack' })[arguments[3]]
aux.print('post bid ' .. aux.color.blue(aux.account_data.post_bid or 'off'))
elseif arguments[1] == 'post' and arguments[2] == 'duration' and ({ ['12'] = post.DURATION_12, ['24'] = post.DURATION_24, ['48'] = post.DURATION_48 })[arguments[3]] then
aux.account_data.post_duration = ({ ['12'] = post.DURATION_12, ['24'] = post.DURATION_24, ['48'] = post.DURATION_48 })[arguments[3]]
aux.print('post duration ' .. aux.color.blue(info.duration_hours(aux.account_data.post_duration) .. 'h'))
elseif arguments[1] == 'crafting' and arguments[2] == 'cost' then
aux.account_data.crafting_cost = not aux.account_data.crafting_cost
Expand Down Expand Up @@ -65,7 +65,7 @@ function SlashCmdList.AUX(command)
aux.print('- scale [' .. aux.color.blue(aux.account_data.scale) .. ']')
aux.print('- ignore owner [' .. status(aux.account_data.ignore_owner) .. ']')
aux.print('- action shortcuts [' .. status(aux.account_data.action_shortcuts) .. ']')
aux.print('- post bid [' .. status(aux.account_data.post_bid) .. ']')
aux.print('- post bid [' .. aux.color.blue(aux.account_data.post_bid or 'off') .. ']')
aux.print('- post duration [' .. aux.color.blue(info.duration_hours(aux.account_data.post_duration) .. 'h') .. ']')
aux.print('- crafting cost [' .. status(aux.account_data.crafting_cost) .. ']')
aux.print('- tooltip value [' .. status(tooltip_settings.value) .. ']')
Expand Down
2 changes: 1 addition & 1 deletion frame.lua
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ function event.AUX_LOADED()
end

do
local frame = CreateFrame('Frame', 'aux_frame', UIParent)
local frame = CreateFrame('Frame', 'aux_frame', UIParent, 'BackdropTemplate')
tinsert(UISpecialFrames, 'aux_frame')
gui.set_window_style(frame)
gui.set_size(frame, 768, 447)
Expand Down
4 changes: 2 additions & 2 deletions gui/auction_listing.lua
Original file line number Diff line number Diff line change
Expand Up @@ -16,8 +16,8 @@ local HEAD_SPACE = 2
local TIME_LEFT_STRINGS = {
aux.color.red'30m', -- Short
aux.color.orange'2h', -- Medium
aux.color.yellow'8h', -- Long
aux.color.blue'24h', -- Very Long
aux.color.yellow'12h', -- Long
aux.color.blue'48h', -- Very Long
}

function item_column_init(rt, cell)
Expand Down
Loading

0 comments on commit 1a3cc45

Please sign in to comment.