Skip to content

Commit

Permalink
added missing localization
Browse files Browse the repository at this point in the history
  • Loading branch information
Taidtuskecyh authored and Taidtuskecyh committed Jun 6, 2021
1 parent 8d13c2a commit 5953a60
Show file tree
Hide file tree
Showing 11 changed files with 146 additions and 0 deletions.
2 changes: 2 additions & 0 deletions Localization/Localization.cn.lua
Original file line number Diff line number Diff line change
Expand Up @@ -180,6 +180,8 @@ if GetLocale() == "zhCN" then
AUTOCOMBATLOGTTWARN = "如果尚未激活,请在系统>网络中手动激活高级战斗日志。",
AUTOOPEN = "自动打开出价窗口",
AUTOOPENTTDESC = "选中该选项后,将在拍卖新项目时自动打开投标窗口。 如果未选中,则需要使用“/dkp bid”手动将其打开。",
AUTOAWARDLOOT = "Auto Award Loot",
AUTOAWARDLOOTDESC = "When checked loot will be automatically awarded to the winner. If looting they will be master looted to the winner. If awarding from your bags they will be inserted into the next trade window with the winner.",
DECREASEDISENCHANT = "降低分解價值",
DECREASEDISENCHANTTTDESC = "3次分解後將分解值降低一半,之後每次分解至少減少5個DKP",
AWARDBONUS = "奖励奖金",
Expand Down
2 changes: 2 additions & 0 deletions Localization/Localization.de.lua
Original file line number Diff line number Diff line change
Expand Up @@ -180,6 +180,8 @@ if GetLocale() == "deDE" then
AUTOCOMBATLOGTTWARN = "Sie müssen Advanced Combat Logging immer noch manuell unter System> Netzwerk aktivieren, falls Sie dies noch nicht getan haben.",
AUTOOPEN = "Gebotsfenster automatisch öffnen",
AUTOOPENTTDESC = "Wenn diese Option aktiviert ist, wird das Gebotsfenster automatisch geöffnet, wenn ein neuer Artikel versteigert wird. Wenn das Kontrollkästchen deaktiviert ist, müssen Sie es bei Bedarf mit \"/dkp bid\" manuell öffnen.",
AUTOAWARDLOOT = "Auto Award Loot",
AUTOAWARDLOOTDESC = "When checked loot will be automatically awarded to the winner. If looting they will be master looted to the winner. If awarding from your bags they will be inserted into the next trade window with the winner.",
DECREASEDISENCHANT = "Entzaubern-Wert verringern",
DECREASEDISENCHANTTTDESC = "Verringere den Entzaubern-Wert nach drei Entzauberungen um die Hälfte bei jeder weiteren Entzauberung bis zu einem Mindestwert von 5 DKP",
AWARDBONUS = "Bonusprämie",
Expand Down
2 changes: 2 additions & 0 deletions Localization/Localization.en.lua
Original file line number Diff line number Diff line change
Expand Up @@ -811,6 +811,8 @@ core.L = {
CONFIRMMIGRATE = "Are you certain you wish to be the officer conducting the migration? This is a non-reversable process.",
AUTOOPEN = "Auto Open Bid Window",
AUTOOPENTTDESC = "When checked, bidding window will automatically open when a new item is being auctioned. If unchecked, you will be required to open it manually when needed with \"/dkp bid\".",
AUTOAWARDLOOT = "Auto Award Loot",
AUTOAWARDLOOTDESC = "When checked loot will be automatically awarded to the winner. If looting they will be master looted to the winner. If awarding from your bags they will be inserted into the next trade window with the winner.",
DECREASEDISENCHANT = "Decrease Disenchant Value",
DECREASEDISENCHANTTTDESC = "Decrease Disenchant Value after 3 disenchants by half every disenchant afterwards until a minimum of 5 DKP",
DELETETABLES = "Delete Tables",
Expand Down
2 changes: 2 additions & 0 deletions Localization/Localization.es.lua
Original file line number Diff line number Diff line change
Expand Up @@ -180,6 +180,8 @@ if GetLocale() == "esES" or GetLocale() == "esMX" then
AUTOCOMBATLOGTTWARN = "Aún debe activar manualmente el Registro avanzado de combate en Sistema> Red si aún no lo ha hecho.",
AUTOOPEN = "Ventana de oferta de apertura automática",
AUTOOPENTTDESC = "Cuando está marcada, la ventana de ofertas se abrirá automáticamente cuando se subaste un nuevo artículo. Si no está marcado, deberá abrirlo manualmente cuando sea necesario con \"/dkp bid\".",
AUTOAWARDLOOT = "Auto Award Loot",
AUTOAWARDLOOTDESC = "When checked loot will be automatically awarded to the winner. If looting they will be master looted to the winner. If awarding from your bags they will be inserted into the next trade window with the winner.",
DECREASEDISENCHANT = "Disminuir el valor de desencantar",
DECREASEDISENCHANTTTDESC = "Disminuya el valor de desencantar después de 3 desencantadores a la mitad cada desencanto después hasta un mínimo de 5 DKP",
AWARDBONUS = "Bono de premio",
Expand Down
2 changes: 2 additions & 0 deletions Localization/Localization.fr.lua
Original file line number Diff line number Diff line change
Expand Up @@ -222,6 +222,8 @@ if GetLocale() == "frFR" then
ARTINFLATTTDESC = "Points à donner à chaque joueur SUR LE DKP divisé et réparti entre eux. Cette valeur est ajoutée à leur DKP gagné APRÈS que la valeur mise en banque soit divisée.",
AUTOAWARD = "Prix ​​Auto DKP",
AUTOAWARDTTDESC = "Attribue automatiquement des DKP de Boss tué (réglés dans l'onglet Options) lorsqu'un boss est tué. Seul le Chef de Raid distribuera ces points. Le raid doit être en cours (via l'onglet Ajuster les DKP).",
AUTOAWARDLOOT = "Auto Award Loot",
AUTOAWARDLOOTDESC = "When checked loot will be automatically awarded to the winner. If looting they will be master looted to the winner. If awarding from your bags they will be inserted into the next trade window with the winner.",
AUTOCOMBATLOG = "Journal de combat automatique",
AUTOCOMBATLOGTTDESC = "Active automatiquement /combatlog lorsque vous êtes dans un raid et que vous entrez dans une zone de raid ou entrez dans un combat avec un boss de raid.",
AUTOCOMBATLOGTTWARN = "Vous devez toujours activer manuellement la journalisation de combat avancée dans Système > Réseau (si vous ne l'avez pas déjà fait).",
Expand Down
2 changes: 2 additions & 0 deletions Localization/Localization.kr.lua
Original file line number Diff line number Diff line change
Expand Up @@ -174,6 +174,8 @@ if GetLocale() == "koKR" then
ARTINFLATTTDESC = "DKP에서 각 플레이어에게 나누어주는 포인트. 이 값은 뱅킹 된 값이 분할 된 후 획득 한 DKP에 추가됩니다.",
AUTOAWARD = "자동 수상 DKP",
AUTOAWARDTTDESC = "Automatically awards Boss Kill Bonus DKP (set in Options tab) when a boss is killed. Only the raid leader will distribute points with this. Raid must be initialized on the Adjust DKP tab.", -- NEED TRANSLATION
AUTOAWARDLOOT = "Auto Award Loot",
AUTOAWARDLOOTDESC = "When checked loot will be automatically awarded to the winner. If looting they will be master looted to the winner. If awarding from your bags they will be inserted into the next trade window with the winner.",
AUTOCOMBATLOG = "자동 전투 기록",
AUTOCOMBATLOGTTDESC = "공격대와 공격대에 들어가거나 전투 대전에서 전투에 참가할 때 / combatlog를 자동으로 활성화합니다.",
AUTOCOMBATLOGTTWARN = "시스템> 네트워크에서 고급 전투 로깅을 아직 활성화하지 않은 경우 여전히 수동으로 활성화해야합니다.",
Expand Down
2 changes: 2 additions & 0 deletions Localization/Localization.ru.lua
Original file line number Diff line number Diff line change
Expand Up @@ -236,6 +236,8 @@ if GetLocale() == "ruRU" then
ARTINFLATTTDESC = "Очки, которые распределяются между каждым игроком таблицы DKP, которые разделены и распределены между ними. Это значение добавляется к их заработанному DKP ПОСЛЕ того, как банковская стоимость делится.",
AUTOAWARD = "Авто-начисление DKP",
AUTOAWARDTTDESC = "Automatically awards Boss Kill Bonus DKP (set in Options tab) when a boss is killed. Only the raid leader will distribute points with this. Raid must be initialized on the Adjust DKP tab.", -- NEEDS TRANSLATION
AUTOAWARDLOOT = "Auto Award Loot",
AUTOAWARDLOOTDESC = "When checked loot will be automatically awarded to the winner. If looting they will be master looted to the winner. If awarding from your bags they will be inserted into the next trade window with the winner.",
AUTOCOMBATLOG = "Автоматический журнал боя",
AUTOCOMBATLOGTTDESC = "Автоматически активирует /combatlog когда в рейде и рейдовой зоне.",
AUTOCOMBATLOGTTWARN = "Вам все еще необходимо активировать \"Расширенный журнал боя\" в \"Настройки > Соединение\" если Вы еще не сделали этого.",
Expand Down
2 changes: 2 additions & 0 deletions Localization/Localization.tw.lua
Original file line number Diff line number Diff line change
Expand Up @@ -174,6 +174,8 @@ if GetLocale() == "zhTW" then
ARTINFLATTTDESC = "分配給每個玩家的DKP的TOP積分,在各個玩家之間分配。銀行價值除後,此值將添加到他們的收入DKP中。",
AUTOAWARD = "汽車獎DKP",
AUTOAWARDTTDESC = "Automatically awards Boss Kill Bonus DKP (set in Options tab) when a boss is killed. Only the raid leader will distribute points with this. Raid must be initialized on the Adjust DKP tab.", -- NEED TRANSLATION
AUTOAWARDLOOT = "Auto Award Loot",
AUTOAWARDLOOTDESC = "When checked loot will be automatically awarded to the winner. If looting they will be master looted to the winner. If awarding from your bags they will be inserted into the next trade window with the winner.",
AUTOCOMBATLOG = "自動戰鬥記錄",
AUTOCOMBATLOGTTDESC = "在突襲中進入突襲區域或在遭遇突襲時進入戰鬥時自動激活/ combatlog。",
AUTOCOMBATLOGTTWARN = "如果尚未激活“高級戰鬥日誌”,則仍必須在系統>網絡中手動激活它。",
Expand Down
38 changes: 38 additions & 0 deletions Modules/Award.lua
Original file line number Diff line number Diff line change
Expand Up @@ -234,6 +234,44 @@ local function AwardItem(player, cost, boss, zone, loot, reassign)
SendChatMessage(L["CONGRATS"].." "..winner.." "..L["ON"].." "..loot.." @ "..-cost.." "..L["DKP"], "GUILD")
end


if core.DB.defaults.AutoAwardLoot then
local numLootItems = GetNumLootItems()
if numLootItems > 0 then
local lootIndex = nil
for i = 1, numLootItems do
local lootLink = GetLootSlotLink(i)
if lootIndex == nil and lootLink ~= nil and lootLink == loot then
lootIndex = i
end
end

local candidateIndex = nil
local maxGroupMembers = MAX_RAID_MEMBERS
if not IsInRaid() then maxGroupMembers = MAX_PARTY_MEMBERS end
for i = 1, maxGroupMembers do
local candidate = GetMasterLootCandidate(lootIndex, i)
if candidateIndex == nil and candidate ~= nil and candidate == winner then
candidateIndex = i
end
end

if lootIndex ~= nil and candidateIndex ~= nil then
GiveMasterLoot(lootIndex, candidateIndex)
end
else
if core.DB.pendingLoot == nil then
core.DB.pendingLoot = {}
end
if core.DB.pendingLoot[winner] == nil then
core.DB.pendingLoot[winner] = {}
end
tinsert(core.DB.pendingLoot[winner], loot)

InitiateTrade(winner)
end
end

end
end

Expand Down
20 changes: 20 additions & 0 deletions Modules/Options.lua
Original file line number Diff line number Diff line change
Expand Up @@ -1182,6 +1182,26 @@ function CommDKP:Options()
end)

