Commit d69cd888 authored by TOM_RUS's avatar TOM_RUS
Browse files

WOW-27165patch8.0.1_Beta

parent f0aa5d5b
......@@ -72,6 +72,22 @@ local Club =
Name = "ClearClubPresenceSubscription",
Type = "Function",
},
{
Name = "CompareBattleNetDisplayName",
Type = "Function",
Arguments =
{
{ Name = "clubId", Type = "string", Nilable = false },
{ Name = "lhsMemberId", Type = "number", Nilable = false },
{ Name = "rhsMemberId", Type = "number", Nilable = false },
},
Returns =
{
{ Name = "comparison", Type = "number", Nilable = false },
},
},
{
Name = "CreateClub",
Type = "Function",
......
......@@ -53,6 +53,15 @@ local GarrisonInfo =
{ Name = "treeIDs", Type = "table", InnerType = "number", Nilable = false },
},
},
{
Name = "IsAtGarrisonMissionNPC",
Type = "Function",
Returns =
{
{ Name = "atGarrisonMissionNPC", Type = "bool", Nilable = false },
},
},
},
Events =
......
......@@ -6,11 +6,11 @@ BoostTutorial = {
MINIMUM_POINTER_SHOW_TIME = 3,
};
function BoostTutorial:EVENT_TUTORIAL_UNHIGHLIGHT_SPELL()
function BoostTutorial:TUTORIAL_UNHIGHLIGHT_SPELL()
self:UnhighlightSpells();
end
function BoostTutorial:EVENT_TUTORIAL_HIGHLIGHT_SPELL(spellID, textID)
function BoostTutorial:TUTORIAL_HIGHLIGHT_SPELL(spellID, textID)
self:HighlightSpell(spellID, textID);
end
......@@ -18,7 +18,7 @@ function BoostTutorial:SPELL_PUSHED_TO_ACTIONBAR(spellID)
self.spellQueue[spellID] = true;
end
function BoostTutorial:UNIT_SPELLCAST_SUCCEEDED(unit, name, rank, lineID, spellID)
function BoostTutorial:UNIT_SPELLCAST_SUCCEEDED(unit, cast, spellID)
-- NOTE: Might not want to to do this here in case the tutorial requires multiple spell casts...
-- but in that case, shouldn't the server be telling the client to highlight a spell?
self:UnhighlightSpells(spellID);
......
......@@ -92,6 +92,9 @@
</Frame>
<EditBox name="CommunitiesChatEditBoxTemplate" autoFocus="false" virtual="true" bytes="512" visibleBytes="255" invisibleBytes="255">
<Size x="130" y="32"/>
<KeyValues>
<KeyValue key="supportsSlashCommands" value="false" type="boolean"/>
</KeyValues>
<Layers>
<Layer level="BACKGROUND">
<Texture parentKey="Left" file="Interface\ChatFrame\UI-ChatInputBorder-Left2">
......
......@@ -122,6 +122,7 @@ function CommunitiesFrameMixin:OnEvent(event, ...)
end
elseif event == "CLUB_REMOVED" then
local clubId = ...;
self:SetPrivilegesForClub(clubId, nil);
if clubId == self:GetSelectedClubId() then
self:UpdateClubSelection();
end
......
......@@ -342,7 +342,7 @@ function CommunitiesMemberListMixin:UpdateMemberList()
self.memberIds = CommunitiesUtil.GetMemberIdsSortedByName(clubId, streamId);
self.allMemberList = CommunitiesUtil.GetMemberInfo(clubId, self.memberIds);
self.allMemberInfoLookup = CommunitiesUtil.GetMemberInfoLookup(self.allMemberList);
self.allMemberList = CommunitiesUtil.SortMemberInfo(self.allMemberList);
self.allMemberList = CommunitiesUtil.SortMemberInfo(clubId, self.allMemberList);
if not self:ShouldShowOfflinePlayers() then
self.sortedMemberList = CommunitiesUtil.GetOnlineMembers(self.allMemberList);
self.sortedMemberLookup = CommunitiesUtil.GetMemberInfoLookup(self.sortedMemberList);
......@@ -413,7 +413,7 @@ function CommunitiesMemberListMixin:SortList()
local keepSortDirection = true;
self:SortByColumnIndex(self.activeColumnSortIndex, keepSortDirection);
else
CommunitiesUtil.SortMemberInfo(self.sortedMemberList);
CommunitiesUtil.SortMemberInfo(self:GetSelectedClubId(), self.sortedMemberList);
end
if self:IsDisplayingProfessions() then
......@@ -819,7 +819,7 @@ function CommunitiesMemberListMixin:SortByColumnIndex(columnIndex, keepSortDirec
return;
end
CommunitiesUtil.SortMemberInfoWithOverride(self.sortedMemberList, function(lhsMemberInfo, rhsMemberInfo)
CommunitiesUtil.SortMemberInfoWithOverride(self:GetSelectedClubId(), self.sortedMemberList, function(lhsMemberInfo, rhsMemberInfo)
if self.reverseActiveColumnSort then
return CompareMembersByAttribute(lhsMemberInfo, rhsMemberInfo, sortAttribute);
else
......
......@@ -180,7 +180,7 @@
</Scripts>
</Frame>
<Frame name="CommunitiesNotificationSettingsDialogTemplate" frameStrata="DIALOG" mixin="CommunitiesNotificationSettingsDialogMixin" inherits="SelectionFrameTemplate" virtual="true">
<Frame name="CommunitiesNotificationSettingsDialogTemplate" frameStrata="DIALOG" enableMouse="true" mixin="CommunitiesNotificationSettingsDialogMixin" inherits="SelectionFrameTemplate" virtual="true">
<KeyValues>
<KeyValue key="OnOkay" value="CommunitiesNotificationSettingsDialogOkayButton_OnClick" type="global"/>
<KeyValue key="OnCancel" value="CommunitiesNotificationSettingsDialogCancelButton_OnClick" type="global"/>
......
......@@ -270,10 +270,9 @@ function BFAMission:DefaultTab()
return 1; -- Missions
end
function BFAMission:SetupTabs()
self.Tab1:Show();
self.Tab2:Show();
self.Tab3:Show();
function BFAMission:ShouldShowMissionsAndFollowersTabs()
-- If we don't have any followers or we are not at a mission npc, hide followers and missions tabs
return C_Garrison.GetNumFollowers(self.followerTypeID) > 0 and C_Garrison.IsAtGarrisonMissionNPC();
end
function BFAMission:SetupMissionList()
......
......@@ -123,6 +123,11 @@ function OrderHallMission:DefaultTab()
return 1; -- Missions
end
function OrderHallMission:ShouldShowMissionsAndFollowersTabs()
-- If we don't have any followers, hide followers and missions tabs
return C_Garrison.GetNumFollowers(self.followerTypeID) > 0;
end
function OrderHallMission:SetupTabs()
local tabList = { };
local validTabs = { };
......@@ -130,8 +135,7 @@ function OrderHallMission:SetupTabs()
local lastShowMissionsAndFollowersTabs = self.lastShowMissionsAndFollowersTabs;
-- If we don't have any followers, hide followers and missions tabs
if (C_Garrison.GetNumFollowers(self.followerTypeID) > 0) then
if self:ShouldShowMissionsAndFollowersTabs() then
table.insert(tabList, 1);
table.insert(tabList, 2);
validTabs[1] = true;
......
......@@ -690,7 +690,12 @@ BONUS_BUTTON_TOOLTIPS = {
tooltipKey = "SKIRMISH",
},
EpicBattleground = {
tooltipKey = "RANDOM_EPIC_BG",
func = function(self)
GameTooltip:SetOwner(self, "ANCHOR_RIGHT");
GameTooltip:SetText(BONUS_BUTTON_RANDOM_LARGE_BG_TITLE, 1, 1, 1);
GameTooltip:AddLine(BONUS_BUTTON_RANDOM_LARGE_BG_DESC, nil, nil, nil, true);
GameTooltip:Show();
end,
},
Brawl = {
func = function(self)
......
......@@ -990,7 +990,7 @@
<Anchor point="TOP" relativeKey="$parent.RandomBGButton" relativePoint="BOTTOM" x="0" y="-1"/>
</Anchors>
<KeyValues>
<KeyValue key="tooltipTableKey" value="LargeBattleground" type="string"/>
<KeyValue key="tooltipTableKey" value="EpicBattleground" type="string"/>
</KeyValues>
</Button>
<Button parentKey="Arena1Button" inherits="PVPCasualActivityButtonTemplate">
......
......@@ -376,9 +376,10 @@ function TradeSkillDetailsMixin:RefreshButtons()
end
function TradeSkillDetailsMixin:ViewGuildCrafters()
local tradeSkillID, skillLineName, skillLineRank, skillLineMaxRank, skillLineModifier = C_TradeSkillUI.GetTradeSkillLine();
if tradeSkillID and self.selectedRecipeID then
self.GuildFrame:ShowGuildRecipe(tradeSkillID, self.selectedRecipeID);
local tradeSkillID, skillLineName, skillLineRank, skillLineMaxRank, skillLineModifier, parentSkillLineID = C_TradeSkillUI.GetTradeSkillLine();
local effectiveSkillLineID = parentSkillLineID or tradeSkillID;
if effectiveSkillLineID and self.selectedRecipeID then
self.GuildFrame:ShowGuildRecipe(effectiveSkillLineID, self.selectedRecipeID);
end
end
......
......@@ -3642,8 +3642,11 @@ end
function ChatFrame_OpenChat(text, chatFrame, desiredCursorPosition)
if chatFrame == nil and CHAT_FOCUS_OVERRIDE ~= nil then
CHAT_FOCUS_OVERRIDE:SetFocus();
return;
if CHAT_FOCUS_OVERRIDE.supportsSlashCommands or not text or strsub(text, 0, 1) ~= "/" then
CHAT_FOCUS_OVERRIDE:SetFocus();
CHAT_FOCUS_OVERRIDE:SetText(text);
return;
end
end
local editBox = ChatEdit_ChooseBoxForSend(chatFrame);
......@@ -4557,9 +4560,9 @@ function ChatEdit_OnChar(self)
else
self.command = nil;
end
if (command and target and self.autoCompleteParams) then --if they typed a command with a autocompletable target
if (command and target and self.autoCompleteSource and self.autoCompleteParams) then --if they typed a command with a autocompletable target
local utf8Position = self:GetUTF8CursorPosition();
local nameToShow = GetAutoCompleteResults(target, 1, utf8Position, self.autoCompleteParams.include, self.autoCompleteParams.exclude)[1];
local nameToShow = self.autoCompleteSource(target, 1, utf8Position, unpack(self.autoCompleteParams))[1];
if (nameToShow and nameToShow.name) then
local name = Ambiguate(nameToShow.name, "all");
--We're going to be setting the text programatically which will clear the userInput flag on the editBox.
......@@ -4594,7 +4597,13 @@ function ChatEdit_OnInputLanguageChanged(self)
end
local function processChatType(editBox, msg, index, send)
editBox.autoCompleteParams = AUTOCOMPLETE_LIST[index];
local autoCompleteInfo = AUTOCOMPLETE_LIST[index];
if ( autoCompleteInfo ) then
AutoCompleteEditBox_SetAutoCompleteSource(editBox, GetAutoCompleteResults, autoCompleteInfo.include, autoCompleteInfo.exclude);
else
AutoCompleteEditBox_SetAutoCompleteSource(editBox, nil);
end
-- this is a special function for "ChatEdit_HandleChatType"
if ( ChatTypeInfo[index] ) then
if ( index == "WHISPER" or index == "SMART_WHISPER" ) then
......@@ -4655,7 +4664,7 @@ function ChatEdit_HandleChatType(editBox, msg, command, send)
end
end
--This isn't one we found in our list, so we're not going to autocomplete.
editBox.autoCompleteParams = nil;
AutoCompleteEditBox_SetAutoCompleteSource(editBox, nil);
return false;
end
......
......@@ -74,8 +74,32 @@ local function CompareMembers(lhsMemberInfo, rhsMemberInfo)
end
end
function CommunitiesUtil.SortMemberInfo(memberInfoArray)
table.sort(memberInfoArray, CompareMembers);
local function GenerateCompareMemberLambda(clubId)
local clubInfo = clubId and C_Club.GetClubInfo(clubId);
if clubInfo and clubInfo.clubType == Enum.ClubType.BattleNet then
local function CompareBNetMembers(lhsMemberInfo, rhsMemberInfo)
if lhsMemberInfo.presence ~= rhsMemberInfo.presence then
return PRESENCE_SORT_ORDER[lhsMemberInfo.presence] < PRESENCE_SORT_ORDER[rhsMemberInfo.presence];
elseif lhsMemberInfo.role ~= rhsMemberInfo.role then
return lhsMemberInfo.role < rhsMemberInfo.role;
else
local nameComparison = C_Club.CompareBattleNetDisplayName(clubId, lhsMemberInfo.memberId, rhsMemberInfo.memberId);
if nameComparison ~= 0 then
return nameComparison < 0;
else
return lhsMemberInfo.memberId < rhsMemberInfo.memberId;
end
end
end
return CompareBNetMembers;
else
return CompareMembers;
end
end
function CommunitiesUtil.SortMemberInfo(clubId, memberInfoArray)
table.sort(memberInfoArray, GenerateCompareMemberLambda(clubId));
return memberInfoArray;
end
......@@ -138,15 +162,16 @@ function CommunitiesUtil.GetAndSortMemberInfo(clubId, streamId, filterOffline)
if filterOffline then
memberInfoArray = CommunitiesUtil.GetOnlineMembers(memberInfoArray);
end
memberInfoArray = CommunitiesUtil.SortMemberInfo(memberInfoArray);
memberInfoArray = CommunitiesUtil.SortMemberInfo(clubId, memberInfoArray);
return memberInfoArray;
end
function CommunitiesUtil.SortMemberInfoWithOverride(memberInfoArray, overrideCompare)
function CommunitiesUtil.SortMemberInfoWithOverride(clubId, memberInfoArray, overrideCompare)
local baseCompare = GenerateCompareMemberLambda(clubId);
table.sort(memberInfoArray, function (lhsMemberInfo, rhsMemberInfo)
local overrideCompareResult = overrideCompare(lhsMemberInfo, rhsMemberInfo);
if overrideCompareResult == nil then
return CompareMembers(lhsMemberInfo, rhsMemberInfo);
return baseCompare(lhsMemberInfo, rhsMemberInfo);
else
return overrideCompareResult;
end
......
......@@ -268,7 +268,7 @@ function PvpTalentSlotMixin:Update()
self.Border:SetAtlas("pvptalents-talentborder-locked");
self:Disable();
self.Texture:Hide();
self.slotWasDisabled = true;
self.slotWasDisabled = (slotInfo and not slotInfo.enabled);
end
end
......
......@@ -869,7 +869,10 @@ function CharacterCreateEnumerateClasses()
SetupClassButton(button, classID, classData);
end
if (not C_CharacterCreation.CanCreateDemonHunter()) then
local isCreatingBoostCharacter = CharacterUpgrade_IsCreatedCharacterUpgrade() or CharacterUpgrade_IsCreatedCharacterTrialBoost();
local isBoostValidForDemonHunter = CharacterUpgradeFlow.data and CharacterUpgradeFlow.data.level > 100;
local demonHunterBoostIsInvalid = isCreatingBoostCharacter and not isBoostValidForDemonHunter;
if (demonHunterBoostIsInvalid or not C_CharacterCreation.CanCreateDemonHunter()) then
MAX_DISPLAYED_CLASSES_PER_RACE = 11;
for button in CharacterCreate.classFramePool:EnumerateActive() do
button:SetSize(44, 44);
......
......@@ -542,6 +542,10 @@ local function IsBoostFlowValidForCharacter(flowData, class, level, boostInProgr
return false;
end
if class == "DEMONHUNTER" and flowData.level <= 100 then
return false;
end
if isExpansionTrialCharacter and CanUpgradeExpansion() then
return false;
elseif isTrialBoost 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