Commit f9b5bc6e authored by TOM_RUS's avatar TOM_RUS

WOW-34902patch9.0.1_Beta

parent afbc2349
......@@ -34,6 +34,20 @@ local AchievementInfo =
{ Name = "supercedingAchievements", Type = "table", InnerType = "number", Nilable = false },
},
},
{
Name = "IsValidAchievement",
Type = "Function",
Arguments =
{
{ Name = "achievementId", Type = "number", Nilable = false },
},
Returns =
{
{ Name = "isValidAchievement", Type = "bool", Nilable = false },
},
},
{
Name = "SetPortraitTexture",
Type = "Function",
......
......@@ -166,6 +166,20 @@ local GarrisonInfo =
{ Name = "missionDeploymentInfo", Type = "MissionDeploymentInfo", Nilable = false },
},
},
{
Name = "GetMissionEncounterIconInfo",
Type = "Function",
Arguments =
{
{ Name = "missionID", Type = "number", Nilable = false },
},
Returns =
{
{ Name = "missionEncounterIconInfo", Type = "MissionEncounterIconInfo", Nilable = false },
},
},
{
Name = "GetTalentInfo",
Type = "Function",
......@@ -998,6 +1012,16 @@ local GarrisonInfo =
{ Name = "enemies", Type = "table", InnerType = "GarrisonEnemyEncounterInfo", Nilable = false },
},
},
{
Name = "MissionEncounterIconInfo",
Type = "Structure",
Fields =
{
{ Name = "portraitFileDataID", Type = "number", Nilable = false },
{ Name = "isElite", Type = "bool", Nilable = false },
{ Name = "isRare", Type = "bool", Nilable = false },
},
},
},
};
......
......@@ -183,6 +183,10 @@ local GossipInfo =
Name = "GossipShow",
Type = "Event",
LiteralName = "GOSSIP_SHOW",
Payload =
{
{ Name = "uiTextureKit", Type = "string", Nilable = true },
},
},
},
......
......@@ -62,6 +62,20 @@ local Item =
{ Name = "itemExists", Type = "bool", Nilable = false },
},
},
{
Name = "DoesItemMatchBonusTreeReplacement",
Type = "Function",
Arguments =
{
{ Name = "itemLoc", Type = "table", Mixin = "ItemLocationMixin", Nilable = false },
},
Returns =
{
{ Name = "matchesBonusTree", Type = "bool", Nilable = false },
},
},
{
Name = "GetCurrentItemLevel",
Type = "Function",
......@@ -258,20 +272,6 @@ local Item =
{ Name = "isBound", Type = "bool", Nilable = false },
},
},
{
Name = "IsItemCorruptable",
Type = "Function",
Arguments =
{
{ Name = "itemLoc", Type = "table", Mixin = "ItemLocationMixin", Nilable = false },
},
Returns =
{
{ Name = "isCorruptable", Type = "bool", Nilable = false },
},
},
{
Name = "IsItemCorrupted",
Type = "Function",
......
......@@ -35,7 +35,7 @@ local LegendaryCrafting =
},
},
{
Name = "GetItemLevelTiers",
Name = "GetRuneforgeLegendaryCost",
Type = "Function",
Arguments =
......@@ -45,7 +45,7 @@ local LegendaryCrafting =
Returns =
{
{ Name = "tiers", Type = "table", InnerType = "ItemLevelTier", Nilable = false },
{ Name = "cost", Type = "table", InnerType = "CurrencyCost", Nilable = false },
},
},
{
......@@ -65,7 +65,6 @@ local LegendaryCrafting =
{
{ Name = "baseItem", Type = "table", Mixin = "ItemLocationMixin", Nilable = false },
{ Name = "powerID", Type = "number", Nilable = true },
{ Name = "itemLevelTierIndex", Type = "number", Nilable = true },
{ Name = "addedModifierIndex", Type = "number", Nilable = false },
{ Name = "modifiers", Type = "table", InnerType = "number", Nilable = false },
},
......@@ -140,7 +139,6 @@ local LegendaryCrafting =
{
{ Name = "baseItem", Type = "table", Mixin = "ItemLocationMixin", Nilable = false },
{ Name = "runeforgePowerID", Type = "number", Nilable = false },
{ Name = "itemLevelTierIndex", Type = "number", Nilable = false },
{ Name = "modifiers", Type = "table", InnerType = "number", Nilable = false },
},
......
......@@ -26,15 +26,6 @@ local LegendaryCraftingTypes =
{ Name = "Invalid", Type = "RuneforgePowerState", EnumValue = 2 },
},
},
{
Name = "CurrencyCost",
Type = "Structure",
Fields =
{
{ Name = "currencyID", Type = "number", Nilable = false },
{ Name = "amount", Type = "number", Nilable = false },
},
},
},
};
......
......@@ -214,9 +214,9 @@ local PetJournalInfo =
{
Name = "PetJournalError",
Type = "Enumeration",
NumValues = 6,
NumValues = 7,
MinValue = 0,
MaxValue = 5,
MaxValue = 6,
Fields =
{
{ Name = "None", Type = "PetJournalError", EnumValue = 0 },
......@@ -225,6 +225,7 @@ local PetJournalInfo =
{ Name = "InvalidFaction", Type = "PetJournalError", EnumValue = 3 },
{ Name = "NoFavoritesToSummon", Type = "PetJournalError", EnumValue = 4 },
{ Name = "NoValidRandomSummon", Type = "PetJournalError", EnumValue = 5 },
{ Name = "InvalidCovenant", Type = "PetJournalError", EnumValue = 6 },
},
},
},
......
......@@ -33,31 +33,33 @@ local Soulbinds =
},
},
{
Name = "GetConduitSpellID",
Name = "GetConduitHyperlink",
Type = "Function",
Arguments =
{
{ Name = "conduitID", Type = "number", Nilable = false },
{ Name = "rank", Type = "number", Nilable = false },
},
Returns =
{
{ Name = "spellID", Type = "number", Nilable = false },
{ Name = "link", Type = "string", Nilable = false },
},
},
{
Name = "GetItemConduitID",
Name = "GetConduitSpellID",
Type = "Function",
Arguments =
{
{ Name = "itemLocation", Type = "table", Mixin = "ItemLocationMixin", Nilable = false },
{ Name = "conduitID", Type = "number", Nilable = false },
{ Name = "conduitRank", Type = "number", Nilable = false },
},
Returns =
{
{ Name = "conduitID", Type = "number", Nilable = false },
{ Name = "spellID", Type = "number", Nilable = false },
},
},
{
......@@ -200,10 +202,6 @@ local Soulbinds =
{ Name = "result", Type = "bool", Nilable = false },
},
},
{
Name = "UninstallConduits",
Type = "Function",
},
},
Events =
......@@ -224,7 +222,7 @@ local Soulbinds =
Payload =
{
{ Name = "nodeID", Type = "number", Nilable = false },
{ Name = "conduitID", Type = "number", Nilable = false },
{ Name = "data", Type = "SoulbindConduitData", Nilable = false },
},
},
{
......@@ -277,6 +275,15 @@ local Soulbinds =
Tables =
{
{
Name = "SoulbindConduitData",
Type = "Structure",
Fields =
{
{ Name = "conduitID", Type = "number", Nilable = false },
{ Name = "conduitRank", Type = "number", Nilable = false },
},
},
{
Name = "SoulbindData",
Type = "Structure",
......
......@@ -2539,11 +2539,12 @@ function AchievementFrameSummaryCategory_OnHide (self)
end
function AchievementFrame_SelectAchievement(id, forceSelect, isComparison)
if ( not AchievementFrame:IsShown() and not forceSelect ) then
if ( (not AchievementFrame:IsShown() and not forceSelect) or (not C_AchievementInfo.IsValidAchievement(id)) ) then
return;
end
local _, _, _, achCompleted, _, _, _, _, flags = GetAchievementInfo(id);
if ( achCompleted and (ACHIEVEMENTUI_SELECTEDFILTER == AchievementFrameFilters[ACHIEVEMENT_FILTER_INCOMPLETE].func) ) then
AchievementFrame_SetFilter(ACHIEVEMENT_FILTER_ALL);
elseif ( (not achCompleted) and (ACHIEVEMENTUI_SELECTEDFILTER == AchievementFrameFilters[ACHIEVEMENT_FILTER_COMPLETE].func) ) then
......
......@@ -29,24 +29,6 @@ function AlliedRacesFrameMixin:SetupAbilityPool(index, racialAbility)
return abilityButton;
end
function AlliedRacesFrameMixin:UpdateObjectivesFrame(achievementID)
local objectivesFrame = self.RaceInfoFrame.ScrollFrame.Child.ObjectivesFrame;
objectivesFrame.contentHeight = 0;
objectivesFrame.lastBullet = nil;
local id, achievementName, points, achievementCompleted, month, day, year, description, flags, iconpath = GetAchievementInfo(achievementID);
local numCriteria = GetAchievementNumCriteria(achievementID);
self.bulletPool:ReleaseAll();
for criteriaIndex = 1, numCriteria do
local bulletFrame = self.bulletPool:Acquire();
bulletFrame:SetUp(achievementID, criteriaIndex, objectivesFrame);
end
objectivesFrame:SetHeight(objectivesFrame.contentHeight + 43); -- total of header height plus top and bottom padding
end
function AlliedRacesFrameMixin:RacialAbilitiesData(raceID)
local racialAbilities = C_AlliedRaces.GetAllRacialAbilitiesFromID(raceID);
......@@ -88,7 +70,7 @@ function AlliedRacesFrameMixin:LoadRaceData(raceID)
self:SetPortraitAtlasRaw(raceInfo.crestAtlas);
self:UpdatedBannerColor(raceInfo.bannerColor);
self:RacialAbilitiesData(raceID);
self:UpdateObjectivesFrame(raceInfo.achievementID);
self.RaceInfoFrame.ScrollFrame.Child.ObjectivesFrame:SetAchievement(raceInfo.achievementID);
end
function AlliedRacesFrameMixin:SetRaceNameForGender(gender)
......@@ -124,7 +106,6 @@ end
function AlliedRacesFrameMixin:OnLoad()
self.abilityPool = CreateFramePool("BUTTON", self.RaceInfoFrame.ScrollFrame.Child, "AlliedRaceAbilityTemplate");
self.bulletPool = CreateFramePool("FRAME", self.RaceInfoFrame.ScrollFrame.Child, "AlliedRaceOverviewBulletsTemplate");
self:RegisterEvent("ALLIED_RACE_CLOSE");
self.TopTileStreaks:Hide();
self.RaceInfoFrame.AlliedRacesRaceName:SetFontObjectsToTry("Fancy32Font", "Fancy30Font", "Fancy27Font", "Fancy24Font", "Fancy24Font", "Fancy18Font", "Fancy16Font");
......@@ -138,92 +119,4 @@ end
function AlliedRacesFrameMixin:OnHide()
C_AlliedRaces.ClearAlliedRaceDetailsGiver();
end
AlliedRacesBulletFrameMixin = { };
function AlliedRacesBulletFrameMixin:SetUp(achievementID, criteriaIndex, objectivesFrame)
local BULLET_SPACING = 14;
local TEXT_ANCHOR_POINT_X = 27; -- from XML
local criteriaString, criteriaType, completed, quantity, reqQuantity, charName, flags, assetID, quantityString = GetAchievementCriteriaInfo(achievementID, criteriaIndex);
local _, _, _, achievementCompleted = GetAchievementInfo(achievementID);
completed = completed or achievementCompleted;
if (criteriaString and criteriaString ~= "") then
self.achievementID = achievementID;
self.criteriaIndex = criteriaIndex;
self.Text:SetText(criteriaString);
if (not objectivesFrame.lastBullet) then
self:SetPoint("TOPLEFT", objectivesFrame.HeaderBackground, "BOTTOMLEFT", 13, -6);
else
self:SetPoint("TOPLEFT", objectivesFrame.lastBullet, "BOTTOMLEFT", 0, -BULLET_SPACING);
end
objectivesFrame.lastBullet = self;
local textHeight = self.Text:GetHeight();
self:SetSize(self.Text:GetStringWidth() + TEXT_ANCHOR_POINT_X, textHeight);
objectivesFrame.contentHeight = objectivesFrame.contentHeight + textHeight + BULLET_SPACING;
if completed then
self.Text:SetTextColor(GREEN_FONT_COLOR:GetRGB());
else
self.Text:SetTextColor(HIGHLIGHT_FONT_COLOR:GetRGB());
end
self.Dash:SetShown(not completed);
self.Check:SetShown(completed);
self:Show();
end
end
function AlliedRacesBulletFrameMixin:OnEnter()
GameTooltip:SetOwner(self, "ANCHOR_RIGHT");
local criteriaString, criteriaType, criteriaCompleted, quantity, reqQuantity, charName, flags, assetID, quantityString = GetAchievementCriteriaInfo(self.achievementID, self.criteriaIndex);
local achievementID = self.achievementID;
local _, _, _, overallAchievementCompleted = GetAchievementInfo(achievementID);
local criteriaAchievementCompleted, month, day, year;
if criteriaCompleted or overallAchievementCompleted then
-- check if the criteria is an achievement to use its completion date, otherwise try main achievement in case it's all complete
if AchievementUtil.IsCriteriaAchievementEarned(self.achievementID, self.criteriaIndex) then
achievementID = assetID;
_, _, _, criteriaAchievementCompleted, month, day, year = GetAchievementInfo(achievementID); --Grab the criteria completed info if we have earned it.
end
if (criteriaAchieveCompleted) then
local completionDate = FormatShortDate(day, month, year);
GameTooltip_AddColoredLine(GameTooltip, CRITERIA_COMPLETED_DATE:format(completionDate), HIGHLIGHT_FONT_COLOR);
else
GameTooltip_AddColoredLine(GameTooltip, CRITERIA_COMPLETED, HIGHLIGHT_FONT_COLOR);
end
else
GameTooltip_SetTitle(GameTooltip, CRITERIA_NOT_COMPLETED, DISABLED_FONT_COLOR);
end
GameTooltip_AddColoredLine(GameTooltip, CLICK_FOR_MORE_INFO, GREEN_FONT_COLOR);
GameTooltip:Show();
end
function AlliedRacesBulletFrameMixin:OnLeave()
GameTooltip:Hide();
end
function AlliedRacesBulletFrameMixin:OnMouseUp()
local criteriaString, criteriaType, criteriaCompleted, quantity, reqQuantity, charName, flags, assetID, quantityString = GetAchievementCriteriaInfo(self.achievementID, self.criteriaIndex);
-- check if it's rep-related
local CHECK_CRITERIA_ACHIEVEMENT = true;
if AchievementUtil.IsCriteriaReputationGained(self.achievementID, self.criteriaIndex, CHECK_CRITERIA_ACHIEVEMENT) then
if not ReputationFrame:IsVisible() then
ToggleCharacter("ReputationFrame");
end
else
-- see if it's an achievement, otherwise use main achievement
if AchievementUtil.IsCriteriaAchievementEarned(self.achievementID, self.criteriaIndex) then
OpenAchievementFrameToAchievement(assetID);
else
OpenAchievementFrameToAchievement(self.achievementID);
end
end
end
\ No newline at end of file
......@@ -30,38 +30,6 @@
<OnClick method="OnClick" />
</Scripts>
</Button>
<Frame name="AlliedRaceOverviewBulletsTemplate" mixin="AlliedRacesBulletFrameMixin" virtual="true">
<Size x="200" y="20"/>
<Layers>
<Layer level="ARTWORK">
<Texture parentKey="Check" atlas="AlliedRace-UnlockingFrame-Checkmark" useAtlasSize="true">
<Anchors>
<Anchor point="TOPLEFT"/>
</Anchors>
</Texture>
</Layer>
<Layer level="OVERLAY">
<FontString parentKey="Dash" inherits="GameFontBlackMedium" text="QUEST_DASH">
<Anchors>
<Anchor point="TOPLEFT" x="7"/>
</Anchors>
<Color r="1" g="1" b="1"/>
</FontString>
<FontString parentKey="Text" inherits="GameFontBlackMedium" justifyH="LEFT" justifyV="TOP">
<Size x="230" y="0"/>
<Anchors>
<Anchor point="TOPLEFT" x="27" y="0"/>
</Anchors>
<Color r="0.25" g="0.1484375" b=".02" a="1"/>
</FontString>
</Layer>
</Layers>
<Scripts>
<OnEnter method="OnEnter"/>
<OnLeave method="OnLeave"/>
<OnMouseUp method="OnMouseUp"/>
</Scripts>
</Frame>
<Frame name="AlliedRaceAbilityTemplate" virtual="true">
<Size x="300" y="36"/>
<Layers>
......@@ -91,7 +59,7 @@
<OnEnter>
GameTooltip:SetOwner(self.Icon, "ANCHOR_RIGHT", 6, 0);
GameTooltip:SetText(self.abilityName, HIGHLIGHT_FONT_COLOR:GetRGB());
GameTooltip:AddLine(self.abilityDescription, NORMAL_FONT_COLOR.r, NORMAL_FONT_COLOR.g, NORMAL_FONT_COLOR.b, true);
GameTooltip:AddLine(self.abilityDescription, NORMAL_FONT_COLOR.r, NORMAL_FONT_COLOR.g, NORMAL_FONT_COLOR.b, true);
GameTooltip:Show();
</OnEnter>
<OnLeave>
......@@ -102,7 +70,7 @@
<Frame name="AlliedRacesFrame" toplevel="true" parent="UIParent" inherits="ButtonFrameTemplate" mixin="AlliedRacesFrameMixin" enableMouse="true" hidden="true">
<Size x="704" y="607"/>
<Anchors>
<Anchor point="LEFT" x="20" y="40"/>
<Anchor point="LEFT" x="20" y="40"/>
</Anchors>
<Frames>
<PlayerModel parentKey="ModelFrame" mixin="ModelFrameMixin" enableMouse="true" useParentLevel="true" drawLayer="BORDER" inherits="ModelTemplate">
......@@ -140,11 +108,11 @@
<OnClick>
local alliedRaceModelFrame = self:GetParent();
alliedRaceModelFrame.AlliedRacesFemaleButton:SetChecked(false);
local alliedRaceFrame = self:GetParent():GetParent();
local alliedRaceFrame = self:GetParent():GetParent();
alliedRaceFrame:UpdateModel(self.MaleModelID);
alliedRaceFrame:SetRaceNameForGender("male");
PlaySound(SOUNDKIT.IG_INVENTORY_ROTATE_CHARACTER);
PlaySound(SOUNDKIT.IG_INVENTORY_ROTATE_CHARACTER);
</OnClick>
</Scripts>
</CheckButton>
......@@ -157,10 +125,10 @@
<OnClick>
local alliedRaceModelFrame = self:GetParent();
alliedRaceModelFrame.AlliedRacesMaleButton:SetChecked(false);
local alliedRaceFrame = self:GetParent():GetParent();
local alliedRaceFrame = self:GetParent():GetParent();
alliedRaceFrame:UpdateModel(self.FemaleModelID);
alliedRaceFrame:SetRaceNameForGender("female");
PlaySound(SOUNDKIT.IG_INVENTORY_ROTATE_CHARACTER);
PlaySound(SOUNDKIT.IG_INVENTORY_ROTATE_CHARACTER);
</OnClick>
</Scripts>
<NormalTexture atlas="AlliedRace-UnlockingFrame-Female"/>
......@@ -223,50 +191,14 @@
<Frame parentKey="Child">
<Size x="275" y="1"/>
<Frames>
<Frame parentKey="ObjectivesFrame">
<Frame parentKey="ObjectivesFrame" inherits="AchievementDisplayTemplate">
<KeyValues>
<KeyValue key="title" type="global" value="ALLIED_RACE_UNLOCK_TEXT"/>
</KeyValues>
<Size x="287" y="0"/>
<Anchors>
<Anchor point="TOP" x="28" y="-20"/>
</Anchors>
<Layers>
<Layer level="BORDER">
<Texture parentKey="HeaderBackground" atlas="AlliedRace-UnlockingFrame-BoxTopper" useAtlasSize="true">
<Anchors>
<Anchor point="TOP"/>
</Anchors>
</Texture>
</Layer>
<Layer level="BACKGROUND">
<Texture parentKey="DescriptionBGBottom" atlas="AlliedRace-UnlockingFrame-Box" useAtlasSize="true">
<Anchors>
<Anchor point="BOTTOM" x="1" y="0"/>
</Anchors>
</Texture>
<Texture parentKey="DescriptionBG" atlas="!AlliedRace-UnlockingFrame-BoxTile">
<Size x="287" y="0"/>
<Anchors>
<Anchor point="TOP" relativeKey="$parent.HeaderBackground" relativePoint="BOTTOM" x="1" y="6"/>
<Anchor point="BOTTOM" relativeKey="$parent.DescriptionBGBottom" relativePoint="TOP" x="1" y="0"/>
</Anchors>
</Texture>
</Layer>
<Layer level="ARTWORK">
<FontString parentKey="Title" justifyH="LEFT" inherits="GameFontNormal" text="ALLIED_RACE_UNLOCK_TEXT">
<Size x="200" y="0"/>
<Anchors>
<Anchor point="LEFT" relativeKey="$parent.HeaderBackground" x="11" y="3"/>
</Anchors>
<Color r="0.929" g="0.788" b="0.620"/>
</FontString>
<FontString parentKey="Description" inherits="GameFontBlack" justifyH="LEFT">
<Size x="260" y="30"/>
<Anchors>
<Anchor point="TOP" relativePoint="BOTTOM" relativeKey="$parent.HeaderBackground" x="=-20" y="-9"/>
</Anchors>
<Color r="0.25" g="0.1484375" b=".02" a="1"/>
</FontString>
</Layer>
</Layers>
</Frame>
</Frames>
<Layers>
......@@ -338,6 +270,6 @@
<OnEvent method="OnEvent"/>
<OnHide method="OnHide"/>
<OnShow method="OnShow"/>
</Scripts>
</Scripts>
</Frame>
</Ui>
\ No newline at end of file
......@@ -57,12 +57,12 @@ function ArenaEnemyFrames_ResetCrowdControlCooldownData()
end
function ArenaEnemyFrames_OnShow(self)
DurabilityFrame_SetAlerts();
DurabilityFrame:SetAlerts();
UIParent_ManageFramePositions();
end