if core.IsOfficer == true then
CommDKP.ConfigTab4.AutoAwardLootCheckbox = CreateFrame("CheckButton", nil, CommDKP.ConfigTab4, "UICheckButtonTemplate");
CommDKP.ConfigTab4.AutoAwardLootCheckbox:SetChecked(core.DB.defaults.AutoAwardLoot)
CommDKP.ConfigTab4.AutoAwardLootCheckbox:SetScale(0.8);
CommDKP.ConfigTab4.AutoAwardLootCheckbox.text:SetText("|cff5151de"..L["AUTOAWARDLOOT"].."|r");
CommDKP.ConfigTab4.AutoAwardLootCheckbox.text:SetScale(1);
CommDKP.ConfigTab4.AutoAwardLootCheckbox.text:SetFontObject("CommDKPSmallLeft")
CommDKP.ConfigTab4.AutoAwardLootCheckbox:SetPoint("TOP", CommDKP.ConfigTab4.AutoOpenCheckbox, "BOTTOM", 0, 0);
CommDKP.ConfigTab4.AutoAwardLootCheckbox:SetScript("OnClick", function(self)
core.DB.defaults.AutoAwardLoot = self:GetChecked()
end)
CommDKP.ConfigTab4.AutoAwardLootCheckbox:SetScript("OnEnter", function(self)
GameTooltip:SetOwner(self, "ANCHOR_LEFT");
GameTooltip:SetText(L["AUTOAWARDLOOT"], 0.25, 0.75, 0.90, 1, true);
GameTooltip:AddLine(L["AUTOAWARDLOOTDESC"], 1.0, 1.0, 1.0, true);
GameTooltip:Show();
end)
CommDKP.ConfigTab4.AutoAwardLootCheckbox:SetScript("OnLeave", function(self)
GameTooltip:Hide()
end)

