Skip to content

Commit

Permalink
Make sure the player has any of the currency
Browse files Browse the repository at this point in the history
  • Loading branch information
p3lim committed Sep 15, 2014
1 parent 0695b5a commit a0f16a3
Showing 1 changed file with 7 additions and 5 deletions.
12 changes: 7 additions & 5 deletions BonusRollPreview.lua
Expand Up @@ -330,15 +330,17 @@ function Container:PLAYER_LOOT_SPEC_UPDATED(event)
HandlePosition()
end

function Container:SPELL_CONFIRMATION_PROMPT(event, spellID, confirmType)
function Container:SPELL_CONFIRMATION_PROMPT(event, spellID, confirmType, _, _, currencyID)
if(confirmType == CONFIRMATION_PROMPT_BONUS_ROLL) then
currentEncounterID = ns.encounterIDs[spellID]

if(currentEncounterID) then
self:RegisterEvent('EJ_LOOT_DATA_RECIEVED')
self:RegisterEvent('PLAYER_LOOT_SPEC_UPDATED')

self:Update()
local _, count = GetCurrencyInfo(currencyID)
if(count > 0) then
self:RegisterEvent('EJ_LOOT_DATA_RECIEVED')
self:RegisterEvent('PLAYER_LOOT_SPEC_UPDATED')
self:Update()
end
else
print('|cffff8080BonusRollPreview:|r Found an unknown spell [' .. spellID .. ']. Please report this!')
end
Expand Down

0 comments on commit a0f16a3

Please sign in to comment.