From 14d07a8dbdff60654ffd2e5ef05afe9075bfee55 Mon Sep 17 00:00:00 2001 From: ianv88 <58250981+ianv88@users.noreply.github.com> Date: Sun, 1 Dec 2019 16:19:30 +0100 Subject: [PATCH] Revert "Pull Taker2one GetDKP into LE GetDKP" --- GetDKPConfig/GetDKPConfig.lua | 27 ++++++++++---------------- GetDKPConfig/GetDKPConfig.xml | 6 +----- GetDKPCore/GetDKP.lua | 9 ++------- GetDKPCore/GetDKP.xml | 3 +++ GetDKPList/GetDKPList.lua | 36 +++++++++++++++++------------------ 5 files changed, 34 insertions(+), 47 deletions(-) diff --git a/GetDKPConfig/GetDKPConfig.lua b/GetDKPConfig/GetDKPConfig.lua index 5da2ac6..a3329c4 100755 --- a/GetDKPConfig/GetDKPConfig.lua +++ b/GetDKPConfig/GetDKPConfig.lua @@ -263,7 +263,7 @@ function GetDKP_VarLoad() GDKPvar_save.ShowOnlyInRaid = false; GDKPvar_save.ShowItems = true; GDKPvar_save.TokenItems = true; - GDKPvar_save.GetDKPASK = false; + GDKPvar_save.GetDKPASK = true; GDKPvar_save.HideOutGoingWhisper = true; GDKPvar_save.IncomigWhisper = false; GDKPvar_save.NeedLimit = -1; @@ -448,7 +448,7 @@ function GDKP_CheckConfig() end; if GDKPvar_save.GetDKPASK == nil then - GDKPvar_save.GetDKPASK = false + GDKPvar_save.GetDKPASK = true end; if GDKPvar_save.HideOutGoingWhisper == nil then @@ -619,7 +619,7 @@ function GetDKP_Config_OnEvent(self, event, ... ) GetDKP_Zone(); elseif (event =="CHAT_MSG_ADDON") then - if (arg1 == "getdkp_list_load" and arg4 ~= UnitName("player").."-"..GetRealmName()) then + if (arg1 == "getdkp_list_load" and arg4 ~= UnitName("player")) then GetDKP_List_Load_Resiv(arg1,arg2,arg3,arg4); end; else @@ -631,18 +631,14 @@ end; -------------------- function GetDKP_List_Load_Resiv(arg1,arg2,arg3,arg4) _args = GDKP_GetArgs(arg2, ","); + + if(not IsPromoted()) then + print("You are not promoted"); + end; if (_args[1] == "ASK" and GetDKP_CheckifPlayerIsInRaid(UnitName("player")) and IsPromoted() and GDKPvar_save.GetDKPASK) then GDC_GDL_ASK_SEND:Show(); end; - - if(_args[1] == "ASKACCEPTED" and arg4 ~= UnitName("player").."-"..GetRealmName()) then - print("GETDKP: Ask for data accepted by: ", arg4) - if(GDC_GDL_ASK_SEND:IsShown()) then - print("GETDKP: Hide ask window.") - GDC_GDL_ASK_SEND:Hide(); - end - end; if (_args[1] == "StartUI") then print(GDC_RESIV1..arg4); @@ -742,11 +738,6 @@ function GetDKP_List_Load_Resiv(arg1,arg2,arg3,arg4) end; end; --- Broadcast that send request was accepted to inform other assits that it is not required anymore -function GetDKP_Ask_Send_Accepted() - C_ChatInfo.SendAddonMessage("getdkp_list_load", "ASKACCEPTED", "RAID") -end - function GetDKP_List_Load_Send() local konto , dkpchars ; dkpcharlen = {}; @@ -916,7 +907,9 @@ function GetDKP_Config_OnUpdate(this, elapsed) end; end if (this.TimeSinceLastUpdate > GDL_UpdateInterval and GetDKP_Config_Frame:GetAlpha() < 1 ) then - GetDKP_Config_Frame:SetAlpha(1); + a = GetDKP_Config_Frame:GetAlpha(); + a = a + 0.1; + GetDKP_Config_Frame:SetAlpha(a); this.TimeSinceLastUpdate = 0; end end; diff --git a/GetDKPConfig/GetDKPConfig.xml b/GetDKPConfig/GetDKPConfig.xml index e527ab5..8fd20ab 100755 --- a/GetDKPConfig/GetDKPConfig.xml +++ b/GetDKPConfig/GetDKPConfig.xml @@ -1705,9 +1705,6 @@ self:ClearFocus(); - GetDKP_Config_GDA_EditBox_OnEnterPressed(1); @@ -3635,7 +3632,6 @@ - GetDKP_Ask_Send_Accepted(); GetDKP_List_Load_Send(); GDC_GDL_ASK_SEND_BUTTON2:Hide(); GDC_GDL_ASK_SEND_BUTTON1:Hide(); @@ -3718,7 +3714,7 @@ GetDKP_Config_OnUpdate2(self, elapsed); - self:StartMoving(); + self:StartMoving(); self.isMoving = true; diff --git a/GetDKPCore/GetDKP.lua b/GetDKPCore/GetDKP.lua index 27d53f3..2735468 100755 --- a/GetDKPCore/GetDKP.lua +++ b/GetDKPCore/GetDKP.lua @@ -102,7 +102,7 @@ end; --This Message show after each Update and first install StaticPopupDialogs["Update_Show"] = { -text = "Welcome to GetDKP v7.4.1\nFixed getDKP for WoW-Classic 1.13.2 Bugreport @ eqdkp-plus.eu/forum/ ;)", +text = "Welcome to GetDKP v7.4.0\nFixed getDKP for WoW Patch 7.4 and fixed some minor bugs with class colors\n Bugreport @ eqdkp-plus.eu/forum/ ;)", button1 = "Thanks!", timeout = 0 } @@ -138,11 +138,6 @@ function GDKP_Load() --this:RegisterEvent("AUCTION_HOUSE_CLOSE"); --this:RegisterEvent("AUCTION_ITEM_LIST_UPDATE"); --this:RegisterEvent("MERCHANT_SHOW"); - - -- Set the script as workaround for newer UI versions problem with onEvent function - this:SetScript("OnEvent", GDKP_Event) - -- Registers an addon message prefix, allowing messages sent over addon channels with that prefix to be received by the client. - C_ChatInfo.RegisterAddonMessagePrefix("GETDKP") end; function GetDKP_RegisterMRTNotify() if MRT_RegisterLootNotify ~= nil then @@ -1041,7 +1036,7 @@ this.TimeSinceLastUpdate = this.TimeSinceLastUpdate + elapsed; end; -- register wisper event for dkp request -function GDKP_Event(self, event, ...) +function GDKP_Event(event, ...) local numArgs, result; local requestfrom, playerlockup, _output ; local _args diff --git a/GetDKPCore/GetDKP.xml b/GetDKPCore/GetDKP.xml index 1d7fa92..6ea7c3f 100755 --- a/GetDKPCore/GetDKP.xml +++ b/GetDKPCore/GetDKP.xml @@ -7,6 +7,9 @@ GDKP_Load(self); self.TimeSinceLastUpdate = 0; + + GDKP_Event(event, ...); + GetDKP_Status_Frame_OnUpdate(self, elapsed); diff --git a/GetDKPList/GetDKPList.lua b/GetDKPList/GetDKPList.lua index be43859..e958df4 100755 --- a/GetDKPList/GetDKPList.lua +++ b/GetDKPList/GetDKPList.lua @@ -181,10 +181,10 @@ function GetDKP_List_VarLoad() --getglobal("GDL_Playerlist_ShowItemButton").status = "set"; if (GDKPvar_save["ShowOnlyInRaid"] == "true") then getglobal("GDL_Playerlist_InRaidButton").status = "inraid"; - GDL_Playerlist_InRaidButton:SetText(GDL_NOTINRAID); + GDL_Playerlist_InRaidButton:SetText(GDL_INRAID); else getglobal("GDL_Playerlist_InRaidButton").status = "notinraid"; - GDL_Playerlist_InRaidButton:SetText(GDL_INRAID); + GDL_Playerlist_InRaidButton:SetText(GDL_NOTINRAID); end; GDL_NonSetItems = {}; @@ -430,7 +430,8 @@ function GetDKP_List_Toggle() if (GetDKP_List_Frame:IsVisible()) then GetDKP_List_Frame:Hide(); else - + GetDKP_List_Frame:SetAlpha(0.0); + GDL_Playerlist_Frame:SetAlpha(0.0); GetDKP_List_Frame:Show(); GDL_Playerlist_Frame:Show(); GetDKP_List_Frame_Show = 1; @@ -441,17 +442,16 @@ function GetDKP_List_Toggle() end; end; - function GetDKP_List_OnUpdate(this, elapsed) --- this.TimeSinceLastUpdate = this.TimeSinceLastUpdate + elapsed; - - --if (this.TimeSinceLastUpdate > GDL_UpdateInterval and GetDKP_List_Frame:GetAlpha() < 1 ) then --- a = GetDKP_List_Frame:GetAlpha(); --- a = a + 0.1; --- GetDKP_List_Frame:SetAlpha(a); --- GDL_Playerlist_Frame:SetAlpha(a); --- this.TimeSinceLastUpdate = 0; - --end + this.TimeSinceLastUpdate = this.TimeSinceLastUpdate + elapsed; + + if (this.TimeSinceLastUpdate > GDL_UpdateInterval and GetDKP_List_Frame:GetAlpha() < 1 ) then + a = GetDKP_List_Frame:GetAlpha(); + a = a + 0.1; + GetDKP_List_Frame:SetAlpha(a); + GDL_Playerlist_Frame:SetAlpha(a); + this.TimeSinceLastUpdate = 0; + end end; function GetDKP_List_ButtonToggle() @@ -1315,11 +1315,11 @@ end; function GDL_ItemList_OnUpdate(this, elapsed, GDL_ItemList_Stop) - --this.TimeSinceLastUpdate = this.TimeSinceLastUpdate + elapsed; - --if (this.TimeSinceLastUpdate > GDL_ItemList_UpdateInterval) then - -- GDL_Itemlist_SetFrame:Hide(); - -- this.TimeSinceLastUpdate = 0; - --end + this.TimeSinceLastUpdate = this.TimeSinceLastUpdate + elapsed; + if (this.TimeSinceLastUpdate > GDL_ItemList_UpdateInterval) then + GDL_Itemlist_SetFrame:Hide(); + this.TimeSinceLastUpdate = 0; + end end; function GDL_ItemList_SetFrameSetLink()