Commit 4f1ee239 authored by TOM_RUS's avatar TOM_RUS

WOW-34137patch9.0.1_Beta

parent 3fab6356
......@@ -49,6 +49,7 @@ ConfigurationWarningsDocumentation.lua
ConsoleDocumentation.lua
ContainerDocumentation.lua
ContributionCollectorDocumentation.lua
CovenantCallingsDocumentation.lua
CovenantPreviewDocumentation.lua
CovenantSanctumDocumentation.lua
CreatureInfoDocumentation.lua
......@@ -172,6 +173,7 @@ ActionDocumentation.lua
AppearanceSourceDocumentation.lua
AuctionHouseEnumsDocumentation.lua
BaseDocumentation.lua
BountySharedDocumentation.lua
CalendarConstantsDocumentation.lua
CharacterCustomizationSharedDocumentation.lua
ChatDocumentation.lua
......
local CovenantCallings =
{
Name = "CovenantCallings",
Type = "System",
Namespace = "C_CovenantCallings",
Functions =
{
{
Name = "RequestCallings",
Type = "Function",
},
},
Events =
{
{
Name = "CovenantCallingsUpdated",
Type = "Event",
LiteralName = "COVENANT_CALLINGS_UPDATED",
Payload =
{
{ Name = "callings", Type = "table", InnerType = "BountyInfo", Nilable = false },
},
},
},
Tables =
{
},
};
APIDocumentation:AddDocumentationTable(CovenantCallings);
\ No newline at end of file
......@@ -68,20 +68,21 @@ local GarrisonConstants =
{
Name = "GarrAutoMissionEventType",
Type = "Enumeration",
NumValues = 9,
NumValues = 10,
MinValue = 0,
MaxValue = 8,
MaxValue = 9,
Fields =
{
{ Name = "MeleeDamage", Type = "GarrAutoMissionEventType", EnumValue = 0 },
{ Name = "RangeDamage", Type = "GarrAutoMissionEventType", EnumValue = 1 },
{ Name = "SpellDamage", Type = "GarrAutoMissionEventType", EnumValue = 2 },
{ Name = "Heal", Type = "GarrAutoMissionEventType", EnumValue = 3 },
{ Name = "PeriodicDamage", Type = "GarrAutoMissionEventType", EnumValue = 4 },
{ Name = "PeriodicHeal", Type = "GarrAutoMissionEventType", EnumValue = 5 },
{ Name = "ApplyAura", Type = "GarrAutoMissionEventType", EnumValue = 6 },
{ Name = "RemoveAura", Type = "GarrAutoMissionEventType", EnumValue = 7 },
{ Name = "Died", Type = "GarrAutoMissionEventType", EnumValue = 8 },
{ Name = "SpellMeleeDamage", Type = "GarrAutoMissionEventType", EnumValue = 2 },
{ Name = "SpellRangeDamage", Type = "GarrAutoMissionEventType", EnumValue = 3 },
{ Name = "Heal", Type = "GarrAutoMissionEventType", EnumValue = 4 },
{ Name = "PeriodicDamage", Type = "GarrAutoMissionEventType", EnumValue = 5 },
{ Name = "PeriodicHeal", Type = "GarrAutoMissionEventType", EnumValue = 6 },
{ Name = "ApplyAura", Type = "GarrAutoMissionEventType", EnumValue = 7 },
{ Name = "RemoveAura", Type = "GarrAutoMissionEventType", EnumValue = 8 },
{ Name = "Died", Type = "GarrAutoMissionEventType", EnumValue = 9 },
},
},
{
......@@ -257,6 +258,14 @@ local GarrisonConstants =
{ Name = "Type_9_0", Type = "GarrisonType", EnumValue = 111 },
},
},
{
Name = "GarrisonConstsExposed",
Type = "Constants",
Values =
{
{ Name = "GARRISON_AUTO_COMBATANT_FULL_HEAL_COST", Type = "number", Value = 100 },
},
},
},
};
......
......@@ -22,6 +22,20 @@ local GarrisonInfo =
{ Name = "followerAdded", Type = "bool", Nilable = false },
},
},
{
Name = "GetAutoCombatSpellInfo",
Type = "Function",
Arguments =
{
{ Name = "autoCombatSpellID", Type = "number", Nilable = false },
},
Returns =
{
{ Name = "spellInfo", Type = "AutoCombatSpellInfo", Nilable = false },
},
},
{
Name = "GetCurrentGarrTalentTreeFriendshipFactionID",
Type = "Function",
......@@ -54,6 +68,20 @@ local GarrisonInfo =
{ Name = "spellInfo", Type = "table", InnerType = "AutoCombatSpellInfo", Nilable = false },
},
},
{
Name = "GetFollowerAutoCombatStats",
Type = "Function",
Arguments =
{
{ Name = "garrFollowerID", Type = "string", Nilable = false },
},
Returns =
{
{ Name = "autoCombatInfo", Type = "FollowerAutoCombatStatsInfo", Nilable = true },
},
},
{
Name = "GetFollowerMissionCompleteInfo",
Type = "Function",
......@@ -251,6 +279,15 @@ local GarrisonInfo =
{ Name = "failureString", Type = "string", Nilable = true },
},
},
{
Name = "RushHealFollower",
Type = "Function",
Arguments =
{
{ Name = "garrFollowerID", Type = "string", Nilable = false },
},
},
},
Events =
......@@ -735,6 +772,19 @@ local GarrisonInfo =
Tables =
{
{
Name = "AutoCombatantRole",
Type = "Enumeration",
NumValues = 3,
MinValue = 0,
MaxValue = 2,
Fields =
{
{ Name = "Damager", Type = "AutoCombatantRole", EnumValue = 0 },
{ Name = "Healer", Type = "AutoCombatantRole", EnumValue = 1 },
{ Name = "Tank", Type = "AutoCombatantRole", EnumValue = 2 },
},
},
{
Name = "AutoCombatResult",
Type = "Structure",
......@@ -790,6 +840,17 @@ local GarrisonInfo =
{ Name = "events", Type = "table", InnerType = "AutoMissionEvent", Nilable = false },
},
},
{
Name = "FollowerAutoCombatStatsInfo",
Type = "Structure",
Fields =
{
{ Name = "currentHealth", Type = "number", Nilable = false },
{ Name = "maxHealth", Type = "number", Nilable = false },
{ Name = "attack", Type = "number", Nilable = false },
{ Name = "healingTimestamp", Type = "number", Nilable = false },
},
},
{
Name = "FollowerDisplayID",
Type = "Structure",
......@@ -827,6 +888,9 @@ local GarrisonInfo =
{ Name = "textureKit", Type = "string", Nilable = false },
{ Name = "isTroop", Type = "bool", Nilable = false },
{ Name = "boardIndex", Type = "number", Nilable = false },
{ Name = "health", Type = "number", Nilable = false },
{ Name = "maxHealth", Type = "number", Nilable = false },
{ Name = "role", Type = "AutoCombatantRole", Nilable = false },
},
},
{
......@@ -871,6 +935,9 @@ local GarrisonInfo =
{ Name = "height", Type = "number", Nilable = false },
{ Name = "mechanics", Type = "table", InnerType = "GarrisonMechanicInfo", Nilable = false },
{ Name = "autoCombatSpells", Type = "table", InnerType = "AutoCombatSpellInfo", Nilable = false },
{ Name = "role", Type = "AutoCombatantRole", Nilable = false },
{ Name = "health", Type = "number", Nilable = false },
{ Name = "maxHealth", Type = "number", Nilable = false },
{ Name = "boardIndex", Type = "number", Nilable = false },
},
},
......
......@@ -6,26 +6,6 @@ local PlayerInfo =
Functions =
{
{
Name = "IsPlayerEligibleForNPE",
Type = "Function",
Returns =
{
{ Name = "isEligible", Type = "bool", Nilable = false },
{ Name = "failureReason", Type = "string", Nilable = false },
},
},
{
Name = "IsPlayerEligibleForNPEv2",
Type = "Function",
Returns =
{
{ Name = "isEligible", Type = "bool", Nilable = false },
{ Name = "failureReason", Type = "string", Nilable = false },
},
},
{
Name = "IsPlayerNPERestricted",
Type = "Function",
......
......@@ -101,7 +101,7 @@ local QuestLog =
Returns =
{
{ Name = "bounties", Type = "table", InnerType = "MapBountyInfo", Nilable = true },
{ Name = "bounties", Type = "table", InnerType = "BountyInfo", Nilable = true },
},
},
{
......@@ -1154,18 +1154,6 @@ local QuestLog =
{ Name = "Epic", Type = "WorldQuestQuality", EnumValue = 2 },
},
},
{
Name = "MapBountyInfo",
Type = "Structure",
Fields =
{
{ Name = "questID", Type = "number", Nilable = false },
{ Name = "factionID", Type = "number", Nilable = false },
{ Name = "icon", Type = "number", Nilable = false },
{ Name = "numObjectives", Type = "number", Nilable = false },
{ Name = "turninRequirementText", Type = "string", Nilable = true },
},
},
{
Name = "QuestInfo",
Type = "Structure",
......
......@@ -190,6 +190,71 @@
</Layer>
</Layers>
</CheckButton>
<Frame name="CharacterCreateStartingZoneTemplate" mixin="CharacterCreateStartingZoneMixin" virtual="true">
<Size x ="746" y="564" />
<Frames>
<Button parentKey="ZoneArt" mixin="CharacterCreateStartingZoneArtMixin">
<Size x ="762" y="506" />
<Anchors>
<Anchor point="TOP"/>
</Anchors>
<Layers>
<Layer level="BACKGROUND">
<Texture parentKey="BGTex" atlas="charactercreate-startingzone-exilesreach" setAllPoints="true">
<Size x ="730" y="474" />
<Anchors>
<Anchor point="CENTER"/>
</Anchors>
</Texture>
</Layer>
</Layers>
<Frames>
<Frame parentKey="Border" useParentLevel="true" inherits="NineSlicePanelTemplate">
<KeyValues>
<KeyValue key="layoutType" value="CharacterCreateThickBorder" type="string"/>
</KeyValues>
</Frame>
</Frames>
<Scripts>
<OnEnter method="OnEnter"/>
<OnLeave method="OnLeave"/>
<OnClick method="OnClick"/>
</Scripts>
</Button>
<Frame parentKey="ZoneNameButton" inherits="ResizeLayoutFrame" mixin="ResizeCheckButtonMixin, CharacterCreateStartingZoneButtonMixin">
<Anchors>
<Anchor point="BOTTOM"/>
</Anchors>
<Frames>
<CheckButton parentKey="Button">
<Size x="58" y="58"/>
<Anchors>
<Anchor point="TOPLEFT"/>
</Anchors>
<NormalTexture parentKey="NormalTexture" atlas="common-radiobutton-circle"/>
<HighlightTexture parentKey="HighlightTexture" atlas="common-radiobutton-circle" alphaMode="ADD" alpha="0.2"/>
<CheckedTexture parentKey="CheckedTexture" atlas="common-radiobutton-dot"/>
<Scripts>
<OnClick>
self:GetParent():OnCheckButtonClick();
</OnClick>
</Scripts>
</CheckButton>
</Frames>
<Layers>
<Layer level="ARTWORK">
<FontString parentKey="Label" inherits="GameFontHighlightLarge2">
<Anchors>
<Anchor point="LEFT" relativeKey="$parent.Button" relativePoint="RIGHT" x="10" y="0"/>
</Anchors>
</FontString>
</Layer>
</Layers>
</Frame>
</Frames>
</Frame>
<Frame name="CharacterCreateVerticalLayoutFrame" inherits="VerticalLayoutFrame" virtual="true">
<KeyValues>
......@@ -235,6 +300,18 @@
</AnimationGroup>
</Animations>
</Texture>
<Texture parentKey="LeftBlackBar">
<Anchors>
<Anchor point="BOTTOMRIGHT" relativePoint="BOTTOMLEFT"/>
</Anchors>
<Color r="0.0" g="0.0" b="0.0"/>
</Texture>
<Texture parentKey="RightBlackBar">
<Anchors>
<Anchor point="BOTTOMLEFT" relativePoint="BOTTOMRIGHT"/>
</Anchors>
<Color r="0.0" g="0.0" b="0.0"/>
</Texture>
</Layer>
</Layers>
<Frames>
......@@ -393,30 +470,33 @@
<Anchor point="TOP" relativeKey="$parent.Label" relativePoint="BOTTOM" y="-5"/>
</Anchors>
<Frames>
<Button parentKey="ClearButton">
<Button parentKey="NameAvailabilityState" inherits="CharCustomizeFrameWithTooltipTemplate" mixin="CharacterCreateNameAvailabilityStateMixin">
<Size x="18" y="18"/>
<Anchors>
<Anchor point="RIGHT"/>
</Anchors>
<Scripts>
<OnClick>
self:GetParent():SetText("");
</OnClick>
</Scripts>
<KeyValues>
<KeyValue key="tooltipMinWidth" value="nil" type="number"/>
<KeyValue key="tooltipXOffset" value="20" type="number"/>
<KeyValue key="tooltipYOffset" value="-10" type="number"/>
</KeyValues>
<NormalTexture atlas="common-icon-redx"/>
<HighlightTexture atlas="common-icon-redx" alphaMode="ADD" alpha="0.2"/>
<Scripts>
<OnEvent method="OnEvent"/>
</Scripts>
</Button>
</Frames>
<Scripts>
<OnShow method="UpdateState"/>
<OnShow method="OnTextChanged"/>
<OnHide method="OnHide"/>
<OnEvent method="OnEvent"/>
<OnEscapePressed method="OnEscapePressed"/>
<OnEnterPressed method="OnEnterPressed"/>
<OnTextChanged method="UpdateState"/>
<OnTextChanged method="OnTextChanged"/>
</Scripts>
</EditBox>
<Button parentKey="RandomNameButton" inherits="CharCustomizeSmallButtonTemplate" mixin="CharacterCreateRandomNameButtonMixin">
<Button parentKey="RandomNameButton" inherits="CharCustomizeSmallButtonTemplate" mixin="CharacterCreateRandomNameButtonMixin" hidden="true">
<Anchors>
<Anchor point="LEFT" relativeKey="$parent.EditBox" relativePoint="RIGHT" x="20"/>
</Anchors>
......@@ -445,6 +525,50 @@
<OnHide method="OnHide" />
</Scripts>
</Frame>
<Frame parentKey="ZoneChoiceFrame" mixin="CharacterCreateZoneChoiceMixin" setAllPoints="true" hidden="true" scale="0.7111">
<Layers>
<Layer level="BACKGROUND">
<Texture parentKey="BlackOverlay" setAllPoints="true">
<Color r="0" g="0" b="0" a="0.5"/>
</Texture>
</Layer>
<Layer level="ARTWORK">
<FontString parentKey="Title" inherits="GameFont72NormalShadow" text="CHOOSE_STARTING_ZONE">
<Anchors>
<Anchor point="TOP" y="-100"/>
</Anchors>
</FontString>
</Layer>
</Layers>
<Frames>
<Frame parentKey="NPEZone" inherits="CharacterCreateStartingZoneTemplate">
<Anchors>
<Anchor point="RIGHT" relativePoint="CENTER" x="-30" y="-10"/>
</Anchors>
<KeyValues>
<KeyValue key="isNPE" value="true" type="boolean"/>
</KeyValues>
</Frame>
<Frame parentKey="NormalStartingZone" inherits="CharacterCreateStartingZoneTemplate">
<Anchors>
<Anchor point="LEFT" relativePoint="CENTER" x="30" y="-10"/>
</Anchors>
<KeyValues>
<KeyValue key="isNPE" value="false" type="boolean"/>
</KeyValues>
</Frame>
</Frames>
<Animations>
<AnimationGroup parentKey="FadeIn" setToFinalAlpha="true">
<Alpha childKey="BlackOverlay" duration="0.25" fromAlpha="0" toAlpha="1"/>
</AnimationGroup>
</Animations>
<Scripts>
<OnLoad method="OnLoad"/>
<OnShow method="OnShow"/>
<OnHide method="OnHide"/>
</Scripts>
</Frame>
</Frames>
<Scripts>
<OnLoad method="OnLoad" />
......@@ -453,6 +577,7 @@
<OnHide method="OnHide" />
<OnMouseDown method="OnMouseDown" />
<OnMouseUp method="OnMouseUp" />
<OnKeyDown method="OnKeyDown"/>
</Scripts>
</ModelFFX>
</Ui>
......@@ -18,7 +18,7 @@ end
CovenantMissionPageEnemyMixin = { }
function CovenantMissionPageEnemyMixin:OnEnter()
if (self.autoCombatSpells) then
if (#self.autoCombatSpells > 0) then
GameTooltip:SetOwner(self, "ANCHOR_NONE");
GameTooltip:SetPoint("TOPLEFT", self, "BOTTOMRIGHT", 0, 0);
GameTooltip_SetTitle(GameTooltip, self.Name:GetText());
......@@ -52,4 +52,188 @@ end
function CovenantMissionAutoSpellAbilityTemplate_OnLeave()
GameTooltip_Hide();
end
---------------------------------------------------------------------------------
-- Covenant Follower Tab Heal Button Handlers
---------------------------------------------------------------------------------
function CovenantMissionHealFollowerButton_OnClick(buttonFrame)
local mainFrame = buttonFrame:GetParent();
C_Garrison.RushHealFollower(mainFrame.followerID);
end
function CovenantMissionHealFollowerButton_OnEnter(buttonFrame)
GameTooltip:SetOwner(buttonFrame, "ANCHOR_NONE");
GameTooltip:SetPoint("TOPLEFT", buttonFrame, "BOTTOMRIGHT", 0, 0);
GameTooltip_AddNormalLine(GameTooltip, buttonFrame.tooltip, wrap);
GameTooltip:Show();
end
---------------------------------------------------------------------------------
-- Covenant Follower Tab Mixin
---------------------------------------------------------------------------------
CovenantFollowerTabMixin = {};
function CovenantFollowerTabMixin:OnLoad()
self.abilitiesPool = CreateFramePool("FRAME", self.AbilitiesFrame, "CovenantMissionAutoSpellAbilityTemplate");
self.statsPool = CreateFramePool("FRAME", self.StatsFrame, "CovenantStatLineTemplate");
end
function CovenantFollowerTabMixin:OnUpdate()
local SECONDS_BETWEEN_UPDATE = 5;
local currentTime = GetTime();
if (self.lastUpdate and (currentTime - self.lastUpdate) > SECONDS_BETWEEN_UPDATE) then
self.followerInfo.autoCombatantStats = C_Garrison.GetFollowerAutoCombatStats(self.followerID);
self:UpdateCombatantStats(self.followerInfo);
self:UpdateHealCost();
self.lastUpdate = GetTime();
end
end
function CovenantFollowerTabMixin:UpdateValidSpellHighlightOnAbilityFrame()
end
function CovenantFollowerTabMixin:UpdateHealCost()
local followerStats = self.followerInfo.autoCombatantStats;
self.HealFollowerButton.tooltip = nil;
if not followerStats then
self.HealFollowerButton:SetEnabled(false);
return;
end
local buttonCost = ((followerStats.maxHealth - followerStats.currentHealth) / followerStats.maxHealth) * Constants.GarrisonConstsExposed.GARRISON_AUTO_COMBATANT_FULL_HEAL_COST;
self.CostFrame.Cost:SetText(math.ceil(buttonCost));
if (buttonCost == 0) then
self.HealFollowerButton:SetEnabled(false);
self.HealFollowerButton.tooltip = COVENANT_MISSIONS_HEAL_ERROR_FULL_HEALTH;
else
local primaryCurrency = C_Garrison.GetCurrencyTypes(GarrisonFollowerOptions[self.followerInfo.followerTypeID].garrisonType);
local currencyInfo = C_CurrencyInfo.GetCurrencyInfo(primaryCurrency);
if (buttonCost > currencyInfo.quantity) then
self.HealFollowerButton:SetEnabled(false);
self.HealFollowerButton.tooltip = COVENANT_MISSIONS_HEAL_ERROR_RESOURCES;
else
self.HealFollowerButton:SetEnabled(true);
end
end
end
function CovenantFollowerTabMixin:SetupNewStatText(anchorFrame, leftText, rightText, additionalOffset)
additionalOffset = additionalOffset or 0;
local newFrame = self.statsPool:Acquire();
newFrame.LeftString:SetText(leftText);
newFrame.RightString:SetText(rightText);
newFrame.layoutIndex = anchorFrame.layoutIndex + 1;
newFrame:SetPoint("TOPLEFT", anchorFrame, "BOTTOMLEFT", 0, -4 + additionalOffset);
newFrame:Show();
return newFrame;
end
function CovenantFollowerTabMixin:UpdateCombatantStats(followerInfo)
self.statsPool:ReleaseAll();
local anchorFrame = self.StatsFrame.StatsLabel;
local autoCombatantStats = followerInfo.autoCombatantStats;
if autoCombatantStats then
--Level
local newAnchorFrame = self:SetupNewStatText(anchorFrame, COVENANT_MISSIONS_LEVEL, followerInfo.level);
--Health
local healthColor = (autoCombatantStats.currentHealth == autoCombatantStats.maxHealth) and WHITE_FONT_COLOR or RED_FONT_COLOR;
newAnchorFrame = self:SetupNewStatText(newAnchorFrame, COVENANT_MISSIONS_HEALTH, healthColor:WrapTextInColorCode(autoCombatantStats.currentHealth) .. "/" .. autoCombatantStats.maxHealth, -4);
--Attack
newAnchorFrame = self:SetupNewStatText(newAnchorFrame, COVENANT_MISSIONS_ATTACK, autoCombatantStats.attack);
--Experience, hide if max level.
if followerInfo.levelXP ~= 0 then
newAnchorFrame = self:SetupNewStatText(newAnchorFrame, COVENANT_MISSIONS_XP_TO_LEVEL, followerInfo.levelXP);
end
self.StatsFrame.StatsLabel:Show();
self.StatsFrame:Layout();
else
self.StatsFrame.StatsLabel:Hide();
end
end
function CovenantFollowerTabMixin:UpdateAbilities(autoSpellInfo)
local ABILITY_ICON_SIZE = 60; --The base frame we're reusing here as a pool is too small.
local anchorFrame;
self.AbilitiesLabel:Hide();
self.abilitiesPool:ReleaseAll();
for i, autoSpell in ipairs(autoSpellInfo) do
local abilityFrame = self.abilitiesPool:Acquire();