-- Suppress Broadcast Notifications checkbox
CommDKP.ConfigTab4.SuppressTells = CreateFrame("CheckButton", nil, CommDKP.ConfigTab4, "UICheckButtonTemplate");
CommDKP.ConfigTab4.SuppressTells:SetPoint("LEFT", CommDKP.ConfigTab4.SuppressNotifications, "RIGHT", 200, 0)
Expand Down
72 changes: 72 additions & 0 deletions init.lua
Original file line number Diff line number Diff line change
Expand Up @@ -615,6 +615,74 @@ function CommDKP_OnEvent(self, event, arg1, ...)
CommDKP:LootTable_Set(lootList)
end
end
elseif core.DB.defaults.AutoAwardLoot and event == "TRADE_SHOW" then
local traderName = UnitName("npc")
if traderName == nil or core.DB.pendingLoot == nil or core.DB.pendingLoot[traderName] == nil then
return
end
core.DB.pendingTradePlayer = traderName
core.DB.pendingTrade = {}
local pendingLoot = core.DB.pendingLoot[traderName]
print(pendingLoot)
for i, lootLink in pairs(pendingLoot) do
local awarded = false
for containerSlot = 0, NUM_BAG_FRAMES do
for bagSlot = 1, GetContainerNumSlots(containerSlot) do
local containerLink = GetContainerItemLink(containerSlot, bagSlot)
print(containerLink)
print(lootLink)
if not awarded and containerLink ~= nil and containerLink == lootLink then
ClearCursor()
PickupContainerItem(containerSlot, bagSlot)
local tradeSlot = TradeFrame_GetAvailableSlot()
if tradeSlot ~= nil and tradeSlot <= 6 then
ClickTradeButton(tradeSlot)
pendingLoot[i] = nil
tinsert(core.DB.pendingTrade, lootLink)
awarded = true
end
end
end
end
end
elseif core.DB.defaults.AutoAwardLoot and event == "TRADE_ACCEPT_UPDATE" then
local arg2 = ...
local traderName = UnitName("npc")
if traderName == nil or core.DB.pendingLoot == nil or core.DB.pendingLoot[traderName] == nil then
return
end
if arg1 ~= nil and arg1 == 1 then
local pendingLoot = core.DB.pendingLoot[traderName]
if core.DB.pendingTrade == nil then
core.DB.pendingTrade = {}
end
for tradeSlot = 1, 6 do
local tradeLink = GetTradePlayerItemLink(tradeSlot)
for i, lootLink in pairs(pendingLoot) do
if tradeLink ~= nil and tradeLink == lootLink then
tinsert(core.DB.pendingTrade, tradeLink)
end
end
end
end
elseif core.DB.defaults.AutoAwardLoot and event == "TRADE_CLOSED" then
local traderName = UnitName("npc")
if traderName == nil or core.DB.pendingTrade == nil or core.DB.pendingLoot == nil or core.DB.pendingLoot[traderName] == nil then
return
end
local pendingLoot = core.DB.pendingLoot[traderName]
for _, tradeLink in pairs(core.DB.pendingTrade) do
for i, lootLink in pairs(pendingLoot) do
if tradeLink == lootLink then
pendingLoot[i] = nil
end
end
end
if #pendingLoot <= 0 then
core.DB.pendingLoot[traderName] = nil
end
core.DB.pendingTrade = {}
core.DB.pendingTradePlayer = nil
end
end

Expand Down Expand Up @@ -1256,4 +1324,8 @@ events:RegisterEvent("GUILD_ROSTER_UPDATE")
events:RegisterEvent("PLAYER_ENTERING_WORLD")
events:RegisterEvent("ZONE_CHANGED_NEW_AREA")
events:RegisterEvent("BOSS_KILL")
events:RegisterEvent("TRADE_SHOW")
events:RegisterEvent("TRADE_ACCEPT_UPDATE")
events:RegisterEvent("TRADE_CLOSED")

events:SetScript("OnEvent", CommDKP_OnEvent); -- calls the above CommDKP_OnEvent function to determine what to do with the event

0 comments on commit 5953a60

Please sign in to comment.