Skip to content

Commit

Permalink
Fixing a null error issue.
Browse files Browse the repository at this point in the history
  • Loading branch information
Vapok committed May 18, 2020
1 parent a6761fc commit 1488272
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 5 deletions.
1 change: 0 additions & 1 deletion Modules/Award.lua
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,6 @@ local function AwardItem(player, cost, boss, zone, loot, reassign)

MonDKP:StatusVerify_Update()
if core.IsOfficer then
print("Is Officer");
if MonDKP_DB.modes.costvalue == "Percent" then
local search = MonDKP:Table_Search(MonDKP_DKPTable, winner);

Expand Down
15 changes: 11 additions & 4 deletions init.lua
Original file line number Diff line number Diff line change
Expand Up @@ -72,14 +72,21 @@ MonDKP.Commands = {
if not name or not strfind(name, ":::::") then
MonDKP:Print(L["AWARDWARNING"])
return
end
end
local item = strjoin(" ", ...)
if not item then return end
item = name.." "..item;
local itemName,itemLink,_,_,_,_,_,_,_,_ = GetItemInfo(item)
local itemName,_,_,_,_,_,_,_,_,_ = GetItemInfo(item)
local cost = 0;
local search = MonDKP:Table_Search(MonDKP_MinBids, itemName)
local cost = MonDKP_MinBids[search[1][1]].minbid or MonDKP:GetMinBid(itemLink);
MonDKP:AwardConfirm(nil, cost, MonDKP_DB.bossargs.LastKilledBoss, MonDKP_DB.bossargs.CurrentRaidZone, item)

if not search then
cost = MonDKP:GetMinBid(item)
else
cost = MonDKP_MinBids[search[1][1]].minbid;
end

MonDKP:AwardConfirm(nil, cost, MonDKP_DB.bossargs.LastKilledBoss, MonDKP_DB.bossargs.CurrentRaidZone, item)
else
MonDKP:Print(L["NOPERMISSION"])
end
Expand Down

0 comments on commit 1488272

Please sign in to comment.