Commit 5bb0600c authored by TOM_RUS's avatar TOM_RUS
Browse files

WOW-27326patch8.0.1_Beta

parent c5c750e3
......@@ -6,6 +6,15 @@ local GuildInfo =
Functions =
{
{
Name = "CanSpeakInGuildChat",
Type = "Function",
Returns =
{
{ Name = "canSpeakInGuildChat", Type = "bool", Nilable = false },
},
},
{
Name = "GetGuildRankOrder",
Type = "Function",
......
......@@ -102,7 +102,7 @@ function AdventureMapQuestChoiceDialogMixin:RefreshRewards()
end
local xp = GetQuestLogRewardXP(self.questID);
if xp > 0 and UnitLevel("player") < MAX_PLAYER_LEVEL then
if xp > 0 and not IsPlayerAtEffectiveMaxLevel() then
self:AddReward(BreakUpLargeNumbers(xp), "Interface\\Icons\\XP_Icon", nil, 0, "NumberFontNormal");
end
......
......@@ -117,6 +117,17 @@ function CommunitiesChatMixin:SendMessage(text)
local clubId = self:GetCommunitiesFrame():GetSelectedClubId();
local streamId = self:GetCommunitiesFrame():GetSelectedStreamId();
if (clubId ~= nil and streamId ~= nil and C_Club.IsSubscribedToStream(clubId, streamId)) then
local streamInfo = C_Club.GetStreamInfo(clubId, streamId);
if not streamInfo then
return;
end
if streamInfo.streamType == Enum.ClubStreamType.Guild and not C_GuildInfo.CanSpeakInGuildChat() then
self.MessageFrame:AddMessage(ERR_GUILD_PERMISSIONS, YELLOW_FONT_COLOR:GetRGB());
ChatFrame_DisplaySystemMessageInPrimary(ERR_GUILD_PERMISSIONS);
return;
end
C_Club.SendMessage(clubId, streamId, text);
elseif clubId ~= nil and C_Club.IsAccountMuted(clubId) then
UIErrorsFrame:AddExternalErrorMessage(ERR_PARENTAL_CONTROLS_CHAT_MUTED);
......
......@@ -80,7 +80,8 @@ function CommunitiesGuildMemberDetailMixin:DisplayMember(clubId, memberInfo)
local personalNoteText = self.NoteBackground.PersonalNoteText;
local note = memberInfo.memberNote;
if CanEditPublicNote() then
local canEditNote = memberInfo.isSelf or CanEditPublicNote();
if canEditNote then
personalNoteText:SetTextColor(1.0, 1.0, 1.0);
if not note or note == "" then
note = GUILD_NOTE_EDITLABEL;
......@@ -88,7 +89,7 @@ function CommunitiesGuildMemberDetailMixin:DisplayMember(clubId, memberInfo)
else
personalNoteText:SetTextColor(0.65, 0.65, 0.65);
end
self.NoteBackground:EnableMouse(CanEditPublicNote());
self.NoteBackground:EnableMouse(canEditNote);
personalNoteText:SetText(note);
local maxRankOrder = GuildControlGetNumRanks();
......
......@@ -573,10 +573,19 @@ function GarrisonLandingPageReportList_UpdateAvailable()
Reward.tooltip = BreakUpLargeNumbers(reward.quantity).." |T"..currencyTexture..":0:0:0:-1|t ";
Reward.currencyID = reward.currencyID;
Reward.currencyQuantity = reward.quantity;
Reward.Quantity:SetText(reward.quantity);
if C_CurrencyInfo.IsCurrencyContainer(reward.currencyID, reward.quantity) then
local name, texture, quantity = CurrencyContainerUtil.GetCurrencyContainerInfo(reward.currencyID, reward.quantity);
Reward.Icon:SetTexture(texture);
if quantity > 1 then
Reward.Quantity:SetText(quantity);
Reward.Quantity:Show();
end
else
Reward.Quantity:SetText(reward.quantity);
Reward.Quantity:Show();
end
local currencyColor = GetColorForCurrencyReward(reward.currencyID, reward.quantity);
Reward.Quantity:SetTextColor(currencyColor:GetRGB());
Reward.Quantity:Show();
end
elseif (reward.bonusAbilityID) then
Reward.bonusAbilityID = reward.bonusAbilityID;
......@@ -852,6 +861,10 @@ function GarrisonLandingPageReportMissionReward_OnEnter(self)
GameTooltip:SetItemByID(self.itemID);
return;
end
if (self.currencyID and C_CurrencyInfo.IsCurrencyContainer(self.currencyID, self.currencyQuantity)) then
GameTooltip:SetCurrencyByID(self.currencyID, self.currencyQuantity);
return;
end
if (self.title) then
GameTooltip:SetText(self.title);
end
......
......@@ -508,11 +508,6 @@
<Anchor point="TOPLEFT" relativeTo="$parentOfficerBg" relativePoint="TOPLEFT" x="22" y="-20"/>
</Anchors>
</FontString>
<FontString name="$parentRosterLabel" inherits="GameFontNormal" text="GUILD_ROSTER">
<Anchors>
<Anchor point="TOPLEFT" relativeTo="$parentRosterBg" x="7" y="-7"/>
</Anchors>
</FontString>
<FontString name="$parentBankLabel" inherits="GameFontNormal" text="GUILD_BANK">
<Anchors>
<Anchor point="TOPLEFT" relativeTo="$parentBankBg" x="7" y="-7"/>
......@@ -555,7 +550,7 @@
<CheckButton parentKey="InviteCheckbox" name="$parentCheckbox5" inherits="GuildPermissionCheckBoxTemplate" id="5">
<Anchors>
<Anchor point="TOPLEFT" relativeTo="$parentRosterLabel" relativePoint="BOTTOMLEFT" x="0" y="-3"/>
<Anchor point="TOPLEFT" relativeTo="$parentRosterBg" x="7" y="-2"/>
</Anchors>
</CheckButton>
<CheckButton name="$parentCheckbox7" inherits="GuildPermissionCheckBoxTemplate" id="7">
......@@ -573,6 +568,11 @@
<Anchor point="TOPLEFT" relativeTo="$parentCheckbox6" relativePoint="BOTTOMLEFT" x="0" y="1"/>
</Anchors>
</CheckButton>
<CheckButton name="$parentCheckbox2" inherits="GuildPermissionCheckBoxTemplate" id="2">
<Anchors>
<Anchor point="TOPLEFT" relativeTo="$parentCheckbox7" relativePoint="BOTTOMLEFT" x="0" y="1"/>
</Anchors>
</CheckButton>
<CheckButton name="$parentCheckbox15" inherits="GuildPermissionCheckBoxTemplate" id="15">
<Anchors>
......
......@@ -286,7 +286,7 @@ function BonusObjectiveTracker_AddReward(questID, block, xp, money)
if ( not xp ) then
xp = GetQuestLogRewardXP(questID);
end
if ( xp > 0 and UnitLevel("player") < MAX_PLAYER_LEVEL ) then
if ( xp > 0 and not IsPlayerAtEffectiveMaxLevel() ) then
local t = { };
t.label = xp;
t.texture = "Interface\\Icons\\XP_Icon";
......@@ -1165,7 +1165,7 @@ function BonusObjectiveTrackerProgressBar_UpdateReward(progressBar)
texture = "Interface\\Icons\\inv_misc_coin_02";
end
-- xp
if ( not texture and GetQuestLogRewardXP(progressBar.questID) > 0 and UnitLevel("player") < MAX_PLAYER_LEVEL ) then
if ( not texture and GetQuestLogRewardXP(progressBar.questID) > 0 and not IsPlayerAtEffectiveMaxLevel() ) then
texture = "Interface\\Icons\\xp_icon";
end
progressBar.needsReward = nil;
......
......@@ -179,7 +179,7 @@ function ScenarioBlocksFrame_OnEvent(self, event, ...)
ScenarioProvingGroundsBlock.Score:SetText(score);
elseif (event == "SCENARIO_COMPLETED") then
local rewardQuestID, xp, money = ...;
if( ( xp and xp > 0 and UnitLevel("player") < MAX_PLAYER_LEVEL ) or ( money and money > 0 ) ) then
if( ( xp and xp > 0 and not IsPlayerAtEffectiveMaxLevel() ) or ( money and money > 0 ) ) then
ScenarioObjectiveTracker_AnimateReward( xp, money );
end
elseif (event == "SPELL_UPDATE_COOLDOWN") then
......@@ -202,7 +202,7 @@ function ScenarioObjectiveStageBlock_OnEnter(self)
GameTooltip:SetText(name, 1, 0.914, 0.682, 1);
GameTooltip:AddLine(description, 1, 1, 1, true);
GameTooltip:AddLine(" ");
if ( xp > 0 and UnitLevel("player") < MAX_PLAYER_LEVEL ) then
if ( xp > 0 and not IsPlayerAtEffectiveMaxLevel() ) then
GameTooltip:AddLine(string.format(BONUS_OBJECTIVE_EXPERIENCE_FORMAT, xp), 1, 1, 1);
end
if ( money > 0 ) then
......@@ -287,7 +287,7 @@ function ScenarioObjectiveTracker_AnimateReward(xp, money)
rewardsFrame:Show();
rewardsFrame:SetScale(0.9);
local rewards = {};
if( xp > 0 and UnitLevel("player") < MAX_PLAYER_LEVEL ) then
if( xp > 0 and not IsPlayerAtEffectiveMaxLevel() ) then
local t = {};
t.label = xp;
t.texture = "Interface\\Icons\\XP_Icon";
......@@ -752,7 +752,7 @@ function SCENARIO_TRACKER_MODULE:AddProgressBar(block, line, criteriaIndex)
texture = "Interface\\Icons\\inv_misc_coin_02";
end
-- xp
if ( not texture and GetQuestLogRewardXP(rewardQuestID) > 0 and UnitLevel("player") < MAX_PLAYER_LEVEL ) then
if ( not texture and GetQuestLogRewardXP(rewardQuestID) > 0 and not IsPlayerAtEffectiveMaxLevel() ) then
texture = "Interface\\Icons\\xp_icon";
end
if ( texture ) then
......
......@@ -809,7 +809,7 @@ function HonorFrameBonusFrame_Update()
-- brawls
local button = HonorFrame.BonusFrame.BrawlButton;
local brawlInfo = C_PvP.GetBrawlInfo();
local isMaxLevel = UnitLevel("player") >= MAX_PLAYER_LEVEL;
local isMaxLevel = IsPlayerAtEffectiveMaxLevel();
button.canQueue = brawlInfo and brawlInfo.active and isMaxLevel;
button.isBrawl = true;
......@@ -831,7 +831,7 @@ function HonorFrameBonusFrame_Update()
button.Reward:Hide();
button:Disable();
end
HonorFrame.BonusFrame.BrawlHelpBox:SetShown(ShouldShowBrawlHelpBox(brawlInfo and brawlInfo.active, (UnitLevel("player") >= MAX_PLAYER_LEVEL)));
HonorFrame.BonusFrame.BrawlHelpBox:SetShown(ShouldShowBrawlHelpBox(brawlInfo and brawlInfo.active, (IsPlayerAtEffectiveMaxLevel())));
end
-- select a button if one isn't selected
......@@ -1584,7 +1584,7 @@ function PVPConquestBarMixin:OnEvent(event, ...)
end
function PVPConquestBarMixin:Update()
local locked = UnitLevel("player") < MAX_PLAYER_LEVEL;
local locked = not IsPlayerAtEffectiveMaxLevel();
self:SetDisabled(ConquestFrame.seasonState == SEASON_STATE_PRESEASON or ConquestFrame.seasonState == SEASON_STATE_OFFSEASON or locked);
self.Lock:SetShown(locked);
......
......@@ -347,6 +347,7 @@ end
function WorldQuestPinMixin:RefreshVisuals()
local tagID, tagName, worldQuestType, rarity, isElite, tradeskillLineIndex, displayTimeLeft = GetQuestTagInfo(self.questID);
local tradeskillLineID = tradeskillLineIndex and select(7, GetProfessionInfo(tradeskillLineIndex));
local selected = self.questID == GetSuperTrackedQuestID();
self.Glow:SetShown(selected);
self.SelectedGlow:SetShown(rarity ~= LE_WORLD_QUEST_QUALITY_COMMON and selected);
......
......@@ -265,7 +265,7 @@ function ScenarioLegionInvasionAlertFrame_SetUp(frame, rewardQuestID, name, show
DungeonCompletionAlertFrameReward_SetRewardMoney(rewardFrame, money);
end
if xp > 0 and UnitLevel("player") < MAX_PLAYER_LEVEL then
if xp > 0 and not IsPlayerAtEffectiveMaxLevel() then
local rewardFrame = GetRewardFrame(frame, "InvasionAlertFrameRewardTemplate");
DungeonCompletionAlertFrameReward_SetRewardXP(rewardFrame, xp);
end
......@@ -990,7 +990,7 @@ function WorldQuestCompleteAlertFrame_SetUp(frame, questData)
DungeonCompletionAlertFrameReward_SetRewardMoney(rewardFrame, questData.money);
end
if questData.xp > 0 and UnitLevel("player") < MAX_PLAYER_LEVEL then
if questData.xp > 0 and not IsPlayerAtEffectiveMaxLevel() then
local rewardFrame = GetRewardFrame(frame, "WorldQuestFrameRewardTemplate");
DungeonCompletionAlertFrameReward_SetRewardXP(rewardFrame, questData.xp);
end
......
......@@ -5,7 +5,7 @@ function ExpBarMixin:GetPriority()
end
function ExpBarMixin:ShouldBeVisible()
return UnitLevel("player") < MAX_PLAYER_LEVEL and not IsXPUserDisabled();
return not IsPlayerAtEffectiveMaxLevel() and not IsXPUserDisabled();
end
function ExpBarMixin:Update()
......@@ -210,7 +210,7 @@ function ExhaustionTickMixin:UpdateTickPosition()
end
-- Hide exhaustion tick if player is max level or XP is turned off
if ( UnitLevel("player") == MAX_PLAYER_LEVEL or IsXPUserDisabled() ) then
if ( IsPlayerAtEffectiveMaxLevel() or IsXPUserDisabled() ) then
self:Hide();
end
end
......
......@@ -238,7 +238,7 @@ end
function OverrideActionBar_UpdateXpBar(newLevel)
local level = newLevel or UnitLevel("player");
if ( level == MAX_PLAYER_LEVEL or IsXPUserDisabled() ) then
if ( IsLevelAtEffectiveMaxLevel(level) or IsXPUserDisabled() ) then
OverrideActionBar.xpBar:Hide();
else
local currXP = UnitXP("player");
......
......@@ -14,6 +14,7 @@ function ReputationFrame_OnLoad(self)
end
--]]
self.paragonFramesPool = CreateFramePool("FRAME", self, "ReputationParagonFrameTemplate");
self:RegisterEvent("UPDATE_EXPANSION_LEVEL");
end
function ReputationFrame_OnShow(self)
......@@ -39,6 +40,8 @@ end
function ReputationFrame_OnEvent(self, event, ...)
if ( event == "UPDATE_FACTION" or event == "LFG_BONUS_FACTION_ID_UPDATED" or event == "QUEST_LOG_UPDATE" ) then
ReputationFrame_Update();
elseif ( event == "UPDATE_EXPANSION_LEVEL" ) then
ReputationWatchBar_UpdateMaxLevel();
end
end
......
......@@ -5206,3 +5206,16 @@ function ChatClassColorOverrideShown()
end
end
-- takes into account the current expansion
-- NOTE: it's not safe to cache this value as it could change in the middle of the session
function GetEffectivePlayerMaxLevel()
return MAX_PLAYER_LEVEL_TABLE[GetExpansionLevel()];
end
function IsLevelAtEffectiveMaxLevel(level)
return level >= GetEffectivePlayerMaxLevel();
end
function IsPlayerAtEffectiveMaxLevel()
return IsLevelAtEffectiveMaxLevel(UnitLevel("player"));
end
\ No newline at end of file
......@@ -253,7 +253,7 @@
</Layers>
</Frame>
<Slider name="$parentRenderScaleSlider" inherits="VideoOptionsSliderTemplate" valueStep=".05" obeyStepOnDrag="true">
<Slider name="$parentRenderScaleSlider" inherits="VideoOptionsSliderTemplate" valueStep=".0555555555555" obeyStepOnDrag="true">
<Size x="126" y="17"/>
<Anchors>
<Anchor point="TOPLEFT" relativeTo="$parentResolutionDropDown" relativePoint="BOTTOMLEFT">
......@@ -262,44 +262,44 @@
</Anchors>
<Scripts>
<OnLoad>
self:SetMinMaxValues(.5, GetMaxRenderScale());
self:RegisterEvent("DISPLAY_SIZE_CHANGED");
local name = self:GetName();
self.type = CONTROLTYPE_SLIDER;
self.cvar = "RenderScale";
self.tooltip = OPTION_TOOLTIP_RENDER_SCALE;
self.name = RENDER_SCALE;
self.SetDisplayValue = self.SetValue;
self.SetValue = function(self, value)
self:SetDisplayValue(value);
if self:IsVisible() then
BlizzardOptionsPanel_SetCVarSafe(self.cvar, value);
end
end
self.GetCurrentValue = function(self)
return BlizzardOptionsPanel_GetCVarSafe(self.cvar);
end;
self.Text = _G[name.."Text"];
self.Text:SetFontObject("OptionsFontSmall");
self.Text:ClearAllPoints();
self.Text:SetPoint("RIGHT", self, "LEFT", -20, 0);
self.Text:SetText(RENDER_SCALE);
self.Value = _G[name.."Low"];
self.Value:ClearAllPoints();
self.Value:SetPoint("LEFT", self, "RIGHT", 3, 2);
self.Resolution = _G[name.."High"];
self.Resolution:ClearAllPoints();
self.Resolution:SetPoint("TOP", self, "BOTTOM", 0, 0);
VideoOptionsSlider_OnLoad(self);
</OnLoad>
self:SetMinMaxValues(GetMinRenderScale(), GetMaxRenderScale());
self:RegisterEvent("DISPLAY_SIZE_CHANGED");
local name = self:GetName();
self.type = CONTROLTYPE_SLIDER;
self.cvar = "RenderScale";
self.tooltip = OPTION_TOOLTIP_RENDER_SCALE;
self.name = RENDER_SCALE;
self.SetDisplayValue = self.SetValue;
self.SetValue = function(self, value)
self:SetDisplayValue(value);
if self:IsVisible() then
BlizzardOptionsPanel_SetCVarSafe(self.cvar, value);
end
end
self.GetCurrentValue = function(self)
return BlizzardOptionsPanel_GetCVarSafe(self.cvar);
end;
self.Text = _G[name.."Text"];
self.Text:SetFontObject("OptionsFontSmall");
self.Text:ClearAllPoints();
self.Text:SetPoint("RIGHT", self, "LEFT", -20, 0);
self.Text:SetText(RENDER_SCALE);
self.Value = _G[name.."Low"];
self.Value:ClearAllPoints();
self.Value:SetPoint("LEFT", self, "RIGHT", 3, 2);
self.Resolution = _G[name.."High"];
self.Resolution:ClearAllPoints();
self.Resolution:SetPoint("TOP", self, "BOTTOM", 0, 0);
VideoOptionsSlider_OnLoad(self);
</OnLoad>
<OnEvent>
local x, y = GetCurrentScaledResolution();
self.Resolution:SetText(x .."x".. y);
......
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