Commit c5c750e3 authored by TOM_RUS's avatar TOM_RUS
Browse files

WOW-27291patch8.0.1_Beta

parent e2f9a3d9
......@@ -583,6 +583,20 @@ local Club =
{ Name = "tickets", Type = "table", InnerType = "ClubTicketInfo", Nilable = false },
},
},
{
Name = "IsAccountMuted",
Type = "Function",
Arguments =
{
{ Name = "clubId", Type = "string", Nilable = false },
},
Returns =
{
{ Name = "accountMuted", Type = "bool", Nilable = false },
},
},
{
Name = "IsBeginningOfStream",
Type = "Function",
......@@ -1246,9 +1260,9 @@ local Club =
{
Name = "ClubErrorType",
Type = "Enumeration",
NumValues = 39,
NumValues = 40,
MinValue = 0,
MaxValue = 38,
MaxValue = 39,
Fields =
{
{ Name = "ErrorCommunitiesNone", Type = "ClubErrorType", EnumValue = 0 },
......@@ -1266,30 +1280,31 @@ local Club =
{ Name = "ErrorCommunitiesProfanity", Type = "ClubErrorType", EnumValue = 12 },
{ Name = "ErrorCommunitiesTrial", Type = "ClubErrorType", EnumValue = 13 },
{ Name = "ErrorCommunitiesVeteranTrial", Type = "ClubErrorType", EnumValue = 14 },
{ Name = "ErrorClubFull", Type = "ClubErrorType", EnumValue = 15 },
{ Name = "ErrorClubNoClub", Type = "ClubErrorType", EnumValue = 16 },
{ Name = "ErrorClubNotMember", Type = "ClubErrorType", EnumValue = 17 },
{ Name = "ErrorClubAlreadyMember", Type = "ClubErrorType", EnumValue = 18 },
{ Name = "ErrorClubNoSuchMember", Type = "ClubErrorType", EnumValue = 19 },
{ Name = "ErrorClubNoSuchInvitation", Type = "ClubErrorType", EnumValue = 20 },
{ Name = "ErrorClubInvitationAlreadyExists", Type = "ClubErrorType", EnumValue = 21 },
{ Name = "ErrorClubInvalidRoleID", Type = "ClubErrorType", EnumValue = 22 },
{ Name = "ErrorClubInsufficientPrivileges", Type = "ClubErrorType", EnumValue = 23 },
{ Name = "ErrorClubTooManyClubsJoined", Type = "ClubErrorType", EnumValue = 24 },
{ Name = "ErrorClubVoiceFull", Type = "ClubErrorType", EnumValue = 25 },
{ Name = "ErrorClubStreamNoStream", Type = "ClubErrorType", EnumValue = 26 },
{ Name = "ErrorClubStreamInvalidName", Type = "ClubErrorType", EnumValue = 27 },
{ Name = "ErrorClubStreamCountAtMin", Type = "ClubErrorType", EnumValue = 28 },
{ Name = "ErrorClubStreamCountAtMax", Type = "ClubErrorType", EnumValue = 29 },
{ Name = "ErrorClubMemberHasRequiredRole", Type = "ClubErrorType", EnumValue = 30 },
{ Name = "ErrorClubSentInvitationCountAtMax", Type = "ClubErrorType", EnumValue = 31 },
{ Name = "ErrorClubReceivedInvitationCountAtMax", Type = "ClubErrorType", EnumValue = 32 },
{ Name = "ErrorClubTargetIsBanned", Type = "ClubErrorType", EnumValue = 33 },
{ Name = "ErrorClubBanAlreadyExists", Type = "ClubErrorType", EnumValue = 34 },
{ Name = "ErrorClubBanCountAtMax", Type = "ClubErrorType", EnumValue = 35 },
{ Name = "ErrorClubTicketCountAtMax", Type = "ClubErrorType", EnumValue = 36 },
{ Name = "ErrorClubTicketNoSuchTicket", Type = "ClubErrorType", EnumValue = 37 },
{ Name = "ErrorClubTicketHasConsumedAllowedRedeemCount", Type = "ClubErrorType", EnumValue = 38 },
{ Name = "ErrorCommunitiesChatMute", Type = "ClubErrorType", EnumValue = 15 },
{ Name = "ErrorClubFull", Type = "ClubErrorType", EnumValue = 16 },
{ Name = "ErrorClubNoClub", Type = "ClubErrorType", EnumValue = 17 },
{ Name = "ErrorClubNotMember", Type = "ClubErrorType", EnumValue = 18 },
{ Name = "ErrorClubAlreadyMember", Type = "ClubErrorType", EnumValue = 19 },
{ Name = "ErrorClubNoSuchMember", Type = "ClubErrorType", EnumValue = 20 },
{ Name = "ErrorClubNoSuchInvitation", Type = "ClubErrorType", EnumValue = 21 },
{ Name = "ErrorClubInvitationAlreadyExists", Type = "ClubErrorType", EnumValue = 22 },
{ Name = "ErrorClubInvalidRoleID", Type = "ClubErrorType", EnumValue = 23 },
{ Name = "ErrorClubInsufficientPrivileges", Type = "ClubErrorType", EnumValue = 24 },
{ Name = "ErrorClubTooManyClubsJoined", Type = "ClubErrorType", EnumValue = 25 },
{ Name = "ErrorClubVoiceFull", Type = "ClubErrorType", EnumValue = 26 },
{ Name = "ErrorClubStreamNoStream", Type = "ClubErrorType", EnumValue = 27 },
{ Name = "ErrorClubStreamInvalidName", Type = "ClubErrorType", EnumValue = 28 },
{ Name = "ErrorClubStreamCountAtMin", Type = "ClubErrorType", EnumValue = 29 },
{ Name = "ErrorClubStreamCountAtMax", Type = "ClubErrorType", EnumValue = 30 },
{ Name = "ErrorClubMemberHasRequiredRole", Type = "ClubErrorType", EnumValue = 31 },
{ Name = "ErrorClubSentInvitationCountAtMax", Type = "ClubErrorType", EnumValue = 32 },
{ Name = "ErrorClubReceivedInvitationCountAtMax", Type = "ClubErrorType", EnumValue = 33 },
{ Name = "ErrorClubTargetIsBanned", Type = "ClubErrorType", EnumValue = 34 },
{ Name = "ErrorClubBanAlreadyExists", Type = "ClubErrorType", EnumValue = 35 },
{ Name = "ErrorClubBanCountAtMax", Type = "ClubErrorType", EnumValue = 36 },
{ Name = "ErrorClubTicketCountAtMax", Type = "ClubErrorType", EnumValue = 37 },
{ Name = "ErrorClubTicketNoSuchTicket", Type = "ClubErrorType", EnumValue = 38 },
{ Name = "ErrorClubTicketHasConsumedAllowedRedeemCount", Type = "ClubErrorType", EnumValue = 39 },
},
},
{
......
......@@ -6,6 +6,15 @@ local LFGListInfo =
Functions =
{
{
Name = "CanActiveEntryUseAutoAccept",
Type = "Function",
Returns =
{
{ Name = "canUseAutoAccept", Type = "bool", Nilable = false },
},
},
{
Name = "CanCreateQuestGroup",
Type = "Function",
......@@ -28,6 +37,10 @@ local LFGListInfo =
Name = "ClearCreationTextFields",
Type = "Function",
},
{
Name = "ClearSearchTextFields",
Type = "Function",
},
{
Name = "CopyActiveEntryInfoToCreationFields",
Type = "Function",
......@@ -39,12 +52,29 @@ local LFGListInfo =
Arguments =
{
{ Name = "categoryID", Type = "number", Nilable = false },
{ Name = "searchTerms", Type = "table", InnerType = "LFGSearchTerms", Nilable = false, Documentation = { "The outer table represents AND terms and the inner tables represent OR terms." } },
{ Name = "filter", Type = "number", Nilable = false, Default = 0 },
{ Name = "preferredFilters", Type = "number", Nilable = false, Default = 0 },
{ Name = "languageFilter", Type = "WowLocale", Nilable = true },
},
},
{
Name = "SetSearchToActivity",
Type = "Function",
Arguments =
{
{ Name = "activityID", Type = "number", Nilable = false },
},
},
{
Name = "SetSearchToQuestID",
Type = "Function",
Arguments =
{
{ Name = "questID", Type = "number", Nilable = false },
},
},
},
Events =
......@@ -144,14 +174,6 @@ local LFGListInfo =
Tables =
{
{
Name = "LFGSearchTerms",
Type = "Structure",
Fields =
{
{ Name = "matches", Type = "table", InnerType = "string", Nilable = false, Documentation = { "Represent OR terms, 3 is the max terms considered. Terms beyond the primary are only considered on fuzzy match enabled activities, like Mythic+." } },
},
},
{
Name = "WowLocale",
Type = "Structure",
......
......@@ -25,5 +25,6 @@ GuildPerks.xml
GuildInfo.xml
GuildNews.xml
GuildRoster.xml
GuildNameChange.xml
CommunitiesFrame.xml
Localization.lua
\ No newline at end of file
......@@ -118,6 +118,8 @@ function CommunitiesChatMixin:SendMessage(text)
local streamId = self:GetCommunitiesFrame():GetSelectedStreamId();
if (clubId ~= nil and streamId ~= nil and C_Club.IsSubscribedToStream(clubId, streamId)) then
C_Club.SendMessage(clubId, streamId, text);
elseif clubId ~= nil and C_Club.IsAccountMuted(clubId) then
UIErrorsFrame:AddExternalErrorMessage(ERR_PARENTAL_CONTROLS_CHAT_MUTED);
end
end
......
......@@ -57,6 +57,7 @@ local errorStrings =
[Enum.ClubErrorType.ErrorCommunitiesProfanity] = "ERROR_COMMUNITIES_PROFANITY",
[Enum.ClubErrorType.ErrorCommunitiesTrial] = "ERROR_COMMUNITIES_TRIAL",
[Enum.ClubErrorType.ErrorCommunitiesVeteranTrial] = "ERROR_COMMUNITIES_VETERAN_TRIAL",
[Enum.ClubErrorType.ErrorCommunitiesChatMute] = "ERR_PARENTAL_CONTROLS_CHAT_MUTED",
[Enum.ClubErrorType.ErrorClubFull] = "ERROR_CLUB_FULL",
[Enum.ClubErrorType.ErrorClubNoClub] = "ERROR_CLUB_NO_CLUB",
[Enum.ClubErrorType.ErrorClubNotMember] = "ERROR_CLUB_NOT_MEMBER",
......
......@@ -23,6 +23,8 @@ local COMMUNITIES_FRAME_EVENTS = {
"PLAYER_GUILD_UPDATE",
"CHANNEL_UI_UPDATE",
"UPDATE_CHAT_COLOR",
"GUILD_RENAME_REQUIRED",
"REQUIRED_GUILD_RENAME_RESULT",
};
local COMMUNITIES_STATIC_POPUPS = {
......@@ -55,6 +57,8 @@ end
function CommunitiesFrameMixin:OnShow()
PlaySound(SOUNDKIT.IG_CHARACTER_INFO_OPEN);
self:SetNeedsGuildNameChange(GetGuildRenameRequired());
-- Don't allow ChannelFrame and CommunitiesFrame to show at the same time, because they share one presence subscription
if ChannelFrame and ChannelFrame:IsShown() then
HideUIPanel(ChannelFrame);
......@@ -151,6 +155,17 @@ function CommunitiesFrameMixin:OnEvent(event, ...)
end
elseif event == "CHANNEL_UI_UPDATE" or event == "UPDATE_CHAT_COLOR" then
self:UpdateStreamDropDown();
elseif event == "GUILD_RENAME_REQUIRED" then
self:SetNeedsGuildNameChange(...);
self:ValidateDisplayMode();
elseif event == "REQUIRED_GUILD_RENAME_RESULT" then
local success = ...
if success then
self:SetNeedsGuildNameChange(GetGuildRenameRequired());
self:ValidateDisplayMode();
else
UIErrorsFrame:AddExternalErrorMessage(ERR_GUILD_NAME_INVALID);
end
end
end
......@@ -369,6 +384,19 @@ function CommunitiesFrameMixin:SetDisplayMode(displayMode)
self:UpdateCommunitiesTabs();
end
function CommunitiesFrameMixin:GetNeedsGuildNameChange()
return self.hasForcedNameChange;
end
function CommunitiesFrameMixin:SetNeedsGuildNameChange(needsNameChange)
self.hasForcedNameChange = needsNameChange;
end
function CommunitiesFrameMixin:SetGuildNameAlertBannerMode(bannerMode)
self.GuildNameAlertFrame.topAnchored = bannerMode;
self:ValidateDisplayMode();
end
function CommunitiesFrameMixin:ValidateDisplayMode()
local clubId = self:GetSelectedClubId();
if clubId then
......@@ -387,6 +415,65 @@ function CommunitiesFrameMixin:ValidateDisplayMode()
if displayMode == COMMUNITIES_FRAME_DISPLAY_MODES.ROSTER then
self.GuildMemberListDropDownMenu:SetShown(isGuildCommunitySelected);
end
local needsGuildNameChange = isGuildCommunitySelected and self:GetNeedsGuildNameChange();
if needsGuildNameChange then
if self.GuildNameAlertFrame.topAnchored == nil then
self.GuildNameAlertFrame.topAnchored = not IsGuildLeader();
end
if displayMode == COMMUNITIES_FRAME_DISPLAY_MODES.MINIMIZED then
self.GuildNameChangeFrame:SetPoint("TOPLEFT", self, "TOPLEFT", 0, -56);
self.GuildNameChangeFrame:SetPoint("BOTTOMRIGHT", self, "BOTTOMRIGHT", -9, 29);
else
self.GuildNameChangeFrame:SetPoint("TOPLEFT", self.CommunitiesList, "TOPRIGHT", 24, -40);
self.GuildNameChangeFrame:SetPoint("BOTTOMRIGHT", self, "BOTTOMRIGHT", -9, 29);
end
self.GuildNameAlertFrame:ClearAllPoints();
if self.GuildNameAlertFrame.topAnchored then
self.GuildNameAlertFrame:SetPoint("BOTTOM", self, "TOP");
else
self.GuildNameAlertFrame:SetPoint("TOP", self.GuildNameChangeFrame, "TOP", 0, -24)
end
if IsGuildLeader() then
self.GuildNameChangeFrame.GMText:Show();
self.GuildNameChangeFrame.MemberText:Hide();
self.GuildNameChangeFrame.Button:SetText(ACCEPT);
self.GuildNameChangeFrame.Button:SetPoint("TOP", self.GuildNameChangeFrame.EditBox, "BOTTOM", 0, -10);
self.GuildNameChangeFrame.RenameText:Show();
self.GuildNameChangeFrame.EditBox:Show();
else
self.GuildNameChangeFrame.GMText:Hide();
self.GuildNameChangeFrame.MemberText:Show();
self.GuildNameChangeFrame.Button:SetText(OKAY);
self.GuildNameChangeFrame.Button:SetPoint("TOP", self.GuildNameChangeFrame.MemberText, "BOTTOM", 0, -30);
self.GuildNameChangeFrame.RenameText:Hide();
self.GuildNameChangeFrame.EditBox:Hide();
end
if self.GuildNameAlertFrame.topAnchored then
self.GuildNameAlertFrame.Alert:SetFontObject(GameFontHighlight);
self.GuildNameAlertFrame.Alert:ClearAllPoints();
self.GuildNameAlertFrame.Alert:SetPoint("BOTTOM", self.GuildNameAlertFrame, "CENTER", 0, 0);
self.GuildNameAlertFrame.Alert:SetWidth(190);
self.GuildNameAlertFrame:SetSize(256, 60);
self.GuildNameAlertFrame:Enable();
self.GuildNameAlertFrame.ClickText:Show();
else
self.GuildNameAlertFrame.Alert:SetFontObject(GameFontHighlightMedium);
self.GuildNameAlertFrame.Alert:ClearAllPoints();
self.GuildNameAlertFrame.Alert:SetPoint("CENTER", self.GuildNameAlertFrame, "CENTER", 0, 0);
self.GuildNameAlertFrame.Alert:SetWidth(220);
self.GuildNameAlertFrame:SetSize(300, 40);
self.GuildNameAlertFrame:Disable();
self.GuildNameAlertFrame.ClickText:Hide();
end
end
self.GuildNameAlertFrame:SetShown(needsGuildNameChange);
self.GuildNameChangeFrame:SetShown(needsGuildNameChange and not self.GuildNameAlertFrame.topAnchored);
end
end
......@@ -547,11 +634,16 @@ function CommunitiesFrameMixin:UpdateCommunitiesButtons()
addToChatButton:SetEnabled(false);
if clubId ~= nil then
local privileges = self:GetPrivilegesForClub(clubId);
if privileges.canSendInvitation then
inviteButton:SetEnabled(true);
-- There are currently no plans to allow suggesting members.
-- elseif privileges.canSuggestMember then
local clubInfo = C_Club.GetClubInfo(clubId);
if clubInfo and clubInfo.clubType == Enum.ClubType.Guild then
inviteButton:SetEnabled(CanGuildInvite());
else
local privileges = self:GetPrivilegesForClub(clubId);
if privileges.canSendInvitation then
inviteButton:SetEnabled(true);
-- There are currently no plans to allow suggesting members.
-- elseif privileges.canSuggestMember then
end
end
if self:GetSelectedStreamId() ~= nil then
......@@ -670,7 +762,7 @@ function CommunitiesFrameMaximizeMinimizeButton_OnLoad(self)
if communitiesFrame:GetDisplayMode() == COMMUNITIES_FRAME_DISPLAY_MODES.MINIMIZED then
communitiesFrame:SetDisplayMode(COMMUNITIES_FRAME_DISPLAY_MODES.CHAT);
end
communitiesFrame:ValidateDisplayMode();
communitiesFrame:SetSize(814, 426);
communitiesFrame.Chat:SetPoint("TOPLEFT", communitiesFrame.CommunitiesList, "TOPRIGHT", 31, -44);
communitiesFrame.Chat:SetPoint("BOTTOMRIGHT", communitiesFrame.MemberList, "BOTTOMLEFT", -32, 28);
......@@ -697,6 +789,7 @@ function CommunitiesFrameMaximizeMinimizeButton_OnLoad(self)
local function OnMinimize(frame)
local communitiesFrame = frame:GetParent();
communitiesFrame:SetDisplayMode(COMMUNITIES_FRAME_DISPLAY_MODES.MINIMIZED);
communitiesFrame:ValidateDisplayMode();
communitiesFrame:SetSize(322, 406);
communitiesFrame.Chat:SetPoint("TOPLEFT", communitiesFrame, "TOPLEFT", 13, -67);
communitiesFrame.Chat:SetPoint("BOTTOMRIGHT", communitiesFrame, "BOTTOMRIGHT", -35, 36);
......
......@@ -405,6 +405,8 @@
<Anchor point="BOTTOMRIGHT" x="-12" y="30"/>
</Anchors>
</Frame>
<Button parentKey="GuildNameAlertFrame" inherits="CommunitiesGuildNameChangeAlertFrameTemplate" frameLevel="2"/>
<Frame parentKey="GuildNameChangeFrame" inherits="CommunitiesGuildNameChangeFrameTemplate" frameLevel="1"/>
<Frame parentKey="EditStreamDialog" frameStrata="DIALOG" inherits="CommunitiesEditStreamDialogTemplate" hidden="true">
<Size x="320" y="260"/>
<Anchors>
......
......@@ -118,6 +118,20 @@ function CommunitiesEditStreamDialogMixin:OnShow()
communitiesFrame:RegisterDialogShown(self);
end
function CommunitiesEditStreamDialogMixin:ValidateText(clubId)
local name = self.NameEdit:GetText();
local description = self.Description.EditBox:GetText();
local clubInfo = C_Club.GetClubInfo(clubId);
local clubType = clubInfo and clubInfo.clubType or Enum.ClubType.Character;
local nameError = C_Club.GetCommunityNameResultText(C_Club.ValidateText(clubType, name, Enum.ClubFieldType.ClubStreamName));
local descriptionError = C_Club.GetCommunityNameResultText(C_Club.ValidateText(clubType, name, Enum.ClubFieldType.ClubStreamSubject));
if nameError or descriptionError then
UIErrorsFrame:AddExternalErrorMessage(nameError or descriptionError);
return false;
end
return true;
end
function CommunitiesEditStreamDialogMixin:ShowCreateDialog(clubId)
self:SetWidth(350);
self.Description.EditBox:SetWidth(283);
......@@ -130,8 +144,10 @@ function CommunitiesEditStreamDialogMixin:ShowCreateDialog(clubId)
self.Accept:SetScript("OnClick", function(self)
local editStreamDialog = self:GetParent();
local leadersAndModeratorsOnly = editStreamDialog.TypeCheckBox:GetChecked();
C_Club.CreateStream(clubId, editStreamDialog.NameEdit:GetText(), editStreamDialog.Description.EditBox:GetText(), leadersAndModeratorsOnly);
editStreamDialog:Hide();
if editStreamDialog:ValidateText(clubId) then
C_Club.CreateStream(clubId, editStreamDialog.NameEdit:GetText(), editStreamDialog.Description.EditBox:GetText(), leadersAndModeratorsOnly);
editStreamDialog:Hide();
end
PlaySound(SOUNDKIT.IG_MAINMENU_OPTION_CHECKBOX_ON);
end);
self:Show();
......@@ -151,8 +167,10 @@ function CommunitiesEditStreamDialogMixin:ShowEditDialog(clubId, stream)
self.Accept:SetScript("OnClick", function(self)
local editStreamDialog = self:GetParent();
local leadersAndModeratorsOnly = editStreamDialog.TypeCheckBox:GetChecked();
C_Club.EditStream(clubId, stream.streamId, editStreamDialog.NameEdit:GetText(), editStreamDialog.Description.EditBox:GetText(), leadersAndModeratorsOnly)
editStreamDialog:Hide();
if editStreamDialog:ValidateText(clubId) then
C_Club.EditStream(clubId, stream.streamId, editStreamDialog.NameEdit:GetText(), editStreamDialog.Description.EditBox:GetText(), leadersAndModeratorsOnly)
editStreamDialog:Hide();
end
PlaySound(SOUNDKIT.IG_MAINMENU_OPTION_CHECKBOX_ON);
end);
self.Delete:SetScript("OnClick", function(self)
......@@ -345,6 +363,13 @@ function CommunitiesAddToChatDropDown_Initialize(self, level)
return;
end
local streamInfo = C_Club.GetStreamInfo(clubId, streamId);
if not streamInfo then
return;
end
local isGuildStream = streamInfo.streamType == Enum.ClubStreamType.Guild or streamInfo.streamType == Enum.ClubStreamType.Officer;
local info = UIDropDownMenu_CreateInfo();
info.text = COMMUNITIES_ADD_TO_CHAT_DROP_DOWN_TITLE;
info.isTitle = true;
......@@ -359,18 +384,36 @@ function CommunitiesAddToChatDropDown_Initialize(self, level)
local chatTab = _G["ChatFrame"..i.."Tab"];
info.text = chatTab.Text:GetText();
info.value = i;
info.func = function(button)
if button.checked then
ChatFrame_RemoveCommunitiesChannel(chatWindow, clubId, streamId);
else
ChatFrame_AddNewCommunitiesChannel(i, clubId, streamId);
end
if isGuildStream then
local messageGroup = streamInfo.streamType == Enum.ClubStreamType.Guild and "GUILD" or "OFFICER";
info.func = function(button)
if button.checked then
ChatFrame_RemoveMessageGroup(chatWindow, messageGroup);
else
ChatFrame_AddMessageGroup(chatWindow, messageGroup);
end
chatTab:Click();
end;
info.checked = ChatFrame_ContainsMessageGroup(chatWindow, messageGroup);
else
info.func = function(button)
if button.checked then
ChatFrame_RemoveCommunitiesChannel(chatWindow, clubId, streamId);
else
ChatFrame_AddNewCommunitiesChannel(i, clubId, streamId);
end
chatTab:Click();
end;
chatTab:Click();
end;
info.checked = ChatFrame_ContainsChannel(chatWindow, channelName);
end
info.isNotRadio = true;
info.checked = ChatFrame_ContainsChannel(chatWindow, channelName);
UIDropDownMenu_AddButton(info, level);
end
end
......@@ -380,18 +423,25 @@ function CommunitiesAddToChatDropDown_Initialize(self, level)
local info = UIDropDownMenu_CreateInfo();
info.text = COMMUNITIES_ADD_TO_CHAT_DROP_DOWN_NEW_CHAT_WINDOW;
info.func = function(button)
local clubInfo = C_Club.GetClubInfo(clubId);
local streamInfo = C_Club.GetStreamInfo(clubId, streamId);
if clubInfo and streamInfo then
local MAX_COMMUNITY_NAME_LENGTH = 12;
local MAX_CHAT_TAB_STREAM_NAME_LENGTH = 50; -- Arbitrarily large, since for now we don't want to truncate the stream part.
local communityPart = ChatFrame_TruncateToMaxLength(clubInfo.name, MAX_COMMUNITY_NAME_LENGTH);
local streamPart = ChatFrame_TruncateToMaxLength(streamInfo.name, MAX_CHAT_TAB_STREAM_NAME_LENGTH);
local chatFrameName = COMMUNITIES_NAME_AND_STREAM_NAME:format(communityPart, streamPart);
if isGuildStream then
local noDefaultChannels = true;
local frame, chatFrameIndex = FCF_OpenNewWindow(chatFrameName, noDefaultChannels);
local setEditBoxToChannel = true;
ChatFrame_AddNewCommunitiesChannel(chatFrameIndex, clubId, streamId, setEditBoxToChannel);
local chatFrameName = streamInfo.name;
local frame = FCF_OpenNewWindow(chatFrameName, noDefaultChannels);
local messageGroup = streamInfo.streamType == Enum.ClubStreamType.Guild and "GUILD" or "OFFICER";
ChatFrame_AddMessageGroup(frame, messageGroup);
else
local clubInfo = C_Club.GetClubInfo(clubId);
if clubInfo then
local MAX_COMMUNITY_NAME_LENGTH = 12;
local MAX_CHAT_TAB_STREAM_NAME_LENGTH = 50; -- Arbitrarily large, since for now we don't want to truncate the stream part.
local communityPart = ChatFrame_TruncateToMaxLength(clubInfo.name, MAX_COMMUNITY_NAME_LENGTH);
local streamPart = ChatFrame_TruncateToMaxLength(streamInfo.name, MAX_CHAT_TAB_STREAM_NAME_LENGTH);
local chatFrameName = COMMUNITIES_NAME_AND_STREAM_NAME:format(communityPart, streamPart);
local noDefaultChannels = true;
local frame, chatFrameIndex = FCF_OpenNewWindow(chatFrameName, noDefaultChannels);
local setEditBoxToChannel = true;
ChatFrame_AddNewCommunitiesChannel(chatFrameIndex, clubId, streamId, setEditBoxToChannel);
end
end
end;
......@@ -407,7 +457,10 @@ function CommunitiesAddToChatDropDown_Initialize(self, level)
info.func = function()
CURRENT_CHAT_FRAME_ID = SELECTED_CHAT_FRAME:GetID();
ShowUIPanel(ChatConfigFrame);
ChatConfigCategory_OnClick(ChatConfigCategoryFrameButton3);
if not isGuildStream then
ChatConfigCategory_OnClick(ChatConfigCategoryFrameButton3);
end
end;
info.isNotRadio = true;
......
......@@ -43,7 +43,7 @@ function TradeSkillRecipeButtonMixin:SetUpHeader(textWidth, tradeSkillInfo)
self:SetBaseColor(TradeSkillTypeColor[tradeSkillInfo.type]);
if tradeSkillInfo.hasProgressBar then
if tradeSkillInfo.hasProgressBar and not (C_TradeSkillUI.IsTradeSkillGuild() or C_TradeSkillUI.IsTradeSkillGuildMember()) then
self.SubSkillRankBar:Show();
self.SubSkillRankBar:SetMinMaxValues(tradeSkillInfo.skillLineStartingRank, tradeSkillInfo.skillLineMaxLevel);
self.SubSkillRankBar:SetValue(tradeSkillInfo.skillLineCurrentLevel);
......@@ -72,7 +72,7 @@ function TradeSkillRecipeButtonMixin:SetUpHeader(textWidth, tradeSkillInfo)
end
self.Highlight:SetTexture("Interface\\Buttons\\UI-PlusButton-Hilight");
end
self.SelectedTexture:Hide();
self:UnlockHighlight()
self.isSelected = false;
......@@ -82,7 +82,7 @@ TradeSkillTypePrefix = {
optimal = " [+++] ",
medium = " [++] ",
easy = " [+] ",
trivial = " ",
trivial = " ",
header = " ",
subheader = " ",
nodifficulty = " ",
......@@ -158,7 +158,7 @@ function TradeSkillRecipeButtonMixin:SetUpRecipe(textWidth, tradeSkillInfo)
textWidth = textWidth - usedWidth;
else
self.Count:SetFormattedText("[%d]", tradeSkillInfo.numAvailable);
local nameWidth = self.Text:GetWidth();
local countWidth = self.Count:GetWidth();
......@@ -192,7 +192,7 @@ function TradeSkillRecipeButtonMixin:SetSelected(selected)
self.Text:SetVertexColor(HIGHLIGHT_FONT_COLOR.r, HIGHLIGHT_FONT_COLOR.g, HIGHLIGHT_FONT_COLOR.b);
self.Count:SetVertexColor(HIGHLIGHT_FONT_COLOR.r, HIGHLIGHT_FONT_COLOR.g, HIGHLIGHT_FONT_COLOR.b);
self.SkillUps.Text:SetVertexColor(HIGHLIGHT_FONT_COLOR.r, HIGHLIGHT_FONT_COLOR.g, HIGHLIGHT_FONT_COLOR.b);
self.SkillUps.Icon:SetVertexColor(HIGHLIGHT_FONT_COLOR.r, HIGHLIGHT_FONT_COLOR.g, HIGHLIGHT_FONT_COLOR.b);
self:LockHighlight();
......@@ -208,7 +208,7 @@ function TradeSkillRecipeButtonMixin:OnMouseEnter()
self.Count:SetVertexColor(HIGHLIGHT_FONT_COLOR.r, HIGHLIGHT_FONT_COLOR.g, HIGHLIGHT_FONT_COLOR.b);
self.SkillUps.Icon:SetVertexColor(HIGHLIGHT_FONT_COLOR.r, HIGHLIGHT_FONT_COLOR.g, HIGHLIGHT_FONT_COLOR.b);
self.SkillUps.Text:SetVertexColor(HIGHLIGHT_FONT_COLOR.r, HIGHLIGHT_FONT_COLOR.g, HIGHLIGHT_FONT_COLOR.b);
self.Text:SetFontObject(GameFontHighlightLeft);
self.Text:SetVertexColor(HIGHLIGHT_FONT_COLOR.r, HIGHLIGHT_FONT_COLOR.g, HIGHLIGHT_FONT_COLOR.b);
if self.SubSkillRankBar.currentRank and self.SubSkillRankBar.maxRank then
......@@ -222,7 +222,7 @@ function TradeSkillRecipeButtonMixin:OnMouseLeave()
self.Count:SetVertexColor(self.r, self.g, self.b);
self.SkillUps.Icon:SetVertexColor(self.r, self.g, self.b);
self.SkillUps.Text:SetVertexColor(self.r, self.g, self.b);
self.Text:SetFontObject(self.font);