From 7f0fdbbc306874a2a68fa51680ba45b645b06523 Mon Sep 17 00:00:00 2001 From: Repooc Date: Wed, 26 Mar 2014 19:16:09 -0400 Subject: [PATCH] Some changes --- ElvUI_SLE/modules/characterframe/communication.lua | 2 -- ElvUI_SLE/modules/characterframe/inspectframe.lua | 27 ++++++++++++-------- ElvUI_SLE/modules/characterframe/notifyinspect.lua | 5 +++- 3 files changed, 20 insertions(+), 14 deletions(-) diff --git a/ElvUI_SLE/modules/characterframe/communication.lua b/ElvUI_SLE/modules/characterframe/communication.lua index d5584d8..c8ec762 100644 --- a/ElvUI_SLE/modules/characterframe/communication.lua +++ b/ElvUI_SLE/modules/characterframe/communication.lua @@ -680,7 +680,6 @@ if not AISM then local needplayerName, needplayerRealm = Message:match('^.+:(.+)-(.+)$') if needplayerName == playerName and needplayerRealm == playerRealm then - --local DataToSend = E:CopyTable({}, self.PlayerData) local TableToSend = {} for Index, Data in pairs(self.PlayerData) do @@ -723,7 +722,6 @@ if not AISM then if self.DataTypeTable[DataType] == 'Profession' then if stringTable[1] == 'F' then - --TableToSave.Profession[Group] = {} TableToSave.Profession[Group].Name = EMPTY TableToSave.Profession[Group].Level = 0 else diff --git a/ElvUI_SLE/modules/characterframe/inspectframe.lua b/ElvUI_SLE/modules/characterframe/inspectframe.lua index 75cae65..f9e129d 100644 --- a/ElvUI_SLE/modules/characterframe/inspectframe.lua +++ b/ElvUI_SLE/modules/characterframe/inspectframe.lua @@ -276,7 +276,8 @@ function SLI:CreateInspectFrame() end ENI.CancelInspect(TableIndex) - SLI:UnregisterEvent('INSPECT_READY', 'KnightInspect') + SLI:UnregisterEvent('INSPECT_READY') + SLI:UnregisterEvent('INSPECT_HONOR_UPDATE') end self.LastDataSetting = nil @@ -1130,8 +1131,10 @@ function SLI:CreateInspectFrame() AISM.CurrentInspectData[self.Data.TableIndex] = { ['UnitID'] = self.Data.Unit, } + + local TableIndex = self.Data.TableIndex AISM:RegisterInspectDataRequest(function(User, UserData) - if User == self.Data.TableIndex then + if User == TableIndex then E:CopyTable(SLI.CurrentInspectData, UserData) SLI:ShowFrame(SLI.CurrentInspectData) @@ -1163,6 +1166,9 @@ function SLI:CreateInspectFrame() ['Unit'] = UnitExists(Menu.name) and Menu.name or Unit, ['Realm'] = Menu.server ~= '' and Menu.server or E.myrealm } + + if DataTable.Name == E.myname then return end + DataTable.TableIndex = DataTable.Unit and GetUnitName(DataTable.Unit, 1) or DataTable.Name..(DataTable.Realm ~= E.myrealm and '-'..DataTable.Realm or '') for i = 1, DropDownList1.numButtons do @@ -1173,18 +1179,18 @@ function SLI:CreateInspectFrame() end if not Button then - if not (Type == 'GUILD' and AISM and not AISM.GuildMemberData[DataTable.TableIndex]) then - Button = UIDropDownMenu_CreateInfo() - Button.notCheckable = 1 - UIDropDownMenu_AddButton(Button) - - Button = _G['DropDownList1Button'..DropDownList1.numButtons] - elseif not (DataTable.Unit and not UnitCanAttack('player', DataTable.Unit) and UnitIsConnected(DataTable.Unit)) then + if DataTable.Unit and (UnitCanAttack('player', DataTable.Unit) or not UnitIsConnected(DataTable.Unit)) then if AISM then AISM.GroupMemberData[DataTable.TableIndex] = nil end return + elseif DataTable.Unit or AISM and (AISM.GuildMemberData[DataTable.TableIndex] or AISM.GroupMemberData[DataTable.TableIndex]) then + Button = UIDropDownMenu_CreateInfo() + Button.notCheckable = 1 + UIDropDownMenu_AddButton(Button) + + Button = _G['DropDownList1Button'..DropDownList1.numButtons] end end @@ -1227,8 +1233,7 @@ SLI.INSPECT_HONOR_UPDATE = function(Event) SLI.CurrentInspectData.PvP.Honor = { GetInspectHonorData() } end - if not (SLI.ForbidUpdatePvPInformation and Event) then - SLI:UnregisterEvent('INSPECT_HONOR_UPDATE') + if not (SLI.ForbidUpdatePvPInformation) then SLI:InspectFrame_PvPSetting(SLI.CurrentInspectData) end end diff --git a/ElvUI_SLE/modules/characterframe/notifyinspect.lua b/ElvUI_SLE/modules/characterframe/notifyinspect.lua index af579e1..bd40504 100644 --- a/ElvUI_SLE/modules/characterframe/notifyinspect.lua +++ b/ElvUI_SLE/modules/characterframe/notifyinspect.lua @@ -23,7 +23,10 @@ if not ENI then if CurrentUnitGUID and not (ENI.CurrentInspectUnitGUID and CurrentUnitGUID ~= ENI.CurrentInspectUnitGUID) then ENI.CurrentInspectUnitGUID = CurrentUnitGUID BlizzardNotifyInspect(ENI.InspectList[(ENI.InspectList[1])].UnitID) - RequestInspectHonorData() + + if ENI.InspectList[(ENI.InspectList[1])].CancelInspectByManual then + RequestInspectHonorData() + end else ENI.CancelInspect(ENI.InspectList[1]) end -- 1.7.9.5