Commit e2c02e9e authored by TOM_RUS's avatar TOM_RUS
Browse files

WOW-26970patch8.0.1_Beta

parent 16d3b7a4
......@@ -576,6 +576,15 @@ local Club =
{ Name = "clubsEnabled", Type = "bool", Nilable = false },
},
},
{
Name = "IsRestricted",
Type = "Function",
Returns =
{
{ Name = "restrictionReason", Type = "ClubRestrictionReason", Nilable = false },
},
},
{
Name = "IsSubscribedToStream",
Type = "Function",
......@@ -678,6 +687,16 @@ local Club =
{ Name = "memberId", Type = "number", Nilable = false },
},
},
{
Name = "SendBattleTagFriendRequest",
Type = "Function",
Arguments =
{
{ Name = "guildClubId", Type = "string", Nilable = false },
{ Name = "memberId", Type = "number", Nilable = false },
},
},
{
Name = "SendCharacterInvitation",
Type = "Function",
......@@ -793,6 +812,20 @@ local Club =
{ Name = "enabled", Type = "bool", Nilable = false },
},
},
{
Name = "ShouldAllowClubType",
Type = "Function",
Arguments =
{
{ Name = "clubType", Type = "ClubType", Nilable = false },
},
Returns =
{
{ Name = "clubTypeIsAllowed", Type = "bool", Nilable = false },
},
},
{
Name = "UnfocusStream",
Type = "Function",
......@@ -1092,6 +1125,11 @@ local Club =
{ Name = "clubId", Type = "string", Nilable = false },
},
},
{
Name = "InitialClubsLoaded",
Type = "Event",
LiteralName = "INITIAL_CLUBS_LOADED",
},
{
Name = "StreamViewMarkerUpdated",
Type = "Event",
......@@ -1281,6 +1319,18 @@ local Club =
{ Name = "ClubDestroyed", Type = "ClubRemovedReason", EnumValue = 3 },
},
},
{
Name = "ClubRestrictionReason",
Type = "Enumeration",
NumValues = 2,
MinValue = 0,
MaxValue = 1,
Fields =
{
{ Name = "None", Type = "ClubRestrictionReason", EnumValue = 0 },
{ Name = "Unavailable", Type = "ClubRestrictionReason", EnumValue = 1 },
},
},
{
Name = "ClubStreamType",
Type = "Enumeration",
......
......@@ -59,6 +59,21 @@ local CurrencyInfo =
{ Name = "currencyID", Type = "number", Nilable = false },
},
},
{
Name = "GetFactionGrantedByCurrency",
Type = "Function",
Documentation = { "Gets the faction ID for currency that is immediately converted into reputation with that faction instead." },
Arguments =
{
{ Name = "currencyID", Type = "number", Nilable = false },
},
Returns =
{
{ Name = "factionID", Type = "number", Nilable = true },
},
},
{
Name = "GetWarResourcesCurrencyID",
Type = "Function",
......
......@@ -255,6 +255,17 @@ local Loot =
Type = "Event",
LiteralName = "PLAYER_LOOT_SPEC_UPDATED",
},
{
Name = "QuestCurrencyLootReceived",
Type = "Event",
LiteralName = "QUEST_CURRENCY_LOOT_RECEIVED",
Payload =
{
{ Name = "questID", Type = "number", Nilable = false },
{ Name = "currencyId", Type = "number", Nilable = false },
{ Name = "quantity", Type = "number", Nilable = false },
},
},
{
Name = "QuestLootReceived",
Type = "Event",
......
......@@ -86,6 +86,20 @@ local Map =
{ Name = "position", Type = "MapCanvasPosition", Nilable = false },
},
},
{
Name = "GetMapArtID",
Type = "Function",
Arguments =
{
{ Name = "uiMapID", Type = "number", Nilable = false },
},
Returns =
{
{ Name = "uiMapArtID", Type = "number", Nilable = false },
},
},
{
Name = "GetMapArtLayerTextures",
Type = "Function",
......
......@@ -15,6 +15,16 @@ local MythicPlusInfo =
{ Name = "affixIDs", Type = "table", InnerType = "number", Nilable = false },
},
},
{
Name = "GetLastWeeklyBestInformation",
Type = "Function",
Returns =
{
{ Name = "challengeMapId", Type = "number", Nilable = false },
{ Name = "level", Type = "number", Nilable = false },
},
},
{
Name = "GetOwnedKeystoneChallengeMapID",
Type = "Function",
......
......@@ -18,12 +18,23 @@ local QuestLog =
{
Name = "GetMaxNumQuests",
Type = "Function",
Documentation = { "This is the maximum number of quests a player can be on, including hidden quests, world quests, emissaries etc" },
Returns =
{
{ Name = "maxNumQuests", Type = "number", Nilable = false },
},
},
{
Name = "GetMaxNumQuestsCanAccept",
Type = "Function",
Documentation = { "This is the maximum number of standard quests a player can accept. These are quests that are normally visible in the quest log." },
Returns =
{
{ Name = "maxNumQuestsCanAccept", Type = "number", Nilable = false },
},
},
{
Name = "GetQuestInfo",
Type = "Function",
......@@ -95,6 +106,20 @@ local QuestLog =
{ Name = "isOnQuest", Type = "bool", Nilable = false },
},
},
{
Name = "QuestHasWarModeBonus",
Type = "Function",
Arguments =
{
{ Name = "questID", Type = "number", Nilable = false },
},
Returns =
{
{ Name = "hasBonus", Type = "bool", Nilable = false },
},
},
{
Name = "SetMapForQuestPOIs",
Type = "Function",
......
......@@ -6,6 +6,20 @@ local QuestTaskInfo =
Functions =
{
{
Name = "DoesMapShowTaskQuestObjectives",
Type = "Function",
Arguments =
{
{ Name = "uiMapID", Type = "number", Nilable = false },
},
Returns =
{
{ Name = "showsTaskQuestObjectives", Type = "bool", Nilable = false },
},
},
{
Name = "GetDistanceSqToQuest",
Type = "Function",
......
......@@ -742,6 +742,16 @@ local VoiceChat =
{ Name = "speakingEnergy", Type = "number", Nilable = false },
},
},
{
Name = "VoiceChatChannelMemberGuidUpdated",
Type = "Event",
LiteralName = "VOICE_CHAT_CHANNEL_MEMBER_GUID_UPDATED",
Payload =
{
{ Name = "memberID", Type = "number", Nilable = false },
{ Name = "channelID", Type = "number", Nilable = false },
},
},
{
Name = "VoiceChatChannelMemberMuteForAllChanged",
Type = "Event",
......
......@@ -254,6 +254,7 @@ function ArtifactPowerButtonMixin:SetStyle(style)
iconAlpha = 0;
iconBorderAlpha = 0;
self.Rank:SetText(nil);
self.Rank:SetAlpha(0);
self.RankBorder:SetAlpha(0);
......
......@@ -3,6 +3,7 @@ AzeriteEmpoweredItemUIMixin = CreateFromMixins(CallbackRegistryBaseMixin);
AzeriteEmpoweredItemUIMixin:GenerateCallbackEvents(
{
"OnShow",
"OnHide",
});
local AZERITE_EMPOWERED_FRAME_EVENTS = {
......@@ -81,6 +82,8 @@ end
function AzeriteEmpoweredItemUIMixin:OnHide()
PlaySound(SOUNDKIT.IG_CHARACTER_INFO_CLOSE);
self:Clear();
self:TriggerEvent(AzeriteEmpoweredItemUIMixin.Event.OnHide);
end
function AzeriteEmpoweredItemUIMixin:OnEvent(event, ...)
......
......@@ -3880,6 +3880,10 @@ function CalendarCreateEventTexture_Update()
local name = eventTex.title;
CalendarCreateEventTextureName:SetText(GetDungeonNameWithDifficulty(name, difficultyInfo and difficultyInfo.difficultyName or eventTex.difficultyName));
CalendarCreateEventTextureName:Show();
CalendarCreateEventTextureName:SetPoint("TOPLEFT", CalendarCreateEventIcon, "TOPRIGHT", 5, 0)
CalendarCreateEventDateLabel:SetPoint("TOPLEFT", CalendarCreateEventTextureName, "BOTTOMLEFT")
-- set the eventTex texture
if ( eventTex.texture ) then
CalendarCreateEventIcon:SetTexture(eventTex.texture);
......@@ -3888,6 +3892,9 @@ function CalendarCreateEventTexture_Update()
end
else
CalendarCreateEventTextureName:Hide();
CalendarCreateEventDateLabel:SetPoint("TOPLEFT", CalendarCreateEventIcon, "TOPRIGHT", 5, 0)
CalendarCreateEventIcon:SetTexture(CALENDAR_EVENTTYPE_TEXTURES[eventType]);
end
-- need to update the creator name at this point since it is affected by the texture name
......
......@@ -96,7 +96,7 @@ function ChallengesFrame_OnLoad(self)
end
function ChallengesFrame_OnEvent(self, event)
if ( event == "CHALLENGE_MODE_MAPS_UPDATE" or event == "CHALLENGE_MODE_LEADERS_UPDATE" or event =="CHALLENGE_MODE_MEMBER_INFO_UPDATED" or event =="CHALLENGE_MODE_COMPLETED") then
if (event == "CHALLENGE_MODE_MAPS_UPDATE" or event == "CHALLENGE_MODE_LEADERS_UPDATE" or event == "CHALLENGE_MODE_MEMBER_INFO_UPDATED" or event == "CHALLENGE_MODE_COMPLETED" or event == "BAG_UPDATE") then
if (event == "CHALLENGE_MODE_LEADERS_UPDATE") then
self.leadersAvailable = true;
end
......@@ -109,7 +109,9 @@ function ChallengesFrame_OnEvent(self, event)
end
function ChallengesFrame_OnShow(self)
SetPortraitToTexture(PVEFrame.portrait, "Interface\\Icons\\achievement_bg_wineos_underxminutes");
self:RegisterEvent("BAG_UPDATE");
SetPortraitToTexture(PVEFrame.portrait, "Interface\\Icons\\achievement_bg_wineos_underxminutes");
PVEFrame.TitleText:SetText(CHALLENGES);
PVEFrame_HideLeftInset();
......@@ -124,6 +126,7 @@ end
function ChallengesFrame_OnHide(self)
PVEFrame_ShowLeftInset();
self:UnregisterEvent("BAG_UPDATE");
end
function ChallengesFrame_Update(self)
......@@ -140,6 +143,19 @@ function ChallengesFrame_Update(self)
end
table.sort(sortedMaps, function(a, b) return a.level > b.level end);
local weeklySortedMaps = {};
for i = 1, #self.maps do
local _, weeklyLevel = C_MythicPlus.GetWeeklyBestForMap(self.maps[i])
if (not weeklyLevel) then
weeklyLevel = 0;
else
hasWeeklyRun = true;
end
tinsert(weeklySortedMaps, { id = self.maps[i], weeklyLevel = weeklyLevel});
end
table.sort(weeklySortedMaps, function(a, b) return a.weeklyLevel > b.weeklyLevel end);
local frameWidth = self.WeeklyInfo:GetWidth()
......@@ -159,33 +175,43 @@ function ChallengesFrame_Update(self)
end
end
local name, _, _, _, backgroundTexture = C_ChallengeMode.GetMapUIInfo(sortedMaps[1].id);
local _, _, _, _, backgroundTexture = C_ChallengeMode.GetMapUIInfo(sortedMaps[1].id);
if (backgroundTexture ~= 0) then
self.Background:SetTexture(backgroundTexture);
end
self.WeeklyInfo:SetUp(hasWeeklyRun, sortedMaps[1]);
local weeklyChest = self.WeeklyInfo.Child.WeeklyChest;
weeklyChest.name = nil;
weeklyChest.ownedKeystoneLevel, weeklyChest.level, weeklyChest.rewardLevel, weeklyChest.nextRewardLevel = 0;
weeklyChest.name = C_ChallengeMode.GetMapUIInfo(weeklySortedMaps[1].id);
weeklyChest.ownedKeystoneLevel = C_MythicPlus.GetOwnedKeystoneLevel();
if (weeklyChest.ownedKeystoneLevel and name ~= nil) then
weeklyChest.difficulty, weeklyChest.rewardLevel, weeklyChest.nextRewardLevel = C_MythicPlus.GetWeeklyChestRewardLevel();
weeklyChest.level = sortedMaps[1].level;
weeklyChest.level, weeklyChest.rewardLevel, weeklyChest.nextRewardLevel = C_MythicPlus.GetWeeklyChestRewardLevel();
if (weeklyChest.ownedKeystoneLevel and weeklyChest.name ~= nil) then
if (C_MythicPlus.IsWeeklyRewardAvailable()) then
self.WeeklyInfo:HideAffixes();
self.WeeklyInfo.Child.Label:Hide();
weeklyChest.challengeMapId, weeklyChest.level = C_MythicPlus.GetLastWeeklyBestInformation();
weeklyChest.name = C_ChallengeMode.GetMapUIInfo(weeklyChest.challengeMapId);
weeklyChest.rewardLevel = C_MythicPlus.GetRewardLevelFromKeystoneLevel(weeklyChest.level);
self.WeeklyInfo.Child.RunStatus:ClearAllPoints();
self.WeeklyInfo.Child.RunStatus:SetPoint("TOP", self, "TOP", 0, -25);
self.WeeklyInfo.Child.RunStatus:SetPoint("TOP", weeklyChest.CollectChest.FinalKeyLevel, "TOP", 0, 50);
self.WeeklyInfo.Child.RunStatus:SetText(MYTHIC_PLUS_CLAIM_REWARD_MESSAGE);
weeklyChest.CollectChest.FinalKeyLevel:SetText(MYTHIC_PLUS_WEEKLY_CHEST_LEVEL:format(name, weeklyChest.level));
weeklyChest.CollectChest.FinalKeyLevel:SetText(MYTHIC_PLUS_WEEKLY_CHEST_LEVEL:format(weeklyChest.name, weeklyChest.level));
weeklyChest:SetupChest(weeklyChest.CollectChest);
elseif (weeklyChest.level > 0) then
self.WeeklyInfo.Child.Label:Show();
self.WeeklyInfo.Child.RunStatus:ClearAllPoints();
self.WeeklyInfo.Child.RunStatus:SetPoint("TOP", weeklyChest, "TOP", 0, 25);
self.WeeklyInfo.Child.RunStatus:SetText(MYTHIC_PLUS_BEST_WEEKLY:format(name, weeklyChest.level));
self.WeeklyInfo.Child.RunStatus:SetText(MYTHIC_PLUS_BEST_WEEKLY:format(weeklyChest.name, weeklyChest.level));
weeklyChest:SetupChest(weeklyChest.CompletedKeystoneChest);
elseif (weeklyChest.ownedKeystoneLevel) then
......
......@@ -46,6 +46,8 @@ do
self:RegisterEvent("VOICE_CHAT_MUTED_CHANGED");
self:RegisterEvent("VOICE_CHAT_DEAFENED_CHANGED");
self:RegisterEvent("VOICE_CHAT_CHANNEL_MEMBER_MUTE_FOR_ME_CHANGED");
self:RegisterEvent("VOICE_CHAT_CHANNEL_MEMBER_ADDED");
self:RegisterEvent("VOICE_CHAT_CHANNEL_MEMBER_GUID_UPDATED");
self:AddEvents("PARTY_LEADER_CHANGED", "GROUP_ROSTER_UPDATE", "CHANNEL_UI_UPDATE", "CHANNEL_LEFT", "CHAT_MSG_CHANNEL_NOTICE_USER");
......@@ -153,6 +155,10 @@ function ChannelFrameMixin:OnEvent(event, ...)
self:OnDeafenedChanged(...);
elseif event == "VOICE_CHAT_CHANNEL_MEMBER_MUTE_FOR_ME_CHANGED" then
self:OnMemberMuted(...);
elseif event == "VOICE_CHAT_CHANNEL_MEMBER_ADDED" then
self:UpdateVoiceChannelIfSelected(select(2,...));
elseif event == "VOICE_CHAT_CHANNEL_MEMBER_GUID_UPDATED" then
self:UpdateVoiceChannelIfSelected(select(2,...));
end
end
......@@ -337,7 +343,7 @@ function ChannelFrameMixin:UpdatePartyChannelIfSelected()
end
end
function ChannelFrameMixin:UpdateCommunityChannelIfSelected(clubId, memberId)
function ChannelFrameMixin:UpdateCommunityChannelIfSelected(clubId)
local channel = self:GetList():GetSelectedChannelButton();
if channel and channel:ChannelIsCommunity() and channel.clubId == clubId then
self:MarkDirty("UpdateRoster");
......
......@@ -6,20 +6,16 @@ end
function ChannelRosterMixin:OnShow()
self:RegisterEvent("VOICE_CHAT_CHANNEL_MEMBER_ACTIVE_STATE_CHANGED");
self:RegisterEvent("VOICE_CHAT_CHANNEL_MEMBER_ADDED");
self:RegisterEvent("UNIT_CONNECTION");
end
function ChannelRosterMixin:OnHide()
self:UnregisterEvent("VOICE_CHAT_CHANNEL_MEMBER_ACTIVE_STATE_CHANGED");
self:UnregisterEvent("VOICE_CHAT_CHANNEL_MEMBER_ADDED");
self:UnregisterEvent("UNIT_CONNECTION");
end
function ChannelRosterMixin:OnEvent(event, ...)
if event == "VOICE_CHAT_CHANNEL_MEMBER_ADDED" then
self:OnVoiceChannelMemberAdded(...);
elseif event == "VOICE_CHAT_CHANNEL_MEMBER_ACTIVE_STATE_CHANGED" then
if event == "VOICE_CHAT_CHANNEL_MEMBER_ACTIVE_STATE_CHANGED" then
self:OnVoiceChannelMemberActiveStateChanged(...);
elseif event == "UNIT_CONNECTION" then
self:OnUnitConnection(...);
......@@ -30,13 +26,6 @@ function ChannelRosterMixin:GetChannelFrame()
return self:GetParent();
end
function ChannelRosterMixin:OnVoiceChannelMemberAdded(voiceMemberID, channelID)
local channel = self:GetChannelFrame():GetList():GetSelectedChannelButton();
if channel and channel:ChannelSupportsVoice() then
self:Update();
end
end
function ChannelRosterMixin:OnVoiceChannelMemberStateUpdate(methodName, voiceMemberID, voiceChannelID, newStateValue)
local channel = self:GetChannelFrame():GetList():GetSelectedChannelButton();
if channel and channel:GetVoiceChannelID() == voiceChannelID and channel:ChannelSupportsVoice() then
......@@ -186,13 +175,13 @@ do
rosterEntry:SetMemberName(name);
rosterEntry:SetMemberIsOwner(owner);
rosterEntry:SetMemberIsModerator(moderator);
rosterEntry:SetVoiceEnabled(false);
rosterEntry:ClearVoiceInfo();
rosterEntry:SetIsConnected(C_PlayerInfo.IsConnected(rosterEntry:GetMemberPlayerLocation()));
if voiceChannelID then
local voiceMemberID = C_VoiceChat.GetMemberID(voiceChannelID, guid);
local voiceMemberInfo = voiceMemberID and C_VoiceChat.GetMemberInfo(voiceMemberID, voiceChannelID);
if voiceMemberInfo then
rosterEntry:SetVoiceEnabled(true);
rosterEntry:SetVoiceChannelID(voiceChannelID);
......@@ -200,11 +189,6 @@ do
rosterEntry:SetVoiceActive(voiceMemberInfo.isActive);
rosterEntry:SetVoiceMuted(voiceMemberInfo.isMutedForMe);
end
else
rosterEntry:SetVoiceChannelID(nil);
rosterEntry:SetVoiceMemberID(nil);
rosterEntry:SetVoiceActive(nil);
rosterEntry:SetVoiceMuted(nil);
end
rosterEntry:Update();
......@@ -266,13 +250,13 @@ do
rosterEntry:SetMemberName(memberInfo.name);
rosterEntry:SetMemberIsOwner(memberInfo.role == Enum.ClubRoleIdentifier.Owner or memberInfo.role == Enum.ClubRoleIdentifier.Leader);
rosterEntry:SetMemberIsModerator(memberInfo.role == Enum.ClubRoleIdentifier.Moderator);
rosterEntry:SetVoiceEnabled(false);
rosterEntry:ClearVoiceInfo();
rosterEntry:SetIsConnected(memberInfo.presence ~= Enum.ClubMemberPresence.Offline);
if voiceChannelID and memberInfo.guid then
local voiceMemberID = C_VoiceChat.GetMemberID(voiceChannelID, memberInfo.guid);
local voiceMemberInfo = voiceMemberID and C_VoiceChat.GetMemberInfo(voiceMemberID, voiceChannelID);
if voiceMemberInfo then
rosterEntry:SetVoiceEnabled(true);
rosterEntry:SetVoiceChannelID(voiceChannelID);
......@@ -280,11 +264,6 @@ do
rosterEntry:SetVoiceActive(voiceMemberInfo.isActive);
rosterEntry:SetVoiceMuted(voiceMemberInfo.isMutedForMe);
end
else
rosterEntry:SetVoiceChannelID(nil);
rosterEntry:SetVoiceMemberID(nil);
rosterEntry:SetVoiceActive(nil);
rosterEntry:SetVoiceMuted(nil);
end
rosterEntry:Update();
......
......@@ -124,10 +124,6 @@ function ChannelRosterButtonMixin:IsVoiceActive()
return self.voiceActive;
end
function ChannelRosterButtonMixin:ShouldShowTalkingIndicator()
return self:IsVoiceTalking(); -- TODO: Use energy as well?
end
function ChannelRosterButtonMixin:SetVoiceMuted(muted)
self.voiceMuted = muted;
end
......@@ -144,6 +140,14 @@ function ChannelRosterButtonMixin:IsConnected()
return self.isConnected;
end
function ChannelRosterButtonMixin:ClearVoiceInfo()
self:SetVoiceEnabled(false);
self:SetVoiceChannelID(nil);
self:SetVoiceMemberID(nil);
self:SetVoiceActive(nil);
self:SetVoiceMuted(nil);
end
local function ChannelRosterDropdown_Initialize(dropdown, level, menuList)
UnitPopup_ShowMenu(dropdown, "CHAT_ROSTER", nil, dropdown.name);
end
......
......@@ -7,6 +7,7 @@ function VoiceActivityManagerMixin:OnLoad()
self:RegisterEvent("VOICE_CHAT_COMMUNICATION_MODE_CHANGED");
self:RegisterEvent("VOICE_CHAT_CHANNEL_MEMBER_REMOVED");
self:RegisterEvent("VOICE_CHAT_CHANNEL_REMOVED");
self:RegisterEvent("VOICE_CHAT_CHANNEL_DEACTIVATED");
self.releaseTimers = {};
self.notificationMembers = {};
......@@ -39,6 +40,8 @@ function VoiceActivityManagerMixin:OnEvent(event, ...)
self:OnMemberRemoved(...);
elseif event == "VOICE_CHAT_CHANNEL_REMOVED" then
self:OnChannelRemoved(...);
elseif event == "VOICE_CHAT_CHANNEL_DEACTIVATED" then
self:OnChannelDeactivated(...);
end
end
......@@ -109,6 +112,10 @@ function VoiceActivityManagerMixin:OnChannelRemoved(statusCode, channelID)
self:ReleaseNotifications("*", channelID);
end
function VoiceActivityManagerMixin:OnChannelDeactivated(channelID)
self:ReleaseNotifications("*", channelID);
end
-- First return value is the created notification
-- Second return value is true if the notification is an alert
function VoiceActivityManagerMixin:CreateNotification(memberID, channelID, frameTemplate, isLocalPlayer, parentFrame)
......@@ -255,7 +262,7 @@ function VoiceActivityManagerMixin:ReleaseNotifications(memberID, channelID)
self:UpdateAlertNotificationVisibility();
end
if memberID == "*" then
if memberID == "*" then
self:ClearChannelExistingNotifications(channelID);
else
self:ClearMemberHasExistingNotification(memberID, channelID);
......@@ -263,7 +270,7 @@ function VoiceActivityManagerMixin:ReleaseNotifications(memberID, channelID)
end
function VoiceActivityManagerMixin:MemberHasExistingNotification(memberID, channelID)
return self.notificationMembers[channelID] and self.notificationMembers[channelID][memberID];
return self.notificationMembers[channelID] and (self.notificationMembers[channelID][memberID] or memberID == "*");