Commit b117620f authored by TOM_RUS's avatar TOM_RUS

WOW-30329patch8.2.0_PTR

parent 0d02b38b
...@@ -129,6 +129,7 @@ SystemDocumentation.lua ...@@ -129,6 +129,7 @@ SystemDocumentation.lua
TalkingHeadDocumentation.lua TalkingHeadDocumentation.lua
TaxiMapDocumentation.lua TaxiMapDocumentation.lua
TextureUtilsDocumentation.lua TextureUtilsDocumentation.lua
TooltipConstantsDocumentation.lua
ToyBoxInfoDocumentation.lua ToyBoxInfoDocumentation.lua
TradeInfoDocumentation.lua TradeInfoDocumentation.lua
TradeSkillUIDocumentation.lua TradeSkillUIDocumentation.lua
......
...@@ -327,9 +327,9 @@ local ClubFinder = ...@@ -327,9 +327,9 @@ local ClubFinder =
{ {
Name = "ClubFinderSettingFlags", Name = "ClubFinderSettingFlags",
Type = "Enumeration", Type = "Enumeration",
NumValues = 15, NumValues = 18,
MinValue = 0, MinValue = 0,
MaxValue = 14, MaxValue = 17,
Fields = Fields =
{ {
{ Name = "None", Type = "ClubFinderSettingFlags", EnumValue = 0 }, { Name = "None", Type = "ClubFinderSettingFlags", EnumValue = 0 },
...@@ -347,6 +347,9 @@ local ClubFinder = ...@@ -347,6 +347,9 @@ local ClubFinder =
{ Name = "EnableListing", Type = "ClubFinderSettingFlags", EnumValue = 12 }, { Name = "EnableListing", Type = "ClubFinderSettingFlags", EnumValue = 12 },
{ Name = "MaxLevelOnly", Type = "ClubFinderSettingFlags", EnumValue = 13 }, { Name = "MaxLevelOnly", Type = "ClubFinderSettingFlags", EnumValue = 13 },
{ Name = "AutoAccept", Type = "ClubFinderSettingFlags", EnumValue = 14 }, { 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 = ...@@ -494,6 +494,7 @@ local FriendList =
{ Name = "dnd", Type = "bool", Nilable = false }, { Name = "dnd", Type = "bool", Nilable = false },
{ Name = "afk", Type = "bool", Nilable = false }, { Name = "afk", Type = "bool", Nilable = false },
{ Name = "referAFriend", 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 = ...@@ -481,6 +481,20 @@ local UIWidgetManager =
{ Name = "Huge", Type = "UIWidgetTextSizeType", EnumValue = 3 }, { 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", Name = "ZoneControlState",
Type = "Enumeration", Type = "Enumeration",
...@@ -917,6 +931,7 @@ local UIWidgetManager = ...@@ -917,6 +931,7 @@ local UIWidgetManager =
Fields = Fields =
{ {
{ Name = "shownState", Type = "WidgetShownState", Nilable = false }, { Name = "shownState", Type = "WidgetShownState", Nilable = false },
{ Name = "mode", Type = "ZoneControlMode", Nilable = false },
{ Name = "zoneEntries", Type = "table", InnerType = "ZoneEntry", Nilable = false }, { Name = "zoneEntries", Type = "table", InnerType = "ZoneEntry", Nilable = false },
{ Name = "widgetSizeSetting", Type = "number", Nilable = false }, { Name = "widgetSizeSetting", Type = "number", Nilable = false },
{ Name = "textureKitID", Type = "number", Nilable = false }, { Name = "textureKitID", Type = "number", Nilable = false },
......
...@@ -1453,6 +1453,7 @@ function CommunitiesMemberListDropdown_Initialize(self, level) ...@@ -1453,6 +1453,7 @@ function CommunitiesMemberListDropdown_Initialize(self, level)
self.clubAssignableRoles = C_Club.GetAssignableRoles(clubInfo.clubId, memberInfo.memberId); self.clubAssignableRoles = C_Club.GetAssignableRoles(clubInfo.clubId, memberInfo.memberId);
self.isSelf = memberInfo.isSelf; self.isSelf = memberInfo.isSelf;
self.guid = memberInfo.guid; self.guid = memberInfo.guid;
self.isMobile = memberInfo.presence == Enum.ClubMemberPresence.OnlineMobile;
UnitPopup_ShowMenu(self, clubTypeToUnitPopup[clubInfo.clubType], nil, memberInfo.name); UnitPopup_ShowMenu(self, clubTypeToUnitPopup[clubInfo.clubType], nil, memberInfo.name);
end end
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 = { ...@@ -412,7 +412,7 @@ local textureKitRegionInfo = {
["FullGlow"] = {formatString = "%s-fullglow", useAtlasSize = true}, ["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 isActive = (zoneInfo.activeState == Enum.ZoneControlActiveState.Active);
local isMaxed = (zoneInfo.current == zoneInfo.max); local isMaxed = (zoneInfo.current == zoneInfo.max);
local wasMaxed = lastVals and (lastVals.current == lastVals.max) or false; local wasMaxed = lastVals and (lastVals.current == lastVals.max) or false;
...@@ -440,7 +440,17 @@ function UIWidgetBaseControlZoneTemplateMixin:UpdateAnimations(zoneInfo, lastVal ...@@ -440,7 +440,17 @@ function UIWidgetBaseControlZoneTemplateMixin:UpdateAnimations(zoneInfo, lastVal
self.FallingGlowAnim:Stop(); self.FallingGlowAnim:Stop();
self.FallingGlow:Hide(); self.FallingGlow:Hide();
else 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; local playFillingAnim, playFallingAnim;
if reverseAnims then if reverseAnims then
playFillingAnim = zoneInfo.current < lastVals.current; playFillingAnim = zoneInfo.current < lastVals.current;
...@@ -471,7 +481,7 @@ function UIWidgetBaseControlZoneTemplateMixin:UpdateAnimations(zoneInfo, lastVal ...@@ -471,7 +481,7 @@ function UIWidgetBaseControlZoneTemplateMixin:UpdateAnimations(zoneInfo, lastVal
end end
end end
function UIWidgetBaseControlZoneTemplateMixin:Setup(zoneIndex, zoneInfo, lastVals, textureKitID) function UIWidgetBaseControlZoneTemplateMixin:Setup(zoneIndex, zoneMode, zoneInfo, lastVals, textureKitID)
local textureKit = GetUITextureKitInfo(textureKitID); local textureKit = GetUITextureKitInfo(textureKitID);
if not textureKit then if not textureKit then
self:Hide(); self:Hide();
...@@ -539,7 +549,7 @@ function UIWidgetBaseControlZoneTemplateMixin:Setup(zoneIndex, zoneInfo, lastVal ...@@ -539,7 +549,7 @@ function UIWidgetBaseControlZoneTemplateMixin:Setup(zoneIndex, zoneInfo, lastVal
zoneInfo.current = currentVal; zoneInfo.current = currentVal;
-- And update the animations -- And update the animations
self:UpdateAnimations(zoneInfo, lastVals); self:UpdateAnimations(zoneInfo, zoneMode, lastVals);
self:SetTooltip(zoneInfo.tooltip); self:SetTooltip(zoneInfo.tooltip);
......
...@@ -38,7 +38,7 @@ function UIWidgetTemplateZoneControlMixin:Setup(widgetInfo, widgetContainer) ...@@ -38,7 +38,7 @@ function UIWidgetTemplateZoneControlMixin:Setup(widgetInfo, widgetContainer)
local entryFrame = self.entryPool:Acquire(); local entryFrame = self.entryPool:Acquire();
entryFrame:Show(); entryFrame:Show();
local lastVals = (self.lastVals[index] and (self.lastVals[index].state == zoneInfo.state)) and self.lastVals[index] or nil; 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:SetZoneAnchors(entryFrame, index);
self.lastVals[index] = zoneInfo; self.lastVals[index] = zoneInfo;
end end
......
...@@ -1530,12 +1530,24 @@ ...@@ -1530,12 +1530,24 @@
<Anchor point="TOP" x="20" y="-18"/> <Anchor point="TOP" x="20" y="-18"/>
</Anchors> </Anchors>
<Color r="1.0" g="0.82" b="0.0"/> <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>
<FontString inherits="Game24Font" text="GARRISON_MISSION_ADDED_TOAST2"> <FontString inherits="Game24Font" text="GARRISON_MISSION_ADDED_TOAST2">
<Anchors> <Anchors>
<Anchor point="TOP" x="20" y="-34"/> <Anchor point="TOP" x="20" y="-34"/>
</Anchors> </Anchors>
<Color r="1.0" g="0.82" b="0.0"/> <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>
<FontString parentKey="Level" inherits="Game24Font"> <FontString parentKey="Level" inherits="Game24Font">
<Anchors> <Anchors>
...@@ -1554,6 +1566,12 @@ ...@@ -1554,6 +1566,12 @@
<Anchor point="TOP" x="-115" y="-48"/> <Anchor point="TOP" x="-115" y="-48"/>
</Anchors> </Anchors>
<Color r="0.098" g="0.537" b="0.969" a="1"/> <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> </FontString>
</Layer> </Layer>
<Layer level="OVERLAY"> <Layer level="OVERLAY">
......
...@@ -575,6 +575,8 @@ function FloatingGarrisonMission_Show(garrMissionID, garrMissionDBID) ...@@ -575,6 +575,8 @@ function FloatingGarrisonMission_Show(garrMissionID, garrMissionDBID)
local itemName, _, itemRarity, _, _, _, _, _, _, itemTexture = GetItemInfo(reward.itemID); local itemName, _, itemRarity, _, _, _, _, _, _, itemTexture = GetItemInfo(reward.itemID);
if itemName then if itemName then
rewardText = rewardText..ITEM_QUALITY_COLORS[itemRarity].hex..itemName..FONT_COLOR_CODE_CLOSE; 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 end
elseif (reward.followerXP) then elseif (reward.followerXP) then
rewardText = rewardText..reward.title; rewardText = rewardText..reward.title;
...@@ -585,7 +587,7 @@ function FloatingGarrisonMission_Show(garrMissionID, garrMissionDBID) ...@@ -585,7 +587,7 @@ function FloatingGarrisonMission_Show(garrMissionID, garrMissionDBID)
end end
end end
else else
rewardText = RETRIEVING_DATA; rewardText = RED_FONT_COLOR:GenerateHexColorMarkup()..RETRIEVING_DATA..FONT_COLOR_CODE_CLOSE;
end end
FloatingGarrisonMissionTooltip.Rewards:SetText(rewardText, 1, 1, 1); FloatingGarrisonMissionTooltip.Rewards:SetText(rewardText, 1, 1, 1);
......
...@@ -60,6 +60,7 @@ local INVITE_RESTRICTION_WOW_PROJECT_ID = 5; ...@@ -60,6 +60,7 @@ local INVITE_RESTRICTION_WOW_PROJECT_ID = 5;
local INVITE_RESTRICTION_WOW_PROJECT_MAINLINE = 6; local INVITE_RESTRICTION_WOW_PROJECT_MAINLINE = 6;
local INVITE_RESTRICTION_WOW_PROJECT_CLASSIC = 7; local INVITE_RESTRICTION_WOW_PROJECT_CLASSIC = 7;
local INVITE_RESTRICTION_NONE = 8; local INVITE_RESTRICTION_NONE = 8;
local INVITE_RESTRICTION_MOBILE = 9;
local FriendListEntries = { }; local FriendListEntries = { };
local playerRealmName; local playerRealmName;
...@@ -114,6 +115,10 @@ function FriendsFrame_ShouldShowSummonButton(self) ...@@ -114,6 +115,10 @@ function FriendsFrame_ShouldShowSummonButton(self)
return false, false; return false, false;
end end
if ( info.mobile ) then
return false, false;
end
return true, CanSummonFriend(info.name); return true, CanSummonFriend(info.name);
elseif ( self:GetParent().buttonType == FRIENDS_BUTTON_TYPE_BNET ) then elseif ( self:GetParent().buttonType == FRIENDS_BUTTON_TYPE_BNET ) then
--Get the information by BNet friends list ID. --Get the information by BNet friends list ID.
...@@ -201,7 +206,7 @@ function FriendsFrame_ShowDropdown(name, connected, lineID, chatType, chatFrame, ...@@ -201,7 +206,7 @@ function FriendsFrame_ShowDropdown(name, connected, lineID, chatType, chatFrame,
end end
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 or friendsList ) then
if ( connected ) then if ( connected ) then
FriendsDropDown.initialize = FriendsFrameBNDropDown_Initialize; FriendsDropDown.initialize = FriendsFrameBNDropDown_Initialize;
...@@ -220,7 +225,7 @@ function FriendsFrame_ShowBNDropdown(name, connected, lineID, chatType, chatFram ...@@ -220,7 +225,7 @@ function FriendsFrame_ShowBNDropdown(name, connected, lineID, chatType, chatFram
FriendsDropDown.chatTarget = name; FriendsDropDown.chatTarget = name;
FriendsDropDown.chatFrame = chatFrame; FriendsDropDown.chatFrame = chatFrame;
FriendsDropDown.bnetIDAccount = bnetIDAccount; FriendsDropDown.bnetIDAccount = bnetIDAccount;
FriendsDropDown.isMobile = nil; FriendsDropDown.isMobile = mobile;
ToggleDropDownMenu(1, nil, FriendsDropDown, "cursor"); ToggleDropDownMenu(1, nil, FriendsDropDown, "cursor");
end end
end end
...@@ -490,7 +495,7 @@ function FriendsList_CanWhisperFriend(friendType, friendIndex) ...@@ -490,7 +495,7 @@ function FriendsList_CanWhisperFriend(friendType, friendIndex)
return true; return true;
elseif friendType == FRIENDS_BUTTON_TYPE_WOW then elseif friendType == FRIENDS_BUTTON_TYPE_WOW then
local info = C_FriendList.GetFriendInfoByIndex(friendIndex); local info = C_FriendList.GetFriendInfoByIndex(friendIndex);
return info.connected; return info.connected and not info.mobile;
end end
return false; return false;
...@@ -936,12 +941,12 @@ function FriendsFrameFriendButton_OnClick(self, button) ...@@ -936,12 +941,12 @@ function FriendsFrameFriendButton_OnClick(self, button)
PlaySound(SOUNDKIT.IG_MAINMENU_OPTION_CHECKBOX_ON); PlaySound(SOUNDKIT.IG_MAINMENU_OPTION_CHECKBOX_ON);
if ( self.buttonType == FRIENDS_BUTTON_TYPE_BNET ) then if ( self.buttonType == FRIENDS_BUTTON_TYPE_BNET ) then
-- bnet friend -- bnet friend
local bnetIDAccount, accountName, battleTag, isBattleTag, characterName, bnetIDGameAccount, client, isOnline = BNGetFriendInfo(self.id); 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); FriendsFrame_ShowBNDropdown(accountName, isOnline, nil, nil, nil, 1, bnetIDAccount, nil, nil, nil, nil, mobile);
else else
-- wow friend -- wow friend
local info = C_FriendList.GetFriendInfoByIndex(self.id); 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 end
end end
...@@ -1293,7 +1298,7 @@ function FriendsFrame_UpdateFriendButton(button) ...@@ -1293,7 +1298,7 @@ function FriendsFrame_UpdateFriendButton(button)
nameText = info.name; nameText = info.name;
nameColor = FRIENDS_GRAY_COLOR; nameColor = FRIENDS_GRAY_COLOR;
end end
infoText = info.area; infoText = info.mobile and LOCATION_MOBILE_APP or info.area;
button.gameIcon:Hide(); button.gameIcon:Hide();
button.summonButton:ClearAllPoints(); button.summonButton:ClearAllPoints();
button.summonButton:SetPoint("TOPRIGHT", button, "TOPRIGHT", 1, -1); button.summonButton:SetPoint("TOPRIGHT", button, "TOPRIGHT", 1, -1);
...@@ -1302,7 +1307,7 @@ function FriendsFrame_UpdateFriendButton(button) ...@@ -1302,7 +1307,7 @@ function FriendsFrame_UpdateFriendButton(button)
local bnetIDAccount, accountName, battleTag, isBattleTag, characterName, local bnetIDAccount, accountName, battleTag, isBattleTag, characterName,
bnetIDGameAccount, client, isOnline, lastOnline, isBnetAFK, bnetIDGameAccount, client, isOnline, lastOnline, isBnetAFK,
isBnetDND, messageText, noteText, isRIDFriend, messageTime, isBnetDND, messageText, noteText, isRIDFriend, messageTime,
wowProjectID, isReferAFriend, canSummonFriend, isFavorite = BNGetFriendInfo(FriendListEntries[index].id); wowProjectID, isReferAFriend, canSummonFriend, isFavorite, mobile = BNGetFriendInfo(FriendListEntries[index].id);
broadcastText = messageText; broadcastText = messageText;
isFavoriteFriend = isFavorite; isFavoriteFriend = isFavorite;
-- set up player name and character name -- set up player name and character name
...@@ -1329,7 +1334,7 @@ function FriendsFrame_UpdateFriendButton(button) ...@@ -1329,7 +1334,7 @@ function FriendsFrame_UpdateFriendButton(button)
end end
if ( isOnline ) then 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); 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 if ( isBnetAFK or isGameAFK ) then
button.status:SetTexture(FRIENDS_TEXTURE_AFK); button.status:SetTexture(FRIENDS_TEXTURE_AFK);
...@@ -1342,7 +1347,7 @@ function FriendsFrame_UpdateFriendButton(button) ...@@ -1342,7 +1347,7 @@ function FriendsFrame_UpdateFriendButton(button)
if ( not zoneName or zoneName == "" ) then if ( not zoneName or zoneName == "" ) then
infoText = UNKNOWN; infoText = UNKNOWN;
else else
infoText = zoneName; infoText = mobile and LOCATION_MOBILE_APP or zoneName;
end end
else else
infoText = gameText; infoText = gameText;
...@@ -1634,7 +1639,7 @@ function FriendsFrameTooltip_Show(self) ...@@ -1634,7 +1639,7 @@ function FriendsFrameTooltip_Show(self)
anchor = FriendsFrameTooltip_SetLine(FriendsTooltipHeader, nil, nameText); anchor = FriendsFrameTooltip_SetLine(FriendsTooltipHeader, nil, nameText);
-- game account 1 -- game account 1
if ( bnetIDGameAccount ) then 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 ""; level = level or "";
race = race or ""; race = race or "";
class = class or ""; class = class or "";
...@@ -1645,7 +1650,7 @@ function FriendsFrameTooltip_Show(self) ...@@ -1645,7 +1650,7 @@ function FriendsFrameTooltip_Show(self)
text = string.format(FRIENDS_TOOLTIP_WOW_TOON_TEMPLATE, characterName..CANNOT_COOPERATE_LABEL, level, race, class); text = string.format(FRIENDS_TOOLTIP_WOW_TOON_TEMPLATE, characterName..CANNOT_COOPERATE_LABEL, level, race, class);
end end
FriendsFrameTooltip_SetLine(FriendsTooltipGameAccount1Name, nil, text); 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 else
if ( isOnline ) then if ( isOnline ) then
characterName = BNet_GetValidatedCharacterName(characterName, battleTag, client) or ""; characterName = BNet_GetValidatedCharacterName(characterName, battleTag, client) or "";
...@@ -1697,7 +1702,7 @@ function FriendsFrameTooltip_Show(self) ...@@ -1697,7 +1702,7 @@ function FriendsFrameTooltip_Show(self)
if ( info.connected ) then if ( info.connected ) then
FriendsTooltipHeader:SetTextColor(FRIENDS_WOW_NAME_COLOR.r, FRIENDS_WOW_NAME_COLOR.g, FRIENDS_WOW_NAME_COLOR.b); 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)); 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 else
FriendsTooltipHeader:SetTextColor(FRIENDS_GRAY_COLOR.r, FRIENDS_GRAY_COLOR.g, FRIENDS_GRAY_COLOR.b); FriendsTooltipHeader:SetTextColor(FRIENDS_GRAY_COLOR.r, FRIENDS_GRAY_COLOR.g, FRIENDS_GRAY_COLOR.b);
FriendsTooltipGameAccount1Name:Hide(); FriendsTooltipGameAccount1Name:Hide();
...@@ -2232,7 +2237,7 @@ function FriendsFrame_GetInviteRestriction(index) ...@@ -2232,7 +2237,7 @@ function FriendsFrame_GetInviteRestriction(index)
local restriction = INVITE_RESTRICTION_NO_GAME_ACCOUNTS; local restriction = INVITE_RESTRICTION_NO_GAME_ACCOUNTS;
local numGameAccounts = BNGetNumFriendGameAccounts(index); local numGameAccounts = BNGetNumFriendGameAccounts(index);
for i = 1, numGameAccounts do 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 ( client == BNET_CLIENT_WOW ) then
if ( wowProjectID ~= WOW_PROJECT_ID ) then if ( wowProjectID ~= WOW_PROJECT_ID ) then
if (wowProjectID == WOW_PROJECT_CLASSIC) then if (wowProjectID == WOW_PROJECT_CLASSIC) then
...@@ -2246,6 +2251,8 @@ function FriendsFrame_GetInviteRestriction(index) ...@@ -2246,6 +2251,8 @@ function FriendsFrame_GetInviteRestriction(index)
restriction = max(INVITE_RESTRICTION_FACTION, restriction); restriction = max(INVITE_RESTRICTION_FACTION, restriction);
elseif ( realmID == 0 ) then elseif ( realmID == 0 ) then
restriction = max(INVITE_RESTRICTION_INFO, restriction); restriction = max(INVITE_RESTRICTION_INFO, restriction);
elseif ( mobile ) then
restriction = INVITE_RESTRICTION_MOBILE;
else else
-- there is at lease 1 game account that can be invited -- there is at lease 1 game account that can be invited
return INVITE_RESTRICTION_NONE; return INVITE_RESTRICTION_NONE;
...@@ -2272,6 +2279,8 @@ function FriendsFrame_GetInviteRestrictionText(restriction) ...@@ -2272,6 +2279,8 @@ function FriendsFrame_GetInviteRestrictionText(restriction)
return ERR_TRAVEL_PASS_WRONG_PROJECT_MAINLINE_OVERRIDE; return ERR_TRAVEL_PASS_WRONG_PROJECT_MAINLINE_OVERRIDE;
elseif ( restriction == INVITE_RESTRICTION_WOW_PROJECT_CLASSIC ) then elseif ( restriction == INVITE_RESTRICTION_WOW_PROJECT_CLASSIC ) then
return ERR_TRAVEL_PASS_WRONG_PROJECT_CLASSIC_OVERRIDE; return ERR_TRAVEL_PASS_WRONG_PROJECT_CLASSIC_OVERRIDE;
elseif ( restriction == INVITE_RESTRICTION_MOBILE ) then
return ERR_TRAVEL_PASS_MOBILE;
else else
return ""; return "";
end end
......
...@@ -4962,11 +4962,14 @@ end ...@@ -4962,11 +4962,14 @@ end