Commit f9da707c authored by TOM_RUS's avatar TOM_RUS

WOW-32790patch1.13.3_ClassicRetail

parent dd93ad52
......@@ -74,6 +74,7 @@ SpellDocumentation.lua
SpellBookDocumentation.lua
StableInfoDocumentation.lua
StorePublicUIDocumentation.lua
SummonInfoDocumentation.lua
SystemDocumentation.lua
TaxiMapDocumentation.lua
TradeInfoDocumentation.lua
......
......@@ -106,6 +106,11 @@ local DeathInfo =
Type = "Event",
LiteralName = "CORPSE_OUT_OF_RANGE",
},
{
Name = "CorpsePositionUpdate",
Type = "Event",
LiteralName = "CORPSE_POSITION_UPDATE",
},
{
Name = "PlayerAlive",
Type = "Event",
......
local SummonInfo =
{
Name = "SummonInfo",
Type = "System",
Namespace = "C_SummonInfo",
Functions =
{
{
Name = "CancelSummon",
Type = "Function",
},
{
Name = "ConfirmSummon",
Type = "Function",
},
{
Name = "GetSummonConfirmAreaName",
Type = "Function",
Returns =
{
{ Name = "areaName", Type = "string", Nilable = false },
},
},
{
Name = "GetSummonConfirmSummoner",
Type = "Function",
Returns =
{
{ Name = "summoner", Type = "string", Nilable = true },
},
},
{
Name = "GetSummonConfirmTimeLeft",
Type = "Function",
Returns =
{
{ Name = "timeLeft", Type = "number", Nilable = false },
},
},
{
Name = "GetSummonReason",
Type = "Function",
Returns =
{
{ Name = "summonReason", Type = "number", Nilable = false },
},
},
{
Name = "IsSummonSkippingStartExperience",
Type = "Function",
Returns =
{
{ Name = "isSummonSkippingStartExperience", Type = "bool", Nilable = false },
},
},
},
Events =
{
},
Tables =
{
},
};
APIDocumentation:AddDocumentationTable(SummonInfo);
\ No newline at end of file
......@@ -308,6 +308,22 @@ local VoiceChat =
{ Name = "sensitivity", Type = "number", Nilable = true },
},
},
{
Name = "IsChannelJoinPending",
Type = "Function",
Arguments =
{
{ Name = "channelType", Type = "ChatChannelType", Nilable = false },
{ Name = "clubId", Type = "string", Nilable = true },
{ Name = "streamId", Type = "string", Nilable = true },
},
Returns =
{
{ Name = "isPending", Type = "bool", Nilable = false },
},
},
{
Name = "IsDeafened",
Type = "Function",
......@@ -493,6 +509,7 @@ local VoiceChat =
Arguments =
{
{ Name = "channelType", Type = "ChatChannelType", Nilable = false },
{ Name = "autoActivate", Type = "bool", Nilable = true },
},
},
{
......@@ -943,8 +960,8 @@ local VoiceChat =
Payload =
{
{ Name = "channelType", Type = "ChatChannelType", Nilable = false },
{ Name = "clubId", Type = "string", Nilable = false },
{ Name = "streamId", Type = "string", Nilable = false },
{ Name = "clubId", Type = "string", Nilable = true },
{ Name = "streamId", Type = "string", Nilable = true },
{ Name = "pendingJoin", Type = "bool", Nilable = false },
},
},
......
......@@ -157,7 +157,7 @@ function AuctionFrame_OnLoad (self)
end
function AuctionFrame_Show()
if (IsKioskModeEnabled()) then
if (Kiosk.IsEnabled()) then
UIErrorsFrame:AddMessage(ERR_CLIENT_LOCKED_OUT, 1.0, 0.1, 0.1, 1.0);
CloseAuctionHouse();
HideUIPanel(AuctionFrame);
......
......@@ -291,7 +291,7 @@ function ChannelButtonTextMixin:ChannelSupportsText()
end
function ChannelButtonTextMixin:ChannelSupportsVoice()
return self:GetVoiceChannel() ~= nil;
return C_ChatInfo.IsPartyChannelType(self:GetChannelType());
end
-- Voice channel button
......
......@@ -54,8 +54,6 @@ do
local notificationSubSystem = ChatAlertFrame:AddAutoAnchoredSubSystem(VoiceChatChannelActivatedNotification);
ChatAlertFrame:SetSubSystemAnchorPriority(notificationSubSystem, 11);
self:CheckDiscoverChannels();
end
end
......@@ -232,9 +230,9 @@ function ChannelFrameMixin:TryCreateVoiceChannel(channelName)
end);
end
function ChannelFrameMixin:TryJoinVoiceChannelByType(channelType)
function ChannelFrameMixin:TryJoinVoiceChannelByType(channelType, autoActivate)
self:TryExecuteCommand(function()
C_VoiceChat.RequestJoinChannelByChannelType(channelType);
C_VoiceChat.RequestJoinChannelByChannelType(channelType, autoActivate);
end);
end
......@@ -416,8 +414,6 @@ function ChannelFrameMixin:OnVoiceChatError(platformCode, statusCode)
end
function ChannelFrameMixin:OnVoiceChatConnectionSuccess()
self:CheckDiscoverChannels();
if self.lastError then
ChatFrame_DisplayUsageError(VOICE_CHAT_SERVICE_CONNECTION_RESTORED);
self.lastError = nil;
......@@ -535,7 +531,6 @@ function ChannelFrameMixin:OnCountUpdate(id, count)
end
function ChannelFrameMixin:OnGroupFormed(partyCategory, partyGUID)
self:TryJoinVoiceChannelByType(GetChannelTypeFromPartyCategory(partyCategory));
end
function ChannelFrameMixin:OnGroupLeft(partyCategory, partyGUID)
......
......@@ -3395,6 +3395,12 @@ function Blizzard_CombatLog_QuickButtonFrame_OnLoad(self)
COMBATLOG:UnregisterEvent("COMBAT_LOG_EVENT");
return hide and hide(self)
end)
-- Disable Combat Log Hyperlinks
COMBATLOG:SetScript("OnHyperlinkClick", function(self)
return;
end)
if ( COMBATLOG:IsShown() ) then
COMBATLOG:RegisterEvent("COMBAT_LOG_EVENT");
end
......@@ -3462,7 +3468,7 @@ end
local oldSetItemRef = SetItemRef;
function SetItemRef(link, text, button, chatFrame)
--[[if ( strsub(link, 1, 4) == "unit") then
if ( strsub(link, 1, 4) == "unit") then
local _, guid, name = strsplit(":", link);
if ( IsModifiedClick("CHATLINK") ) then
......@@ -3517,7 +3523,7 @@ function SetItemRef(link, text, button, chatFrame)
ChatEdit_InsertLink (link);
return;
end
end]]
end
oldSetItemRef(link, text, button, chatFrame);
end
......
......@@ -52,7 +52,7 @@ function CommunitiesFrameMixin:OnLoad()
end
function CommunitiesFrameMixin:OnShow()
PlaySound(SOUNDKIT.IG_CHARACTER_INFO_OPEN);
PlaySound(SOUNDKIT.IG_CHARACTER_INFO_TAB);
-- Don't allow ChannelFrame and CommunitiesFrame to show at the same time, because they share one presence subscription
if ChannelFrame and ChannelFrame:IsShown() then
......@@ -567,7 +567,9 @@ function CommunitiesFrameMixin:UpdateStreamDropDown()
end
function CommunitiesFrameMixin:OnHide()
PlaySound(SOUNDKIT.IG_CHARACTER_INFO_CLOSE);
if (not FRIENDS_COMMUNITY_SWAP_IN_PROGRESS) then
PlaySound(SOUNDKIT.IG_MAINMENU_CLOSE);
end
self:CloseActiveDialogs();
C_Club.ClearClubPresenceSubscription();
......@@ -655,6 +657,13 @@ function CommunitiesFrameMaximizeMinimizeButton_OnLoad(self)
self:SetMinimizedCVar("miniCommunitiesFrame");
end
function CommunitiesFrameToggleToFriends(selectedTab)
FRIENDS_COMMUNITY_SWAP_IN_PROGRESS = true;
ToggleCommunitiesFrame();
ToggleFriendsFrame(selectedTab, true);
FRIENDS_COMMUNITY_SWAP_IN_PROGRESS = false;
end
CommunitiesControlFrameMixin = {};
function CommunitiesControlFrameMixin:OnShow()
......
......@@ -27,8 +27,7 @@
<Button name="CommunitiesFrameFriendTabTemplate" inherits="FriendsFrameTabTemplate" virtual="true">
<Scripts>
<OnClick>
ToggleCommunitiesFrame();
ToggleFriendsFrame(self:GetID(), true);
CommunitiesFrameToggleToFriends(self:GetID());
</OnClick>
</Scripts>
</Button>
......
......@@ -206,7 +206,7 @@ function CraftFrame_Update()
craftButtonSubText:SetText("");
end
if ( trainingPointCost > 0 ) then
craftButtonCost:SetText(format(PARENS_TEMPLATE --[[TRAINER_LIST_TP]], trainingPointCost));
craftButtonCost:SetText(format(TRAINER_LIST_TP, trainingPointCost));
else
craftButtonCost:SetText("");
end
......
......@@ -117,14 +117,6 @@ end
function InspectPaperDollItemSlotButton_OnClick(self, button)
local itemLink = GetInventoryItemLink(InspectFrame.unit, self:GetID());
if itemLink and IsModifiedClick("EXPANDITEM") then
local _, _, classID = UnitClass(InspectFrame.unit);
if C_AzeriteEmpoweredItem.IsAzeriteEmpoweredItemByID(itemLink) then
local azeritePowerIDs = C_PaperDollInfo.GetInspectAzeriteItemEmpoweredChoices(InspectFrame.unit, self:GetID());
OpenAzeriteEmpoweredItemUIFromLink(itemLink, classID, azeritePowerIDs);
return;
end
end
HandleModifiedItemClick(GetInventoryItemLink(InspectFrame.unit, self:GetID()));
end
......
local expirationWarningSoundKit = 15273;
local errorSecondsThreshold = 60;
KioskFrameMixin = {}
function KioskFrameMixin:OnLoad()
self:RegisterEvent("KIOSK_SESSION_EXPIRATION_WARNING");
self:RegisterEvent("KIOSK_SESSION_EXPIRATION_CHANGED");
self.whitelistedMapIDs = { 1533 };
end
function KioskFrameMixin:HasWhitelistedMaps()
return #self.whitelistedMapIDs > 0;
end
function KioskFrameMixin:GetWhitelistedMapIDs()
return self.whitelistedMapIDs;
end
function KioskFrameMixin:OnEvent(event, ...)
if event == "KIOSK_SESSION_EXPIRATION_WARNING" then
local seconds = ...;
local msg = string.format(KIOSK_SESSION_EXPIRE_WARNING, seconds / 60);
if seconds > errorSecondsThreshold then
UIErrorsFrame:AddExternalWarningMessage(msg);
end
ChatFrame_DisplaySystemMessageInCurrent(msg);
PlaySound(expirationWarningSoundKit);
elseif event == "KIOSK_SESSION_EXPIRATION_CHANGED" then
UIErrorsFrame:AddExternalWarningMessage(KIOSK_SESSION_TIMER_CHANGED);
end
end
KioskSessionFinishedDialogMixin = CreateFromMixins(BaseExpandableDialogMixin);
function KioskSessionFinishedDialogMixin:OnLoad()
self:RegisterEvent("KIOSK_SESSION_EXPIRATION_CHANGED");
self:RegisterEvent("KIOSK_SESSION_EXPIRED");
self.Dialog.Title:SetText(KIOSK_SESSION_EXPIRED_TITLE);
self.Dialog.SubTitle:SetText("Dire Maul");
--self.Dialog.Body:SetText(KIOSK_SESSION_EXPIRED_BODY);
end
function KioskSessionFinishedDialogMixin:OnEvent(event, ...)
if event == "KIOSK_SESSION_EXPIRATION_CHANGED" then
local reactivated = ...;
if reactivated then
self:Hide();
end
elseif event == "KIOSK_SESSION_EXPIRED" then
self:Show();
end
end
\ No newline at end of file
## Title: Blizzard_Kiosk
## Author: Blizzard Entertainment
## LoadOnDemand: 1
Blizzard_Kiosk.xml
\ No newline at end of file
<Ui xmlns="http://www.blizzard.com/wow/ui/" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://www.blizzard.com/wow/ui/
..\..\FrameXML\UI.xsd">
<Script file="Blizzard_Kiosk.lua"/>
<Font name="KioskDialogHeaderFont" font="Fonts\FRIZQT__.TTF" height="20"/>
<Frame name="KioskFrame" mixin="KioskFrameMixin">
<Scripts>
<OnLoad method="OnLoad"/>
<OnEvent method="OnEvent"/>
</Scripts>
</Frame>
<Frame name="KioskSessionFinishedDialog" toplevel="true" enableMouse="true" enableKeyboard="true" frameStrata="FULLSCREEN_DIALOG" parent="UIParent" mixin="KioskSessionFinishedDialogMixin" hidden="true">
<Size x="375" y="230"/>
<Anchors>
<Anchor point="TOP" relativeTo="UIParent" relativePoint="TOP" x="0" y="-4"/>
</Anchors>
<Frames>
<Frame parentKey="Dialog">
<Size x="375" y="230"/>
<Anchors>
<Anchor point="CENTER"/>
</Anchors>
<Layers>
<Layer level="BACKGROUND">
<Texture parentKey="Bg" atlas="ClassTrial-End-Frame">
<Size x="375" y="230"/>
<Anchors>
<Anchor point="CENTER"/>
</Anchors>
</Texture>
</Layer>
<Layer level="ARTWORK">
<FontString parentKey="Title" inherits="KioskDialogHeaderFont">
<Anchors>
<Anchor point="TOP" x="0" y="-84.0" />
</Anchors>
<Color color="BLACK_FONT_COLOR"/>
</FontString>
<FontString parentKey="SubTitle" inherits="SystemFont_WTF2">
<Anchors>
<Anchor point="TOP" relativeKey="$parent.Title" relativePoint="BOTTOM" x="0" y="-10" />
</Anchors>
<Color color="BLACK_FONT_COLOR"/>
</FontString>
<FontString parentKey="Body" inherits="SystemFont_Large" justifyH="CENTER" justifyV="CENTER" wordWrap="true">
<Anchors>
<Anchor point="TOP" relativeKey="$parent.SubTitle" relativePoint="BOTTOM" y="18"/>
<Anchor point="LEFT" relativePoint="LEFT" x="90.0"/>
<Anchor point="RIGHT" relativePoint="RIGHT" x="-90.0"/>
<Anchor point="BOTTOM"/>
</Anchors>
<Color color="BLACK_FONT_COLOR"/>
</FontString>
</Layer>
</Layers>
</Frame>
</Frames>
<Scripts>
<OnLoad method="OnLoad"/>
<OnEvent method="OnEvent"/>
</Scripts>
</Frame>
</Ui>
\ No newline at end of file
DeathMapDataProviderMixin = CreateFromMixins(MapCanvasDataProviderMixin);
function DeathMapDataProviderMixin:OnShow()
self:RegisterEvent("CORPSE_POSITION_UPDATE");
end
function DeathMapDataProviderMixin:OnHide()
self:UnregisterEvent("CORPSE_POSITION_UPDATE");
end
function DeathMapDataProviderMixin:OnEvent(event, ...)
if event == "CORPSE_POSITION_UPDATE" then
self:RefreshAllData();
end
end
function DeathMapDataProviderMixin:RemoveAllData()
self:GetMap():RemoveAllPinsByTemplate("CorpsePinTemplate");
self:GetMap():RemoveAllPinsByTemplate("DeathReleasePinTemplate");
......
......@@ -10,6 +10,7 @@ end
Import("IsOnGlueScreen");
Import("GetPhysicalScreenSize");
Import("GetScreenDPIScale");
Import("ConvertPixelsToUI");
if ( tbl.IsOnGlueScreen() ) then
......@@ -30,8 +31,7 @@ function SimpleCheckoutMixin:OnEvent(event, ...)
if (event == "STORE_OPEN_SIMPLE_CHECKOUT") then
local checkoutID = ...;
if (StoreFrame:IsShown()) then
self.requestedWidth = 800;
self.requestedHeight = 600;
self:CalculateDesiredSize();
self:RecalculateSize();
self:Show();
if (self:OpenCheckout(checkoutID)) then
......@@ -43,6 +43,7 @@ function SimpleCheckoutMixin:OnEvent(event, ...)
self:CancelOpenCheckout();
end
elseif (event == "UI_SCALE_CHANGED" or event == "DISPLAY_SIZE_CHANGED") then
self:CalculateDesiredSize();
self:RecalculateSize();
elseif (event == "SUBSCRIPTION_CHANGED_KICK_IMMINENT") then
if (IsOnGlueScreen()) then
......@@ -73,13 +74,51 @@ function SimpleCheckoutMixin:OnHide()
end
function SimpleCheckoutMixin:OnRequestNewSize(newWidth, newHeight)
-- newWidth and newHeight are in pixels; we need to convert to UI coordinates
self.requestedWidth = newWidth;
self.requestedHeight = newHeight;
-- newWidth and newHeight are in pixels
self.desiredWidth = newWidth;
self.desiredHeight = newHeight;
self:RecalculateSize();
end
function SimpleCheckoutMixin:OnExternalLink()
self:OpenExternalLink();
end
do
local baseWidth = 860;
local baseHeight = 645;
local NormalizeScaleMultiplier = function(multiplier)
if multiplier > 2.4 then
return 3;
elseif multiplier > 1.4 then
return 2;
else
return 1;
end
end
function SimpleCheckoutMixin:CalculateDesiredSize()
local physicalWidth, physicalHeight = GetPhysicalScreenSize();
local scaleMultiplier = NormalizeScaleMultiplier(GetScreenDPIScale());
local desiredWidth = baseWidth * scaleMultiplier;
local desiredHeight = baseHeight * scaleMultiplier;
while scaleMultiplier >= 2 and (desiredWidth > physicalWidth * 0.9 or desiredHeight > physicalHeight * 0.9) do
scaleMultiplier = scaleMultiplier - 1;
desiredWidth = baseWidth * scaleMultiplier;
desiredHeight = baseHeight * scaleMultiplier;
end
self.desiredWidth = desiredWidth;
self.desiredHeight = desiredHeight;
end
end
local function SetOffsets(top, left, bottom, right, size, topOffset, leftOffset, bottomOffset, rightOffset)
top:SetThickness(size);
top:SetStartPoint("TOPLEFT", leftOffset * size, topOffset * size);
......@@ -104,12 +143,12 @@ function SimpleCheckoutMixin:RecalculateSize()
local pixelSize = ConvertPixelsToUI(1, self:GetEffectiveScale());
-- Convert to ui coordinates, clamping to 90% of window size
local requestedWidth = Clamp(self.requestedWidth * pixelSize, 1, physicalWidth * pixelSize * 0.9);
local requestedHeight = Clamp(self.requestedHeight * pixelSize, 1, physicalHeight * pixelSize * 0.9);
local desiredWidth = Clamp(self.desiredWidth * pixelSize, 1, physicalWidth * pixelSize * 0.9);
local desiredHeight = Clamp(self.desiredHeight * pixelSize, 1, physicalHeight * pixelSize * 0.9);
-- Convert back to pixel coordinates; this will include any clamping done above
local uiWidth = requestedWidth / pixelSize;
local uiHeight = requestedHeight / pixelSize;
local uiWidth = desiredWidth / pixelSize;
local uiHeight = desiredHeight / pixelSize;
-- position frame on a pixel boundary.
local left = math.floor((physicalWidth - uiWidth) / 2) * pixelSize;
......@@ -117,7 +156,7 @@ function SimpleCheckoutMixin:RecalculateSize()
self:ClearAllPoints();
self:SetPoint("BOTTOMLEFT", UIParent, "BOTTOMLEFT", left, bottom);
self:SetSize(requestedWidth, requestedHeight);
self:SetSize(desiredWidth, desiredHeight);
self.CloseButton:SetSize(20 * pixelSize, 20 * pixelSize);
self.CloseButton:ClearAllPoints();
......@@ -126,4 +165,3 @@ function SimpleCheckoutMixin:RecalculateSize()
SetOffsets(self.TopInside, self.LeftInside, self.BottomInside, self.RightInside, pixelSize, -1, 1, 1, -1);
SetOffsets(self.TopOutside, self.LeftOutside, self.BottomOutside, self.RightOutside, pixelSize, 0, 0, 0, 0);
end
......@@ -82,6 +82,7 @@
<OnHide method="OnHide"/>
<OnShow method="OnShow"/>
<OnRequestNewSize method="OnRequestNewSize"/>
<OnExternalLink method="OnExternalLink"/>
</Scripts>
</Checkout>
</ScopedModifier>
......
......@@ -1819,7 +1819,7 @@
</OnShow>
</Scripts>
</Frame>
<Frame parentKey="Notice" enableMouse="false" hidden="true">
<Frame parentKey="Notice" frameLevel="1001" enableMouse="false" hidden="true">
<Size x="320" y="210" />
<Anchors>
<Anchor point="CENTER" x="0" y="20" />
......@@ -1871,7 +1871,6 @@
<Scripts>
<OnShow>
StoreFrame_UpdateCoverState();
self:SetFrameLevel(self:GetParent():GetFrameLevel()+4);
</OnShow>
<OnHide function="StoreFrame_UpdateCoverState" />
</Scripts>
......
......@@ -1161,20 +1161,12 @@ local vasErrorData = {
[Enum.VasError.TooMuchMoneyForLevel] = {
msg = function(character)
local str = "";
if (character.level >= 110) then
str = GetSecureMoneyString(1000000 * COPPER_PER_SILVER * SILVER_PER_GOLD, true, true);
elseif (character.level >= 100) then
str = GetSecureMoneyString(250000 * COPPER_PER_SILVER * SILVER_PER_GOLD, true, true);
elseif (character.level > 80) then
str = GetSecureMoneyString(50000 * COPPER_PER_SILVER * SILVER_PER_GOLD, true, true);
elseif (character.level > 70) then
str = GetSecureMoneyString(20000 * COPPER_PER_SILVER * SILVER_PER_GOLD, true, true);
elseif (character.level > 50) then
str = GetSecureMoneyString(5000 * COPPER_PER_SILVER * SILVER_PER_GOLD, true, true);
if (character.level > 50) then
str = GetSecureMoneyString(2000 * COPPER_PER_SILVER * SILVER_PER_GOLD, true, true);