diff --git a/Localization/Localization.de.lua b/Localization/Localization.de.lua
index ffaf0525..3a05e7ca 100644
--- a/Localization/Localization.de.lua
+++ b/Localization/Localization.de.lua
@@ -781,7 +781,7 @@ if GetLocale() == "deDE" then
ZEROSUMITEMCOST = "Zero Sum Item Costs",
ZEROSUMITEMCOSTTTDESC = "Wählen Sie die Art der Artikelkosten aus, die Sie verwenden möchten. Static gibt Artikeln einen definierten Preis. Während Mindestgebot ermöglicht es den Spielern, ein Gebot abzugeben, das die Kosten definiert, während Sie einen Mindestgebotsschwellenwert festlegen.",
ZONE = "Zone",
- PASS = "Weitergeben",
+ PASS = "Passen",
CHANGELOG1 = "- Verbessertes Broadcast-System mit zugänglicher Schnittstelle durch Klicken auf das Statusanzeigesymbol in der unteren linken Ecke der DKP-Hauptschnittstelle.",
CHANGELOG2 = " - Die Option \"Vollständige Übertragung\" überträgt alle Daten und überschreibt die Empfängertabellen mit identischen Kopien von Ihnen. Alle Daten, die sie hatten und die Sie nicht hatten, gehen verloren (Funktioniert genauso wie die Broadcast-Schaltfläche in 1.6 und früher).",
diff --git a/Modules/Award.lua b/Modules/Award.lua
index e66af011..55fa4ca9 100644
--- a/Modules/Award.lua
+++ b/Modules/Award.lua
@@ -130,11 +130,11 @@ local function AwardItem(player, cost, boss, zone, loot, reassign)
core.BidInProgress = false;
MonDKP:BroadcastStopBidTimer()
+ SendChatMessage(L["CONGRATS"].." "..winner.." "..L["ON"].." "..loot.." @ "..-cost.." "..L["DKP"], "RAID_WARNING")
if MonDKP_DB.modes.AnnounceAward then
SendChatMessage(L["CONGRATS"].." "..winner.." "..L["ON"].." "..loot.." @ "..-cost.." "..L["DKP"], "GUILD")
- else
- SendChatMessage(L["CONGRATS"].." "..winner.." "..L["ON"].." "..loot.." @ "..-cost.." "..L["DKP"], "RAID_WARNING")
- end
+ end
+
if mode == "Static Item Values" or mode == "Roll Based Bidding" or (mode == "Zero Sum" and MonDKP_DB.modes.ZeroSumBidType == "Static") then
local search = MonDKP:Table_Search(MonDKP_MinBids, core.BiddingWindow.itemName:GetText())
diff --git a/Modules/BidInterface.lua b/Modules/BidInterface.lua
index da29c7aa..3ee49c4f 100644
--- a/Modules/BidInterface.lua
+++ b/Modules/BidInterface.lua
@@ -354,7 +354,7 @@ local function BidWindowCreateRow(parent, id) -- Create 3 buttons for each row i
return f
end
-function MonDKP:CurrItem_Set(item, value, value2, icon)
+function MonDKP:CurrItem_Set(item, value, icon, value2)
CurrItemForBid = item;
CurrItemIcon = icon;
@@ -630,23 +630,25 @@ function MonDKP:BidInterface_Create()
else
behavior = "Max DKP"
end
-
+
local dkp = 0
local search = MonDKP:Table_Search(MonDKP_DKPTable, UnitName("player"), "player")
if search then
dkp = MonDKP_DKPTable[search[1][1]].dkp;
end
-
+
if behavior == "Max DKP" or itemValue == 0 then
f.Bid:SetNumber(dkp);
elseif behavior == "Max Item Value" then
f.Bid:SetNumber(itemValue);
- else
+ elseif behavior == "Min(Max DKP, Max Item Value)" then
if dkp < itemValue then
f.Bid:SetNumber(dkp)
else
f.Bid:SetNumber(itemValue);
end
+ else
+ f.Bid:SetNumber(dkp);
end
end)
@@ -658,12 +660,33 @@ function MonDKP:BidInterface_Create()
f.BidHalf:SetNormalFontObject("MonDKPSmallCenter");
f.BidHalf:SetHighlightFontObject("MonDKPSmallCenter");
f.BidHalf:SetScript("OnClick", function()
- local search = MonDKP:Table_Search(MonDKP_DKPTable, UnitName("player"), "player")
+ local behavior = MonDKP_DB.modes.MaxBehavior
+ local itemValue = 0
+ if mode == "Minimum Bid Values" or (mode == "Zero Sum" and MonDKP_DB.modes.ZeroSumBidType == "Minimum Bid") then
+ local value, text = strsplit(" ", f.MaxBid:GetText())
+ itemValue = tonumber(value)
+ else
+ behavior = "Max DKP"
+ end
+ local dkp = 0
+ local search = MonDKP:Table_Search(MonDKP_DKPTable, UnitName("player"), "player")
if search then
- f.Bid:SetNumber(MonDKP_DKPTable[search[1][1]].dkp/2);
+ dkp = MonDKP_DKPTable[search[1][1]].dkp;
+ end
+
+ if behavior == "Max DKP" or itemValue == 0 then
+ f.Bid:SetNumber(dkp/2);
+ elseif behavior == "Max Item Value" then
+ f.Bid:SetNumber(itemValue/2);
+ elseif behavior == "Min(Max DKP, Max Item Value)" then
+ if dkp < itemValue then
+ f.Bid:SetNumber(dkp/2)
+ else
+ f.Bid:SetNumber(itemValue/2);
+ end
else
- f.Bid:SetNumber(0);
+ f.Bid:SetNumber(dkp/2)
end
end)
diff --git a/Modules/Bidding.lua b/Modules/Bidding.lua
index 6040fdfa..d7a10527 100644
--- a/Modules/Bidding.lua
+++ b/Modules/Bidding.lua
@@ -160,9 +160,9 @@ function MonDKP_CHAT_MSG_WHISPER(text, ...)
if (cmd and cmd <= dkp) or (MonDKP_DB.modes.SubZeroBidding == true and dkp >= 0) or (MonDKP_DB.modes.SubZeroBidding == true and MonDKP_DB.modes.AllowNegativeBidders == true) or (mode == "Static Item Values" and dkp > 0 and (dkp > core.BiddingWindow.cost:GetNumber() or MonDKP_DB.modes.SubZeroBidding == true or MonDKP_DB.modes.costvalue == "Percent")) or ((mode == "Zero Sum" and MonDKP_DB.modes.ZeroSumBidType == "Static") and not cmd) then
if (cmd and core.BiddingWindow.minBid and tonumber(core.BiddingWindow.minBid:GetNumber()) <= cmd) or mode == "Static Item Values" or (mode == "Zero Sum" and MonDKP_DB.modes.ZeroSumBidType == "Static") or (mode == "Zero Sum" and MonDKP_DB.modes.ZeroSumBidType == "Minimum Bid" and cmd >= core.BiddingWindow.minBid:GetNumber()) then
for i=1, #Bids_Submitted do -- checks if a bid was submitted, removes last bid if it was
- if (mode ~= "Zero Sum" and MonDKP_DB.modes.ZeroSumBidType ~= "Static") and Bids_Submitted[i] and Bids_Submitted[i].player == name and Bids_Submitted[i].bid < cmd then
+ if (not (mode == "Zero Sum" and MonDKP_DB.modes.ZeroSumBidType == "Static")) and Bids_Submitted[i] and Bids_Submitted[i].player == name and Bids_Submitted[i].bid < cmd then
table.remove(Bids_Submitted, i)
- elseif (mode ~= "Zero Sum" and MonDKP_DB.modes.ZeroSumBidType ~= "Static") and Bids_Submitted[i] and Bids_Submitted[i].player == name and Bids_Submitted[i].bid >= cmd then
+ elseif (not (mode == "Zero Sum" and MonDKP_DB.modes.ZeroSumBidType == "Static")) and Bids_Submitted[i] and Bids_Submitted[i].player == name and Bids_Submitted[i].bid >= cmd then
SendChatMessage(L["BIDEQUALORLESS"], "WHISPER", nil, name)
return
end
@@ -185,7 +185,11 @@ function MonDKP_CHAT_MSG_WHISPER(text, ...)
MonDKP.Sync:SendData("MonDKPBidShare", Bids_Submitted)
end
if Timer ~= 0 and Timer > (core.BiddingWindow.bidTimer:GetText() - 10) and MonDKP_DB.modes.AntiSnipe > 0 then
- MonDKP:BroadcastBidTimer(core.BiddingWindow.bidTimer:GetText().."{"..MonDKP_DB.modes.AntiSnipe, core.BiddingWindow.item:GetText().." Min Bid: "..core.BiddingWindow.minBid:GetText(), core.BiddingWindow.itemIcon:GetTexture());
+ if core.BiddingWindow.maxBid:GetNumber() ~= 0 then
+ MonDKP:BroadcastBidTimer(core.BiddingWindow.bidTimer:GetText().."{"..MonDKP_DB.modes.AntiSnipe, core.BiddingWindow.item:GetText().." Min Bid: "..core.BiddingWindow.minBid:GetText().." Max Bid: "..core.BiddingWindow.maxBid:GetText(), core.BiddingWindow.itemIcon:GetTexture());
+ else
+ MonDKP:BroadcastBidTimer(core.BiddingWindow.bidTimer:GetText().."{"..MonDKP_DB.modes.AntiSnipe, core.BiddingWindow.item:GetText().." Min Bid: "..core.BiddingWindow.minBid:GetText(), core.BiddingWindow.itemIcon:GetTexture());
+ end
end
elseif mode == "Static Item Values" or (mode == "Zero Sum" and MonDKP_DB.modes.ZeroSumBidType == "Static") then
if MonDKP_DB.modes.AnnounceBid and ((Bids_Submitted[1] and Bids_Submitted[1].dkp < dkp) or not Bids_Submitted[1]) then
@@ -545,8 +549,8 @@ local function StartBidding()
else
MonDKP:BroadcastBidTimer(core.BiddingWindow.bidTimer:GetText(), core.BiddingWindow.item:GetText().." Min Bid: "..core.BiddingWindow.minBid:GetText(), CurrItemIcon)
end
- MonDKP.Sync:SendData("MonDKPCommand", "BidInfo,"..core.BiddingWindow.item:GetText()..","..core.BiddingWindow.minBid:GetText()..","..core.BiddingWindow.maxBid:GetText()..","..CurrItemIcon)
- MonDKP:CurrItem_Set(core.BiddingWindow.item:GetText(), core.BiddingWindow.minBid:GetText(), core.BiddingWindow.maxBid:GetText(), CurrItemIcon)
+ MonDKP.Sync:SendData("MonDKPCommand", "BidInfo,"..core.BiddingWindow.item:GetText().."#"..core.BiddingWindow.minBid:GetText().."#"..CurrItemIcon.."#"..core.BiddingWindow.maxBid:GetText())
+ MonDKP:CurrItem_Set(core.BiddingWindow.item:GetText(), core.BiddingWindow.minBid:GetText(), CurrItemIcon, core.BiddingWindow.maxBid:GetText())
if MonDKP_DB.defaults.AutoOpenBid then -- toggles bid window if option is set to
MonDKP:BidInterface_Toggle()
@@ -595,10 +599,9 @@ local function StartBidding()
else
if MonDKP_DB.modes.costvalue == "Percent" then perc = "%" else perc = " DKP" end;
MonDKP:BroadcastBidTimer(core.BiddingWindow.bidTimer:GetText(), core.BiddingWindow.item:GetText().." Cost: "..core.BiddingWindow.cost:GetNumber()..perc, CurrItemIcon)
- MonDKP.Sync:SendData("MonDKPCommand", "BidInfo,"..core.BiddingWindow.item:GetText()..","..core.BiddingWindow.cost:GetText()..perc..",0,"..CurrItemIcon)
+ MonDKP.Sync:SendData("MonDKPCommand", "BidInfo,"..core.BiddingWindow.item:GetText().."#"..core.BiddingWindow.cost:GetText()..perc.."#"..CurrItemIcon.."#0")
MonDKP:BidInterface_Toggle()
- MonDKP:CurrItem_Set(core.BiddingWindow.item:GetText(), core.BiddingWindow.cost:GetText()..perc, 0, CurrItemIcon)
-
+ MonDKP:CurrItem_Set(core.BiddingWindow.item:GetText(), core.BiddingWindow.cost:GetText()..perc, CurrItemIcon, 0)
end
if mode == "Roll Based Bidding" then
diff --git a/Modules/ManageEntries.lua b/Modules/ManageEntries.lua
index 7d8cd679..24756bb8 100644
--- a/Modules/ManageEntries.lua
+++ b/Modules/ManageEntries.lua
@@ -148,19 +148,19 @@ function AddRaidToDKPTable()
end
end
-local function AddGuildToDKPTable(rank)
+local function AddGuildToDKPTable(rank, level)
local guildSize = GetNumGuildMembers();
- local class, addedUsers, c, name, rankName, rankIndex;
+ local class, addedUsers, c, name, rankName, rankIndex, charLevel;
local numPlayers = 0;
local FlagRecovery = false
local curTime = time()
for i=1, guildSize do
- name,rankName,rankIndex,_,_,_,_,_,_,_,class = GetGuildRosterInfo(i)
+ name,rankName,rankIndex,charLevel,_,_,_,_,_,_,class = GetGuildRosterInfo(i)
name = strsub(name, 1, string.find(name, "-")-1) -- required to remove server name from player (can remove in classic if this is not an issue)
local search = MonDKP:Table_Search(MonDKP_DKPTable, name)
- if not search and rankIndex == rank then
+ if not search and (level == nil or charLevel >= level) and (rank == nil or rankIndex == rank) then
tinsert(MonDKP_DKPTable, {
player=name,
class=class,
@@ -168,7 +168,7 @@ local function AddGuildToDKPTable(rank)
previous_dkp=0,
lifetime_gained = 0,
lifetime_spent = 0,
- rank=rank,
+ rank=rankIndex,
rankName=rankName,
spec = "No Spec Reported",
role = "No Role Reported",
diff --git a/Modules/comm.lua b/Modules/comm.lua
index 06424284..fef6c423 100644
--- a/Modules/comm.lua
+++ b/Modules/comm.lua
@@ -242,7 +242,8 @@ function MonDKP.Sync:OnCommReceived(prefix, message, distribution, sender)
if MonDKP_DB.defaults.AutoOpenBid and not core.BidInterface:IsShown() then -- toggles bid window if option is set to
MonDKP:BidInterface_Toggle()
end
- MonDKP:CurrItem_Set(arg1, arg2, arg3, arg4) -- populates bid window
+ local subarg1, subarg2, subarg3, subarg4 = strsplit("#", arg1);
+ MonDKP:CurrItem_Set(subarg1, subarg2, subarg3, subarg4) -- populates bid window
end
end
elseif prefix == "MonDKPRaidTime" and sender ~= UnitName("player") and core.IsOfficer and MonDKP.ConfigTab2 then
@@ -703,7 +704,7 @@ function MonDKP.Sync:OnCommReceived(prefix, message, distribution, sender)
end
end
elseif prefix == "MonDKPDKPModes" then
- if MonDKP_DB.modes.mode ~= deserialized[1].mode then
+ if (MonDKP_DB.modes.mode ~= deserialized[1].mode) or (MonDKP_DB.modes.MaxBehavior ~= deserialized[1].MaxBehavior) then
MonDKP:Print(L["RECOMMENDRELOAD"])
end
MonDKP_DB.modes = deserialized[1]
diff --git a/Modules/exportDKP.lua b/Modules/exportDKP.lua
index d2db3873..440e3db8 100644
--- a/Modules/exportDKP.lua
+++ b/Modules/exportDKP.lua
@@ -130,7 +130,21 @@ local function GenerateDKPTables(table, format)
ExportString = "\n";
for i=1, numrows do
- ExportString = ExportString.." \n "..MonDKP_DKPHistory[i].players.."\n "..MonDKP_DKPHistory[i].dkp.."\n "..MonDKP_DKPHistory[i].date.."\n "..MonDKP_DKPHistory[i].reason.."\n \n";
+ local deletes;
+ local deletedby;
+ if MonDKP_DKPHistory[i].deletes == nil then
+ deletes = ''
+ else
+ deletes = MonDKP_DKPHistory[i].deletes
+ end
+
+ if MonDKP_DKPHistory[i].deletedby == nil then
+ deletedby = ''
+ else
+ deletedby = MonDKP_DKPHistory[i].deletedby
+ end
+
+ ExportString = ExportString.." \n "..MonDKP_DKPHistory[i].players.."\n "..MonDKP_DKPHistory[i].dkp.."\n "..MonDKP_DKPHistory[i].date.."\n "..MonDKP_DKPHistory[i].reason.."\n "..deletes.."\n "..deletedby.."\n \n";
end
ExportString = ExportString.."";
elseif table == MonDKP_Loot then
@@ -148,7 +162,21 @@ local function GenerateDKPTables(table, format)
local itemNumber = strsub(cur, string.find(cur, "Hitem:")+6, string.find(cur, ":", string.find(cur, "Hitem:")+6)-1)
local itemName = strsub(cur, string.find(cur, "::|h%[")+5, string.find(cur, "%]", string.find(cur, "::|h%[")+5)-1)
- ExportString = ExportString.." \n "..MonDKP_Loot[i].player.."\n "..itemName.."\n "..itemNumber.."\n "..MonDKP_Loot[i].zone.."\n "..MonDKP_Loot[i].boss.."\n "..MonDKP_Loot[i].date.."\n "..MonDKP_Loot[i].cost.."\n \n";
+ local deletes;
+ local deletedby;
+ if MonDKP_Loot[i].deletes == nil then
+ deletes = ''
+ else
+ deletes = MonDKP_Loot[i].deletes
+ end
+
+ if MonDKP_Loot[i].deletedby == nil then
+ deletedby = ''
+ else
+ deletedby = MonDKP_Loot[i].deletedby
+ end
+
+ ExportString = ExportString.." \n "..MonDKP_Loot[i].player.."\n "..itemName.."\n "..itemNumber.."\n "..MonDKP_Loot[i].zone.."\n "..MonDKP_Loot[i].boss.."\n "..MonDKP_Loot[i].date.."\n "..MonDKP_Loot[i].cost.."\n "..deletes.."\n "..deletedby.."\n \n";
end
ExportString = ExportString.."";
end
diff --git a/init.lua b/init.lua
index 5008af7a..b2ee9203 100644
--- a/init.lua
+++ b/init.lua
@@ -237,9 +237,13 @@ function MonDKP_OnEvent(self, event, arg1, ...)
end
elseif event == "CHAT_MSG_WHISPER" then
MonDKP:CheckOfficer()
- arg1 = strlower(arg1)
- if (core.BidInProgress or string.find(arg1, "!dkp") == 1 or string.find(arg1, "!dkp") == 1) and core.IsOfficer == true then
- MonDKP_CHAT_MSG_WHISPER(arg1, ...)
+ if core.IsOfficer then
+ arg1 = strlower(arg1)
+ if (core.BidInProgress or string.find(arg1, "!dkp") == 1 or string.find(arg1, "!dkp") == 1) then
+ MonDKP_CHAT_MSG_WHISPER(arg1, ...)
+ elseif string.find(arg1, "!standby") == 1 and core.StandbyActive then
+ MonDKP_Standby_Handler(arg1, ...)
+ end
end
elseif event == "GUILD_ROSTER_UPDATE" then
if IsInGuild() and not core.InitStart then