From b117620f92c502b0788286938782f437143b7418 Mon Sep 17 00:00:00 2001 From: TOM_RUS Date: Wed, 8 May 2019 02:17:19 +0300 Subject: [PATCH] WOW-30329patch8.2.0_PTR --- .../Blizzard_APIDocumentation.toc | 1 + .../ClubFinderDocumentation.lua | 7 ++- .../FriendListDocumentation.lua | 1 + .../TooltipConstantsDocumentation.lua | 63 +++++++++++++++++++ .../UIWidgetManagerDocumentation.lua | 15 +++++ .../CommunitiesMemberList.lua | 1 + .../Blizzard_PVPMatch/Blizard_PVPMatch.toc | 7 --- .../Blizzard_UIWidgetTemplateBase.lua | 18 ++++-- .../Blizzard_UIWidgetTemplateZoneControl.lua | 2 +- Interface/FrameXML/AlertFrameSystems.xml | 18 ++++++ .../FloatingGarrisonFollowerTooltip.lua | 4 +- Interface/FrameXML/FriendsFrame.lua | 37 ++++++----- Interface/FrameXML/UIParent.lua | 13 ++-- Interface/FrameXML/UnitPopup.lua | 14 +++-- 14 files changed, 162 insertions(+), 39 deletions(-) create mode 100644 Interface/AddOns/Blizzard_APIDocumentation/TooltipConstantsDocumentation.lua delete mode 100644 Interface/AddOns/Blizzard_PVPMatch/Blizard_PVPMatch.toc diff --git a/Interface/AddOns/Blizzard_APIDocumentation/Blizzard_APIDocumentation.toc b/Interface/AddOns/Blizzard_APIDocumentation/Blizzard_APIDocumentation.toc index 5dc25933..db81ece9 100644 --- a/Interface/AddOns/Blizzard_APIDocumentation/Blizzard_APIDocumentation.toc +++ b/Interface/AddOns/Blizzard_APIDocumentation/Blizzard_APIDocumentation.toc @@ -129,6 +129,7 @@ SystemDocumentation.lua TalkingHeadDocumentation.lua TaxiMapDocumentation.lua TextureUtilsDocumentation.lua +TooltipConstantsDocumentation.lua ToyBoxInfoDocumentation.lua TradeInfoDocumentation.lua TradeSkillUIDocumentation.lua diff --git a/Interface/AddOns/Blizzard_APIDocumentation/ClubFinderDocumentation.lua b/Interface/AddOns/Blizzard_APIDocumentation/ClubFinderDocumentation.lua index a772f7ad..952c97b0 100644 --- a/Interface/AddOns/Blizzard_APIDocumentation/ClubFinderDocumentation.lua +++ b/Interface/AddOns/Blizzard_APIDocumentation/ClubFinderDocumentation.lua @@ -327,9 +327,9 @@ local ClubFinder = { Name = "ClubFinderSettingFlags", Type = "Enumeration", - NumValues = 15, + NumValues = 18, MinValue = 0, - MaxValue = 14, + MaxValue = 17, Fields = { { Name = "None", Type = "ClubFinderSettingFlags", EnumValue = 0 }, @@ -347,6 +347,9 @@ local ClubFinder = { Name = "EnableListing", Type = "ClubFinderSettingFlags", EnumValue = 12 }, { Name = "MaxLevelOnly", Type = "ClubFinderSettingFlags", EnumValue = 13 }, { Name = "AutoAccept", Type = "ClubFinderSettingFlags", EnumValue = 14 }, + { Name = "FactionHorde", Type = "ClubFinderSettingFlags", EnumValue = 15 }, + { Name = "FactionAlliance", Type = "ClubFinderSettingFlags", EnumValue = 16 }, + { Name = "FactionNeutral", Type = "ClubFinderSettingFlags", EnumValue = 17 }, }, }, { diff --git a/Interface/AddOns/Blizzard_APIDocumentation/FriendListDocumentation.lua b/Interface/AddOns/Blizzard_APIDocumentation/FriendListDocumentation.lua index ef327ffc..e67e2903 100644 --- a/Interface/AddOns/Blizzard_APIDocumentation/FriendListDocumentation.lua +++ b/Interface/AddOns/Blizzard_APIDocumentation/FriendListDocumentation.lua @@ -494,6 +494,7 @@ local FriendList = { Name = "dnd", Type = "bool", Nilable = false }, { Name = "afk", Type = "bool", Nilable = false }, { Name = "referAFriend", Type = "bool", Nilable = false }, + { Name = "mobile", Type = "bool", Nilable = false }, }, }, { diff --git a/Interface/AddOns/Blizzard_APIDocumentation/TooltipConstantsDocumentation.lua b/Interface/AddOns/Blizzard_APIDocumentation/TooltipConstantsDocumentation.lua new file mode 100644 index 00000000..6b319666 --- /dev/null +++ b/Interface/AddOns/Blizzard_APIDocumentation/TooltipConstantsDocumentation.lua @@ -0,0 +1,63 @@ +local TooltipConstants = +{ + Name = "Tooltip", + Type = "System", + Namespace = "C_Tooltip", + + Functions = + { + }, + + Events = + { + }, + + Tables = + { + { + Name = "TooltipSide", + Type = "Enumeration", + NumValues = 4, + MinValue = 0, + MaxValue = 3, + Fields = + { + { Name = "Left", Type = "TooltipSide", EnumValue = 0 }, + { Name = "Right", Type = "TooltipSide", EnumValue = 1 }, + { Name = "Top", Type = "TooltipSide", EnumValue = 2 }, + { Name = "Bottom", Type = "TooltipSide", EnumValue = 3 }, + }, + }, + { + Name = "TooltipTextureAnchor", + Type = "Enumeration", + NumValues = 7, + MinValue = 0, + MaxValue = 6, + Fields = + { + { Name = "LeftTop", Type = "TooltipTextureAnchor", EnumValue = 0 }, + { Name = "LeftCenter", Type = "TooltipTextureAnchor", EnumValue = 1 }, + { Name = "LeftBottom", Type = "TooltipTextureAnchor", EnumValue = 2 }, + { Name = "RightTop", Type = "TooltipTextureAnchor", EnumValue = 3 }, + { Name = "RightCenter", Type = "TooltipTextureAnchor", EnumValue = 4 }, + { Name = "RightBottom", Type = "TooltipTextureAnchor", EnumValue = 5 }, + { Name = "All", Type = "TooltipTextureAnchor", EnumValue = 6 }, + }, + }, + { + Name = "TooltipTextureRelativeRegion", + Type = "Enumeration", + NumValues = 2, + MinValue = 0, + MaxValue = 1, + Fields = + { + { Name = "LeftLine", Type = "TooltipTextureRelativeRegion", EnumValue = 0 }, + { Name = "RightLine", Type = "TooltipTextureRelativeRegion", EnumValue = 1 }, + }, + }, + }, +}; + +APIDocumentation:AddDocumentationTable(TooltipConstants); \ No newline at end of file diff --git a/Interface/AddOns/Blizzard_APIDocumentation/UIWidgetManagerDocumentation.lua b/Interface/AddOns/Blizzard_APIDocumentation/UIWidgetManagerDocumentation.lua index c8bf80af..eb404212 100644 --- a/Interface/AddOns/Blizzard_APIDocumentation/UIWidgetManagerDocumentation.lua +++ b/Interface/AddOns/Blizzard_APIDocumentation/UIWidgetManagerDocumentation.lua @@ -481,6 +481,20 @@ local UIWidgetManager = { Name = "Huge", Type = "UIWidgetTextSizeType", EnumValue = 3 }, }, }, + { + Name = "ZoneControlMode", + Type = "Enumeration", + NumValues = 4, + MinValue = 0, + MaxValue = 3, + Fields = + { + { Name = "BothStatesAreGood", Type = "ZoneControlMode", EnumValue = 0 }, + { Name = "State1IsGood", Type = "ZoneControlMode", EnumValue = 1 }, + { Name = "State2IsGood", Type = "ZoneControlMode", EnumValue = 2 }, + { Name = "NeitherStateIsGood", Type = "ZoneControlMode", EnumValue = 3 }, + }, + }, { Name = "ZoneControlState", Type = "Enumeration", @@ -917,6 +931,7 @@ local UIWidgetManager = Fields = { { Name = "shownState", Type = "WidgetShownState", Nilable = false }, + { Name = "mode", Type = "ZoneControlMode", Nilable = false }, { Name = "zoneEntries", Type = "table", InnerType = "ZoneEntry", Nilable = false }, { Name = "widgetSizeSetting", Type = "number", Nilable = false }, { Name = "textureKitID", Type = "number", Nilable = false }, diff --git a/Interface/AddOns/Blizzard_Communities/CommunitiesMemberList.lua b/Interface/AddOns/Blizzard_Communities/CommunitiesMemberList.lua index 4d248527..a9dd4e50 100644 --- a/Interface/AddOns/Blizzard_Communities/CommunitiesMemberList.lua +++ b/Interface/AddOns/Blizzard_Communities/CommunitiesMemberList.lua @@ -1453,6 +1453,7 @@ function CommunitiesMemberListDropdown_Initialize(self, level) self.clubAssignableRoles = C_Club.GetAssignableRoles(clubInfo.clubId, memberInfo.memberId); self.isSelf = memberInfo.isSelf; self.guid = memberInfo.guid; + self.isMobile = memberInfo.presence == Enum.ClubMemberPresence.OnlineMobile; UnitPopup_ShowMenu(self, clubTypeToUnitPopup[clubInfo.clubType], nil, memberInfo.name); end end diff --git a/Interface/AddOns/Blizzard_PVPMatch/Blizard_PVPMatch.toc b/Interface/AddOns/Blizzard_PVPMatch/Blizard_PVPMatch.toc deleted file mode 100644 index 31486448..00000000 --- a/Interface/AddOns/Blizzard_PVPMatch/Blizard_PVPMatch.toc +++ /dev/null @@ -1,7 +0,0 @@ -## Title: Blizzard_UIWidgets -## LoadOnDemand: 0 -## RequiredDep: Blizzard_UIWidgets -PVPMatchUtil.lua -PVPMatchTable.xml -PVPMatchResults.xml -PVPMatchScoreboard.xml \ No newline at end of file diff --git a/Interface/AddOns/Blizzard_UIWidgets/Blizzard_UIWidgetTemplateBase.lua b/Interface/AddOns/Blizzard_UIWidgets/Blizzard_UIWidgetTemplateBase.lua index c60afaf1..53b90b1e 100644 --- a/Interface/AddOns/Blizzard_UIWidgets/Blizzard_UIWidgetTemplateBase.lua +++ b/Interface/AddOns/Blizzard_UIWidgets/Blizzard_UIWidgetTemplateBase.lua @@ -412,7 +412,7 @@ local textureKitRegionInfo = { ["FullGlow"] = {formatString = "%s-fullglow", useAtlasSize = true}, } -function UIWidgetBaseControlZoneTemplateMixin:UpdateAnimations(zoneInfo, lastVals) +function UIWidgetBaseControlZoneTemplateMixin:UpdateAnimations(zoneInfo, zoneMode, lastVals) local isActive = (zoneInfo.activeState == Enum.ZoneControlActiveState.Active); local isMaxed = (zoneInfo.current == zoneInfo.max); local wasMaxed = lastVals and (lastVals.current == lastVals.max) or false; @@ -440,7 +440,17 @@ function UIWidgetBaseControlZoneTemplateMixin:UpdateAnimations(zoneInfo, lastVal self.FallingGlowAnim:Stop(); self.FallingGlow:Hide(); else - local reverseAnims = (zoneInfo.state == Enum.ZoneControlState.State2); + local reverseAnims; + if zoneMode == Enum.ZoneControlMode.BothStatesAreGood then + reverseAnims = false; + elseif zoneMode == Enum.ZoneControlMode.State1IsGood then + reverseAnims = (zoneInfo.state == Enum.ZoneControlState.State2); + elseif zoneMode == Enum.ZoneControlMode.State2IsGood then + reverseAnims = (zoneInfo.state == Enum.ZoneControlState.State1); + else + reverseAnims = true; + end + local playFillingAnim, playFallingAnim; if reverseAnims then playFillingAnim = zoneInfo.current < lastVals.current; @@ -471,7 +481,7 @@ function UIWidgetBaseControlZoneTemplateMixin:UpdateAnimations(zoneInfo, lastVal end end -function UIWidgetBaseControlZoneTemplateMixin:Setup(zoneIndex, zoneInfo, lastVals, textureKitID) +function UIWidgetBaseControlZoneTemplateMixin:Setup(zoneIndex, zoneMode, zoneInfo, lastVals, textureKitID) local textureKit = GetUITextureKitInfo(textureKitID); if not textureKit then self:Hide(); @@ -539,7 +549,7 @@ function UIWidgetBaseControlZoneTemplateMixin:Setup(zoneIndex, zoneInfo, lastVal zoneInfo.current = currentVal; -- And update the animations - self:UpdateAnimations(zoneInfo, lastVals); + self:UpdateAnimations(zoneInfo, zoneMode, lastVals); self:SetTooltip(zoneInfo.tooltip); diff --git a/Interface/AddOns/Blizzard_UIWidgets/Blizzard_UIWidgetTemplateZoneControl.lua b/Interface/AddOns/Blizzard_UIWidgets/Blizzard_UIWidgetTemplateZoneControl.lua index f8082409..2c5f4ac4 100644 --- a/Interface/AddOns/Blizzard_UIWidgets/Blizzard_UIWidgetTemplateZoneControl.lua +++ b/Interface/AddOns/Blizzard_UIWidgets/Blizzard_UIWidgetTemplateZoneControl.lua @@ -38,7 +38,7 @@ function UIWidgetTemplateZoneControlMixin:Setup(widgetInfo, widgetContainer) local entryFrame = self.entryPool:Acquire(); entryFrame:Show(); local lastVals = (self.lastVals[index] and (self.lastVals[index].state == zoneInfo.state)) and self.lastVals[index] or nil; - entryFrame:Setup(index, zoneInfo, lastVals, widgetInfo.textureKitID); + entryFrame:Setup(index, widgetInfo.mode, zoneInfo, lastVals, widgetInfo.textureKitID); self:SetZoneAnchors(entryFrame, index); self.lastVals[index] = zoneInfo; end diff --git a/Interface/FrameXML/AlertFrameSystems.xml b/Interface/FrameXML/AlertFrameSystems.xml index f55b1977..0040a26e 100644 --- a/Interface/FrameXML/AlertFrameSystems.xml +++ b/Interface/FrameXML/AlertFrameSystems.xml @@ -1530,12 +1530,24 @@ + + + + + + + + + + + + @@ -1554,6 +1566,12 @@ + + + + + + diff --git a/Interface/FrameXML/FloatingGarrisonFollowerTooltip.lua b/Interface/FrameXML/FloatingGarrisonFollowerTooltip.lua index 0246a1ba..d871eedd 100644 --- a/Interface/FrameXML/FloatingGarrisonFollowerTooltip.lua +++ b/Interface/FrameXML/FloatingGarrisonFollowerTooltip.lua @@ -575,6 +575,8 @@ function FloatingGarrisonMission_Show(garrMissionID, garrMissionDBID) local itemName, _, itemRarity, _, _, _, _, _, _, itemTexture = GetItemInfo(reward.itemID); if itemName then rewardText = rewardText..ITEM_QUALITY_COLORS[itemRarity].hex..itemName..FONT_COLOR_CODE_CLOSE; + else + rewardText = RED_FONT_COLOR:GenerateHexColorMarkup()..RETRIEVING_DATA..FONT_COLOR_CODE_CLOSE; end elseif (reward.followerXP) then rewardText = rewardText..reward.title; @@ -585,7 +587,7 @@ function FloatingGarrisonMission_Show(garrMissionID, garrMissionDBID) end end else - rewardText = RETRIEVING_DATA; + rewardText = RED_FONT_COLOR:GenerateHexColorMarkup()..RETRIEVING_DATA..FONT_COLOR_CODE_CLOSE; end FloatingGarrisonMissionTooltip.Rewards:SetText(rewardText, 1, 1, 1); diff --git a/Interface/FrameXML/FriendsFrame.lua b/Interface/FrameXML/FriendsFrame.lua index 4b8ec84c..65e5bd68 100644 --- a/Interface/FrameXML/FriendsFrame.lua +++ b/Interface/FrameXML/FriendsFrame.lua @@ -60,6 +60,7 @@ local INVITE_RESTRICTION_WOW_PROJECT_ID = 5; local INVITE_RESTRICTION_WOW_PROJECT_MAINLINE = 6; local INVITE_RESTRICTION_WOW_PROJECT_CLASSIC = 7; local INVITE_RESTRICTION_NONE = 8; +local INVITE_RESTRICTION_MOBILE = 9; local FriendListEntries = { }; local playerRealmName; @@ -114,6 +115,10 @@ function FriendsFrame_ShouldShowSummonButton(self) return false, false; end + if ( info.mobile ) then + return false, false; + end + return true, CanSummonFriend(info.name); elseif ( self:GetParent().buttonType == FRIENDS_BUTTON_TYPE_BNET ) then --Get the information by BNet friends list ID. @@ -201,7 +206,7 @@ function FriendsFrame_ShowDropdown(name, connected, lineID, chatType, chatFrame, end end -function FriendsFrame_ShowBNDropdown(name, connected, lineID, chatType, chatFrame, friendsList, bnetIDAccount, communityClubID, communityStreamID, communityEpoch, communityPosition) +function FriendsFrame_ShowBNDropdown(name, connected, lineID, chatType, chatFrame, friendsList, bnetIDAccount, communityClubID, communityStreamID, communityEpoch, communityPosition, mobile) if ( connected or friendsList ) then if ( connected ) then FriendsDropDown.initialize = FriendsFrameBNDropDown_Initialize; @@ -220,7 +225,7 @@ function FriendsFrame_ShowBNDropdown(name, connected, lineID, chatType, chatFram FriendsDropDown.chatTarget = name; FriendsDropDown.chatFrame = chatFrame; FriendsDropDown.bnetIDAccount = bnetIDAccount; - FriendsDropDown.isMobile = nil; + FriendsDropDown.isMobile = mobile; ToggleDropDownMenu(1, nil, FriendsDropDown, "cursor"); end end @@ -490,7 +495,7 @@ function FriendsList_CanWhisperFriend(friendType, friendIndex) return true; elseif friendType == FRIENDS_BUTTON_TYPE_WOW then local info = C_FriendList.GetFriendInfoByIndex(friendIndex); - return info.connected; + return info.connected and not info.mobile; end return false; @@ -936,12 +941,12 @@ function FriendsFrameFriendButton_OnClick(self, button) PlaySound(SOUNDKIT.IG_MAINMENU_OPTION_CHECKBOX_ON); if ( self.buttonType == FRIENDS_BUTTON_TYPE_BNET ) then -- bnet friend - local bnetIDAccount, accountName, battleTag, isBattleTag, characterName, bnetIDGameAccount, client, isOnline = BNGetFriendInfo(self.id); - FriendsFrame_ShowBNDropdown(accountName, isOnline, nil, nil, nil, 1, bnetIDAccount, nil, nil, nil, nil); + local bnetIDAccount, accountName, battleTag, isBattleTag, characterName, bnetIDGameAccount, client, isOnline, _, _, _, _, _, _, _, _, _, _, _, mobile = BNGetFriendInfo(self.id); + FriendsFrame_ShowBNDropdown(accountName, isOnline, nil, nil, nil, 1, bnetIDAccount, nil, nil, nil, nil, mobile); else -- wow friend local info = C_FriendList.GetFriendInfoByIndex(self.id); - FriendsFrame_ShowDropdown(info.name, info.connected, nil, nil, nil, 1, nil, nil, nil, nil); + FriendsFrame_ShowDropdown(info.name, info.connected, nil, nil, nil, 1, info.mobile, nil, nil, nil); end end end @@ -1293,7 +1298,7 @@ function FriendsFrame_UpdateFriendButton(button) nameText = info.name; nameColor = FRIENDS_GRAY_COLOR; end - infoText = info.area; + infoText = info.mobile and LOCATION_MOBILE_APP or info.area; button.gameIcon:Hide(); button.summonButton:ClearAllPoints(); button.summonButton:SetPoint("TOPRIGHT", button, "TOPRIGHT", 1, -1); @@ -1302,7 +1307,7 @@ function FriendsFrame_UpdateFriendButton(button) local bnetIDAccount, accountName, battleTag, isBattleTag, characterName, bnetIDGameAccount, client, isOnline, lastOnline, isBnetAFK, isBnetDND, messageText, noteText, isRIDFriend, messageTime, - wowProjectID, isReferAFriend, canSummonFriend, isFavorite = BNGetFriendInfo(FriendListEntries[index].id); + wowProjectID, isReferAFriend, canSummonFriend, isFavorite, mobile = BNGetFriendInfo(FriendListEntries[index].id); broadcastText = messageText; isFavoriteFriend = isFavorite; -- set up player name and character name @@ -1329,7 +1334,7 @@ function FriendsFrame_UpdateFriendButton(button) end if ( isOnline ) then - local _, _, _, realmName, realmID, faction, _, _, _, zoneName, _, gameText, _, _, _, _, _, isGameAFK, isGameBusy, guid, wowProjectID = BNGetGameAccountInfo(bnetIDGameAccount); + local _, _, _, realmName, realmID, faction, _, _, _, zoneName, _, gameText, _, _, _, _, _, isGameAFK, isGameBusy, guid, wowProjectID, mobile = BNGetGameAccountInfo(bnetIDGameAccount); button.background:SetColorTexture(FRIENDS_BNET_BACKGROUND_COLOR.r, FRIENDS_BNET_BACKGROUND_COLOR.g, FRIENDS_BNET_BACKGROUND_COLOR.b, FRIENDS_BNET_BACKGROUND_COLOR.a); if ( isBnetAFK or isGameAFK ) then button.status:SetTexture(FRIENDS_TEXTURE_AFK); @@ -1342,7 +1347,7 @@ function FriendsFrame_UpdateFriendButton(button) if ( not zoneName or zoneName == "" ) then infoText = UNKNOWN; else - infoText = zoneName; + infoText = mobile and LOCATION_MOBILE_APP or zoneName; end else infoText = gameText; @@ -1634,7 +1639,7 @@ function FriendsFrameTooltip_Show(self) anchor = FriendsFrameTooltip_SetLine(FriendsTooltipHeader, nil, nameText); -- game account 1 if ( bnetIDGameAccount ) then - local hasFocus, characterName, client, realmName, realmID, faction, race, class, _, zoneName, level, gameText, _, _, _, _, _, _, _, _, wowProjectID = BNGetGameAccountInfo(bnetIDGameAccount); + local hasFocus, characterName, client, realmName, realmID, faction, race, class, _, zoneName, level, gameText, _, _, _, _, _, _, _, _, wowProjectID, mobile = BNGetGameAccountInfo(bnetIDGameAccount); level = level or ""; race = race or ""; class = class or ""; @@ -1645,7 +1650,7 @@ function FriendsFrameTooltip_Show(self) text = string.format(FRIENDS_TOOLTIP_WOW_TOON_TEMPLATE, characterName..CANNOT_COOPERATE_LABEL, level, race, class); end FriendsFrameTooltip_SetLine(FriendsTooltipGameAccount1Name, nil, text); - anchor = FriendsFrameTooltip_SetLine(FriendsTooltipGameAccount1Info, nil, string.format(FRIENDS_TOOLTIP_WOW_INFO_TEMPLATE, zoneName, realmName), -4); + anchor = FriendsFrameTooltip_SetLine(FriendsTooltipGameAccount1Info, nil, string.format(FRIENDS_TOOLTIP_WOW_INFO_TEMPLATE, mobile and LOCATION_MOBILE_APP or zoneName, realmName), -4); else if ( isOnline ) then characterName = BNet_GetValidatedCharacterName(characterName, battleTag, client) or ""; @@ -1697,7 +1702,7 @@ function FriendsFrameTooltip_Show(self) if ( info.connected ) then FriendsTooltipHeader:SetTextColor(FRIENDS_WOW_NAME_COLOR.r, FRIENDS_WOW_NAME_COLOR.g, FRIENDS_WOW_NAME_COLOR.b); FriendsFrameTooltip_SetLine(FriendsTooltipGameAccount1Name, nil, string.format(FRIENDS_LEVEL_TEMPLATE, info.level, info.className)); - anchor = FriendsFrameTooltip_SetLine(FriendsTooltipGameAccount1Info, nil, info.area); + anchor = FriendsFrameTooltip_SetLine(FriendsTooltipGameAccount1Info, nil, info.mobile and LOCATION_MOBILE_APP or info.area); else FriendsTooltipHeader:SetTextColor(FRIENDS_GRAY_COLOR.r, FRIENDS_GRAY_COLOR.g, FRIENDS_GRAY_COLOR.b); FriendsTooltipGameAccount1Name:Hide(); @@ -2232,7 +2237,7 @@ function FriendsFrame_GetInviteRestriction(index) local restriction = INVITE_RESTRICTION_NO_GAME_ACCOUNTS; local numGameAccounts = BNGetNumFriendGameAccounts(index); for i = 1, numGameAccounts do - local hasFocus, characterName, client, realmName, realmID, faction, _, _, _, _, _, _, _, _, _, _, _, _, _, _, wowProjectID = BNGetFriendGameAccountInfo(index, i); + local hasFocus, characterName, client, realmName, realmID, faction, _, _, _, _, _, _, _, _, _, _, _, _, _, _, wowProjectID, mobile = BNGetFriendGameAccountInfo(index, i); if ( client == BNET_CLIENT_WOW ) then if ( wowProjectID ~= WOW_PROJECT_ID ) then if (wowProjectID == WOW_PROJECT_CLASSIC) then @@ -2246,6 +2251,8 @@ function FriendsFrame_GetInviteRestriction(index) restriction = max(INVITE_RESTRICTION_FACTION, restriction); elseif ( realmID == 0 ) then restriction = max(INVITE_RESTRICTION_INFO, restriction); + elseif ( mobile ) then + restriction = INVITE_RESTRICTION_MOBILE; else -- there is at lease 1 game account that can be invited return INVITE_RESTRICTION_NONE; @@ -2272,6 +2279,8 @@ function FriendsFrame_GetInviteRestrictionText(restriction) return ERR_TRAVEL_PASS_WRONG_PROJECT_MAINLINE_OVERRIDE; elseif ( restriction == INVITE_RESTRICTION_WOW_PROJECT_CLASSIC ) then return ERR_TRAVEL_PASS_WRONG_PROJECT_CLASSIC_OVERRIDE; + elseif ( restriction == INVITE_RESTRICTION_MOBILE ) then + return ERR_TRAVEL_PASS_MOBILE; else return ""; end diff --git a/Interface/FrameXML/UIParent.lua b/Interface/FrameXML/UIParent.lua index 53d6275b..55a64719 100644 --- a/Interface/FrameXML/UIParent.lua +++ b/Interface/FrameXML/UIParent.lua @@ -4962,11 +4962,14 @@ end NUMBER_ABBREVIATION_DATA = { -- Order these from largest to smallest -- (significandDivisor and fractionDivisor should multiply to be equal to breakpoint) - { breakpoint = 100000000, abbreviation = SECOND_NUMBER_CAP_NO_SPACE, significandDivisor = 10000000, fractionDivisor = 1 }, - { breakpoint = 10000000, abbreviation = SECOND_NUMBER_CAP_NO_SPACE, significandDivisor = 1000000, fractionDivisor = 1 }, - { breakpoint = 1000000, abbreviation = SECOND_NUMBER_CAP_NO_SPACE, significandDivisor = 100000, fractionDivisor = 10 }, - { breakpoint = 10000, abbreviation = FIRST_NUMBER_CAP_NO_SPACE, significandDivisor = 1000, fractionDivisor = 1 }, - { breakpoint = 1000, abbreviation = FIRST_NUMBER_CAP_NO_SPACE, significandDivisor = 100, fractionDivisor = 10 }, + { breakpoint = 10000000000000, abbreviation = FOURTH_NUMBER_CAP_NO_SPACE, significandDivisor = 1000000000000, fractionDivisor = 1 }, + { breakpoint = 1000000000000, abbreviation = FOURTH_NUMBER_CAP_NO_SPACE, significandDivisor = 100000000000, fractionDivisor = 10 }, + { breakpoint = 10000000000, abbreviation = THIRD_NUMBER_CAP_NO_SPACE, significandDivisor = 1000000000, fractionDivisor = 1 }, + { breakpoint = 1000000000, abbreviation = THIRD_NUMBER_CAP_NO_SPACE, significandDivisor = 100000000, fractionDivisor = 10 }, + { breakpoint = 10000000, abbreviation = SECOND_NUMBER_CAP_NO_SPACE, significandDivisor = 1000000, fractionDivisor = 1 }, + { breakpoint = 1000000, abbreviation = SECOND_NUMBER_CAP_NO_SPACE, significandDivisor = 100000, fractionDivisor = 10 }, + { breakpoint = 10000, abbreviation = FIRST_NUMBER_CAP_NO_SPACE, significandDivisor = 1000, fractionDivisor = 1 }, + { breakpoint = 1000, abbreviation = FIRST_NUMBER_CAP_NO_SPACE, significandDivisor = 100, fractionDivisor = 10 }, } function AbbreviateNumbers(value) diff --git a/Interface/FrameXML/UnitPopup.lua b/Interface/FrameXML/UnitPopup.lua index f0867129..e526e3db 100644 --- a/Interface/FrameXML/UnitPopup.lua +++ b/Interface/FrameXML/UnitPopup.lua @@ -942,9 +942,7 @@ function UnitPopup_HideButtons () if ( UnitInRaid(dropdownMenu.name) ~= nil ) then shown = false; end - elseif ( dropdownMenu == FriendsDropDown and dropdownMenu.isMobile ) then - shown = false; - elseif ( dropdownMenu == GuildMenuDropDown and dropdownMenu.isMobile ) then + elseif ( dropdownMenu.isMobile ) then shown = false; else if ( dropdownMenu.name == UnitName("party1") or @@ -966,7 +964,7 @@ function UnitPopup_HideButtons () shown = false; end elseif ( value == "BN_INVITE" or value == "BN_SUGGEST_INVITE" or value == "BN_REQUEST_INVITE" ) then - local bnetIDAccount, accountName, battleTag, isBattleTag, characterName, bnetIDGameAccount = BNGetFriendInfoByID(dropdownMenu.bnetIDAccount); + local bnetIDAccount, accountName, battleTag, isBattleTag, characterName, bnetIDGameAccount, _, _, _, _, _, _, _, _, _, _, _, _, _, mobile = BNGetFriendInfoByID(dropdownMenu.bnetIDAccount); if not bnetIDGameAccount then shown = false; else @@ -976,7 +974,7 @@ function UnitPopup_HideButtons () shown = false; elseif ( not dropdownMenu.bnetIDAccount or not BNFeaturesEnabledAndConnected() ) then shown = false; - elseif ( UnitInParty(characterName) or UnitInRaid(characterName) ) then + elseif ( mobile or UnitInParty(characterName) or UnitInRaid(characterName) ) then shown = false; end end @@ -994,6 +992,10 @@ function UnitPopup_HideButtons () if whisperIsLocalPlayer or (isOffline and not dropdownMenu.bnetIDAccount) or ( dropdownMenu.unit and (not canCoop or not isPlayer)) or (dropdownMenu.bnetIDAccount and not BNIsFriend(dropdownMenu.bnetIDAccount)) then shown = false; end + + if ( dropdownMenu.isMobile ) then + shown = false; + end elseif ( value == "DUEL" ) then if ( UnitCanAttack("player", dropdownMenu.unit) or not isPlayer ) then shown = false; @@ -1066,6 +1068,8 @@ function UnitPopup_HideButtons () -- We don't want to show a menu option that will end up being blocked if ( not dropdownMenu.bnetIDAccount or not BNIsFriend(dropdownMenu.bnetIDAccount) or InCombatLockdown() or not issecure() ) then shown = false; + elseif ( dropdownMenu.isMobile ) then + shown = false; end elseif ( value == "PROMOTE" ) then if ( not inParty or not isLeader or not isPlayer or HasLFGRestrictions()) then -- GitLab