Commit b117620f authored by TOM_RUS's avatar TOM_RUS
Browse files

WOW-30329patch8.2.0_PTR

parent 0d02b38b
......@@ -129,6 +129,7 @@ SystemDocumentation.lua
TalkingHeadDocumentation.lua
TaxiMapDocumentation.lua
TextureUtilsDocumentation.lua
TooltipConstantsDocumentation.lua
ToyBoxInfoDocumentation.lua
TradeInfoDocumentation.lua
TradeSkillUIDocumentation.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 },
},
},
{
......
......@@ -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 },
},
},
{
......
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
......@@ -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 },
......
......@@ -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
......
## Title: Blizzard_UIWidgets
## LoadOnDemand: 0
## RequiredDep: Blizzard_UIWidgets
PVPMatchUtil.lua
PVPMatchTable.xml
PVPMatchResults.xml
PVPMatchScoreboard.xml
\ No newline at end of file
......@@ -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);
......
......@@ -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
......
......@@ -1530,12 +1530,24 @@
<Anchor point="TOP" x="20" y="-18"/>
</Anchors>
<Color r="1.0" g="0.82" b="0.0"/>
<Shadow>
<Offset>
<AbsDimension x="1" y="-1"/>
</Offset>
<Color r="0" g="0" b="0"/>
</Shadow>
</FontString>
<FontString inherits="Game24Font" text="GARRISON_MISSION_ADDED_TOAST2">
<Anchors>
<Anchor point="TOP" x="20" y="-34"/>
</Anchors>
<Color r="1.0" g="0.82" b="0.0"/>
<Shadow>
<Offset>
<AbsDimension x="1" y="-1"/>
</Offset>
<Color r="0" g="0" b="0"/>
</Shadow>
</FontString>
<FontString parentKey="Level" inherits="Game24Font">
<Anchors>
......@@ -1554,6 +1566,12 @@
<Anchor point="TOP" x="-115" y="-48"/>
</Anchors>
<Color r="0.098" g="0.537" b="0.969" a="1"/>
<Shadow>
<Offset>
<AbsDimension x="1" y="-1"/>
</Offset>
<Color r="0" g="0" b="0"/>
</Shadow>
</FontString>
</Layer>
<Layer level="OVERLAY">
......
......@@ -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);
......
......@@ -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
......
......@@ -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)
......
......@@ -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
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment