diff --git a/Interface/AddOns/Blizzard_APIDocumentationGenerated/AdventureJournalDocumentation.lua b/Interface/AddOns/Blizzard_APIDocumentationGenerated/AdventureJournalDocumentation.lua
index c4257c9883..87426c154a 100644
--- a/Interface/AddOns/Blizzard_APIDocumentationGenerated/AdventureJournalDocumentation.lua
+++ b/Interface/AddOns/Blizzard_APIDocumentationGenerated/AdventureJournalDocumentation.lua
@@ -58,6 +58,11 @@ local AdventureJournal =
Type = "Event",
LiteralName = "AJ_PVP_SKIRMISH_ACTION",
},
+ {
+ Name = "AjPvpSpecialBgAction",
+ Type = "Event",
+ LiteralName = "AJ_PVP_SPECIAL_BG_ACTION",
+ },
{
Name = "AjQuestLogOpen",
Type = "Event",
diff --git a/Interface/AddOns/Blizzard_APIDocumentationGenerated/AuctionHouseConstantsDocumentation.lua b/Interface/AddOns/Blizzard_APIDocumentationGenerated/AuctionHouseConstantsDocumentation.lua
new file mode 100644
index 0000000000..492cf6a2b5
--- /dev/null
+++ b/Interface/AddOns/Blizzard_APIDocumentationGenerated/AuctionHouseConstantsDocumentation.lua
@@ -0,0 +1,16 @@
+local AuctionHouseConstants =
+{
+ Tables =
+ {
+ {
+ Name = "AuctionConstants",
+ Type = "Constants",
+ Values =
+ {
+ { Name = "DEFAULT_AUCTION_PRICE_MULTIPLIER", Type = "number", Value = 1.5 },
+ },
+ },
+ },
+};
+
+APIDocumentation:AddDocumentationTable(AuctionHouseConstants);
\ No newline at end of file
diff --git a/Interface/AddOns/Blizzard_APIDocumentationGenerated/BagConstantsDocumentation.lua b/Interface/AddOns/Blizzard_APIDocumentationGenerated/BagConstantsDocumentation.lua
index cf810189e6..82b4852ece 100644
--- a/Interface/AddOns/Blizzard_APIDocumentationGenerated/BagConstantsDocumentation.lua
+++ b/Interface/AddOns/Blizzard_APIDocumentationGenerated/BagConstantsDocumentation.lua
@@ -5,9 +5,9 @@ local BagConstants =
{
Name = "BagFlag",
Type = "Enumeration",
- NumValues = 28,
+ NumValues = 29,
MinValue = 1,
- MaxValue = 134217728,
+ MaxValue = 268435456,
Fields =
{
{ Name = "DontFindStack", Type = "BagFlag", EnumValue = 1 },
@@ -38,6 +38,7 @@ local BagConstants =
{ Name = "LookInAccountBankOnly", Type = "BagFlag", EnumValue = 33554432 },
{ Name = "HasRefund", Type = "BagFlag", EnumValue = 67108864 },
{ Name = "SkipValidCountCheck", Type = "BagFlag", EnumValue = 134217728 },
+ { Name = "AllowSoulboundItemInAccountBank", Type = "BagFlag", EnumValue = 268435456 },
},
},
{
diff --git a/Interface/AddOns/Blizzard_APIDocumentationGenerated/BattleNetDocumentation.lua b/Interface/AddOns/Blizzard_APIDocumentationGenerated/BattleNetDocumentation.lua
index f93c36d46f..462e9bba71 100644
--- a/Interface/AddOns/Blizzard_APIDocumentationGenerated/BattleNetDocumentation.lua
+++ b/Interface/AddOns/Blizzard_APIDocumentationGenerated/BattleNetDocumentation.lua
@@ -172,7 +172,6 @@ local BattleNet =
{ Name = "characterLevel", Type = "number", Nilable = true },
{ Name = "richPresence", Type = "string", Nilable = true },
{ Name = "playerGuid", Type = "WOWGUID", Nilable = true },
- { Name = "isWowMobile", Type = "bool", Nilable = false },
{ Name = "canSummon", Type = "bool", Nilable = false },
{ Name = "hasFocus", Type = "bool", Nilable = false },
{ Name = "regionID", Type = "number", Nilable = false },
diff --git a/Interface/AddOns/Blizzard_APIDocumentationGenerated/Blizzard_APIDocumentationGenerated.toc b/Interface/AddOns/Blizzard_APIDocumentationGenerated/Blizzard_APIDocumentationGenerated.toc
index dfe9b300d0..2f757d8bb1 100644
--- a/Interface/AddOns/Blizzard_APIDocumentationGenerated/Blizzard_APIDocumentationGenerated.toc
+++ b/Interface/AddOns/Blizzard_APIDocumentationGenerated/Blizzard_APIDocumentationGenerated.toc
@@ -74,11 +74,11 @@ FrameAPISimpleCheckoutDocumentation.lua
FrameAPITabardModelBaseDocumentation.lua
FrameAPIUnitPositionFrameDocumentation.lua
FrameScriptDocumentation.lua
+FriendListDocumentation.lua
GMTicketInfoDocumentation.lua
GameCursorDocumentation.lua
GameEnvironmentManagerDocumentation.lua
GameErrorDocumentation.lua
-GameModeManagerDocumentation.lua
GamePadDocumentation.lua
GameRulesDocumentation.lua
GameUIDocumentation.lua
@@ -146,6 +146,7 @@ ReportSystemDocumentation.lua
ReputationInfoDocumentation.lua
ResearchInfoDocumentation.lua
RestrictedActionsDocumentation.lua
+ScenarioInfoDocumentation.lua
ScreenDocumentation.lua
ScriptWarningsDocumentation.lua
SecureTransferDocumentation.lua
@@ -193,6 +194,7 @@ SimpleTextureBaseAPIDocumentation.lua
SkillInfoDocumentation.lua
SlashCommandDocumentation.lua
SocialQueueDocumentation.lua
+SocialRestrictionsDocumentation.lua
SoundDocumentation.lua
SpecializationInfoDocumentation.lua
SpecializationSharedDocumentation.lua
@@ -219,6 +221,7 @@ TradeInfoDocumentation.lua
TrainerDocumentation.lua
TraitConfigDocumentation.lua
TransmogDocumentation.lua
+TransmogItemsDocumentation.lua
TutorialDocumentation.lua
UIColorDocumentation.lua
UIEventToastManagerDocumentation.lua
@@ -232,6 +235,7 @@ UIWidgetManagerDocumentation.lua
URLDocumentation.lua
UnitDocumentation.lua
UnitAuraDocumentation.lua
+UnitRoleDocumentation.lua
UserFeedbackDocumentation.lua
VehicleDocumentation.lua
VideoDocumentation.lua
@@ -254,20 +258,19 @@ FrameAPICharacterModelBaseDocumentation.lua
FrameAPIDressUpModelDocumentation.lua
FrameAPIModelSceneFrameActorDocumentation.lua
FrameAPITabardModelDocumentation.lua
-FriendListDocumentation.lua
+LFGListRolesDocumentation.lua
MailInfoDocumentation.lua
MapDocumentation.lua
ReforgeDocumentation.lua
ScriptedAnimationsDocumentation.lua
SeasonsDocumentation.lua
-SocialRestrictionsDocumentation.lua
SystemDocumentation.lua
TradeSkillUIDocumentation.lua
-TransmogItemsDocumentation.lua
AccountConstantsDocumentation.lua
ActionDocumentation.lua
AppearanceSourceDocumentation.lua
ArrowCalloutConstantsDocumentation.lua
+AuctionHouseConstantsDocumentation.lua
AuctionHouseEnumsDocumentation.lua
AzeriteConstantsDocumentation.lua
BagConstantsDocumentation.lua
@@ -289,6 +292,7 @@ ContentTrackingTypesDocumentation.lua
CurrencyConstantsDocumentation.lua
CursorConstDocumentation.lua
DamageConstantsDocumentation.lua
+DelvesConstantsDocumentation.lua
EditModeManagerSharedDocumentation.lua
EncounterJournalConstantsDocumentation.lua
ExpansionLandingPageConstantsDocumentation.lua
@@ -300,6 +304,7 @@ GamePadConstDocumentation.lua
GameRulesConstantsDocumentation.lua
GarrisonConstantsDocumentation.lua
GossipConstantsDocumentation.lua
+GroupFinderConstantsDocumentation.lua
GuildInfoSharedDocumentation.lua
InputConstantsDocumentation.lua
ItemConstantsDocumentation.lua
@@ -337,6 +342,7 @@ QuestSessionConstantsDocumentation.lua
QueueSpecificDocumentation.lua
RecruitAFriendSharedDocumentation.lua
ReportSystemConstantsDocumentation.lua
+ScreenLocationConstantsDocumentation.lua
ScriptRegionSharedDocumentation.lua
SharedScriptObjectModelLightDocumentation.lua
SharedScriptObjectUnitPositionFrameDocumentation.lua
diff --git a/Interface/AddOns/Blizzard_APIDocumentationGenerated/ChatInfoDocumentation.lua b/Interface/AddOns/Blizzard_APIDocumentationGenerated/ChatInfoDocumentation.lua
index 2985f6aeef..c686ca89f1 100644
--- a/Interface/AddOns/Blizzard_APIDocumentationGenerated/ChatInfoDocumentation.lua
+++ b/Interface/AddOns/Blizzard_APIDocumentationGenerated/ChatInfoDocumentation.lua
@@ -191,6 +191,25 @@ local ChatInfo =
{ Name = "isCensored", Type = "bool", Nilable = false },
},
},
+ {
+ Name = "IsLoggingChat",
+ Type = "Function",
+
+ Returns =
+ {
+ { Name = "enabled", Type = "bool", Nilable = false },
+ },
+ },
+ {
+ Name = "IsLoggingCombat",
+ Type = "Function",
+
+ Returns =
+ {
+ { Name = "enabled", Type = "bool", Nilable = false },
+ { Name = "advanced", Type = "bool", Nilable = false },
+ },
+ },
{
Name = "IsPartyChannelType",
Type = "Function",
@@ -430,6 +449,16 @@ local ChatInfo =
{ Name = "supressRaidIcons", Type = "bool", Nilable = false },
},
},
+ {
+ Name = "ChatLoggingChanged",
+ Type = "Event",
+ LiteralName = "CHAT_LOGGING_CHANGED",
+ Payload =
+ {
+ { Name = "whichLog", Type = "number", Nilable = false },
+ { Name = "isEnabled", Type = "bool", Nilable = false },
+ },
+ },
{
Name = "ChatMsgAchievement",
Type = "Event",
diff --git a/Interface/AddOns/Blizzard_APIDocumentationGenerated/ClubDocumentation.lua b/Interface/AddOns/Blizzard_APIDocumentationGenerated/ClubDocumentation.lua
index 2109e973d6..c4554b6ed6 100644
--- a/Interface/AddOns/Blizzard_APIDocumentationGenerated/ClubDocumentation.lua
+++ b/Interface/AddOns/Blizzard_APIDocumentationGenerated/ClubDocumentation.lua
@@ -473,6 +473,22 @@ local Club =
{ Name = "invitations", Type = "table", InnerType = "ClubSelfInvitationInfo", Nilable = false },
},
},
+ {
+ Name = "GetLastTicketResponse",
+ Type = "Function",
+
+ Arguments =
+ {
+ { Name = "ticket", Type = "string", Nilable = false },
+ },
+
+ Returns =
+ {
+ { Name = "error", Type = "ClubErrorType", Nilable = false },
+ { Name = "info", Type = "ClubInfo", Nilable = true },
+ { Name = "showError", Type = "bool", Nilable = false },
+ },
+ },
{
Name = "GetMemberInfo",
Type = "Function",
diff --git a/Interface/AddOns/Blizzard_APIDocumentationGenerated/CurrencyConstantsDocumentation.lua b/Interface/AddOns/Blizzard_APIDocumentationGenerated/CurrencyConstantsDocumentation.lua
index 87cccbaa82..ff6ce5876c 100644
--- a/Interface/AddOns/Blizzard_APIDocumentationGenerated/CurrencyConstantsDocumentation.lua
+++ b/Interface/AddOns/Blizzard_APIDocumentationGenerated/CurrencyConstantsDocumentation.lua
@@ -5,9 +5,9 @@ local CurrencyConstants =
{
Name = "AccountCurrencyTransferResult",
Type = "Enumeration",
- NumValues = 9,
+ NumValues = 10,
MinValue = 0,
- MaxValue = 8,
+ MaxValue = 9,
Fields =
{
{ Name = "Success", Type = "AccountCurrencyTransferResult", EnumValue = 0 },
@@ -19,6 +19,7 @@ local CurrencyConstants =
{ Name = "NoValidSourceCharacter", Type = "AccountCurrencyTransferResult", EnumValue = 6 },
{ Name = "ServerError", Type = "AccountCurrencyTransferResult", EnumValue = 7 },
{ Name = "CannotUseCurrency", Type = "AccountCurrencyTransferResult", EnumValue = 8 },
+ { Name = "TransactionInProgress", Type = "AccountCurrencyTransferResult", EnumValue = 9 },
},
},
{
diff --git a/Interface/AddOns/Blizzard_APIDocumentationGenerated/DelvesConstantsDocumentation.lua b/Interface/AddOns/Blizzard_APIDocumentationGenerated/DelvesConstantsDocumentation.lua
new file mode 100644
index 0000000000..9ba47ab9c9
--- /dev/null
+++ b/Interface/AddOns/Blizzard_APIDocumentationGenerated/DelvesConstantsDocumentation.lua
@@ -0,0 +1,49 @@
+local DelvesConstants =
+{
+ Tables =
+ {
+ {
+ Name = "CompanionConfigSlotTypes",
+ Type = "Enumeration",
+ NumValues = 3,
+ MinValue = 0,
+ MaxValue = 2,
+ Fields =
+ {
+ { Name = "Role", Type = "CompanionConfigSlotTypes", EnumValue = 0 },
+ { Name = "Utility", Type = "CompanionConfigSlotTypes", EnumValue = 1 },
+ { Name = "Combat", Type = "CompanionConfigSlotTypes", EnumValue = 2 },
+ },
+ },
+ {
+ Name = "CurioRarity",
+ Type = "Enumeration",
+ NumValues = 4,
+ MinValue = 1,
+ MaxValue = 4,
+ Fields =
+ {
+ { Name = "Common", Type = "CurioRarity", EnumValue = 1 },
+ { Name = "Uncommon", Type = "CurioRarity", EnumValue = 2 },
+ { Name = "Rare", Type = "CurioRarity", EnumValue = 3 },
+ { Name = "Epic", Type = "CurioRarity", EnumValue = 4 },
+ },
+ },
+ {
+ Name = "DelvesConsts",
+ Type = "Constants",
+ Values =
+ {
+ { Name = "DELVES_MIN_PLAYER_LEVEL_CONTENT_TUNING_ID", Type = "number", Value = 2677 },
+ { Name = "DELVES_NORMAL_KEY_CURRENCY_ID", Type = "number", Value = 3028 },
+ { Name = "DELVES_COMPANION_TOOLTIP_WIDGET_SET_ID", Type = "number", Value = 1331 },
+ { Name = "DELVES_COMPANION_TRAIT_SYSTEM_ID", Type = "number", Value = 6 },
+ { Name = "BRANN_COMPANION_INFO_ID", Type = "number", Value = 1 },
+ { Name = "BRANN_MAX_LEVEL", Type = "number", Value = 60 },
+ { Name = "BRANN_XP_FACTION_ID", Type = "number", Value = 1203 },
+ },
+ },
+ },
+};
+
+APIDocumentation:AddDocumentationTable(DelvesConstants);
\ No newline at end of file
diff --git a/Interface/AddOns/Blizzard_APIDocumentationGenerated/ExpansionInfoDocumentation.lua b/Interface/AddOns/Blizzard_APIDocumentationGenerated/ExpansionInfoDocumentation.lua
index cbb1ab02bf..0c4b29f91c 100644
--- a/Interface/AddOns/Blizzard_APIDocumentationGenerated/ExpansionInfoDocumentation.lua
+++ b/Interface/AddOns/Blizzard_APIDocumentationGenerated/ExpansionInfoDocumentation.lua
@@ -19,6 +19,20 @@ local ExpansionInfo =
{ Name = "isAtLeast", Type = "bool", Nilable = false },
},
},
+ {
+ Name = "ClassicExpansionAtMost",
+ Type = "Function",
+
+ Arguments =
+ {
+ { Name = "expansionLevel", Type = "number", Nilable = false },
+ },
+
+ Returns =
+ {
+ { Name = "isAtMost", Type = "bool", Nilable = false },
+ },
+ },
{
Name = "GetClassicExpansionLevel",
Type = "Function",
diff --git a/Interface/AddOns/Blizzard_APIDocumentationGenerated/FrameAPIDressUpModelDocumentation.lua b/Interface/AddOns/Blizzard_APIDocumentationGenerated/FrameAPIDressUpModelDocumentation.lua
index 836801b629..0636e493a6 100644
--- a/Interface/AddOns/Blizzard_APIDocumentationGenerated/FrameAPIDressUpModelDocumentation.lua
+++ b/Interface/AddOns/Blizzard_APIDocumentationGenerated/FrameAPIDressUpModelDocumentation.lua
@@ -40,6 +40,33 @@ local FrameAPIDressUpModel =
{ Name = "itemModAppearanceID", Type = "number", Nilable = false },
},
},
+ {
+ Name = "GetItemTransmogInfo",
+ Type = "Function",
+
+ Arguments =
+ {
+ { Name = "inventorySlot", Type = "luaIndex", Nilable = false },
+ },
+
+ Returns =
+ {
+ { Name = "itemTransmogInfo", Type = "ItemTransmogInfo", Mixin = "ItemTransmogInfoMixin", Nilable = false },
+ },
+ },
+ {
+ Name = "GetItemTransmogInfoList",
+ Type = "Function",
+
+ Arguments =
+ {
+ },
+
+ Returns =
+ {
+ { Name = "infoList", Type = "table", InnerType = "ItemTransmogInfo", Nilable = false },
+ },
+ },
{
Name = "GetObeyHideInTransmogFlag",
Type = "Function",
diff --git a/Interface/AddOns/Blizzard_APIDocumentationGenerated/FriendListDocumentation.lua b/Interface/AddOns/Blizzard_APIDocumentationGenerated/FriendListDocumentation.lua
index 465a5fa491..8b43bcad92 100644
--- a/Interface/AddOns/Blizzard_APIDocumentationGenerated/FriendListDocumentation.lua
+++ b/Interface/AddOns/Blizzard_APIDocumentationGenerated/FriendListDocumentation.lua
@@ -408,6 +408,7 @@ local FriendList =
Payload =
{
{ Name = "friendId", Type = "number", Nilable = false },
+ { Name = "isCompanionApp", Type = "bool", Nilable = false, Default = false },
},
},
{
@@ -417,6 +418,7 @@ local FriendList =
Payload =
{
{ Name = "friendId", Type = "number", Nilable = false },
+ { Name = "isCompanionApp", Type = "bool", Nilable = false, Default = false },
},
},
{
@@ -485,6 +487,20 @@ local FriendList =
Type = "Event",
LiteralName = "MUTELIST_UPDATE",
},
+ {
+ Name = "NewMatchmakingPartyInvite",
+ Type = "Event",
+ LiteralName = "NEW_MATCHMAKING_PARTY_INVITE",
+ },
+ {
+ Name = "RejectedMatchmakingPartyInvite",
+ Type = "Event",
+ LiteralName = "REJECTED_MATCHMAKING_PARTY_INVITE",
+ Payload =
+ {
+ { Name = "name", Type = "cstring", Nilable = false },
+ },
+ },
{
Name = "WhoListUpdate",
Type = "Event",
@@ -508,6 +524,7 @@ local FriendList =
{ Name = "level", Type = "number", Nilable = false },
{ Name = "dnd", Type = "bool", Nilable = false },
{ Name = "afk", Type = "bool", Nilable = false },
+ { Name = "rafLinkType", Type = "RafLinkType", Nilable = false },
},
},
{
diff --git a/Interface/AddOns/Blizzard_APIDocumentationGenerated/GMTicketInfoDocumentation.lua b/Interface/AddOns/Blizzard_APIDocumentationGenerated/GMTicketInfoDocumentation.lua
index 7ff87fe18f..f699fdee6c 100644
--- a/Interface/AddOns/Blizzard_APIDocumentationGenerated/GMTicketInfoDocumentation.lua
+++ b/Interface/AddOns/Blizzard_APIDocumentationGenerated/GMTicketInfoDocumentation.lua
@@ -66,6 +66,8 @@ local GMTicketInfo =
{ Name = "caseIndex", Type = "number", Nilable = true },
{ Name = "waitTimeMinutes", Type = "number", Nilable = true },
{ Name = "waitMessage", Type = "cstring", Nilable = true },
+ { Name = "caseTitle", Type = "cstring", Nilable = true },
+ { Name = "caseDescription", Type = "cstring", Nilable = true },
},
},
},
diff --git a/Interface/AddOns/Blizzard_APIDocumentationGenerated/GameModeManagerDocumentation.lua b/Interface/AddOns/Blizzard_APIDocumentationGenerated/GameModeManagerDocumentation.lua
deleted file mode 100644
index 9c6d2a9c71..0000000000
--- a/Interface/AddOns/Blizzard_APIDocumentationGenerated/GameModeManagerDocumentation.lua
+++ /dev/null
@@ -1,29 +0,0 @@
-local GameModeManager =
-{
- Name = "GameModeManager",
- Type = "System",
- Namespace = "C_GameModeManager",
-
- Functions =
- {
- {
- Name = "GetCurrentGameMode",
- Type = "Function",
-
- Returns =
- {
- { Name = "gameMode", Type = "GameMode", Nilable = false },
- },
- },
- },
-
- Events =
- {
- },
-
- Tables =
- {
- },
-};
-
-APIDocumentation:AddDocumentationTable(GameModeManager);
\ No newline at end of file
diff --git a/Interface/AddOns/Blizzard_APIDocumentationGenerated/GameRulesConstantsDocumentation.lua b/Interface/AddOns/Blizzard_APIDocumentationGenerated/GameRulesConstantsDocumentation.lua
index 0a0efd3779..7bc3dec07a 100644
--- a/Interface/AddOns/Blizzard_APIDocumentationGenerated/GameRulesConstantsDocumentation.lua
+++ b/Interface/AddOns/Blizzard_APIDocumentationGenerated/GameRulesConstantsDocumentation.lua
@@ -5,13 +5,27 @@ local GameRulesConstants =
{
Name = "GameRuleFlags",
Type = "Enumeration",
- NumValues = 2,
+ NumValues = 3,
MinValue = 0,
- MaxValue = 1,
+ MaxValue = 2,
Fields =
{
{ Name = "None", Type = "GameRuleFlags", EnumValue = 0 },
{ Name = "AllowClient", Type = "GameRuleFlags", EnumValue = 1 },
+ { Name = "RequiresDefault", Type = "GameRuleFlags", EnumValue = 2 },
+ },
+ },
+ {
+ Name = "GameRuleType",
+ Type = "Enumeration",
+ NumValues = 3,
+ MinValue = 0,
+ MaxValue = 2,
+ Fields =
+ {
+ { Name = "Int", Type = "GameRuleType", EnumValue = 0 },
+ { Name = "Float", Type = "GameRuleType", EnumValue = 1 },
+ { Name = "Bool", Type = "GameRuleType", EnumValue = 2 },
},
},
},
diff --git a/Interface/AddOns/Blizzard_APIDocumentationGenerated/GlueDocumentation.lua b/Interface/AddOns/Blizzard_APIDocumentationGenerated/GlueDocumentation.lua
index 1356cc43d7..264ac68d20 100644
--- a/Interface/AddOns/Blizzard_APIDocumentationGenerated/GlueDocumentation.lua
+++ b/Interface/AddOns/Blizzard_APIDocumentationGenerated/GlueDocumentation.lua
@@ -2,9 +2,19 @@ local Glue =
{
Name = "Glue",
Type = "System",
+ Namespace = "C_Glue",
Functions =
{
+ {
+ Name = "IsFirstLoadThisSession",
+ Type = "Function",
+
+ Returns =
+ {
+ { Name = "IsFirstLoadThisSession", Type = "bool", Nilable = false },
+ },
+ },
{
Name = "IsOnGlueScreen",
Type = "Function",
@@ -18,6 +28,11 @@ local Glue =
Events =
{
+ {
+ Name = "AccountCvarsLoaded",
+ Type = "Event",
+ LiteralName = "ACCOUNT_CVARS_LOADED",
+ },
},
Tables =
diff --git a/Interface/AddOns/Blizzard_APIDocumentationGenerated/GroupFinderConstantsDocumentation.lua b/Interface/AddOns/Blizzard_APIDocumentationGenerated/GroupFinderConstantsDocumentation.lua
new file mode 100644
index 0000000000..2d52d560b1
--- /dev/null
+++ b/Interface/AddOns/Blizzard_APIDocumentationGenerated/GroupFinderConstantsDocumentation.lua
@@ -0,0 +1,8 @@
+local GroupFinderConstants =
+{
+ Tables =
+ {
+ },
+};
+
+APIDocumentation:AddDocumentationTable(GroupFinderConstants);
\ No newline at end of file
diff --git a/Interface/AddOns/Blizzard_APIDocumentationGenerated/LFGConstantsDocumentation.lua b/Interface/AddOns/Blizzard_APIDocumentationGenerated/LFGConstantsDocumentation.lua
index 3e0c2cd8cc..117d1719d4 100644
--- a/Interface/AddOns/Blizzard_APIDocumentationGenerated/LFGConstantsDocumentation.lua
+++ b/Interface/AddOns/Blizzard_APIDocumentationGenerated/LFGConstantsDocumentation.lua
@@ -48,11 +48,24 @@ local LFGConstants =
},
},
{
- Name = "GroupFinderConstants",
+ Name = "PremadeGroupFinderStyle",
+ Type = "Enumeration",
+ NumValues = 3,
+ MinValue = 0,
+ MaxValue = 2,
+ Fields =
+ {
+ { Name = "Disabled", Type = "PremadeGroupFinderStyle", EnumValue = 0 },
+ { Name = "Mainline", Type = "PremadeGroupFinderStyle", EnumValue = 1 },
+ { Name = "Vanilla", Type = "PremadeGroupFinderStyle", EnumValue = 2 },
+ },
+ },
+ {
+ Name = "LFGConstsExposed",
Type = "Constants",
Values =
{
- { Name = "MAX_GROUP_FINDER_ACTIVITIES", Type = "number", Value = 41 },
+ { Name = "GROUP_FINDER_MAX_ACTIVITY_CAPACITY", Type = "number", Value = 16 },
},
},
{
@@ -64,6 +77,16 @@ local LFGConstants =
{ Name = "LFG_ROLE_ANY", Type = "LFGRole", Value = Enum.LFGRoleMeta.NumValues },
},
},
+ {
+ Name = "LFGRoles",
+ Type = "Structure",
+ Fields =
+ {
+ { Name = "tank", Type = "bool", Nilable = false },
+ { Name = "healer", Type = "bool", Nilable = false },
+ { Name = "dps", Type = "bool", Nilable = false },
+ },
+ },
},
};
diff --git a/Interface/AddOns/Blizzard_APIDocumentationGenerated/LFGInfoDocumentation.lua b/Interface/AddOns/Blizzard_APIDocumentationGenerated/LFGInfoDocumentation.lua
index 3acf30a05d..223e9a4c56 100644
--- a/Interface/AddOns/Blizzard_APIDocumentationGenerated/LFGInfoDocumentation.lua
+++ b/Interface/AddOns/Blizzard_APIDocumentationGenerated/LFGInfoDocumentation.lua
@@ -134,15 +134,6 @@ local LFGInfo =
Name = "IsLFREnabled",
Type = "Function",
- Returns =
- {
- { Name = "enabled", Type = "bool", Nilable = false },
- },
- },
- {
- Name = "IsPremadeGroupEnabled",
- Type = "Function",
-
Returns =
{
{ Name = "enabled", Type = "bool", Nilable = false },
diff --git a/Interface/AddOns/Blizzard_APIDocumentationGenerated/LFGListInfoDocumentation.lua b/Interface/AddOns/Blizzard_APIDocumentationGenerated/LFGListInfoDocumentation.lua
index b5207ab242..24e29f6988 100644
--- a/Interface/AddOns/Blizzard_APIDocumentationGenerated/LFGListInfoDocumentation.lua
+++ b/Interface/AddOns/Blizzard_APIDocumentationGenerated/LFGListInfoDocumentation.lua
@@ -45,6 +45,20 @@ local LFGListInfo =
Name = "CopyActiveEntryInfoToCreationFields",
Type = "Function",
},
+ {
+ Name = "CreateListing",
+ Type = "Function",
+
+ Arguments =
+ {
+ { Name = "createData", Type = "LfgListingCreateData", Nilable = false },
+ },
+
+ Returns =
+ {
+ { Name = "success", Type = "bool", Nilable = false },
+ },
+ },
{
Name = "DoesEntryTitleMatchPrebuiltTitle",
Type = "Function",
@@ -233,35 +247,55 @@ local LFGListInfo =
},
},
{
- Name = "GetRoles",
+ Name = "GetPremadeGroupFinderStyle",
+ Type = "Function",
+
+ Returns =
+ {
+ { Name = "style", Type = "PremadeGroupFinderStyle", Nilable = false },
+ },
+ },
+ {
+ Name = "GetSearchResultInfo",
Type = "Function",
+ Arguments =
+ {
+ { Name = "searchResultID", Type = "number", Nilable = false },
+ },
+
Returns =
{
- { Name = "roles", Type = "LFGRoles", Nilable = false },
+ { Name = "searchResultData", Type = "LfgSearchResultData", Nilable = false },
},
},
{
- Name = "GetSavedRoles",
+ Name = "GetSearchResultLeaderInfo",
Type = "Function",
+ Arguments =
+ {
+ { Name = "searchResultID", Type = "number", Nilable = false },
+ },
+
Returns =
{
- { Name = "roles", Type = "LFGRoles", Nilable = false },
+ { Name = "leaderInfo", Type = "LfgSearchResultPlayerInfo", Nilable = false },
},
},
{
- Name = "GetSearchResultInfo",
+ Name = "GetSearchResultPlayerInfo",
Type = "Function",
Arguments =
{
{ Name = "searchResultID", Type = "number", Nilable = false },
+ { Name = "memberIndex", Type = "luaIndex", Nilable = false },
},
Returns =
{
- { Name = "searchResultData", Type = "LfgSearchResultData", Nilable = false },
+ { Name = "playerInfo", Type = "LfgSearchResultPlayerInfo", Nilable = false },
},
},
{
@@ -303,7 +337,7 @@ local LFGListInfo =
Arguments =
{
- { Name = "activityID", Type = "number", Nilable = true },
+ { Name = "activityCategoryID", Type = "number", Nilable = true },
},
Returns =
@@ -311,6 +345,15 @@ local LFGListInfo =
{ Name = "isAuthenticated", Type = "bool", Nilable = false },
},
},
+ {
+ Name = "IsPremadeGroupFinderEnabled",
+ Type = "Function",
+
+ Returns =
+ {
+ { Name = "enabled", Type = "bool", Nilable = false },
+ },
+ },
{
Name = "Search",
Type = "Function",
@@ -323,6 +366,7 @@ local LFGListInfo =
{ Name = "languageFilter", Type = "WowLocale", Nilable = true },
{ Name = "searchCrossFactionListings", Type = "bool", Nilable = true, Default = false },
{ Name = "advancedFilter", Type = "AdvancedFilterOptions", Nilable = true },
+ { Name = "activityIDsFilter", Type = "table", InnerType = "number", Nilable = true, Documentation = { "Activity IDs to filter by." } },
},
},
{
@@ -337,35 +381,35 @@ local LFGListInfo =
},
},
{
- Name = "SetRoles",
+ Name = "SetSearchToActivity",
Type = "Function",
Arguments =
{
- { Name = "roles", Type = "LFGRoles", Nilable = false },
- },
-
- Returns =
- {
- { Name = "success", Type = "bool", Nilable = false },
+ { Name = "activityID", Type = "number", Nilable = false },
},
},
{
- Name = "SetSearchToActivity",
+ Name = "SetSearchToQuestID",
Type = "Function",
Arguments =
{
- { Name = "activityID", Type = "number", Nilable = false },
+ { Name = "questID", Type = "number", Nilable = false },
},
},
{
- Name = "SetSearchToQuestID",
+ Name = "UpdateListing",
Type = "Function",
Arguments =
{
- { Name = "questID", Type = "number", Nilable = false },
+ { Name = "createData", Type = "LfgListingCreateData", Nilable = false },
+ },
+
+ Returns =
+ {
+ { Name = "success", Type = "bool", Nilable = false },
},
},
{
@@ -481,11 +525,6 @@ local LFGListInfo =
{ Name = "groupName", Type = "kstringLfgListChat", Nilable = false },
},
},
- {
- Name = "LfgListRoleUpdate",
- Type = "Event",
- LiteralName = "LFG_LIST_ROLE_UPDATE",
- },
{
Name = "LfgListSearchFailed",
Type = "Event",
@@ -540,7 +579,7 @@ local LFGListInfo =
{ Name = "needsMyClass", Type = "bool", Nilable = false, Default = false },
{ Name = "hasTank", Type = "bool", Nilable = false, Default = false },
{ Name = "hasHealer", Type = "bool", Nilable = false, Default = false },
- { Name = "activities", Type = "table", InnerType = "number", Nilable = false },
+ { Name = "activities", Type = "table", InnerType = "number", Nilable = false, Documentation = { "Activity group IDs to filter by." } },
{ Name = "minimumRating", Type = "number", Nilable = false, Default = 0 },
{ Name = "difficultyNormal", Type = "bool", Nilable = false, Default = false },
{ Name = "difficultyHeroic", Type = "bool", Nilable = false, Default = false },
@@ -573,7 +612,7 @@ local LFGListInfo =
{ Name = "ilvlSuggestion", Type = "number", Nilable = false },
{ Name = "filters", Type = "number", Nilable = false },
{ Name = "minLevel", Type = "number", Nilable = false },
- { Name = "maxLevel", Type = "number", Nilable = false },
+ { Name = "minLevelSuggestion", Type = "number", Nilable = false },
{ Name = "maxLevelSuggestion", Type = "number", Nilable = false },
{ Name = "maxNumPlayers", Type = "number", Nilable = false },
{ Name = "displayType", Type = "LFGListDisplayType", Nilable = false },
@@ -588,7 +627,6 @@ local LFGListInfo =
{ Name = "allowCrossFaction", Type = "bool", Nilable = false },
{ Name = "isHeroicActivity", Type = "bool", Nilable = false },
{ Name = "isNormalActivity", Type = "bool", Nilable = false },
- { Name = "iconFileDataID", Type = "number", Nilable = false },
{ Name = "mapID", Type = "number", Nilable = false },
{ Name = "difficultyID", Type = "number", Nilable = false },
{ Name = "redirectedDifficultyID", Type = "number", Nilable = false },
@@ -628,7 +666,6 @@ local LFGListInfo =
Type = "Structure",
Fields =
{
- { Name = "activityID", Type = "number", Nilable = false },
{ Name = "activityIDs", Type = "table", InnerType = "number", Nilable = false },
{ Name = "requiredItemLevel", Type = "number", Nilable = false },
{ Name = "requiredHonorLevel", Type = "number", Nilable = false },
@@ -647,13 +684,20 @@ local LFGListInfo =
},
},
{
- Name = "LFGRoles",
+ Name = "LfgListingCreateData",
Type = "Structure",
Fields =
{
- { Name = "tank", Type = "bool", Nilable = false },
- { Name = "healer", Type = "bool", Nilable = false },
- { Name = "dps", Type = "bool", Nilable = false },
+ { Name = "activityIDs", Type = "table", InnerType = "number", Nilable = false },
+ { Name = "questID", Type = "number", Nilable = true },
+ { Name = "isAutoAccept", Type = "bool", Nilable = false, Default = false },
+ { Name = "isCrossFactionListing", Type = "bool", Nilable = false, Default = false },
+ { Name = "isPrivateGroup", Type = "bool", Nilable = false, Default = false },
+ { Name = "newPlayerFriendly", Type = "bool", Nilable = false, Default = false },
+ { Name = "playstyle", Type = "LFGEntryPlaystyle", Nilable = false, Default = "None" },
+ { Name = "requiredDungeonScore", Type = "number", Nilable = false, Default = 0 },
+ { Name = "requiredItemLevel", Type = "number", Nilable = false, Default = 0 },
+ { Name = "requiredPvpRating", Type = "number", Nilable = false, Default = 0 },
},
},
{
@@ -662,7 +706,6 @@ local LFGListInfo =
Fields =
{
{ Name = "searchResultID", Type = "number", Nilable = false },
- { Name = "activityID", Type = "number", Nilable = false },
{ Name = "activityIDs", Type = "table", InnerType = "number", Nilable = false },
{ Name = "leaderName", Type = "string", Nilable = true },
{ Name = "name", Type = "kstringLfgListSearch", Nilable = false },
@@ -679,15 +722,36 @@ local LFGListInfo =
{ Name = "autoAccept", Type = "bool", Nilable = false },
{ Name = "isWarMode", Type = "bool", Nilable = false },
{ Name = "age", Type = "time_t", Nilable = false },
+ { Name = "questID", Type = "number", Nilable = true },
{ Name = "leaderOverallDungeonScore", Type = "number", Nilable = true },
- { Name = "leaderDungeonScoreInfo", Type = "BestDungeonScoreMapInfo", Nilable = true },
+ { Name = "leaderDungeonScoreInfo", Type = "table", InnerType = "BestDungeonScoreMapInfo", Nilable = false },
{ Name = "leaderBestDungeonScoreInfo", Type = "BestDungeonScoreMapInfo", Nilable = true },
- { Name = "leaderPvpRatingInfo", Type = "PvpRatingInfo", Nilable = true },
+ { Name = "leaderPvpRatingInfo", Type = "table", InnerType = "PvpRatingInfo", Nilable = false },
+ { Name = "requiredDungeonScore", Type = "number", Nilable = true },
+ { Name = "requiredPvpRating", Type = "number", Nilable = true },
+ { Name = "playstyle", Type = "LFGEntryPlaystyle", Nilable = true },
+ { Name = "crossFactionListing", Type = "bool", Nilable = true },
{ Name = "leaderFactionGroup", Type = "number", Nilable = false },
{ Name = "newPlayerFriendly", Type = "bool", Nilable = true },
{ Name = "partyGUID", Type = "WOWGUID", Nilable = false },
},
},
+ {
+ Name = "LfgSearchResultPlayerInfo",
+ Type = "Structure",
+ Fields =
+ {
+ { Name = "name", Type = "string", Nilable = true },
+ { Name = "level", Type = "number", Nilable = true },
+ { Name = "areaName", Type = "cstring", Nilable = true },
+ { Name = "className", Type = "cstring", Nilable = false },
+ { Name = "classFilename", Type = "cstring", Nilable = false },
+ { Name = "specName", Type = "cstring", Nilable = true },
+ { Name = "assignedRole", Type = "cstring", Nilable = false },
+ { Name = "lfgRoles", Type = "LFGRoles", Nilable = false },
+ { Name = "isLeader", Type = "bool", Nilable = false },
+ },
+ },
{
Name = "PvpRatingInfo",
Type = "Structure",
diff --git a/Interface/AddOns/Blizzard_APIDocumentationGenerated/LFGListRolesDocumentation.lua b/Interface/AddOns/Blizzard_APIDocumentationGenerated/LFGListRolesDocumentation.lua
new file mode 100644
index 0000000000..48c073d9f2
--- /dev/null
+++ b/Interface/AddOns/Blizzard_APIDocumentationGenerated/LFGListRolesDocumentation.lua
@@ -0,0 +1,58 @@
+local LFGListRoles =
+{
+ Name = "LFGListRoles",
+ Type = "System",
+ Namespace = "C_LFGListRoles",
+
+ Functions =
+ {
+ {
+ Name = "GetRoles",
+ Type = "Function",
+
+ Returns =
+ {
+ { Name = "roles", Type = "LFGRoles", Nilable = false },
+ },
+ },
+ {
+ Name = "GetSavedRoles",
+ Type = "Function",
+
+ Returns =
+ {
+ { Name = "roles", Type = "LFGRoles", Nilable = false },
+ },
+ },
+ {
+ Name = "SetRoles",
+ Type = "Function",
+
+ Arguments =
+ {
+ { Name = "roles", Type = "LFGRoles", Nilable = false },
+ { Name = "limitToClassRoles", Type = "bool", Nilable = false, Default = false },
+ },
+
+ Returns =
+ {
+ { Name = "success", Type = "bool", Nilable = false },
+ },
+ },
+ },
+
+ Events =
+ {
+ {
+ Name = "LfgListRoleUpdate",
+ Type = "Event",
+ LiteralName = "LFG_LIST_ROLE_UPDATE",
+ },
+ },
+
+ Tables =
+ {
+ },
+};
+
+APIDocumentation:AddDocumentationTable(LFGListRoles);
\ No newline at end of file
diff --git a/Interface/AddOns/Blizzard_APIDocumentationGenerated/MerchantFrameDocumentation.lua b/Interface/AddOns/Blizzard_APIDocumentationGenerated/MerchantFrameDocumentation.lua
index ba2681d833..11c1c5199c 100644
--- a/Interface/AddOns/Blizzard_APIDocumentationGenerated/MerchantFrameDocumentation.lua
+++ b/Interface/AddOns/Blizzard_APIDocumentationGenerated/MerchantFrameDocumentation.lua
@@ -52,6 +52,24 @@ local MerchantFrame =
Tables =
{
+ {
+ Name = "MerchantItemInfo",
+ Type = "Structure",
+ Fields =
+ {
+ { Name = "name", Type = "string", Nilable = true },
+ { Name = "texture", Type = "fileID", Nilable = false },
+ { Name = "price", Type = "number", Nilable = false, Default = 0 },
+ { Name = "stackCount", Type = "number", Nilable = false, Default = 0 },
+ { Name = "numAvailable", Type = "number", Nilable = false, Default = 0 },
+ { Name = "isPurchasable", Type = "bool", Nilable = false, Default = false },
+ { Name = "isUsable", Type = "bool", Nilable = false, Default = false },
+ { Name = "hasExtendedCost", Type = "bool", Nilable = false, Default = false },
+ { Name = "currencyID", Type = "number", Nilable = true },
+ { Name = "spellID", Type = "number", Nilable = true },
+ { Name = "isQuestStartItem", Type = "bool", Nilable = false, Default = false },
+ },
+ },
},
};
diff --git a/Interface/AddOns/Blizzard_APIDocumentationGenerated/PartyInfoDocumentation.lua b/Interface/AddOns/Blizzard_APIDocumentationGenerated/PartyInfoDocumentation.lua
index b25e1d9a2c..f09f55a638 100644
--- a/Interface/AddOns/Blizzard_APIDocumentationGenerated/PartyInfoDocumentation.lua
+++ b/Interface/AddOns/Blizzard_APIDocumentationGenerated/PartyInfoDocumentation.lua
@@ -95,6 +95,19 @@ local PartyInfo =
Events =
{
+ {
+ Name = "BnetRequestInviteConfirmation",
+ Type = "Event",
+ LiteralName = "BNET_REQUEST_INVITE_CONFIRMATION",
+ Payload =
+ {
+ { Name = "gameAccountID", Type = "number", Nilable = false },
+ { Name = "questSessionActive", Type = "bool", Nilable = false },
+ { Name = "tank", Type = "bool", Nilable = false },
+ { Name = "healer", Type = "bool", Nilable = false },
+ { Name = "dps", Type = "bool", Nilable = false },
+ },
+ },
{
Name = "EnteredDifferentInstanceFromParty",
Type = "Event",
@@ -247,27 +260,6 @@ local PartyInfo =
{ Name = "preempted", Type = "bool", Nilable = false },
},
},
- {
- Name = "RoleChangedInform",
- Type = "Event",
- LiteralName = "ROLE_CHANGED_INFORM",
- Payload =
- {
- { Name = "changedName", Type = "cstring", Nilable = false },
- { Name = "fromName", Type = "cstring", Nilable = false },
- { Name = "oldRole", Type = "cstring", Nilable = false },
- { Name = "newRole", Type = "cstring", Nilable = false },
- },
- },
- {
- Name = "RolePollBegin",
- Type = "Event",
- LiteralName = "ROLE_POLL_BEGIN",
- Payload =
- {
- { Name = "fromName", Type = "cstring", Nilable = false },
- },
- },
{
Name = "VoteKickReasonNeeded",
Type = "Event",
diff --git a/Interface/AddOns/Blizzard_APIDocumentationGenerated/PlayerScriptDocumentation.lua b/Interface/AddOns/Blizzard_APIDocumentationGenerated/PlayerScriptDocumentation.lua
index 241493e774..1631cba443 100644
--- a/Interface/AddOns/Blizzard_APIDocumentationGenerated/PlayerScriptDocumentation.lua
+++ b/Interface/AddOns/Blizzard_APIDocumentationGenerated/PlayerScriptDocumentation.lua
@@ -637,6 +637,18 @@ local PlayerScript =
Tables =
{
+ {
+ Name = "PlayerAttackPowerInfo",
+ Type = "Structure",
+ Fields =
+ {
+ { Name = "mainHandAttackPower", Type = "number", Nilable = false },
+ { Name = "offHandAttackPower", Type = "number", Nilable = false },
+ { Name = "rangedAttackPower", Type = "number", Nilable = false },
+ { Name = "baseAttackPower", Type = "number", Nilable = false },
+ { Name = "baseRangedAttackPower", Type = "number", Nilable = false },
+ },
+ },
},
};
diff --git a/Interface/AddOns/Blizzard_APIDocumentationGenerated/QuestInfoSharedDocumentation.lua b/Interface/AddOns/Blizzard_APIDocumentationGenerated/QuestInfoSharedDocumentation.lua
index e3909a5a15..0716cff47c 100644
--- a/Interface/AddOns/Blizzard_APIDocumentationGenerated/QuestInfoSharedDocumentation.lua
+++ b/Interface/AddOns/Blizzard_APIDocumentationGenerated/QuestInfoSharedDocumentation.lua
@@ -23,6 +23,25 @@ local QuestInfoShared =
{ Name = "WorldQuest", Type = "QuestClassification", EnumValue = 10 },
},
},
+ {
+ Name = "QuestPOIMapInfo",
+ Type = "Structure",
+ Fields =
+ {
+ { Name = "childDepth", Type = "number", Nilable = true },
+ { Name = "questTagType", Type = "QuestTagType", Nilable = true },
+ { Name = "questID", Type = "number", Nilable = false },
+ { Name = "numObjectives", Type = "number", Nilable = false },
+ { Name = "mapID", Type = "number", Nilable = false },
+ { Name = "x", Type = "number", Nilable = false },
+ { Name = "y", Type = "number", Nilable = false },
+ { Name = "isQuestStart", Type = "bool", Nilable = false },
+ { Name = "isDaily", Type = "bool", Nilable = false },
+ { Name = "isCombatAllyQuest", Type = "bool", Nilable = false },
+ { Name = "isMeta", Type = "bool", Nilable = false },
+ { Name = "inProgress", Type = "bool", Nilable = false },
+ },
+ },
},
};
diff --git a/Interface/AddOns/Blizzard_APIDocumentationGenerated/QuestLogDocumentation.lua b/Interface/AddOns/Blizzard_APIDocumentationGenerated/QuestLogDocumentation.lua
index 59825db4bf..c11e78b2db 100644
--- a/Interface/AddOns/Blizzard_APIDocumentationGenerated/QuestLogDocumentation.lua
+++ b/Interface/AddOns/Blizzard_APIDocumentationGenerated/QuestLogDocumentation.lua
@@ -74,7 +74,7 @@ local QuestLog =
Returns =
{
- { Name = "quests", Type = "table", InnerType = "QuestOnMapInfo", Nilable = false },
+ { Name = "quests", Type = "table", InnerType = "QuestPOIMapInfo", Nilable = false },
},
},
{
@@ -306,16 +306,6 @@ local QuestLog =
{ Name = "numRequired", Type = "number", Nilable = false },
},
},
- {
- Name = "QuestOnMapInfo",
- Type = "Structure",
- Fields =
- {
- { Name = "questID", Type = "number", Nilable = false },
- { Name = "x", Type = "number", Nilable = false },
- { Name = "y", Type = "number", Nilable = false },
- },
- },
},
};
diff --git a/Interface/AddOns/Blizzard_APIDocumentationGenerated/QuestTaskInfoDocumentation.lua b/Interface/AddOns/Blizzard_APIDocumentationGenerated/QuestTaskInfoDocumentation.lua
index 9d9c85871d..9690a0c6fd 100644
--- a/Interface/AddOns/Blizzard_APIDocumentationGenerated/QuestTaskInfoDocumentation.lua
+++ b/Interface/AddOns/Blizzard_APIDocumentationGenerated/QuestTaskInfoDocumentation.lua
@@ -110,7 +110,7 @@ local QuestTaskInfo =
},
},
{
- Name = "GetQuestsForPlayerByMapID",
+ Name = "GetQuestsOnMap",
Type = "Function",
Arguments =
@@ -120,7 +120,7 @@ local QuestTaskInfo =
Returns =
{
- { Name = "taskPOIs", Type = "table", InnerType = "TaskPOIData", Nilable = false },
+ { Name = "taskPOIs", Type = "table", InnerType = "QuestPOIMapInfo", Nilable = false },
},
},
{
@@ -163,24 +163,6 @@ local QuestTaskInfo =
Tables =
{
- {
- Name = "TaskPOIData",
- Type = "Structure",
- Fields =
- {
- { Name = "questId", Type = "number", Nilable = false },
- { Name = "x", Type = "number", Nilable = false },
- { Name = "y", Type = "number", Nilable = false },
- { Name = "inProgress", Type = "bool", Nilable = false },
- { Name = "numObjectives", Type = "number", Nilable = false },
- { Name = "mapID", Type = "number", Nilable = false },
- { Name = "isQuestStart", Type = "bool", Nilable = false },
- { Name = "isDaily", Type = "bool", Nilable = false },
- { Name = "isCombatAllyQuest", Type = "bool", Nilable = false },
- { Name = "isMeta", Type = "bool", Nilable = false },
- { Name = "childDepth", Type = "number", Nilable = true },
- },
- },
},
};
diff --git a/Interface/AddOns/Blizzard_APIDocumentationGenerated/RaidLocksDocumentation.lua b/Interface/AddOns/Blizzard_APIDocumentationGenerated/RaidLocksDocumentation.lua
index 87740c5552..fac64f53d1 100644
--- a/Interface/AddOns/Blizzard_APIDocumentationGenerated/RaidLocksDocumentation.lua
+++ b/Interface/AddOns/Blizzard_APIDocumentationGenerated/RaidLocksDocumentation.lua
@@ -6,6 +6,21 @@ local RaidLocks =
Functions =
{
+ {
+ Name = "GetRedirectedDifficultyID",
+ Type = "Function",
+
+ Arguments =
+ {
+ { Name = "mapID", Type = "number", Nilable = false },
+ { Name = "difficultyID", Type = "number", Nilable = false },
+ },
+
+ Returns =
+ {
+ { Name = "redirectedDifficultyID", Type = "number", Nilable = false },
+ },
+ },
{
Name = "IsEncounterComplete",
Type = "Function",
diff --git a/Interface/AddOns/Blizzard_APIDocumentationGenerated/RecruitAFriendDocumentation.lua b/Interface/AddOns/Blizzard_APIDocumentationGenerated/RecruitAFriendDocumentation.lua
index bd437ad791..fc86593097 100644
--- a/Interface/AddOns/Blizzard_APIDocumentationGenerated/RecruitAFriendDocumentation.lua
+++ b/Interface/AddOns/Blizzard_APIDocumentationGenerated/RecruitAFriendDocumentation.lua
@@ -7,26 +7,98 @@ local RecruitAFriend =
Functions =
{
{
- Name = "CanGrantLevel",
+ Name = "CanSummonFriend",
Type = "Function",
+ Arguments =
+ {
+ { Name = "guid", Type = "WOWGUID", Nilable = false },
+ },
+
Returns =
{
{ Name = "result", Type = "bool", Nilable = false },
},
},
{
- Name = "CanSummonFriend",
+ Name = "ClaimActivityReward",
Type = "Function",
Arguments =
{
- { Name = "guid", Type = "WOWGUID", Nilable = false },
+ { Name = "activityID", Type = "number", Nilable = false },
+ { Name = "acceptanceID", Type = "RecruitAcceptanceID", Nilable = false },
},
Returns =
{
- { Name = "result", Type = "bool", Nilable = false },
+ { Name = "success", Type = "bool", Nilable = false },
+ },
+ },
+ {
+ Name = "ClaimNextReward",
+ Type = "Function",
+
+ Arguments =
+ {
+ { Name = "rafVersion", Type = "RecruitAFriendRewardsVersion", Nilable = true },
+ },
+
+ Returns =
+ {
+ { Name = "success", Type = "bool", Nilable = false },
+ },
+ },
+ {
+ Name = "GenerateRecruitmentLink",
+ Type = "Function",
+
+ Returns =
+ {
+ { Name = "success", Type = "bool", Nilable = false },
+ },
+ },
+ {
+ Name = "GetRAFInfo",
+ Type = "Function",
+
+ Returns =
+ {
+ { Name = "info", Type = "RafInfo", Nilable = false },
+ },
+ },
+ {
+ Name = "GetRAFSystemInfo",
+ Type = "Function",
+
+ Returns =
+ {
+ { Name = "systemInfo", Type = "RafSystemInfo", Nilable = false },
+ },
+ },
+ {
+ Name = "GetRecruitActivityRequirementsText",
+ Type = "Function",
+
+ Arguments =
+ {
+ { Name = "activityID", Type = "number", Nilable = false },
+ { Name = "acceptanceID", Type = "RecruitAcceptanceID", Nilable = false },
+ },
+
+ Returns =
+ {
+ { Name = "requirementsText", Type = "table", InnerType = "string", Nilable = false },
+ },
+ },
+ {
+ Name = "GetRecruitInfo",
+ Type = "Function",
+
+ Returns =
+ {
+ { Name = "active", Type = "bool", Nilable = false },
+ { Name = "faction", Type = "number", Nilable = false },
},
},
{
@@ -41,12 +113,21 @@ local RecruitAFriend =
},
},
{
- Name = "IsReferAFriendLinked",
+ Name = "IsEnabled",
+ Type = "Function",
+
+ Returns =
+ {
+ { Name = "enabled", Type = "bool", Nilable = false },
+ },
+ },
+ {
+ Name = "IsRecruitAFriendLinked",
Type = "Function",
Arguments =
{
- { Name = "guid", Type = "UnitToken", Nilable = false },
+ { Name = "guid", Type = "WOWGUID", Nilable = false },
},
Returns =
@@ -54,6 +135,38 @@ local RecruitAFriend =
{ Name = "result", Type = "bool", Nilable = false },
},
},
+ {
+ Name = "IsRecruitingEnabled",
+ Type = "Function",
+
+ Returns =
+ {
+ { Name = "enabled", Type = "bool", Nilable = false },
+ },
+ },
+ {
+ Name = "RemoveRAFRecruit",
+ Type = "Function",
+
+ Arguments =
+ {
+ { Name = "wowAccountGUID", Type = "WOWGUID", Nilable = false },
+ },
+
+ Returns =
+ {
+ { Name = "success", Type = "bool", Nilable = false },
+ },
+ },
+ {
+ Name = "RequestUpdatedRecruitmentInfo",
+ Type = "Function",
+
+ Returns =
+ {
+ { Name = "success", Type = "bool", Nilable = false },
+ },
+ },
{
Name = "SummonFriend",
Type = "Function",
@@ -69,74 +182,260 @@ local RecruitAFriend =
Events =
{
{
- Name = "LevelGrantProposed",
+ Name = "RafInfoUpdated",
Type = "Event",
- LiteralName = "LEVEL_GRANT_PROPOSED",
+ LiteralName = "RAF_INFO_UPDATED",
Payload =
{
- { Name = "senderName", Type = "cstring", Nilable = false },
+ { Name = "info", Type = "RafInfo", Nilable = false },
},
},
{
- Name = "PartyReferAFriendUpdated",
+ Name = "RafRecruitingEnabledStatus",
Type = "Event",
- LiteralName = "PARTY_REFER_A_FRIEND_UPDATED",
+ LiteralName = "RAF_RECRUITING_ENABLED_STATUS",
Payload =
{
- { Name = "unitTarget", Type = "UnitToken", Nilable = false },
+ { Name = "enabled", Type = "bool", Nilable = false },
},
},
{
- Name = "RecruitAFriendCanEmail",
+ Name = "RafRewardClaimFailed",
Type = "Event",
- LiteralName = "RECRUIT_A_FRIEND_CAN_EMAIL",
+ LiteralName = "RAF_REWARD_CLAIM_FAILED",
+ },
+ {
+ Name = "RafSystemEnabledStatus",
+ Type = "Event",
+ LiteralName = "RAF_SYSTEM_ENABLED_STATUS",
Payload =
{
- { Name = "resultCode", Type = "number", Nilable = false },
+ { Name = "enabled", Type = "bool", Nilable = false },
},
},
{
- Name = "RecruitAFriendInvitationFailed",
+ Name = "RafSystemInfoUpdated",
Type = "Event",
- LiteralName = "RECRUIT_A_FRIEND_INVITATION_FAILED",
+ LiteralName = "RAF_SYSTEM_INFO_UPDATED",
Payload =
{
- { Name = "failureReason", Type = "cstring", Nilable = false },
+ { Name = "systemInfo", Type = "RafSystemInfo", Nilable = false },
},
},
+ },
+
+ Tables =
+ {
{
- Name = "RecruitAFriendInviterFriendAdded",
- Type = "Event",
- LiteralName = "RECRUIT_A_FRIEND_INVITER_FRIEND_ADDED",
- Payload =
+ Name = "RafRecruitActivityState",
+ Type = "Enumeration",
+ NumValues = 3,
+ MinValue = 0,
+ MaxValue = 2,
+ Fields =
{
- { Name = "name", Type = "cstring", Nilable = false },
+ { Name = "Incomplete", Type = "RafRecruitActivityState", EnumValue = 0 },
+ { Name = "Complete", Type = "RafRecruitActivityState", EnumValue = 1 },
+ { Name = "RewardClaimed", Type = "RafRecruitActivityState", EnumValue = 2 },
},
},
{
- Name = "RecruitAFriendSystemStatus",
- Type = "Event",
- LiteralName = "RECRUIT_A_FRIEND_SYSTEM_STATUS",
+ Name = "RafRecruitSubStatus",
+ Type = "Enumeration",
+ NumValues = 3,
+ MinValue = 0,
+ MaxValue = 2,
+ Fields =
+ {
+ { Name = "Trial", Type = "RafRecruitSubStatus", EnumValue = 0 },
+ { Name = "Active", Type = "RafRecruitSubStatus", EnumValue = 1 },
+ { Name = "Inactive", Type = "RafRecruitSubStatus", EnumValue = 2 },
+ },
},
{
- Name = "SorByTextUpdated",
- Type = "Event",
- LiteralName = "SOR_BY_TEXT_UPDATED",
+ Name = "RafRewardType",
+ Type = "Enumeration",
+ NumValues = 8,
+ MinValue = 0,
+ MaxValue = 7,
+ Fields =
+ {
+ { Name = "Pet", Type = "RafRewardType", EnumValue = 0 },
+ { Name = "Mount", Type = "RafRewardType", EnumValue = 1 },
+ { Name = "Appearance", Type = "RafRewardType", EnumValue = 2 },
+ { Name = "Title", Type = "RafRewardType", EnumValue = 3 },
+ { Name = "GameTime", Type = "RafRewardType", EnumValue = 4 },
+ { Name = "AppearanceSet", Type = "RafRewardType", EnumValue = 5 },
+ { Name = "Illusion", Type = "RafRewardType", EnumValue = 6 },
+ { Name = "Invalid", Type = "RafRewardType", EnumValue = 7 },
+ },
},
{
- Name = "SorCountsUpdated",
- Type = "Event",
- LiteralName = "SOR_COUNTS_UPDATED",
+ Name = "RafAppearanceInfo",
+ Type = "Structure",
+ Fields =
+ {
+ { Name = "appearanceID", Type = "number", Nilable = false },
+ },
},
{
- Name = "SorStartExperienceIncomplete",
- Type = "Event",
- LiteralName = "SOR_START_EXPERIENCE_INCOMPLETE",
+ Name = "RafAppearanceSetInfo",
+ Type = "Structure",
+ Fields =
+ {
+ { Name = "setID", Type = "number", Nilable = false },
+ { Name = "setName", Type = "string", Nilable = false },
+ { Name = "appearanceIDs", Type = "table", InnerType = "number", Nilable = false },
+ },
+ },
+ {
+ Name = "RafIllusionInfo",
+ Type = "Structure",
+ Fields =
+ {
+ { Name = "spellItemEnchantmentID", Type = "number", Nilable = false },
+ },
+ },
+ {
+ Name = "RafInfo",
+ Type = "Structure",
+ Fields =
+ {
+ { Name = "versions", Type = "table", InnerType = "RafVersionInfo", Nilable = false },
+ { Name = "recruitmentInfo", Type = "RafRecruitmentinfo", Nilable = true },
+ { Name = "recruits", Type = "table", InnerType = "RafRecruit", Nilable = false },
+ { Name = "claimInProgress", Type = "bool", Nilable = false },
+ },
+ },
+ {
+ Name = "RafMonthCount",
+ Type = "Structure",
+ Fields =
+ {
+ { Name = "lifetimeMonths", Type = "number", Nilable = false },
+ { Name = "spentMonths", Type = "number", Nilable = false },
+ { Name = "availableMonths", Type = "number", Nilable = false },
+ },
+ },
+ {
+ Name = "RafMountInfo",
+ Type = "Structure",
+ Fields =
+ {
+ { Name = "spellID", Type = "number", Nilable = false },
+ { Name = "mountID", Type = "number", Nilable = false },
+ },
+ },
+ {
+ Name = "RafPetInfo",
+ Type = "Structure",
+ Fields =
+ {
+ { Name = "creatureID", Type = "number", Nilable = false },
+ { Name = "speciesID", Type = "number", Nilable = false },
+ { Name = "displayID", Type = "number", Nilable = false },
+ { Name = "speciesName", Type = "string", Nilable = false },
+ { Name = "description", Type = "string", Nilable = false },
+ },
+ },
+ {
+ Name = "RafRecruit",
+ Type = "Structure",
+ Fields =
+ {
+ { Name = "bnetAccountID", Type = "number", Nilable = false },
+ { Name = "wowAccountGUID", Type = "WOWGUID", Nilable = false },
+ { Name = "battleTag", Type = "string", Nilable = false },
+ { Name = "monthsRemaining", Type = "number", Nilable = false },
+ { Name = "subStatus", Type = "RafRecruitSubStatus", Nilable = false },
+ { Name = "acceptanceID", Type = "RecruitAcceptanceID", Nilable = false },
+ { Name = "versionRecruited", Type = "RecruitAFriendRewardsVersion", Nilable = false },
+ { Name = "activities", Type = "table", InnerType = "RafRecruitActivity", Nilable = false },
+ },
+ },
+ {
+ Name = "RafRecruitActivity",
+ Type = "Structure",
+ Fields =
+ {
+ { Name = "activityID", Type = "number", Nilable = false },
+ { Name = "rewardQuestID", Type = "number", Nilable = false },
+ { Name = "state", Type = "RafRecruitActivityState", Nilable = false },
+ },
+ },
+ {
+ Name = "RafRecruitmentinfo",
+ Type = "Structure",
+ Fields =
+ {
+ { Name = "recruitmentCode", Type = "string", Nilable = false },
+ { Name = "recruitmentURL", Type = "string", Nilable = false },
+ { Name = "expireTime", Type = "number", Nilable = false },
+ { Name = "remainingTimeSeconds", Type = "number", Nilable = false },
+ { Name = "totalUses", Type = "number", Nilable = false },
+ { Name = "remainingUses", Type = "number", Nilable = false },
+ { Name = "sourceRealm", Type = "string", Nilable = false },
+ { Name = "sourceFaction", Type = "string", Nilable = false },
+ },
+ },
+ {
+ Name = "RafReward",
+ Type = "Structure",
+ Fields =
+ {
+ { Name = "rewardID", Type = "number", Nilable = false },
+ { Name = "rafVersion", Type = "RecruitAFriendRewardsVersion", Nilable = false },
+ { Name = "itemID", Type = "number", Nilable = false },
+ { Name = "rewardType", Type = "RafRewardType", Nilable = false },
+ { Name = "petInfo", Type = "RafPetInfo", Nilable = true },
+ { Name = "mountInfo", Type = "RafMountInfo", Nilable = true },
+ { Name = "appearanceInfo", Type = "RafAppearanceInfo", Nilable = true },
+ { Name = "titleInfo", Type = "RafTitleInfo", Nilable = true },
+ { Name = "appearanceSetInfo", Type = "RafAppearanceSetInfo", Nilable = true },
+ { Name = "illusionInfo", Type = "RafIllusionInfo", Nilable = true },
+ { Name = "canClaim", Type = "bool", Nilable = false },
+ { Name = "claimed", Type = "bool", Nilable = false },
+ { Name = "canAfford", Type = "bool", Nilable = false },
+ { Name = "repeatable", Type = "bool", Nilable = false },
+ { Name = "repeatableClaimCount", Type = "number", Nilable = false },
+ { Name = "monthsRequired", Type = "number", Nilable = false },
+ { Name = "monthCost", Type = "number", Nilable = false },
+ { Name = "availableInMonths", Type = "number", Nilable = false },
+ { Name = "iconID", Type = "fileID", Nilable = false },
+ },
+ },
+ {
+ Name = "RafSystemInfo",
+ Type = "Structure",
+ Fields =
+ {
+ { Name = "maxRecruits", Type = "number", Nilable = false },
+ { Name = "maxRecruitMonths", Type = "number", Nilable = false },
+ { Name = "maxRecruitmentUses", Type = "number", Nilable = false },
+ { Name = "daysInCycle", Type = "number", Nilable = false },
+ },
+ },
+ {
+ Name = "RafTitleInfo",
+ Type = "Structure",
+ Fields =
+ {
+ { Name = "titleMaskID", Type = "number", Nilable = false },
+ },
+ },
+ {
+ Name = "RafVersionInfo",
+ Type = "Structure",
+ Fields =
+ {
+ { Name = "rafVersion", Type = "RecruitAFriendRewardsVersion", Nilable = false },
+ { Name = "monthCount", Type = "RafMonthCount", Nilable = false },
+ { Name = "rewards", Type = "table", InnerType = "RafReward", Nilable = false },
+ { Name = "nextReward", Type = "RafReward", Nilable = true },
+ { Name = "numAffordableRewards", Type = "number", Nilable = false },
+ { Name = "numRecruits", Type = "number", Nilable = false },
+ },
},
- },
-
- Tables =
- {
},
};
diff --git a/Interface/AddOns/Blizzard_APIDocumentationGenerated/ScenarioInfoDocumentation.lua b/Interface/AddOns/Blizzard_APIDocumentationGenerated/ScenarioInfoDocumentation.lua
new file mode 100644
index 0000000000..4d43f6e125
--- /dev/null
+++ b/Interface/AddOns/Blizzard_APIDocumentationGenerated/ScenarioInfoDocumentation.lua
@@ -0,0 +1,251 @@
+local ScenarioInfo =
+{
+ Name = "ScenarioInfo",
+ Type = "System",
+ Namespace = "C_ScenarioInfo",
+
+ Functions =
+ {
+ {
+ Name = "GetCriteriaInfo",
+ Type = "Function",
+
+ Arguments =
+ {
+ { Name = "criteriaIndex", Type = "number", Nilable = false },
+ },
+
+ Returns =
+ {
+ { Name = "scenarioCriteriaInfo", Type = "ScenarioCriteriaInfo", Nilable = false },
+ },
+ },
+ {
+ Name = "GetCriteriaInfoByStep",
+ Type = "Function",
+
+ Arguments =
+ {
+ { Name = "stepID", Type = "number", Nilable = false },
+ { Name = "criteriaIndex", Type = "number", Nilable = false },
+ },
+
+ Returns =
+ {
+ { Name = "scenarioCriteriaInfo", Type = "ScenarioCriteriaInfo", Nilable = false },
+ },
+ },
+ {
+ Name = "GetJailersTowerTypeString",
+ Type = "Function",
+
+ Arguments =
+ {
+ { Name = "runType", Type = "JailersTowerType", Nilable = false },
+ },
+
+ Returns =
+ {
+ { Name = "typeString", Type = "cstring", Nilable = true },
+ },
+ },
+ {
+ Name = "GetScenarioInfo",
+ Type = "Function",
+
+ Returns =
+ {
+ { Name = "scenarioInfo", Type = "ScenarioInformation", Nilable = false },
+ },
+ },
+ {
+ Name = "GetScenarioStepInfo",
+ Type = "Function",
+
+ Arguments =
+ {
+ { Name = "scenarioStepID", Type = "number", Nilable = true },
+ },
+
+ Returns =
+ {
+ { Name = "scenarioStepInfo", Type = "ScenarioStepInfo", Nilable = false },
+ },
+ },
+ },
+
+ Events =
+ {
+ {
+ Name = "JailersTowerLevelUpdate",
+ Type = "Event",
+ LiteralName = "JAILERS_TOWER_LEVEL_UPDATE",
+ Payload =
+ {
+ { Name = "level", Type = "number", Nilable = false },
+ { Name = "type", Type = "JailersTowerType", Nilable = false },
+ },
+ },
+ {
+ Name = "ScenarioBonusObjectiveComplete",
+ Type = "Event",
+ LiteralName = "SCENARIO_BONUS_OBJECTIVE_COMPLETE",
+ Payload =
+ {
+ { Name = "bonusObjectiveID", Type = "number", Nilable = false },
+ },
+ },
+ {
+ Name = "ScenarioBonusVisibilityUpdate",
+ Type = "Event",
+ LiteralName = "SCENARIO_BONUS_VISIBILITY_UPDATE",
+ },
+ {
+ Name = "ScenarioCompleted",
+ Type = "Event",
+ LiteralName = "SCENARIO_COMPLETED",
+ Payload =
+ {
+ { Name = "questID", Type = "number", Nilable = true },
+ { Name = "xp", Type = "number", Nilable = true },
+ { Name = "money", Type = "number", Nilable = true },
+ },
+ },
+ {
+ Name = "ScenarioCriteriaShowStateUpdate",
+ Type = "Event",
+ LiteralName = "SCENARIO_CRITERIA_SHOW_STATE_UPDATE",
+ Payload =
+ {
+ { Name = "show", Type = "bool", Nilable = false },
+ },
+ },
+ {
+ Name = "ScenarioCriteriaUpdate",
+ Type = "Event",
+ LiteralName = "SCENARIO_CRITERIA_UPDATE",
+ Payload =
+ {
+ { Name = "criteriaID", Type = "number", Nilable = false },
+ },
+ },
+ {
+ Name = "ScenarioPoiUpdate",
+ Type = "Event",
+ LiteralName = "SCENARIO_POI_UPDATE",
+ },
+ {
+ Name = "ScenarioSpellUpdate",
+ Type = "Event",
+ LiteralName = "SCENARIO_SPELL_UPDATE",
+ },
+ {
+ Name = "ScenarioUpdate",
+ Type = "Event",
+ LiteralName = "SCENARIO_UPDATE",
+ Payload =
+ {
+ { Name = "newStep", Type = "bool", Nilable = true },
+ },
+ },
+ },
+
+ Tables =
+ {
+ {
+ Name = "JailersTowerType",
+ Type = "Enumeration",
+ NumValues = 15,
+ MinValue = 0,
+ MaxValue = 14,
+ Fields =
+ {
+ { Name = "TwistingCorridors", Type = "JailersTowerType", EnumValue = 0 },
+ { Name = "SkoldusHalls", Type = "JailersTowerType", EnumValue = 1 },
+ { Name = "FractureChambers", Type = "JailersTowerType", EnumValue = 2 },
+ { Name = "Soulforges", Type = "JailersTowerType", EnumValue = 3 },
+ { Name = "Coldheart", Type = "JailersTowerType", EnumValue = 4 },
+ { Name = "Mortregar", Type = "JailersTowerType", EnumValue = 5 },
+ { Name = "UpperReaches", Type = "JailersTowerType", EnumValue = 6 },
+ { Name = "ArkobanHall", Type = "JailersTowerType", EnumValue = 7 },
+ { Name = "TormentChamberJaina", Type = "JailersTowerType", EnumValue = 8 },
+ { Name = "TormentChamberThrall", Type = "JailersTowerType", EnumValue = 9 },
+ { Name = "TormentChamberAnduin", Type = "JailersTowerType", EnumValue = 10 },
+ { Name = "AdamantVaults", Type = "JailersTowerType", EnumValue = 11 },
+ { Name = "ForgottenCatacombs", Type = "JailersTowerType", EnumValue = 12 },
+ { Name = "Ossuary", Type = "JailersTowerType", EnumValue = 13 },
+ { Name = "BossRush", Type = "JailersTowerType", EnumValue = 14 },
+ },
+ },
+ {
+ Name = "ScenarioCriteriaInfo",
+ Type = "Structure",
+ Fields =
+ {
+ { Name = "description", Type = "string", Nilable = false },
+ { Name = "criteriaType", Type = "number", Nilable = false, Default = 0 },
+ { Name = "completed", Type = "bool", Nilable = false, Default = false },
+ { Name = "quantity", Type = "number", Nilable = false, Default = 0 },
+ { Name = "totalQuantity", Type = "number", Nilable = false, Default = 0 },
+ { Name = "flags", Type = "number", Nilable = false, Default = 0 },
+ { Name = "assetID", Type = "number", Nilable = false, Default = 0 },
+ { Name = "criteriaID", Type = "number", Nilable = false },
+ { Name = "duration", Type = "number", Nilable = false, Default = 0 },
+ { Name = "elapsed", Type = "number", Nilable = false, Default = 0 },
+ { Name = "failed", Type = "bool", Nilable = false, Default = false },
+ { Name = "isWeightedProgress", Type = "bool", Nilable = false, Default = false },
+ { Name = "isFormatted", Type = "bool", Nilable = false, Default = false },
+ { Name = "quantityString", Type = "string", Nilable = false },
+ },
+ },
+ {
+ Name = "ScenarioInformation",
+ Type = "Structure",
+ Fields =
+ {
+ { Name = "name", Type = "string", Nilable = false },
+ { Name = "currentStage", Type = "number", Nilable = false },
+ { Name = "numStages", Type = "number", Nilable = false },
+ { Name = "flags", Type = "number", Nilable = false },
+ { Name = "isComplete", Type = "bool", Nilable = false },
+ { Name = "xp", Type = "number", Nilable = false },
+ { Name = "money", Type = "number", Nilable = false },
+ { Name = "type", Type = "number", Nilable = false },
+ { Name = "area", Type = "string", Nilable = false },
+ { Name = "uiTextureKit", Type = "textureKit", Nilable = false },
+ { Name = "scenarioID", Type = "number", Nilable = false },
+ },
+ },
+ {
+ Name = "ScenarioStepInfo",
+ Type = "Structure",
+ Fields =
+ {
+ { Name = "title", Type = "string", Nilable = false },
+ { Name = "description", Type = "string", Nilable = false },
+ { Name = "numCriteria", Type = "number", Nilable = false },
+ { Name = "stepFailed", Type = "bool", Nilable = false },
+ { Name = "isBonusStep", Type = "bool", Nilable = false },
+ { Name = "isForCurrentStepOnly", Type = "bool", Nilable = false },
+ { Name = "shouldShowBonusObjective", Type = "bool", Nilable = false },
+ { Name = "spells", Type = "table", InnerType = "ScenarioStepSpellInfo", Nilable = false },
+ { Name = "weightedProgress", Type = "number", Nilable = true },
+ { Name = "rewardQuestID", Type = "number", Nilable = false },
+ { Name = "widgetSetID", Type = "number", Nilable = true },
+ { Name = "stepID", Type = "number", Nilable = false },
+ },
+ },
+ {
+ Name = "ScenarioStepSpellInfo",
+ Type = "Structure",
+ Fields =
+ {
+ { Name = "spellID", Type = "number", Nilable = false },
+ { Name = "name", Type = "string", Nilable = false },
+ { Name = "icon", Type = "number", Nilable = false },
+ },
+ },
+ },
+};
+
+APIDocumentation:AddDocumentationTable(ScenarioInfo);
\ No newline at end of file
diff --git a/Interface/AddOns/Blizzard_APIDocumentationGenerated/ScreenLocationConstantsDocumentation.lua b/Interface/AddOns/Blizzard_APIDocumentationGenerated/ScreenLocationConstantsDocumentation.lua
new file mode 100644
index 0000000000..40da0f4a26
--- /dev/null
+++ b/Interface/AddOns/Blizzard_APIDocumentationGenerated/ScreenLocationConstantsDocumentation.lua
@@ -0,0 +1,30 @@
+local ScreenLocationConstants =
+{
+ Tables =
+ {
+ {
+ Name = "ScreenLocationType",
+ Type = "Enumeration",
+ NumValues = 12,
+ MinValue = 0,
+ MaxValue = 11,
+ Fields =
+ {
+ { Name = "Center", Type = "ScreenLocationType", EnumValue = 0 },
+ { Name = "Left", Type = "ScreenLocationType", EnumValue = 1 },
+ { Name = "Right", Type = "ScreenLocationType", EnumValue = 2 },
+ { Name = "Top", Type = "ScreenLocationType", EnumValue = 3 },
+ { Name = "Bottom", Type = "ScreenLocationType", EnumValue = 4 },
+ { Name = "TopLeft", Type = "ScreenLocationType", EnumValue = 5 },
+ { Name = "TopRight", Type = "ScreenLocationType", EnumValue = 6 },
+ { Name = "LeftOutside", Type = "ScreenLocationType", EnumValue = 7 },
+ { Name = "RightOutside", Type = "ScreenLocationType", EnumValue = 8 },
+ { Name = "LeftRight", Type = "ScreenLocationType", EnumValue = 9 },
+ { Name = "TopBottom", Type = "ScreenLocationType", EnumValue = 10 },
+ { Name = "LeftRightOutside", Type = "ScreenLocationType", EnumValue = 11 },
+ },
+ },
+ },
+};
+
+APIDocumentation:AddDocumentationTable(ScreenLocationConstants);
\ No newline at end of file
diff --git a/Interface/AddOns/Blizzard_APIDocumentationGenerated/SimpleStatusBarAPIDocumentation.lua b/Interface/AddOns/Blizzard_APIDocumentationGenerated/SimpleStatusBarAPIDocumentation.lua
index 8ff757cfe1..c0df79228a 100644
--- a/Interface/AddOns/Blizzard_APIDocumentationGenerated/SimpleStatusBarAPIDocumentation.lua
+++ b/Interface/AddOns/Blizzard_APIDocumentationGenerated/SimpleStatusBarAPIDocumentation.lua
@@ -235,6 +235,11 @@ local SimpleStatusBarAPI =
{
{ Name = "asset", Type = "TextureAsset", Nilable = false },
},
+
+ Returns =
+ {
+ { Name = "success", Type = "bool", Nilable = false },
+ },
},
{
Name = "SetValue",
diff --git a/Interface/AddOns/Blizzard_APIDocumentationGenerated/SocialQueueDocumentation.lua b/Interface/AddOns/Blizzard_APIDocumentationGenerated/SocialQueueDocumentation.lua
index 58bad1e0e5..28849c0989 100644
--- a/Interface/AddOns/Blizzard_APIDocumentationGenerated/SocialQueueDocumentation.lua
+++ b/Interface/AddOns/Blizzard_APIDocumentationGenerated/SocialQueueDocumentation.lua
@@ -10,6 +10,21 @@ local SocialQueue =
Events =
{
+ {
+ Name = "SocialQueueConfigUpdated",
+ Type = "Event",
+ LiteralName = "SOCIAL_QUEUE_CONFIG_UPDATED",
+ },
+ {
+ Name = "SocialQueueUpdate",
+ Type = "Event",
+ LiteralName = "SOCIAL_QUEUE_UPDATE",
+ Payload =
+ {
+ { Name = "groupGUID", Type = "WOWGUID", Nilable = false },
+ { Name = "numAddedItems", Type = "number", Nilable = true },
+ },
+ },
},
Tables =
@@ -55,6 +70,7 @@ local SocialQueue =
{ Name = "needHealer", Type = "bool", Nilable = false },
{ Name = "needDamage", Type = "bool", Nilable = false },
{ Name = "isSoloQueueParty", Type = "bool", Nilable = false },
+ { Name = "questSessionActive", Type = "bool", Nilable = false },
{ Name = "leaderGUID", Type = "WOWGUID", Nilable = false },
},
},
diff --git a/Interface/AddOns/Blizzard_APIDocumentationGenerated/SocialRestrictionsDocumentation.lua b/Interface/AddOns/Blizzard_APIDocumentationGenerated/SocialRestrictionsDocumentation.lua
index 2fe74db1d9..dcaf3a4484 100644
--- a/Interface/AddOns/Blizzard_APIDocumentationGenerated/SocialRestrictionsDocumentation.lua
+++ b/Interface/AddOns/Blizzard_APIDocumentationGenerated/SocialRestrictionsDocumentation.lua
@@ -10,13 +10,33 @@ local SocialRestrictions =
Name = "AcknowledgeRegionalChatDisabled",
Type = "Function",
},
+ {
+ Name = "CanReceiveChat",
+ Type = "Function",
+ Documentation = { "Returns true if the player meets all conditions that allow them to receive chat messages." },
+
+ Returns =
+ {
+ { Name = "canReceiveChat", Type = "bool", Nilable = false },
+ },
+ },
+ {
+ Name = "CanSendChat",
+ Type = "Function",
+ Documentation = { "Returns true if the player meets all conditions that allow them to send chat messages." },
+
+ Returns =
+ {
+ { Name = "canSendChat", Type = "bool", Nilable = false },
+ },
+ },
{
Name = "IsChatDisabled",
Type = "Function",
Returns =
{
- { Name = "isDisabled", Type = "bool", Nilable = false },
+ { Name = "disabled", Type = "bool", Nilable = false },
},
},
{
diff --git a/Interface/AddOns/Blizzard_APIDocumentationGenerated/SpecializationInfoDocumentation.lua b/Interface/AddOns/Blizzard_APIDocumentationGenerated/SpecializationInfoDocumentation.lua
index c75f3d50cb..cbfea2cf61 100644
--- a/Interface/AddOns/Blizzard_APIDocumentationGenerated/SpecializationInfoDocumentation.lua
+++ b/Interface/AddOns/Blizzard_APIDocumentationGenerated/SpecializationInfoDocumentation.lua
@@ -6,6 +6,20 @@ local SpecializationInfo =
Functions =
{
+ {
+ Name = "GetNumSpecializationsForClassID",
+ Type = "Function",
+
+ Arguments =
+ {
+ { Name = "specID", Type = "number", Nilable = false },
+ },
+
+ Returns =
+ {
+ { Name = "specCount", Type = "number", Nilable = false },
+ },
+ },
},
Events =
diff --git a/Interface/AddOns/Blizzard_APIDocumentationGenerated/SpellActivationOverlayDocumentation.lua b/Interface/AddOns/Blizzard_APIDocumentationGenerated/SpellActivationOverlayDocumentation.lua
index 34b5e87e3f..9a43d5316d 100644
--- a/Interface/AddOns/Blizzard_APIDocumentationGenerated/SpellActivationOverlayDocumentation.lua
+++ b/Interface/AddOns/Blizzard_APIDocumentationGenerated/SpellActivationOverlayDocumentation.lua
@@ -45,7 +45,7 @@ local SpellActivationOverlay =
{
{ Name = "spellID", Type = "number", Nilable = false },
{ Name = "overlayFileDataID", Type = "number", Nilable = false },
- { Name = "locationName", Type = "cstring", Nilable = false },
+ { Name = "locationType", Type = "ScreenLocationType", Nilable = false },
{ Name = "scale", Type = "number", Nilable = false },
{ Name = "r", Type = "number", Nilable = false },
{ Name = "g", Type = "number", Nilable = false },
diff --git a/Interface/AddOns/Blizzard_APIDocumentationGenerated/SpellDocumentation.lua b/Interface/AddOns/Blizzard_APIDocumentationGenerated/SpellDocumentation.lua
index e723af2fac..6f8feb20d0 100644
--- a/Interface/AddOns/Blizzard_APIDocumentationGenerated/SpellDocumentation.lua
+++ b/Interface/AddOns/Blizzard_APIDocumentationGenerated/SpellDocumentation.lua
@@ -13,7 +13,7 @@ local Spell =
Arguments =
{
- { Name = "spellIdentifier", Type = "SpellIdentifier", Nilable = false, Documentation = { "Spell ID, name, name(subtext), or link" } },
+ { Name = "spellIdentifier", Type = "SpellIdentifier", Nilable = false, Documentation = { "Spell ID, name, name(subtext), or link; Using name will always check for an override on that spell" } },
},
Returns =
@@ -87,7 +87,7 @@ local Spell =
Arguments =
{
- { Name = "spellIdentifier", Type = "SpellIdentifier", Nilable = false, Documentation = { "Spell ID, name, name(subtext), or link; If passed a spell ID, will return same id as was passed" } },
+ { Name = "spellIdentifier", Type = "SpellIdentifier", Nilable = false, Documentation = { "Spell ID, name, name(subtext), or link; Using name will always check for an override on that spell; If passed a spell ID, will return same id as was passed" } },
},
Returns =
@@ -102,7 +102,7 @@ local Spell =
Arguments =
{
- { Name = "spellIdentifier", Type = "SpellIdentifier", Nilable = false, Documentation = { "Spell ID, name, name(subtext), or link" } },
+ { Name = "spellIdentifier", Type = "SpellIdentifier", Nilable = false, Documentation = { "Spell ID, name, name(subtext), or link; Using name will always check for an override on that spell" } },
},
Returns =
diff --git a/Interface/AddOns/Blizzard_APIDocumentationGenerated/TraitConstantsDocumentation.lua b/Interface/AddOns/Blizzard_APIDocumentationGenerated/TraitConstantsDocumentation.lua
index 172c236a88..af134f1f63 100644
--- a/Interface/AddOns/Blizzard_APIDocumentationGenerated/TraitConstantsDocumentation.lua
+++ b/Interface/AddOns/Blizzard_APIDocumentationGenerated/TraitConstantsDocumentation.lua
@@ -263,13 +263,14 @@ local TraitConstants =
{
Name = "TraitSystemFlag",
Type = "Enumeration",
- NumValues = 2,
+ NumValues = 3,
MinValue = 1,
- MaxValue = 2,
+ MaxValue = 4,
Fields =
{
{ Name = "AllowMultipleLoadoutsPerTree", Type = "TraitSystemFlag", EnumValue = 1 },
{ Name = "ShowSpendConfirmation", Type = "TraitSystemFlag", EnumValue = 2 },
+ { Name = "AllowEditInCombat", Type = "TraitSystemFlag", EnumValue = 4 },
},
},
{
diff --git a/Interface/AddOns/Blizzard_APIDocumentationGenerated/TransmogDocumentation.lua b/Interface/AddOns/Blizzard_APIDocumentationGenerated/TransmogDocumentation.lua
index ae39c8bb68..7e53856e67 100644
--- a/Interface/AddOns/Blizzard_APIDocumentationGenerated/TransmogDocumentation.lua
+++ b/Interface/AddOns/Blizzard_APIDocumentationGenerated/TransmogDocumentation.lua
@@ -268,6 +268,15 @@ local Transmog =
{ Name = "isBeingCollapsed", Type = "bool", Nilable = false },
},
},
+ {
+ Name = "LoadOutfit",
+ Type = "Function",
+
+ Arguments =
+ {
+ { Name = "outfitID", Type = "number", Nilable = false },
+ },
+ },
{
Name = "SetPending",
Type = "Function",
diff --git a/Interface/AddOns/Blizzard_APIDocumentationGenerated/TransmogItemsDocumentation.lua b/Interface/AddOns/Blizzard_APIDocumentationGenerated/TransmogItemsDocumentation.lua
index 88a9e5ac5f..b1149a61aa 100644
--- a/Interface/AddOns/Blizzard_APIDocumentationGenerated/TransmogItemsDocumentation.lua
+++ b/Interface/AddOns/Blizzard_APIDocumentationGenerated/TransmogItemsDocumentation.lua
@@ -39,6 +39,20 @@ local TransmogItems =
{ Name = "areAllSourceTypeFiltersChecked", Type = "bool", Nilable = false },
},
},
+ {
+ Name = "CanAppearanceBeDisplayedOnPlayer",
+ Type = "Function",
+
+ Arguments =
+ {
+ { Name = "itemAppearanceID", Type = "number", Nilable = false },
+ },
+
+ Returns =
+ {
+ { Name = "canAppearanceBeDisplayedOnPlayer", Type = "bool", Nilable = false },
+ },
+ },
{
Name = "ClearNewAppearance",
Type = "Function",
@@ -62,6 +76,15 @@ local TransmogItems =
{ Name = "completed", Type = "bool", Nilable = false },
},
},
+ {
+ Name = "DeleteOutfit",
+ Type = "Function",
+
+ Arguments =
+ {
+ { Name = "outfitID", Type = "number", Nilable = false },
+ },
+ },
{
Name = "EndSearch",
Type = "Function",
@@ -300,6 +323,15 @@ local TransmogItems =
{ Name = "category", Type = "TransmogCollectionType", Nilable = false },
},
},
+ {
+ Name = "GetNumMaxOutfits",
+ Type = "Function",
+
+ Returns =
+ {
+ { Name = "maxOutfits", Type = "number", Nilable = false },
+ },
+ },
{
Name = "GetNumTransmogSources",
Type = "Function",
@@ -309,6 +341,58 @@ local TransmogItems =
{ Name = "count", Type = "number", Nilable = false },
},
},
+ {
+ Name = "GetOutfitInfo",
+ Type = "Function",
+
+ Arguments =
+ {
+ { Name = "outfitID", Type = "number", Nilable = false },
+ },
+
+ Returns =
+ {
+ { Name = "name", Type = "cstring", Nilable = false },
+ { Name = "icon", Type = "fileID", Nilable = false },
+ },
+ },
+ {
+ Name = "GetOutfitItemTransmogInfoList",
+ Type = "Function",
+
+ Arguments =
+ {
+ { Name = "outfitID", Type = "number", Nilable = false },
+ },
+
+ Returns =
+ {
+ { Name = "list", Type = "table", InnerType = "ItemTransmogInfo", Nilable = false },
+ },
+ },
+ {
+ Name = "GetOutfits",
+ Type = "Function",
+
+ Returns =
+ {
+ { Name = "outfitID", Type = "table", InnerType = "number", Nilable = false },
+ },
+ },
+ {
+ Name = "GetPairedArtifactAppearance",
+ Type = "Function",
+
+ Arguments =
+ {
+ { Name = "itemModifiedAppearanceID", Type = "number", Nilable = false },
+ },
+
+ Returns =
+ {
+ { Name = "pairedItemModifiedAppearanceID", Type = "number", Nilable = false },
+ },
+ },
{
Name = "GetSourceIcon",
Type = "Function",
@@ -472,6 +556,32 @@ local TransmogItems =
{ Name = "isUsingDefaultFilters", Type = "bool", Nilable = false },
},
},
+ {
+ Name = "ModifyOutfit",
+ Type = "Function",
+
+ Arguments =
+ {
+ { Name = "outfitID", Type = "number", Nilable = false },
+ { Name = "itemTransmogInfoList", Type = "table", InnerType = "ItemTransmogInfo", Nilable = false },
+ },
+ },
+ {
+ Name = "NewOutfit",
+ Type = "Function",
+
+ Arguments =
+ {
+ { Name = "name", Type = "cstring", Nilable = false },
+ { Name = "icon", Type = "fileID", Nilable = false },
+ { Name = "itemTransmogInfoList", Type = "table", InnerType = "ItemTransmogInfo", Nilable = false },
+ },
+
+ Returns =
+ {
+ { Name = "outfitID", Type = "number", Nilable = true },
+ },
+ },
{
Name = "PlayerCanCollectSource",
Type = "Function",
@@ -530,6 +640,16 @@ local TransmogItems =
{ Name = "isKnown", Type = "bool", Nilable = false },
},
},
+ {
+ Name = "RenameOutfit",
+ Type = "Function",
+
+ Arguments =
+ {
+ { Name = "outfitID", Type = "number", Nilable = false },
+ { Name = "name", Type = "cstring", Nilable = false },
+ },
+ },
{
Name = "SearchProgress",
Type = "Function",
diff --git a/Interface/AddOns/Blizzard_APIDocumentationGenerated/UIWidgetManagerDocumentation.lua b/Interface/AddOns/Blizzard_APIDocumentationGenerated/UIWidgetManagerDocumentation.lua
index 328d9f0e61..8782ecaf69 100644
--- a/Interface/AddOns/Blizzard_APIDocumentationGenerated/UIWidgetManagerDocumentation.lua
+++ b/Interface/AddOns/Blizzard_APIDocumentationGenerated/UIWidgetManagerDocumentation.lua
@@ -242,6 +242,18 @@ local UIWidgetManager =
Tables =
{
+ {
+ Name = "IconAndTextShiftTextType",
+ Type = "Enumeration",
+ NumValues = 2,
+ MinValue = 0,
+ MaxValue = 1,
+ Fields =
+ {
+ { Name = "None", Type = "IconAndTextShiftTextType", EnumValue = 0 },
+ { Name = "ShiftText", Type = "IconAndTextShiftTextType", EnumValue = 1 },
+ },
+ },
{
Name = "IconAndTextWidgetState",
Type = "Enumeration",
@@ -361,7 +373,9 @@ local UIWidgetManager =
{ Name = "text", Type = "string", Nilable = false },
{ Name = "tooltip", Type = "string", Nilable = false },
{ Name = "dynamicTooltip", Type = "string", Nilable = false },
+ { Name = "shiftTextType", Type = "IconAndTextShiftTextType", Nilable = false },
{ Name = "textureKitID", Type = "number", Nilable = false },
+ { Name = "widgetSizeSetting", Type = "number", Nilable = false },
{ Name = "hasTimer", Type = "bool", Nilable = false },
{ Name = "orderIndex", Type = "number", Nilable = false },
{ Name = "widgetTag", Type = "string", Nilable = false },
diff --git a/Interface/AddOns/Blizzard_APIDocumentationGenerated/UnitDocumentation.lua b/Interface/AddOns/Blizzard_APIDocumentationGenerated/UnitDocumentation.lua
index 1eee7f420e..d412be0a96 100644
--- a/Interface/AddOns/Blizzard_APIDocumentationGenerated/UnitDocumentation.lua
+++ b/Interface/AddOns/Blizzard_APIDocumentationGenerated/UnitDocumentation.lua
@@ -5,15 +5,6 @@ local Unit =
Functions =
{
- {
- Name = "CanShowSetRoleButton",
- Type = "Function",
-
- Returns =
- {
- { Name = "result", Type = "bool", Nilable = false },
- },
- },
{
Name = "GetUnitPowerBarInfo",
Type = "Function",
@@ -374,21 +365,6 @@ local Unit =
{ Name = "maxPower", Type = "number", Nilable = false },
},
},
- {
- Name = "UnitSetRoleEnum",
- Type = "Function",
-
- Arguments =
- {
- { Name = "unit", Type = "UnitToken", Nilable = false },
- { Name = "role", Type = "LFGRole", Nilable = true },
- },
-
- Returns =
- {
- { Name = "result", Type = "bool", Nilable = false },
- },
- },
{
Name = "UnitSex",
Type = "Function",
diff --git a/Interface/AddOns/Blizzard_APIDocumentationGenerated/UnitRoleDocumentation.lua b/Interface/AddOns/Blizzard_APIDocumentationGenerated/UnitRoleDocumentation.lua
new file mode 100644
index 0000000000..b91f1140ea
--- /dev/null
+++ b/Interface/AddOns/Blizzard_APIDocumentationGenerated/UnitRoleDocumentation.lua
@@ -0,0 +1,114 @@
+local UnitRole =
+{
+ Name = "UnitRole",
+ Type = "System",
+
+ Functions =
+ {
+ {
+ Name = "AreClassRolesSoftSuggestions",
+ Type = "Function",
+ Documentation = { "If true, UnitGetAvailableRoles results should be treated as suggested role, not hard limits on what role the current player can display as." },
+
+ Returns =
+ {
+ { Name = "result", Type = "bool", Nilable = false },
+ },
+ },
+ {
+ Name = "CanShowSetRoleButton",
+ Type = "Function",
+
+ Returns =
+ {
+ { Name = "result", Type = "bool", Nilable = false },
+ },
+ },
+ {
+ Name = "InitiateRolePoll",
+ Type = "Function",
+
+ Returns =
+ {
+ { Name = "result", Type = "bool", Nilable = false },
+ },
+ },
+ {
+ Name = "UnitGetAvailableRoles",
+ Type = "Function",
+
+ Arguments =
+ {
+ { Name = "unit", Type = "UnitToken", Nilable = false },
+ },
+
+ Returns =
+ {
+ { Name = "tank", Type = "bool", Nilable = false },
+ { Name = "healer", Type = "bool", Nilable = false },
+ { Name = "dps", Type = "bool", Nilable = false },
+ },
+ },
+ {
+ Name = "UnitSetRole",
+ Type = "Function",
+
+ Arguments =
+ {
+ { Name = "unit", Type = "UnitToken", Nilable = false },
+ { Name = "roleStr", Type = "cstring", Nilable = true },
+ },
+
+ Returns =
+ {
+ { Name = "result", Type = "bool", Nilable = false },
+ },
+ },
+ {
+ Name = "UnitSetRoleEnum",
+ Type = "Function",
+
+ Arguments =
+ {
+ { Name = "unit", Type = "UnitToken", Nilable = false },
+ { Name = "role", Type = "LFGRole", Nilable = true },
+ },
+
+ Returns =
+ {
+ { Name = "result", Type = "bool", Nilable = false },
+ },
+ },
+ },
+
+ Events =
+ {
+ {
+ Name = "RoleChangedInform",
+ Type = "Event",
+ LiteralName = "ROLE_CHANGED_INFORM",
+ Payload =
+ {
+ { Name = "changedName", Type = "cstring", Nilable = false },
+ { Name = "fromName", Type = "cstring", Nilable = false },
+ { Name = "oldRole", Type = "cstring", Nilable = false },
+ { Name = "newRole", Type = "cstring", Nilable = false },
+ },
+ },
+ {
+ Name = "RolePollBegin",
+ Type = "Event",
+ LiteralName = "ROLE_POLL_BEGIN",
+ Payload =
+ {
+ { Name = "fromName", Type = "cstring", Nilable = false },
+ },
+ },
+ },
+
+ Tables =
+ {
+ },
+};
+
+APIDocumentation:AddDocumentationTable(UnitRole);
\ No newline at end of file
diff --git a/Interface/AddOns/Blizzard_AchievementUI/Cata/Blizzard_AchievementUI.lua b/Interface/AddOns/Blizzard_AchievementUI/Cata/Blizzard_AchievementUI.lua
index 789d22c471..7a23cb3844 100644
--- a/Interface/AddOns/Blizzard_AchievementUI/Cata/Blizzard_AchievementUI.lua
+++ b/Interface/AddOns/Blizzard_AchievementUI/Cata/Blizzard_AchievementUI.lua
@@ -65,13 +65,14 @@ function AchievementFrame_OnLoad (self)
end
local function SetFilterSelected(filter)
+ AchievementFrameFilterDropdown:SetText(filter.text);
if filter.func ~= ACHIEVEMENTUI_SELECTEDFILTER then
ACHIEVEMENTUI_SELECTEDFILTER = filter.func;
AchievementFrameAchievements_ForceUpdate();
end
end
- AchievementFrameFilterDropdown:SetWidth(112);
+ AchievementFrameFilterDropdown:SetWidth(118);
AchievementFrameFilterDropdown:SetFrameLevel(AchievementFrameFilterDropdown:GetFrameLevel() + 1);
AchievementFrameFilterDropdown:SetupMenu(function(dropdown, rootDescription)
rootDescription:SetTag("MENU_ACHIEVEMENT_FILTER", block);
diff --git a/Interface/AddOns/Blizzard_AchievementUI/Cata/Blizzard_AchievementUI.xml b/Interface/AddOns/Blizzard_AchievementUI/Cata/Blizzard_AchievementUI.xml
index 9deb190b5e..85d0d39b7b 100644
--- a/Interface/AddOns/Blizzard_AchievementUI/Cata/Blizzard_AchievementUI.xml
+++ b/Interface/AddOns/Blizzard_AchievementUI/Cata/Blizzard_AchievementUI.xml
@@ -3299,8 +3299,12 @@
-
+
+
+
+
+
diff --git a/Interface/AddOns/Blizzard_AchievementUI/Classic/Blizzard_AchievementUI.lua b/Interface/AddOns/Blizzard_AchievementUI/Classic/Blizzard_AchievementUI.lua
index 7699082b5e..74f289d132 100644
--- a/Interface/AddOns/Blizzard_AchievementUI/Classic/Blizzard_AchievementUI.lua
+++ b/Interface/AddOns/Blizzard_AchievementUI/Classic/Blizzard_AchievementUI.lua
@@ -47,13 +47,14 @@ function AchievementFrame_OnLoad (self)
end
local function SetFilterSelected(filter)
+ AchievementFrameFilterDropdown:SetText(filter.text);
if filter.func ~= ACHIEVEMENTUI_SELECTEDFILTER then
ACHIEVEMENTUI_SELECTEDFILTER = filter.func;
AchievementFrameAchievements_ForceUpdate();
end
end
- AchievementFrameFilterDropdown:SetWidth(112);
+ AchievementFrameFilterDropdown:SetWidth(118);
AchievementFrameFilterDropdown:SetFrameLevel(AchievementFrameFilterDropdown:GetFrameLevel() + 1);
AchievementFrameFilterDropdown:SetupMenu(function(dropdown, rootDescription)
rootDescription:SetTag("MENU_ACHIEVEMENT_FILTER", block);
diff --git a/Interface/AddOns/Blizzard_AchievementUI/Classic/Blizzard_AchievementUI.xml b/Interface/AddOns/Blizzard_AchievementUI/Classic/Blizzard_AchievementUI.xml
index 0c8d8d8372..0b82a81cd7 100644
--- a/Interface/AddOns/Blizzard_AchievementUI/Classic/Blizzard_AchievementUI.xml
+++ b/Interface/AddOns/Blizzard_AchievementUI/Classic/Blizzard_AchievementUI.xml
@@ -3196,8 +3196,12 @@
-
+
+
+
+
+
diff --git a/Interface/AddOns/Blizzard_ActionBar/Cata/MainMenuBarMicroButtons.lua b/Interface/AddOns/Blizzard_ActionBar/Cata/MainMenuBarMicroButtons.lua
index 5b90aca475..c55c12822c 100644
--- a/Interface/AddOns/Blizzard_ActionBar/Cata/MainMenuBarMicroButtons.lua
+++ b/Interface/AddOns/Blizzard_ActionBar/Cata/MainMenuBarMicroButtons.lua
@@ -4,6 +4,7 @@ MICRO_BUTTONS = {
"TalentMicroButton",
"AchievementMicroButton",
"QuestLogMicroButton",
+ "SocialsMicroButton",
"GuildMicroButton",
"EJMicroButton",
"CollectionsMicroButton",
@@ -63,6 +64,10 @@ function UpdateMicroButtons()
QuestLogMicroButton:SetButtonState("NORMAL");
end
+ SocialsMicroButton:UpdateMicroButton();
+
+ GuildMicroButton:UpdateMicroButton();
+
if ( EncounterJournal and EncounterJournal:IsShown() ) then
EJMicroButton:SetButtonState("PUSHED", 1);
else
@@ -129,8 +134,6 @@ function UpdateMicroButtons()
AchievementMicroButton:Disable();
end
end
-
- GuildMicroButton:UpdateMicroButton();
end
function AchievementMicroButton_OnLoad()
diff --git a/Interface/AddOns/Blizzard_ActionBar/Cata/MainMenuBarMicroButtons.xml b/Interface/AddOns/Blizzard_ActionBar/Cata/MainMenuBarMicroButtons.xml
index 53be3317c8..c9d3453eff 100644
--- a/Interface/AddOns/Blizzard_ActionBar/Cata/MainMenuBarMicroButtons.xml
+++ b/Interface/AddOns/Blizzard_ActionBar/Cata/MainMenuBarMicroButtons.xml
@@ -223,16 +223,25 @@
-
-
+
+
+
+
+
+
+
+
+
+
+
+
+
+
-
-
-
-
-
+
@@ -243,53 +252,6 @@
-
-
-
-
-
-
-
- self.tooltipText = MicroButtonTooltipText(LFG_BUTTON, "TOGGLEGROUPFINDER");
- self.newbieText = NEWBIE_TOOLTIP_LFGPARENT;
-
-
- if ( self:IsEnabled() ) then
- if ( self.down ) then
- self.down = nil;
- PVEFrame_ToggleFrame();
- return;
- end
- self.down = 1;
- end
-
-
- if ( self:IsEnabled() ) then
- if ( self.down ) then
- self.down = nil;
- if ( self:IsMouseOver() ) then
- PVEFrame_ToggleFrame();
- end
- UpdateMicroButtons();
- return;
- end
- if ( self:GetButtonState() == "NORMAL" ) then
- self.down = 1;
- else
- self.down = 1;
- end
- end
-
-
- self:SetAlpha(1);
- self:GetDisabledTexture():SetDesaturated(false);
-
-
- self:SetAlpha(0.5);
- self:GetDisabledTexture():SetDesaturated(true);
-
-
-
diff --git a/Interface/AddOns/Blizzard_ActionBar/Shared/MainMenuBarMicroButtons.lua b/Interface/AddOns/Blizzard_ActionBar/Shared/MainMenuBarMicroButtons.lua
index ce984d790b..785453a4da 100644
--- a/Interface/AddOns/Blizzard_ActionBar/Shared/MainMenuBarMicroButtons.lua
+++ b/Interface/AddOns/Blizzard_ActionBar/Shared/MainMenuBarMicroButtons.lua
@@ -1,3 +1,4 @@
+CVarCallbackRegistry:SetCVarCachable("useClassicGuildUI");
DISPLAYED_COMMUNITIES_INVITATIONS = DISPLAYED_COMMUNITIES_INVITATIONS or {};
@@ -266,6 +267,51 @@ function LFGMicroButton_OnLoad(self)
self.minLevel = SHOW_LFD_LEVEL;
end
+SocialsMicroButtonMixin = {};
+
+function SocialsMicroButtonMixin:OnLoad()
+ LoadMicroButtonTextures(self, "Socials");
+ self.tooltipText = MicroButtonTooltipText(SOCIAL_BUTTON, "TOGGLESOCIAL");
+ self.newbieText = NEWBIE_TOOLTIP_SOCIAL;
+ self:RegisterEvent("CVAR_UPDATE");
+
+ self:UpdateVisibility();
+end
+
+function SocialsMicroButtonMixin:OnEvent(event, ...)
+ if ( Kiosk.IsEnabled() ) then
+ return;
+ end
+
+ if ( event == "UPDATE_BINDINGS" ) then
+ self.tooltipText = MicroButtonTooltipText(SOCIAL_BUTTON, "TOGGLESOCIAL");
+ elseif event == "CVAR_UPDATE" then
+ local arg1 = ...;
+ if (arg1 == "useClassicGuildUI") then
+ self:UpdateVisibility();
+ end
+ end
+end
+
+function SocialsMicroButtonMixin:OnClick(button, down)
+ if ( not KeybindFrames_InQuickKeybindMode() ) then
+ ToggleFriendsFrame();
+ end
+end
+
+function SocialsMicroButtonMixin:UpdateVisibility()
+ -- With non-Classic Guild UI, use GuildMicroButton instead.
+ self:SetShown(CVarCallbackRegistry:GetCVarValueBool("useClassicGuildUI"));
+end
+
+function SocialsMicroButtonMixin:UpdateMicroButton()
+ if ( FriendsFrame and FriendsFrame:IsShown() ) then
+ self:SetButtonState("PUSHED", true);
+ else
+ self:SetButtonState("NORMAL");
+ end
+end
+
GuildMicroButtonMixin = {};
function GuildMicroButtonMixin:OnLoad()
@@ -283,6 +329,8 @@ function GuildMicroButtonMixin:OnLoad()
self:RegisterEvent("CHAT_DISABLED_CHANGED");
self:RegisterEvent("CHAT_DISABLED_CHANGE_FAILED");
self:RegisterEvent("PLAYER_GUILD_UPDATE");
+ self:RegisterEvent("CVAR_UPDATE");
+
if ( IsCommunitiesUIDisabledByTrialAccount() ) then
self:Disable();
self.disabledTooltip = ERR_RESTRICTED_ACCOUNT_TRIAL;
@@ -291,6 +339,7 @@ function GuildMicroButtonMixin:OnLoad()
self:Disable();
end
self.needsUpdate = true;
+ self:UpdateVisibility();
end
function GuildMicroButtonMixin:OnEvent(event, ...)
@@ -332,6 +381,12 @@ function GuildMicroButtonMixin:OnEvent(event, ...)
self:EvaluateAlertVisibility();
elseif ( event == "CHAT_DISABLED_CHANGE_FAILED" or event == "CHAT_DISABLED_CHANGED" ) then
self:UpdateNotificationIcon();
+ elseif event == "CVAR_UPDATE" then
+ local arg1 = ...;
+ if (arg1 == "useClassicGuildUI") then
+ self:UpdateVisibility();
+ self:UpdateMicroButton();
+ end
end
end
@@ -341,6 +396,11 @@ function GuildMicroButtonMixin:OnClick(button, down)
end
end
+function GuildMicroButtonMixin:UpdateVisibility()
+ -- With Classic Guild UI, use SocialsMicroButton instead.
+ self:SetShown(not CVarCallbackRegistry:GetCVarValueBool("useClassicGuildUI"));
+end
+
function GuildMicroButtonMixin:UpdateMicroButton()
local factionGroup = UnitFactionGroup("player");
@@ -359,17 +419,18 @@ function GuildMicroButtonMixin:UpdateMicroButton()
else
self.disabledTooltip = ERR_RESTRICTED_ACCOUNT_TRIAL;
end
- elseif ( C_Club.IsEnabled() and not BNConnected() ) then
+ elseif ( C_Club.IsEnabled() and not BNConnected() and not C_CVar.GetCVarBool("useClassicGuildUI") ) then
self:Disable();
self.disabledTooltip = BLIZZARD_COMMUNITIES_SERVICES_UNAVAILABLE;
- elseif ( C_Club.IsEnabled() and C_Club.IsRestricted() ~= Enum.ClubRestrictionReason.None ) then
+ elseif ( C_Club.IsEnabled() and C_Club.IsRestricted() ~= Enum.ClubRestrictionReason.None and not C_CVar.GetCVarBool("useClassicGuildUI")) then
self:Disable();
self.disabledTooltip = UNAVAILABLE;
- elseif ( CommunitiesFrame and CommunitiesFrame:IsShown() ) or ( GuildFrame and GuildFrame:IsShown() ) then
- self:Enable();
else
self:Enable();
- if ( CommunitiesFrame_IsEnabled() ) then
+ if ( C_CVar.GetCVarBool("useClassicGuildUI") ) then
+ self.tooltipText = MicroButtonTooltipText(GUILD, "TOGGLEGUILDTAB");
+ self.newbieText = NEWBIE_TOOLTIP_GUILDTAB;
+ elseif ( CommunitiesFrame_IsEnabled() ) then
self.tooltipText = MicroButtonTooltipText(GUILD_AND_COMMUNITIES, "TOGGLEGUILDTAB");
self.newbieText = NEWBIE_TOOLTIP_GUILDTAB;
elseif ( IsInGuild() ) then
@@ -381,6 +442,12 @@ function GuildMicroButtonMixin:UpdateMicroButton()
end
end
+ if ( CommunitiesFrame and CommunitiesFrame:IsShown() ) or ( GuildFrame and GuildFrame:IsShown() ) then
+ self:SetButtonState("PUSHED", true);
+ else
+ self:SetButtonState("NORMAL");
+ end
+
self:UpdateNotificationIcon();
end
@@ -415,7 +482,7 @@ end
function GuildMicroButtonMixin:UpdateNotificationIcon()
if CommunitiesFrame_IsEnabled() and self:IsEnabled() then
- self.NotificationOverlay:SetShown(not C_SocialRestrictions.IsChatDisabled() and (self:HasUnseenInvitations() or CommunitiesUtil.DoesAnyCommunityHaveUnreadMessages()));
+ self.NotificationOverlay:SetShown(C_SocialRestrictions.CanReceiveChat() and (self:HasUnseenInvitations() or CommunitiesUtil.DoesAnyCommunityHaveUnreadMessages()));
else
self.NotificationOverlay:SetShown(false);
end
diff --git a/Interface/AddOns/Blizzard_ActionBar/Wrath/MainMenuBarMicroButtons.lua b/Interface/AddOns/Blizzard_ActionBar/Wrath/MainMenuBarMicroButtons.lua
index 881ccb9623..e1f2333f44 100644
--- a/Interface/AddOns/Blizzard_ActionBar/Wrath/MainMenuBarMicroButtons.lua
+++ b/Interface/AddOns/Blizzard_ActionBar/Wrath/MainMenuBarMicroButtons.lua
@@ -4,6 +4,7 @@ MICRO_BUTTONS = {
"TalentMicroButton",
"AchievementMicroButton",
"QuestLogMicroButton",
+ "SocialsMicroButton",
"GuildMicroButton",
"CollectionsMicroButton",
"PVPMicroButton",
@@ -62,6 +63,10 @@ function UpdateMicroButtons()
QuestLogMicroButton:SetButtonState("NORMAL");
end
+ SocialsMicroButton:UpdateMicroButton();
+
+ GuildMicroButton:UpdateMicroButton();
+
if ( PVPParentFrame and PVPParentFrame:IsShown() ) then
PVPMicroButton:SetButtonState("PUSHED", true);
else
@@ -122,8 +127,6 @@ function UpdateMicroButtons()
AchievementMicroButton:Disable();
end
end
-
- GuildMicroButton:UpdateMicroButton();
end
function AchievementMicroButton_OnLoad()
diff --git a/Interface/AddOns/Blizzard_ActionBar/Wrath/MainMenuBarMicroButtons.xml b/Interface/AddOns/Blizzard_ActionBar/Wrath/MainMenuBarMicroButtons.xml
index ac2cd6fe18..c04877d111 100644
--- a/Interface/AddOns/Blizzard_ActionBar/Wrath/MainMenuBarMicroButtons.xml
+++ b/Interface/AddOns/Blizzard_ActionBar/Wrath/MainMenuBarMicroButtons.xml
@@ -223,16 +223,25 @@
-
+
+
+
+
+
+
+
+
+
+
+
+
+
+
-
-
-
-
-
+
diff --git a/Interface/AddOns/Blizzard_AuctionUI/Classic/Blizzard_AuctionData.lua b/Interface/AddOns/Blizzard_AuctionUI/Classic/Blizzard_AuctionData.lua
index 90feff825e..da26674b81 100644
--- a/Interface/AddOns/Blizzard_AuctionUI/Classic/Blizzard_AuctionData.lua
+++ b/Interface/AddOns/Blizzard_AuctionUI/Classic/Blizzard_AuctionData.lua
@@ -406,9 +406,13 @@ do -- Armor
plateChestCategory:AddFilter(Enum.ItemClass.Armor, Enum.ItemArmorSubclass.Plate, Enum.InventoryType.IndexRobeType);
armorCategory:CreateSubCategoryAndFilter(Enum.ItemClass.Armor, Enum.ItemArmorSubclass.Shield);
- armorCategory:CreateSubCategoryAndFilter(Enum.ItemClass.Armor, Enum.ItemArmorSubclass.Libram);
- armorCategory:CreateSubCategoryAndFilter(Enum.ItemClass.Armor, Enum.ItemArmorSubclass.Idol);
- armorCategory:CreateSubCategoryAndFilter(Enum.ItemClass.Armor, Enum.ItemArmorSubclass.Totem);
+ if ClassicExpansionAtLeast(LE_EXPANSION_CATACLYSM) then
+ armorCategory:CreateSubCategoryAndFilter(Enum.ItemClass.Armor, Enum.ItemArmorSubclass.Relic);
+ else
+ armorCategory:CreateSubCategoryAndFilter(Enum.ItemClass.Armor, Enum.ItemArmorSubclass.Libram);
+ armorCategory:CreateSubCategoryAndFilter(Enum.ItemClass.Armor, Enum.ItemArmorSubclass.Idol);
+ armorCategory:CreateSubCategoryAndFilter(Enum.ItemClass.Armor, Enum.ItemArmorSubclass.Totem);
+ end
end
do -- Containers
@@ -443,13 +447,17 @@ do -- Trade Goods (SubClasses Added in TBC)
end
do -- Projectile
- local projectileCategory = AuctionFrame_CreateCategory(AUCTION_CATEGORY_PROJECTILE);
- projectileCategory:GenerateSubCategoriesAndFiltersFromSubClass(Enum.ItemClass.Projectile);
+ if ClassicExpansionAtMost(LE_EXPANSION_WRATH_OF_THE_LICH_KING) then
+ local projectileCategory = AuctionFrame_CreateCategory(AUCTION_CATEGORY_PROJECTILE);
+ projectileCategory:GenerateSubCategoriesAndFiltersFromSubClass(Enum.ItemClass.Projectile);
+ end
end
do -- Quiver
- local quiverCategory = AuctionFrame_CreateCategory(AUCTION_CATEGORY_QUIVER);
- quiverCategory:GenerateSubCategoriesAndFiltersFromSubClass(Enum.ItemClass.Quiver);
+ if ClassicExpansionAtMost(LE_EXPANSION_WRATH_OF_THE_LICH_KING) then
+ local quiverCategory = AuctionFrame_CreateCategory(AUCTION_CATEGORY_QUIVER);
+ quiverCategory:GenerateSubCategoriesAndFiltersFromSubClass(Enum.ItemClass.Quiver);
+ end
end
do -- Recipes
diff --git a/Interface/AddOns/Blizzard_BarbershopUI/Blizzard_BarberShopUI.lua b/Interface/AddOns/Blizzard_BarbershopUI/Blizzard_BarberShopUI.lua
index 7d8417650d..a934682c56 100644
--- a/Interface/AddOns/Blizzard_BarbershopUI/Blizzard_BarberShopUI.lua
+++ b/Interface/AddOns/Blizzard_BarbershopUI/Blizzard_BarberShopUI.lua
@@ -3,6 +3,7 @@ GILNEAN_RACE_ID = 23;
function BarberShop_OnLoad(self)
self:RegisterEvent("BARBER_SHOP_RESULT");
+ self:RegisterEvent("BARBER_SHOP_FORCE_CUSTOMIZATIONS_UPDATE");
if ( C_BarberShop.IsValidCustomizationType(Enum.CharCustomizationType.Skin) ) then
if ( C_BarberShop.IsValidCustomizationType(Enum.CharCustomizationType.HairColor) ) then
-- tauren, worgen, female pandaren
@@ -19,11 +20,8 @@ end
function BarberShop_SetViewingAlteredForm(viewingAlteredForm)
if(C_BarberShop.IsViewingAlteredForm() ~= viewingAlteredForm) then
C_BarberShop.SetViewingAlteredForm(viewingAlteredForm);
- BarberShop_CheckForInvalidOptions(BarberShopFrame);
BarberShopAlternateFormTop:SetChecked(not viewingAlteredForm);
BarberShopAlternateFormBottom:SetChecked(viewingAlteredForm);
- BarberShop_ResetAll();
- BarberShop_Update(BarberShopFrame);
end
end
@@ -53,7 +51,6 @@ function BarberShop_CheckForInvalidOptions(self)
else
self.HairColorSelector:Hide();
end
- BarberShop_Update(self);
end
function BarberShop_OnShow(self)
@@ -69,8 +66,11 @@ function BarberShop_OnShow(self)
self:ClearAllPoints();
self:SetPoint("RIGHT", min(-50, -CONTAINER_OFFSET_X), -50);
BarberShop_UpdateSexSelectors();
+ BarberShop_HandleAlternateFormButtons(false);
BarberShop_CheckForInvalidOptions(self);
+ BarberShop_Update(self);
+
local isViewingAlteredForm = C_BarberShop.IsViewingAlteredForm();
BarberShopAlternateFormTop:SetChecked(not isViewingAlteredForm);
BarberShopAlternateFormBottom:SetChecked(isViewingAlteredForm);
@@ -94,7 +94,11 @@ function BarberShop_OnEvent(self, event, ...)
PlaySound(SOUNDKIT.BARBERSHOP_HAIRCUT);
BarberShop_ResetAll();
isResult = true;
+ elseif(event == "BARBER_SHOP_FORCE_CUSTOMIZATIONS_UPDATE") then
+ BarberShop_ResetBanner();
+ BarberShop_CheckForInvalidOptions(self);
end
+
if (self:IsShown()) then
BarberShop_Update(self);
if isResult then
@@ -105,7 +109,10 @@ function BarberShop_OnEvent(self, event, ...)
end
function BarberShop_UpdateCost(self)
- MoneyFrame_Update(BarberShopFrameMoneyFrame:GetName(), C_BarberShop.GetCurrentCost());
+ -- [CLASS - 34071]: Remove Barbershop Cost code
+ -- Cost is now deprecated for Classic and Mainline
+ -- MoneyFrame_Update(BarberShopFrameMoneyFrame:GetName(), C_BarberShop.GetCurrentCost());
+
-- The 4th return from GetBarberShopStyleInfo is whether the selected style is the active character style
-- Enable the okay and reset buttons if anything has changed
for i=1, #self.Selector do
@@ -141,13 +148,20 @@ function BarberShop_Update(self, updateBanner)
BarberShop_UpdateCustomizationOptions(self);
end
+-- Returns true if the Banner Name was updated.
function BarberShop_UpdateSelector(self, updateBanner)
updateBanner = updateBanner or 1;
local customName, name, isCurrent = C_BarberShop.GetCustomizationTypeInfo(self:GetID());
if updateBanner == 1 then
BarberShop_UpdateBanner(name);
BarberShop_SetLabelColor(self.Category, not isCurrent);
+
+ if ( name and name ~= "" ) then
+ return true;
+ end
end
+
+ return false;
end
function BarberShop_UpdateCustomizationOptions(self)
@@ -190,7 +204,6 @@ end
function BarberShop_SetSelectedSex(self, sex)
if not C_BarberShop.IsViewingVisibleSex(sex) then
- BarberShop_ResetBanner();
C_BarberShop.SetSelectedSex(sex);
if sex == 0 then
BarberShopFrameMaleButton:SetChecked(1);
@@ -199,9 +212,6 @@ function BarberShop_SetSelectedSex(self, sex)
BarberShopFrameMaleButton:SetChecked(nil);
BarberShopFrameFemaleButton:SetChecked(1);
end
- BarberShop_Update(self);
- else
- BarberShop_Update(self, 0);
end
self.FacialHairSelector.Category:SetText(C_BarberShop.GetCustomizationTypeInfo(Enum.CharCustomizationType.FacialHair));
BarberShop_HandleAlternateFormButtons(false, sex);
diff --git a/Interface/AddOns/Blizzard_BarbershopUI/Blizzard_BarberShopUI.xml b/Interface/AddOns/Blizzard_BarbershopUI/Blizzard_BarberShopUI.xml
index 6799e5cf78..6d93397d0a 100644
--- a/Interface/AddOns/Blizzard_BarbershopUI/Blizzard_BarberShopUI.xml
+++ b/Interface/AddOns/Blizzard_BarbershopUI/Blizzard_BarberShopUI.xml
@@ -104,7 +104,10 @@
C_BarberShop.CycleCharCustomization(parent:GetID(), true);
PlaySound(SOUNDKIT.U_CHAT_SCROLL_BUTTON);
BarberShop_UpdateCost(parent:GetParent());
- BarberShop_UpdateSelector(parent);
+ local updatedBannerName = BarberShop_UpdateSelector(parent);
+ if (not updatedBannerName) then
+ BarberShop_ResetBanner();
+ end
@@ -127,7 +130,10 @@
C_BarberShop.CycleCharCustomization(parent:GetID(), false);
PlaySound(SOUNDKIT.U_CHAT_SCROLL_BUTTON);
BarberShop_UpdateCost(parent:GetParent());
- BarberShop_UpdateSelector(parent);
+ local updatedBannerName = BarberShop_UpdateSelector(parent);
+ if (not updatedBannerName) then
+ BarberShop_ResetBanner();
+ end
@@ -396,6 +402,10 @@
+
@@ -547,6 +558,10 @@
+
diff --git a/Interface/AddOns/Blizzard_Calendar/Classic/Blizzard_Calendar.lua b/Interface/AddOns/Blizzard_Calendar/Classic/Blizzard_Calendar.lua
index 9bb6222edd..48fd7d7d76 100644
--- a/Interface/AddOns/Blizzard_Calendar/Classic/Blizzard_Calendar.lua
+++ b/Interface/AddOns/Blizzard_Calendar/Classic/Blizzard_Calendar.lua
@@ -769,6 +769,8 @@ local function _CalendarFrame_CacheEventDungeons_Internal(eventType, textures)
return false;
end
+ local overlappingMapIDs = (eventType == Enum.CalendarEventType.Raid or eventType == Enum.CalendarEventType.Dungeon) and {};
+
local cacheIndex = 1;
for textureIndex = 1, numTextures do
if ( not CalendarEventDungeonCache[cacheIndex] ) then
@@ -788,16 +790,44 @@ local function _CalendarFrame_CacheEventDungeons_Internal(eventType, textures)
difficultyName = "";
end
- CalendarEventDungeonCache[cacheIndex].textureIndex = textureIndex;
- CalendarEventDungeonCache[cacheIndex].title = title;
- CalendarEventDungeonCache[cacheIndex].texture = texture;
- CalendarEventDungeonCache[cacheIndex].expansionLevel = expansionLevel;
- CalendarEventDungeonCache[cacheIndex].difficultyName = difficultyName;
- CalendarEventDungeonCache[cacheIndex].isLFR = isLFR;
- CalendarEventDungeonCache[cacheIndex].displayHeroic = displayHeroic;
- CalendarEventDungeonCache[cacheIndex].displayMythic = displayMythic;
+ if overlappingMapIDs and overlappingMapIDs[mapID] then
+ -- Already exists a map, collapse the difficulty
+ local firstCacheIndex = overlappingMapIDs[mapID];
+ local cacheEntry = CalendarEventDungeonCache[firstCacheIndex];
- cacheIndex = cacheIndex + 1;
+ if cacheEntry.isLFR and not isLFR then
+ -- Prefer a non-LFR name over a LFR name
+ cacheEntry.title = title;
+ cacheEntry.isLFR = nil;
+ end
+
+ if cacheEntry.displayHeroic or cacheEntry.displayMythic and (not displayHeroic and not displayMythic) then
+ -- Prefer normal difficulty name over higher difficulty
+ cacheEntry.title = title;
+ cacheEntry.displayHeroic = nil;
+ cacheEntry.displayMythic = nil;
+ end
+
+ table.insert(cacheEntry.difficulties, { textureIndex = textureIndex, difficultyName = difficultyName });
+ else
+ CalendarEventDungeonCache[cacheIndex].textureIndex = textureIndex;
+ CalendarEventDungeonCache[cacheIndex].title = title;
+ CalendarEventDungeonCache[cacheIndex].texture = texture;
+ CalendarEventDungeonCache[cacheIndex].expansionLevel = expansionLevel;
+ CalendarEventDungeonCache[cacheIndex].difficultyName = difficultyName;
+ CalendarEventDungeonCache[cacheIndex].isLFR = isLFR;
+ CalendarEventDungeonCache[cacheIndex].displayHeroic = displayHeroic;
+ CalendarEventDungeonCache[cacheIndex].displayMythic = displayMythic;
+
+ if overlappingMapIDs then
+ if not overlappingMapIDs[mapID] then
+ overlappingMapIDs[mapID] = cacheIndex;
+ end
+ CalendarEventDungeonCache[cacheIndex].difficulties = { { textureIndex = textureIndex, difficultyName = difficultyName } };
+ end
+
+ cacheIndex = cacheIndex + 1;
+ end
end
cacheIndex = 1;
@@ -2808,7 +2838,7 @@ function CalendarViewEventFrame_Update()
SetDesaturation(CalendarViewEventIcon, true);
CalendarViewEventTypeName:SetTextColor(GRAY_FONT_COLOR.r, GRAY_FONT_COLOR.g, GRAY_FONT_COLOR.b);
CalendarViewEventCreatorName:SetTextColor(GRAY_FONT_COLOR.r, GRAY_FONT_COLOR.g, GRAY_FONT_COLOR.b);
- CalendarViewEventDescriptionContainer:SetTextColor(GRAY_FONT_COLOR);
+ CalendarViewEventDescriptionContainer.ScrollingFont:SetTextColor(GRAY_FONT_COLOR);
else
-- set the event title
CalendarViewEventTitle:SetText(eventInfo.title);
@@ -4482,11 +4512,7 @@ function CalendarTexturePicker_InitButton(button, elementData)
end
local name = dungeonCacheEntry.title;
- if (eventType == Enum.CalendarEventType.Dungeon) then
- dungeonCacheEntry.difficultyName = "";
- end
-
- button.Title:SetText(GetDungeonNameWithDifficulty(name, dungeonCacheEntry.difficultyName));
+ button.Title:SetText(GetDungeonNameWithDifficulty(name, dungeonCacheEntry.difficulties == nil and dungeonCacheEntry.difficultyName or ""));
button.Title:SetTextColor(NORMAL_FONT_COLOR.r, NORMAL_FONT_COLOR.g, NORMAL_FONT_COLOR.b);
button.Title:ClearAllPoints();
button.Title:SetPoint("LEFT", button.Icon, "RIGHT");
diff --git a/Interface/AddOns/Blizzard_Calendar/Classic/Blizzard_Calendar.xml b/Interface/AddOns/Blizzard_Calendar/Classic/Blizzard_Calendar.xml
index 13de083d3e..3c64ba3aa1 100644
--- a/Interface/AddOns/Blizzard_Calendar/Classic/Blizzard_Calendar.xml
+++ b/Interface/AddOns/Blizzard_Calendar/Classic/Blizzard_Calendar.xml
@@ -630,7 +630,7 @@
I know it's a little unclear. I thought CreateOrEditEventFrame sounded kind of silly.
-->
-
+
@@ -700,7 +700,7 @@
-
+
@@ -720,7 +720,7 @@
-
+
@@ -729,14 +729,14 @@
-
+
-
+
@@ -834,7 +834,7 @@
-
+
diff --git a/Interface/AddOns/Blizzard_Channels/ChannelButton.xml b/Interface/AddOns/Blizzard_Channels/ChannelButton.xml
index 197ae3cea3..1d2303f313 100644
--- a/Interface/AddOns/Blizzard_Channels/ChannelButton.xml
+++ b/Interface/AddOns/Blizzard_Channels/ChannelButton.xml
@@ -39,7 +39,7 @@
-
+
diff --git a/Interface/AddOns/Blizzard_Channels/RosterButton.xml b/Interface/AddOns/Blizzard_Channels/RosterButton.xml
index 905b8e8c31..5a0d1bde5b 100644
--- a/Interface/AddOns/Blizzard_Channels/RosterButton.xml
+++ b/Interface/AddOns/Blizzard_Channels/RosterButton.xml
@@ -6,7 +6,7 @@
-
+
diff --git a/Interface/AddOns/Blizzard_CharacterFrame/Cata/CharacterFrame.xml b/Interface/AddOns/Blizzard_CharacterFrame/Cata/CharacterFrame.xml
index cabdf9e04d..f666965617 100644
--- a/Interface/AddOns/Blizzard_CharacterFrame/Cata/CharacterFrame.xml
+++ b/Interface/AddOns/Blizzard_CharacterFrame/Cata/CharacterFrame.xml
@@ -408,6 +408,9 @@
+
+
+
@@ -427,6 +430,9 @@
+
+
+
diff --git a/Interface/AddOns/Blizzard_CharacterFrame/Cata/PaperDollFrame.lua b/Interface/AddOns/Blizzard_CharacterFrame/Cata/PaperDollFrame.lua
index f580862d29..74165180b7 100644
--- a/Interface/AddOns/Blizzard_CharacterFrame/Cata/PaperDollFrame.lua
+++ b/Interface/AddOns/Blizzard_CharacterFrame/Cata/PaperDollFrame.lua
@@ -3281,7 +3281,7 @@ function GearManagerPopupFrameMixin:OnShow()
PlaySound(SOUNDKIT.IG_CHARACTER_INFO_OPEN);
self.iconDataProvider = CreateAndInitFromMixin(IconDataProviderMixin, IconDataProviderExtraType.Equipment);
- self.BorderBox.IconTypeDropdown:SetSelectedValue(IconSelectorPopupFrameIconFilterTypes.All);
+ self:SetIconFilter(IconSelectorPopupFrameIconFilterTypes.All);
self:Update();
self.BorderBox.IconSelectorEditBox:OnTextChanged();
diff --git a/Interface/AddOns/Blizzard_ChatFrameBase/Classic/ChatFrame.lua b/Interface/AddOns/Blizzard_ChatFrameBase/Classic/ChatFrame.lua
index 165147b91f..394cec649e 100644
--- a/Interface/AddOns/Blizzard_ChatFrameBase/Classic/ChatFrame.lua
+++ b/Interface/AddOns/Blizzard_ChatFrameBase/Classic/ChatFrame.lua
@@ -796,7 +796,7 @@ local function TextEmoteSort(token1, token2)
return string1 < string2;
end
-if not IsOnGlueScreen() then
+if not C_Glue.IsOnGlueScreen() then
table.sort(EmoteList, TextEmoteSort);
table.sort(TextEmoteSpeechList, TextEmoteSort);
end
@@ -5370,6 +5370,18 @@ function ChatFrameMenuButtonMixin:OnLoad()
ShowMacroFrame();
end);
AddSlashInitializer(macroButton, SLASH_MACRO1);
+
+ local numLanguages = GetNumLanguages();
+ if(numLanguages) then
+ local languageSubmenu = rootDescription:CreateButton(LANGUAGE);
+ languageSubmenu:AddInitializer(ColorInitializer);
+
+ for i = 1, GetNumLanguages() do
+ local language, languageID = GetLanguageByIndex(i);
+ local languageData = {language, languageID};
+ languageSubmenu:CreateRadio(language, IsLanguageSelected, SetLanguageSelected, languageData);
+ end
+ end
end);
end
diff --git a/Interface/AddOns/Blizzard_ChatFrameBase/Classic/FloatingChatFrame.lua b/Interface/AddOns/Blizzard_ChatFrameBase/Classic/FloatingChatFrame.lua
index 82f0817f78..5e03e54a91 100644
--- a/Interface/AddOns/Blizzard_ChatFrameBase/Classic/FloatingChatFrame.lua
+++ b/Interface/AddOns/Blizzard_ChatFrameBase/Classic/FloatingChatFrame.lua
@@ -239,7 +239,7 @@ function FCF_Tab_SetupMenu(self)
local name, fontSize, r, g, b, a, shown = FCF_GetChatWindowInfo(FCF_GetCurrentChatFrameID());
local currentChatFrame = FCF_GetCurrentChatFrame();
local isTemporary = currentChatFrame and currentChatFrame.isTemporary;
- local isOnGlueScreen = IsOnGlueScreen();
+ local isOnGlueScreen = C_Glue.IsOnGlueScreen();
local tabChatFrame = FCF_GetChatFrameByID(self:GetID());
-- Window options
diff --git a/Interface/AddOns/Blizzard_ClassMenu/Blizzard_ClassMenu.lua b/Interface/AddOns/Blizzard_ClassMenu/Blizzard_ClassMenu.lua
index ceef9ec0b2..9f9fa8d50f 100644
--- a/Interface/AddOns/Blizzard_ClassMenu/Blizzard_ClassMenu.lua
+++ b/Interface/AddOns/Blizzard_ClassMenu/Blizzard_ClassMenu.lua
@@ -111,7 +111,7 @@ function ClassMenu.InitClassSpecDropdown(dropdown, getClassFilter, getSpecFilter
rootDescription:CreateTitle(HEIRLOOMS_CLASS_FILTER_FORMAT:format(colorStr, name));
local sex = UnitSex("player");
- for index = 1, GetNumSpecializationsForClassID(classID) do
+ for index = 1, C_SpecializationInfo.GetNumSpecializationsForClassID(classID) do
local specID, specName = GetSpecializationInfoForClassID(classID, index, sex);
rootDescription:CreateRadio(specName, IsSpecSelected, SetSelected, CreateData(classID, specID));
end
diff --git a/Interface/AddOns/Blizzard_Collections/Cata/Blizzard_Wardrobe.lua b/Interface/AddOns/Blizzard_Collections/Cata/Blizzard_Wardrobe.lua
index c1f7d17c25..506ae28262 100644
--- a/Interface/AddOns/Blizzard_Collections/Cata/Blizzard_Wardrobe.lua
+++ b/Interface/AddOns/Blizzard_Collections/Cata/Blizzard_Wardrobe.lua
@@ -341,14 +341,14 @@ function TransmogFrameMixin:GetSelectedTransmogLocation()
end
function TransmogFrameMixin:RefreshPlayerModel()
- local sheatheWeapons = false;
- local autoDress = true;
- local hideWeapons = false;
- local useNativeForm = true;
- local _, raceFilename = UnitRace("Player");
- if(raceFilename == "Dracthyr" or raceFilename == "Worgen") then
- useNativeForm = not self.inAlternateForm;
- end
+ local sheatheWeapons = false;
+ local autoDress = true;
+ local hideWeapons = false;
+ local useNativeForm = true;
+ local _, raceFilename = UnitRace("Player");
+ if(raceFilename == "Dracthyr" or raceFilename == "Worgen") then
+ useNativeForm = not self.inAlternateForm;
+ end
WardrobeTransmogFrame.Model:SetUnit("player", sheatheWeapons, autoDress, hideWeapons, useNativeForm);
self:Update();
end
@@ -364,6 +364,7 @@ function TransmogFrameMixin:Update()
end
self:UpdateApplyButton();
+ self.OutfitDropdown:UpdateSaveButton();
if not self.selectedSlotButton or not self.selectedSlotButton:IsEnabled() then
-- select first valid slot or clear selection
@@ -452,6 +453,10 @@ function TransmogFrameMixin:ApplyPending(lastAcceptedWarningIndex)
end
function TransmogFrameMixin:OnTransmogApplied()
+ local dropdown = self.OutfitDropdown;
+ if dropdown.selectedOutfitID and dropdown:IsOutfitDressed() then
+ WardrobeOutfitManager:SaveLastOutfit(dropdown.selectedOutfitID);
+ end
end
WardrobeOutfitDropdownOverrideMixin = {};
@@ -464,16 +469,14 @@ function WardrobeOutfitDropdownOverrideMixin:LoadOutfit(outfitID)
end
function WardrobeOutfitDropdownOverrideMixin:GetItemTransmogInfoList()
- local playerActor = WardrobeTransmogFrame.ModelScene:GetPlayerActor();
- if playerActor then
- return playerActor:GetItemTransmogInfoList();
+ if WardrobeTransmogFrame.Model then
+ return WardrobeTransmogFrame.Model:GetItemTransmogInfoList();
end
return nil;
end
function WardrobeOutfitDropdownOverrideMixin:GetLastOutfitID()
- local specIndex = GetSpecialization();
- return tonumber(GetCVar("lastTransmogOutfitIDSpec"..specIndex));
+ return tonumber(GetCVar("lastTransmogOutfitIDNoSpec"));
end
TransmogSlotButtonMixin = { };
@@ -545,27 +548,27 @@ end
function TransmogSlotButtonMixin:OnEnter()
local isTransmogrified, hasPending, isPendingCollected, canTransmogrify, cannotTransmogrifyReason, hasUndo = C_Transmog.GetSlotInfo(self.transmogLocation);
- if ( self.UndoButton and canTransmogrify and isTransmogrified and not ( hasPending or hasUndo ) ) then
- self.UndoButton:Show();
- end
- GameTooltip:SetOwner(self, "ANCHOR_RIGHT", 14, 0);
- if not canTransmogrify and not hasUndo then
- GameTooltip:SetText(_G[self.slot]);
- local tag = TRANSMOG_INVALID_CODES[cannotTransmogrifyReason];
- local errorMsg;
- if ( tag == "CANNOT_USE" ) then
- local errorCode, errorString = C_Transmog.GetSlotUseError(self.transmogLocation);
- errorMsg = errorString;
- else
- errorMsg = tag and _G["TRANSMOGRIFY_INVALID_"..tag];
- end
- if ( errorMsg ) then
- GameTooltip:AddLine(errorMsg, RED_FONT_COLOR.r, RED_FONT_COLOR.g, RED_FONT_COLOR.b, true);
- end
- GameTooltip:Show();
+ if ( self.UndoButton and canTransmogrify and isTransmogrified and not ( hasPending or hasUndo ) ) then
+ self.UndoButton:Show();
+ end
+ GameTooltip:SetOwner(self, "ANCHOR_RIGHT", 14, 0);
+ if not canTransmogrify and not hasUndo then
+ GameTooltip:SetText(_G[self.slot]);
+ local tag = TRANSMOG_INVALID_CODES[cannotTransmogrifyReason];
+ local errorMsg;
+ if ( tag == "CANNOT_USE" ) then
+ local errorCode, errorString = C_Transmog.GetSlotUseError(self.transmogLocation);
+ errorMsg = errorString;
else
- GameTooltip:SetTransmogrifyItem(self.slotID);
+ errorMsg = tag and _G["TRANSMOGRIFY_INVALID_"..tag];
+ end
+ if ( errorMsg ) then
+ GameTooltip:AddLine(errorMsg, RED_FONT_COLOR.r, RED_FONT_COLOR.g, RED_FONT_COLOR.b, true);
end
+ GameTooltip:Show();
+ else
+ GameTooltip:SetTransmogrifyItem(self.slotID);
+ end
WardrobeTransmogFrame.Model.controlFrame:Show();
self.UpdateTooltip = GenerateClosure(self.OnEnter, self);
@@ -968,7 +971,7 @@ function WardrobeCollectionFrameMixin:SetContainer(parent)
self.ItemsCollectionFrame.SlotsFrame:Show();
self.ItemsCollectionFrame.BGCornerTopLeft:Hide();
self.ItemsCollectionFrame.BGCornerTopRight:Hide();
- self.ItemsCollectionFrame.WeaponDropdown:SetPoint("TOPRIGHT", -25, -58);
+ self.ItemsCollectionFrame.WeaponDropdown:SetPoint("TOPRIGHT", -25, -23);
self.ItemsCollectionFrame.NoValidItemsLabel:Hide();
self.ItemsTab:SetPoint("TOPLEFT", 58, -28);
self:SetTab(self.selectedCollectionTab);
@@ -1010,10 +1013,21 @@ function WardrobeCollectionFrameMixin:SetTab(tabID)
self.SearchBox:SetEnabled(enableSearchAndFilter);
self.FilterButton:Show();
self.FilterButton:SetEnabled(enableSearchAndFilter);
+ self:InitItemsFilterButton();
end
WardrobeFrame:TriggerEvent(WardrobeFrameMixin.Event.OnCollectionTabChanged);
end
+local transmogSourceOrderPriorities = {
+ [Enum.TransmogSource.JournalEncounter] = 5,
+ [Enum.TransmogSource.Quest] = 5,
+ [Enum.TransmogSource.Vendor] = 5,
+ [Enum.TransmogSource.WorldDrop] = 5,
+ [Enum.TransmogSource.Achievement] = 5,
+ [Enum.TransmogSource.Profession] = 5,
+ [Enum.TransmogSource.TradingPost] = 4,
+};
+
function WardrobeCollectionFrameMixin:InitItemsFilterButton()
-- Source filters are in a submenu when unless we're at a transmogrifier.
local function CreateSourceFilters(description)
@@ -1358,20 +1372,20 @@ function WardrobeItemsCollectionSlotButtonMixin:OnClick()
end
function WardrobeItemsCollectionSlotButtonMixin:OnEnter()
- GameTooltip:SetOwner(self, "ANCHOR_RIGHT");
- local slotName = _G[self.slot];
- -- for shoulders check if equipped item has the secondary appearance toggled on
- if self.transmogLocation:GetSlotName() == "SHOULDERSLOT" then
- local itemLocation = TransmogUtil.GetItemLocationFromTransmogLocation(self.transmogLocation);
- if TransmogUtil.IsSecondaryTransmoggedForItemLocation(itemLocation) then
- if self.transmogLocation:IsSecondary() then
- slotName = LEFTSHOULDERSLOT;
- else
- slotName = RIGHTSHOULDERSLOT;
- end
+ GameTooltip:SetOwner(self, "ANCHOR_RIGHT");
+ local slotName = _G[self.slot];
+ -- for shoulders check if equipped item has the secondary appearance toggled on
+ if self.transmogLocation:GetSlotName() == "SHOULDERSLOT" then
+ local itemLocation = TransmogUtil.GetItemLocationFromTransmogLocation(self.transmogLocation);
+ if TransmogUtil.IsSecondaryTransmoggedForItemLocation(itemLocation) then
+ if self.transmogLocation:IsSecondary() then
+ slotName = LEFTSHOULDERSLOT;
+ else
+ slotName = RIGHTSHOULDERSLOT;
end
end
- GameTooltip:SetText(slotName);
+ end
+ GameTooltip:SetText(slotName);
end
WardrobeItemsCollectionMixin = { };
@@ -2004,8 +2018,8 @@ function WardrobeItemsCollectionMixin:UpdateItems()
local changeModel = false;
local isAtTransmogrifier = C_Transmog.IsAtTransmogNPC();
- local _, isWeapon = C_TransmogCollection.GetCategoryInfo(self.activeCategory);
- isArmor = not isWeapon;
+ local _, isWeapon = C_TransmogCollection.GetCategoryInfo(self.activeCategory);
+ isArmor = not isWeapon;
local tutorialAnchorFrame;
@@ -2139,14 +2153,14 @@ end
function WardrobeItemsCollectionMixin:UpdateProgressBar()
local collected, total;
- collected = C_TransmogCollection.GetCategoryCollectedCount(self.activeCategory);
- total = C_TransmogCollection.GetCategoryTotal(self.activeCategory);
+ collected = C_TransmogCollection.GetCategoryCollectedCount(self.activeCategory);
+ total = C_TransmogCollection.GetCategoryTotal(self.activeCategory);
self:GetParent():UpdateProgressBar(collected, total);
end
function WardrobeItemsCollectionMixin:RefreshVisualsList()
- self.visualsList = C_TransmogCollection.GetCategoryAppearances(self.activeCategory, self.transmogLocation);
+ self.visualsList = C_TransmogCollection.GetCategoryAppearances(self.activeCategory, self.transmogLocation);
self:FilterVisuals();
self:SortVisuals();
@@ -2230,7 +2244,7 @@ function WardrobeItemsCollectionMixin:RefreshAppearanceTooltip()
end
local sources = CollectionWardrobeUtil.GetSortedAppearanceSources(self.tooltipVisualID, self.activeCategory, self.transmogLocation);
local chosenSourceID = self:GetChosenVisualSource(self.tooltipVisualID);
- local warningString = CollectionWardrobeUtil.GetVisibilityWarning(self.tooltipModel, self.transmogLocation);
+ local warningString = CollectionWardrobeUtil.GetBestVisibilityWarning(self.tooltipModel, self.transmogLocation, self.tooltipVisualID);
self:GetParent():SetAppearanceTooltip(self, sources, chosenSourceID, warningString);
end
@@ -2347,11 +2361,11 @@ function WardrobeItemsModelMixin:OnMouseDown(button)
local itemsCollectionFrame = self:GetParent();
if ( IsModifiedClick("CHATLINK") ) then
local link;
- local sources = CollectionWardrobeUtil.GetSortedAppearanceSources(self.visualInfo.visualID, itemsCollectionFrame:GetActiveCategory(), itemsCollectionFrame.transmogLocation);
- if ( WardrobeCollectionFrame.tooltipSourceIndex ) then
- local index = CollectionWardrobeUtil.GetValidIndexForNumSources(WardrobeCollectionFrame.tooltipSourceIndex, #sources);
- link = WardrobeCollectionFrame:GetAppearanceItemHyperlink(sources[index]);
- end
+ local sources = CollectionWardrobeUtil.GetSortedAppearanceSources(self.visualInfo.visualID, itemsCollectionFrame:GetActiveCategory(), itemsCollectionFrame.transmogLocation);
+ if ( WardrobeCollectionFrame.tooltipSourceIndex ) then
+ local index = CollectionWardrobeUtil.GetValidIndexForNumSources(WardrobeCollectionFrame.tooltipSourceIndex, #sources);
+ link = WardrobeCollectionFrame:GetAppearanceItemHyperlink(sources[index]);
+ end
if ( link ) then
HandleModifiedItemClick(link);
@@ -2385,6 +2399,7 @@ function WardrobeItemsModelMixin:OnMouseUp(button)
rootDescription:QueueSpacer();
rootDescription:QueueTitle(WARDROBE_TRANSMOGRIFY_AS);
+ local itemsCollectionFrame = self:GetParent();
local activeCategory = itemsCollectionFrame:GetActiveCategory();
local transmogLocation = itemsCollectionFrame.transmogLocation;
local chosenSourceID = itemsCollectionFrame:GetChosenVisualSource(appearanceID);
@@ -2430,8 +2445,8 @@ function WardrobeItemsModelMixin:OnEnter()
self.NewGlow:Hide();
end
- self.needsItemGeo = not self:IsGeoReady();
- itemsCollectionFrame:SetAppearanceTooltip(self);
+ self.needsItemGeo = not self:IsGeoReady();
+ itemsCollectionFrame:SetAppearanceTooltip(self);
end
function WardrobeItemsModelMixin:OnLeave()
@@ -2623,4 +2638,4 @@ function WardrobeCollectionFrameSearchBoxMixin:OnEnter()
GameTooltip:SetOwner(self, "ANCHOR_PRESERVE");
GameTooltip:SetText(WARDROBE_NO_SEARCH);
end
-end
\ No newline at end of file
+end
diff --git a/Interface/AddOns/Blizzard_Collections/Classic/Blizzard_HeirloomCollection.lua b/Interface/AddOns/Blizzard_Collections/Classic/Blizzard_HeirloomCollection.lua
index a13a054ce4..74b98d74c5 100644
--- a/Interface/AddOns/Blizzard_Collections/Classic/Blizzard_HeirloomCollection.lua
+++ b/Interface/AddOns/Blizzard_Collections/Classic/Blizzard_HeirloomCollection.lua
@@ -99,6 +99,9 @@ function HeirloomsMixin:OnLoad()
self:RegisterEvent("HEIRLOOMS_UPDATED");
self:RegisterEvent("HEIRLOOM_UPGRADE_TARGETING_CHANGED");
+
+ self.FilterDropdown:SetWidth(85);
+
end
function HeirloomsMixin:InitFilterDropdown()
diff --git a/Interface/AddOns/Blizzard_Collections/Classic/Blizzard_MountCollection.lua b/Interface/AddOns/Blizzard_Collections/Classic/Blizzard_MountCollection.lua
index 56275a64a4..0207ad0efb 100644
--- a/Interface/AddOns/Blizzard_Collections/Classic/Blizzard_MountCollection.lua
+++ b/Interface/AddOns/Blizzard_Collections/Classic/Blizzard_MountCollection.lua
@@ -36,6 +36,9 @@ function MountJournal_OnLoad(self)
self.ScrollBox:RegisterCallback(ScrollBoxListMixin.Event.OnUpdate, MountJournal_EvaluateListHelpTip, self);
MountJournal_InitFilterButton(self);
+
+ self.FilterDropdown:SetWidth(85);
+
end
function MountJournal_InitFilterButton(self)
@@ -68,7 +71,6 @@ function MountJournal_InitFilterButton(self)
local function SetSourceChecked(filterIndex)
C_MountJournal.SetSourceFilter(filterIndex, not IsSourceChecked(filterIndex));
end
-
self.FilterDropdown:SetupMenu(function(dropdown, rootDescription)
rootDescription:SetTag("MENU_MOUNT_COLLECTION_FILTER");
diff --git a/Interface/AddOns/Blizzard_Collections/Classic/Blizzard_MountCollection.xml b/Interface/AddOns/Blizzard_Collections/Classic/Blizzard_MountCollection.xml
index ccc9f84d3d..c7f741082a 100644
--- a/Interface/AddOns/Blizzard_Collections/Classic/Blizzard_MountCollection.xml
+++ b/Interface/AddOns/Blizzard_Collections/Classic/Blizzard_MountCollection.xml
@@ -309,6 +309,9 @@
+
+
+
diff --git a/Interface/AddOns/Blizzard_Collections/Classic/Blizzard_PetCollection.lua b/Interface/AddOns/Blizzard_Collections/Classic/Blizzard_PetCollection.lua
index c7e9c1de65..8222159d09 100644
--- a/Interface/AddOns/Blizzard_Collections/Classic/Blizzard_PetCollection.lua
+++ b/Interface/AddOns/Blizzard_Collections/Classic/Blizzard_PetCollection.lua
@@ -35,6 +35,8 @@ function PetJournal_OnLoad(self)
PetJournal_InitFilterDropdown(self);
PetJournal_ShowPetCard(1);
+
+ self.FilterDropdown:SetWidth(85)
end
function PetJournal_InitFilterDropdown(self)
@@ -77,7 +79,17 @@ function PetJournal_InitFilterDropdown(self)
[Enum.BattlePetSources.PetStore] = 2,
[Enum.BattlePetSources.Tcg] = 1,
};
+
+ self.FilterDropdown:SetIsDefaultCallback(function()
+ return PetJournalFilterDropdown_GetCollectedFilter() and PetJournalFilterDropdown_GetNotCollectedFilter();
+ end);
+ self.FilterDropdown:SetDefaultCallback(function()
+ PetJournalFilterDropdown_SetCollectedFilter(true);
+ PetJournalFilterDropdown_SetNotCollectedFilter(true);
+ end);
+
+
self.FilterDropdown:SetupMenu(function(dropdown, rootDescription)
rootDescription:SetTag("MENU_PET_COLLECTION_FILTER");
diff --git a/Interface/AddOns/Blizzard_Collections/Classic/Blizzard_PetCollection.xml b/Interface/AddOns/Blizzard_Collections/Classic/Blizzard_PetCollection.xml
index 53e75ef139..3f63d61f23 100644
--- a/Interface/AddOns/Blizzard_Collections/Classic/Blizzard_PetCollection.xml
+++ b/Interface/AddOns/Blizzard_Collections/Classic/Blizzard_PetCollection.xml
@@ -182,8 +182,11 @@
+
+
+
-
+
diff --git a/Interface/AddOns/Blizzard_Collections/Classic/Blizzard_ToyBox.lua b/Interface/AddOns/Blizzard_Collections/Classic/Blizzard_ToyBox.lua
index 246f8189c1..e278e8aa22 100644
--- a/Interface/AddOns/Blizzard_Collections/Classic/Blizzard_ToyBox.lua
+++ b/Interface/AddOns/Blizzard_Collections/Classic/Blizzard_ToyBox.lua
@@ -16,6 +16,8 @@ function ToyBox_OnLoad(self)
self:RegisterEvent("TOYS_UPDATED");
self:RegisterEvent("UI_MODEL_SCENE_INFO_UPDATED");
+
+ self.FilterDropdown:SetWidth(85);
self.OnPageChanged = function(userAction)
PlaySound(SOUNDKIT.IG_ABILITY_PAGE_TURN);
diff --git a/Interface/AddOns/Blizzard_Collections/Classic/Blizzard_ToyBox.xml b/Interface/AddOns/Blizzard_Collections/Classic/Blizzard_ToyBox.xml
index 547e7551f9..eb4054126e 100644
--- a/Interface/AddOns/Blizzard_Collections/Classic/Blizzard_ToyBox.xml
+++ b/Interface/AddOns/Blizzard_Collections/Classic/Blizzard_ToyBox.xml
@@ -35,9 +35,12 @@
-
+
-
+
+
+
+
diff --git a/Interface/AddOns/Blizzard_Commentator/Blizzard_CommentatorScoreboard.xml b/Interface/AddOns/Blizzard_Commentator/Blizzard_CommentatorScoreboard.xml
index 39f3c3a613..0dad55dec8 100644
--- a/Interface/AddOns/Blizzard_Commentator/Blizzard_CommentatorScoreboard.xml
+++ b/Interface/AddOns/Blizzard_Commentator/Blizzard_CommentatorScoreboard.xml
@@ -96,8 +96,8 @@
-
-
+
+
diff --git a/Interface/AddOns/Blizzard_Commentator/Blizzard_CommentatorSpell.xml b/Interface/AddOns/Blizzard_Commentator/Blizzard_CommentatorSpell.xml
index 3924507844..20666367b0 100644
--- a/Interface/AddOns/Blizzard_Commentator/Blizzard_CommentatorSpell.xml
+++ b/Interface/AddOns/Blizzard_Commentator/Blizzard_CommentatorSpell.xml
@@ -18,7 +18,7 @@
-
+
diff --git a/Interface/AddOns/Blizzard_Commentator/Blizzard_CommentatorSpellTray.xml b/Interface/AddOns/Blizzard_Commentator/Blizzard_CommentatorSpellTray.xml
index ed3cba1265..7c715319bd 100644
--- a/Interface/AddOns/Blizzard_Commentator/Blizzard_CommentatorSpellTray.xml
+++ b/Interface/AddOns/Blizzard_Commentator/Blizzard_CommentatorSpellTray.xml
@@ -12,21 +12,21 @@
-
+
-
+
-
+
\ No newline at end of file
diff --git a/Interface/AddOns/Blizzard_Communities/ClubFinder.lua b/Interface/AddOns/Blizzard_Communities/ClubFinder.lua
index 4ff250744c..74ff797d03 100644
--- a/Interface/AddOns/Blizzard_Communities/ClubFinder.lua
+++ b/Interface/AddOns/Blizzard_Communities/ClubFinder.lua
@@ -78,7 +78,7 @@ local function ClubFinderGetTotalNumSpecializations()
local count = 0;
for i = 1, numClasses do
local _, _, classID = GetClassInfo(i);
- for j = 1, GetNumSpecializationsForClassID(classID) do
+ for j = 1, C_SpecializationInfo.GetNumSpecializationsForClassID(classID) do
count = count + 1
end
end
@@ -552,7 +552,7 @@ function ClubLookingForDropdownMixin:SetupMenu(checkedList)
local classColor = GetClassColorObj(classInfo.classFile);
local className = classInfo.className;
- for specIndex = 1, GetNumSpecializationsForClassID(classID) do
+ for specIndex = 1, C_SpecializationInfo.GetNumSpecializationsForClassID(classID) do
local specID, specName, _, _, role = GetSpecializationInfoForClassID(classID, specIndex, sex);
if role == tbl.role then
local function SetSpecSelected(specID)
@@ -604,7 +604,7 @@ function ClubLookingForDropdownMixin:IsEverySpecCheckedForRole(roleToMatch)
local sex = UnitSex("player");
for i = 1, numClasses do
local className, classTag, classID = GetClassInfo(i);
- for j = 1, GetNumSpecializationsForClassID(classID) do
+ for j = 1, C_SpecializationInfo.GetNumSpecializationsForClassID(classID) do
local specID, specName, _, _, role = GetSpecializationInfoForClassID(classID, j, sex);
if(role == roleToMatch) then
if (not self:IsSpecInList(specID)) then
@@ -621,7 +621,7 @@ function ClubLookingForDropdownMixin:CheckOrUncheckAll(info, roleToMatch, checkA
local sex = UnitSex("player");
for i = 1, numClasses do
local className, classTag, classID = GetClassInfo(i);
- for j = 1, GetNumSpecializationsForClassID(classID) do
+ for j = 1, C_SpecializationInfo.GetNumSpecializationsForClassID(classID) do
local specID, specName, _, _, role = GetSpecializationInfoForClassID(classID, j, sex);
if(role == roleToMatch) then
self:ModifyTrackedSpecList(specName, className, specID, checkAll);
@@ -770,6 +770,8 @@ function ClubFinderOptionsMixin:OnLoad()
self.SortByDropdown:SetWidth(100);
self.SortByDropdown:SetPoint("RIGHT", self.ClubFilterDropdown, "RIGHT", 110, 0);
+ self.Search:SetSearchBox(self.SearchBox);
+
self:InitializeRoleButtons();
self:SetEnabledRoles();
end
@@ -791,7 +793,7 @@ function ClubFinderOptionsMixin:CheckDisabled()
self.HealerRoleFrame:SetEnabled(canBeHealer and enabled);
self.DpsRoleFrame:SetEnabled(canBeDPS and enabled);
self.SearchBox:SetEnabled(enabled);
- self.Search:SetEnabled(enabled and self.Search:ShouldBeEnabled());
+ self.Search:UpdateEnabledState();
end
function ClubFinderOptionsMixin:SetType(isGuildType)
@@ -993,13 +995,23 @@ end
ClubFinderSearchButtonMixin = { };
+function ClubFinderSearchButtonMixin:SetSearchBox(searchBox)
+ self.searchBox = searchBox;
+end
+
function ClubFinderSearchButtonMixin:OnClick()
PlaySound(SOUNDKIT.IG_MAINMENU_OPTION_CHECKBOX_ON);
self:GetParent():OnSearchButtonClick();
end
function ClubFinderSearchButtonMixin:ShouldBeEnabled()
- local searchTextLen = strlenutf8(self:GetParent().SearchBox:GetText());
+ -- If the editbox is disabled for any reason (e.g. C_ClubFinder.GetClubFinderDisableReason() is not nil)
+ -- the search button should also be disabled.
+ if not self.searchBox:IsEnabled() then
+ return false;
+ end
+
+ local searchTextLen = strlenutf8(self.searchBox:GetText());
return searchTextLen == 0 or searchTextLen >= 3;
end
@@ -1019,7 +1031,8 @@ function ClubFinderSearchButtonMixin:UpdateEnabledState()
end
function ClubFinderSearchButtonMixin:UpdateTooltip()
- if self.mouseInButton and not self:IsEnabled() then
+ -- If the editbox has been disabled don't show the tooltip instructing the player to enter a search term.
+ if self.mouseInButton and not self:IsEnabled() and self.searchBox:IsEnabled() then
self:ShowTooltip();
else
self:HideTooltip();
@@ -1487,7 +1500,7 @@ function ClubFinderGetPlayerSpecIds()
if (not playerSpecs) then
playerSpecs = { };
local classID = select(3, UnitClass("player"));
- for i = 1, GetNumSpecializationsForClassID(classID) do
+ for i = 1, C_SpecializationInfo.GetNumSpecializationsForClassID(classID) do
local specID = GetSpecializationInfoForClassID(classID, i);
if (specID) then
table.insert(playerSpecs, specID);
diff --git a/Interface/AddOns/Blizzard_Communities/CommunitiesList.lua b/Interface/AddOns/Blizzard_Communities/CommunitiesList.lua
index a2d51123cf..472469b6e4 100644
--- a/Interface/AddOns/Blizzard_Communities/CommunitiesList.lua
+++ b/Interface/AddOns/Blizzard_Communities/CommunitiesList.lua
@@ -533,7 +533,7 @@ function CommunitiesListEntryMixin:Init(elementData)
end
function CommunitiesListEntryMixin:UpdateUnreadNotification()
- if C_SocialRestrictions.IsChatDisabled() then
+ if not C_SocialRestrictions.CanReceiveChat() then
self.UnreadNotificationIcon:SetShown(false);
else
local isNewInvitation = self.isInvitation and not DISPLAYED_COMMUNITIES_INVITATIONS[self.clubId];
diff --git a/Interface/AddOns/Blizzard_CompactRaidFrames/Blizzard_CompactRaidFrameManager_Shared.lua b/Interface/AddOns/Blizzard_CompactRaidFrames/Blizzard_CompactRaidFrameManager_Shared.lua
index 262d254731..34e5bf6bd3 100644
--- a/Interface/AddOns/Blizzard_CompactRaidFrames/Blizzard_CompactRaidFrameManager_Shared.lua
+++ b/Interface/AddOns/Blizzard_CompactRaidFrames/Blizzard_CompactRaidFrameManager_Shared.lua
@@ -193,6 +193,7 @@ function CompactRaidFrameManager_UpdateOptionsFlowContainer(self)
if ( GetDisplayedAllyFrames() == "raid" ) then
FlowContainer_AddObject(container, self.displayFrame.profileSelector);
+ FlowContainer_SetStartingOffset(container, 20, 0);
self.displayFrame.profileSelector:Show();
else
self.displayFrame.profileSelector:Hide();
diff --git a/Interface/AddOns/Blizzard_CompactRaidFrames/Blizzard_CompactRaidFrames.toc b/Interface/AddOns/Blizzard_CompactRaidFrames/Blizzard_CompactRaidFrames.toc
index 8f2da63e01..49c03d8031 100644
--- a/Interface/AddOns/Blizzard_CompactRaidFrames/Blizzard_CompactRaidFrames.toc
+++ b/Interface/AddOns/Blizzard_CompactRaidFrames/Blizzard_CompactRaidFrames.toc
@@ -1,4 +1,5 @@
## Title: Blizzard Compact Raid Frames
+## SavedVariables: Blizzard_CompactRaidFrameManager_FilterOptions
## AllowLoad: game
## AllowLoadGameType: vanilla, tbc
Blizzard_CompactRaidFrameReservationManager.lua
diff --git a/Interface/AddOns/Blizzard_DebugTools/Blizzard_TexelSnappingVisualizer.lua b/Interface/AddOns/Blizzard_DebugTools/Blizzard_TexelSnappingVisualizer.lua
index 7df26fc1b8..526965e91a 100644
--- a/Interface/AddOns/Blizzard_DebugTools/Blizzard_TexelSnappingVisualizer.lua
+++ b/Interface/AddOns/Blizzard_DebugTools/Blizzard_TexelSnappingVisualizer.lua
@@ -2,7 +2,7 @@ if not IsGMClient() then
return; -- This tool only functions in GM builds
end
-if IsOnGlueScreen() then
+if C_Glue.IsOnGlueScreen() then
return;
end
diff --git a/Interface/AddOns/Blizzard_DeprecatedGlue/Blizzard_DeprecatedGlue.toc b/Interface/AddOns/Blizzard_DeprecatedGlue/Blizzard_DeprecatedGlue.toc
new file mode 100644
index 0000000000..a1f2ffdb6b
--- /dev/null
+++ b/Interface/AddOns/Blizzard_DeprecatedGlue/Blizzard_DeprecatedGlue.toc
@@ -0,0 +1,7 @@
+## Title: Blizzard_Deprecated Glue
+## Notes: C API functions that are exposed for backwards compatibility. They will be removed at the next expansion. Upgrade your code to the new APIs as soon as possible.
+## Author: Blizzard Entertainment
+## Version: 1.0
+## LoadOnDemand: 0
+
+Deprecated_Glue.lua
diff --git a/Interface/AddOns/Blizzard_DeprecatedGlue/Deprecated_Glue.lua b/Interface/AddOns/Blizzard_DeprecatedGlue/Deprecated_Glue.lua
new file mode 100644
index 0000000000..0cea5fe258
--- /dev/null
+++ b/Interface/AddOns/Blizzard_DeprecatedGlue/Deprecated_Glue.lua
@@ -0,0 +1,10 @@
+-- These are functions that were deprecated and will be removed in the future.
+-- Please upgrade to the updated APIs as soon as possible.
+
+if not GetCVarBool("loadDeprecationFallbacks") then
+ return;
+end
+
+do
+ IsOnGlueScreen = C_Glue.IsOnGlueScreen();
+end
\ No newline at end of file
diff --git a/Interface/AddOns/Blizzard_DeprecatedLFG/Blizzard_DeprecatedLFG.toc b/Interface/AddOns/Blizzard_DeprecatedLFG/Blizzard_DeprecatedLFG.toc
new file mode 100644
index 0000000000..79d5b80897
--- /dev/null
+++ b/Interface/AddOns/Blizzard_DeprecatedLFG/Blizzard_DeprecatedLFG.toc
@@ -0,0 +1,7 @@
+## Title: Blizzard_Deprecated LFG
+## Notes: C API functions that are exposed for backwards compatibility. They will be removed at the next expansion. Upgrade your code to the new APIs as soon as possible.
+## Author: Blizzard Entertainment
+## Version: 1.0
+## LoadOnDemand: 0
+
+Deprecated_LFG.lua
diff --git a/Interface/AddOns/Blizzard_DeprecatedLFG/Deprecated_LFG.lua b/Interface/AddOns/Blizzard_DeprecatedLFG/Deprecated_LFG.lua
new file mode 100644
index 0000000000..83662452a0
--- /dev/null
+++ b/Interface/AddOns/Blizzard_DeprecatedLFG/Deprecated_LFG.lua
@@ -0,0 +1,16 @@
+-- These are functions that were deprecated and will be removed in the future.
+-- Please upgrade to the updated APIs as soon as possible.
+
+if not GetCVarBool("loadDeprecationFallbacks") then
+ return;
+end
+
+do
+ C_LFGInfo.IsPremadeGroupEnabled = C_LFGList.IsPremadeGroupFinderEnabled;
+ C_LFGList.GetSearchResultMemberInfo = function(...)
+ local info = C_LFGList.GetSearchResultPlayerInfo(...);
+ if (info) then
+ return info.assignedRole, info.classFilename, info.className, info.specName, info.isLeader;
+ end
+ end
+end
\ No newline at end of file
diff --git a/Interface/AddOns/Blizzard_DeprecatedSpecialization/Blizzard_DeprecatedSpecialization.toc b/Interface/AddOns/Blizzard_DeprecatedSpecialization/Blizzard_DeprecatedSpecialization.toc
new file mode 100644
index 0000000000..a26384e670
--- /dev/null
+++ b/Interface/AddOns/Blizzard_DeprecatedSpecialization/Blizzard_DeprecatedSpecialization.toc
@@ -0,0 +1,7 @@
+## Title: Blizzard_Deprecated Specialization
+## Notes: C API functions that are exposed for backwards compatibility. They will be removed at the next expansion. Upgrade your code to the new APIs as soon as possible.
+## Author: Blizzard Entertainment
+## Version: 1.0
+## LoadOnDemand: 0
+
+Deprecated_Specialization.lua
diff --git a/Interface/AddOns/Blizzard_DeprecatedSpecialization/Deprecated_Specialization.lua b/Interface/AddOns/Blizzard_DeprecatedSpecialization/Deprecated_Specialization.lua
new file mode 100644
index 0000000000..5be8bfe74c
--- /dev/null
+++ b/Interface/AddOns/Blizzard_DeprecatedSpecialization/Deprecated_Specialization.lua
@@ -0,0 +1,11 @@
+-- These are functions that were deprecated and will be removed in the future.
+-- Please upgrade to the updated APIs as soon as possible.
+
+if not GetCVarBool("loadDeprecationFallbacks") then
+ return;
+end
+
+do
+ -- Use C_SpecializationInfo.GetNumSpecializationsForClassID instead
+ GetNumSpecializationsForClassID = C_SpecializationInfo.GetNumSpecializationsForClassID;
+end
\ No newline at end of file
diff --git a/Interface/AddOns/Blizzard_EngravingUI/Blizzard_EngravingUI.xml b/Interface/AddOns/Blizzard_EngravingUI/Blizzard_EngravingUI.xml
index df607a594c..c9ace69a43 100644
--- a/Interface/AddOns/Blizzard_EngravingUI/Blizzard_EngravingUI.xml
+++ b/Interface/AddOns/Blizzard_EngravingUI/Blizzard_EngravingUI.xml
@@ -150,6 +150,9 @@
+
+
+
diff --git a/Interface/AddOns/Blizzard_FontStyles_Frame/Classic/FontStyles.xml b/Interface/AddOns/Blizzard_FontStyles_Frame/Classic/FontStyles.xml
index 6069ceb460..055ed5bcb6 100644
--- a/Interface/AddOns/Blizzard_FontStyles_Frame/Classic/FontStyles.xml
+++ b/Interface/AddOns/Blizzard_FontStyles_Frame/Classic/FontStyles.xml
@@ -337,6 +337,9 @@
+
+
+
diff --git a/Interface/AddOns/Blizzard_FrameEffects/EffectFactory.lua b/Interface/AddOns/Blizzard_FrameEffects/EffectFactory.lua
index ba0525ec5d..1b3af3e2e7 100644
--- a/Interface/AddOns/Blizzard_FrameEffects/EffectFactory.lua
+++ b/Interface/AddOns/Blizzard_FrameEffects/EffectFactory.lua
@@ -1,54 +1,84 @@
--- Factory for animated frames.
--- The factory template requires Play(...), where ... are optional arguments forwarded
--- at the factory callsite. The derived factory requires Attach(frame, target), and must
--- invoke EffectFactoryMixin.OnLoad() with the desired template name.
--- See GlowEmitter.lua as example.
+--[[
+Factory for animated frames.
+
+The template frame must implement Play(animEnum) and forward the Play() call
+to the appropriate animation object.
+
+The derived factory must call Init() with the frame type, template name, and strata,
+and implement Attach() for any custom position handling.
+
+See GlowEmitter.lua as an example.
+]]--
EffectFactoryMixin = {};
-function EffectFactoryMixin:OnLoad(template)
- self.template = template;
+-- Derive
+function EffectFactoryMixin:Init(frameType, template, strata)
+ self.pool = CreateFramePool(frameType, nil, template);
+ self.strata = strata;
end
-function EffectFactoryMixin:Show(target, ...)
- if not self.pool then
- self.pool = CreateFramePool("FRAME", nil, self.template);
+-- Derive
+function EffectFactoryMixin:Attach(frame, target, offsetX, offsetY, width, height)
+ frame:SetParent(target);
+ frame:SetFrameStrata(self.strata);
+ frame:ClearAllPoints();
+
+ if not frame.originalWidth then
+ frame.originalWidth = frame:GetWidth();
end
- if not self:GetExisting(target) then
- local frame = self.pool:Acquire();
- frame.target = target;
+ if not frame.originalHeight then
+ frame.originalHeight = frame:GetHeight();
+ end
- self:Attach(frame, target);
+ frame:SetWidth(width or frame.originalWidth);
+ frame:SetHeight(height or frame.originalHeight);
+end
+
+function EffectFactoryMixin:Show(target, animEnum, offsetX, offsetY, width, height)
+ assert(animEnum ~= nil, "EffectFactory missing animEnum");
- frame:Show();
- frame:Play(...);
+ if self:HasExisting(target) then
+ return;
end
+
+ local frame = self.pool:Acquire();
+ frame.target = target;
+
+ self:Attach(frame, target, offsetX, offsetY, width, height);
+
+ frame:Show();
+ frame:Play(animEnum);
end
function EffectFactoryMixin:Hide(target)
local frame = self:GetExisting(target);
- if frame then
- frame:StopAnimating();
-
- self.pool:Release(frame);
+ if not frame then
+ return;
end
+
+ frame:StopAnimating();
+
+ self.pool:Release(frame);
end
-function EffectFactoryMixin:SetShown(target, shown, ...)
+function EffectFactoryMixin:SetShown(shown, target, animEnum, offsetX, offsetY, width, height)
if shown then
- self:Show(target, ...);
+ self:Show(target, animEnum, offsetX, offsetY, width, height);
else
self:Hide(target);
end
end
function EffectFactoryMixin:GetExisting(target)
- if self.pool then
- for frame in self.pool:EnumerateActive() do
- if frame.target == target then
- return frame;
- end
+ for frame in self.pool:EnumerateActive() do
+ if frame.target == target then
+ return frame;
end
end
+end
+
+function EffectFactoryMixin:HasExisting(target)
+ return self:GetExisting(target) ~= nil;
end
\ No newline at end of file
diff --git a/Interface/AddOns/Blizzard_FrameEffects/GlowEmitter.lua b/Interface/AddOns/Blizzard_FrameEffects/GlowEmitter.lua
index 00486e1301..697b841203 100644
--- a/Interface/AddOns/Blizzard_FrameEffects/GlowEmitter.lua
+++ b/Interface/AddOns/Blizzard_FrameEffects/GlowEmitter.lua
@@ -8,54 +8,38 @@ GlowEmitterMixin.Anims =
GreenGlow = 4,
};
+function GlowEmitterMixin:OnLoad()
+ self.anims = {
+ [GlowEmitterMixin.Anims.FadeAnim] = self.FadeAnim,
+ [GlowEmitterMixin.Anims.FaintFadeAnim] = self.FaintFadeAnim,
+ [GlowEmitterMixin.Anims.NPE_RedButton_GreenGlow] = self.NPE_RedButton_GreenGlow,
+ [GlowEmitterMixin.Anims.GreenGlow] = self.GreenGlow,
+ };
+
+ self.NineSlice:SetBorderBlendMode("ADD");
+end
+
function GlowEmitterMixin:Play(animType)
- if animType == GlowEmitterMixin.Anims.FadeAnim then
- self.FadeAnim:Play();
- elseif animType == GlowEmitterMixin.Anims.FaintFadeAnim then
- self.FaintFadeAnim:Play();
- elseif animType == GlowEmitterMixin.Anims.NPE_RedButton_GreenGlow then
- self.NPE_RedButton_GreenGlow:Play();
- elseif animType == GlowEmitterMixin.Anims.GreenGlow then
- self.GreenGlow:Play();
- else
- error("Provide a play type")
- end
+ local anim = self.anims[animType];
+ assert(anim, string.format("Missing an animation for animType %d", animType));
+ anim:Play();
end
GlowEmitterFactory = CreateFromMixins(EffectFactoryMixin);
-function GlowEmitterFactory:OnLoad()
- EffectFactoryMixin.OnLoad(self, "GlowEmitterTemplate");
-end
+function GlowEmitterFactory:Attach(frame, target, offsetX, offsetY, width, height)
+ EffectFactoryMixin.Attach(self, frame, target, offsetX, offsetY, width, height);
-function GlowEmitterFactory:Attach(frame, target)
- frame:SetParent(target);
- frame:SetFrameStrata("DIALOG");
- frame.NineSlice:SetBorderBlendMode("ADD");
+ if offsetX == nil then
+ offsetX = 12;
+ end
- frame:ClearAllPoints();
+ if offsetY == nil then
+ offsetY = 0;
+ end
- local offsetX = self.offsetXOverride and self.offsetXOverride or 12;
- local offsetY = self.offsetYOverride and self.offsetYOverride or 0;
frame:SetPoint("LEFT", target, -offsetX, offsetY);
frame:SetPoint("RIGHT", target, offsetX, offsetY);
-
- self.offsetXOverride = nil;
- self.offsetYOverride = nil;
-
- if self.heightOverride then
- frame:SetHeight(self.heightOverride);
- self.heightOverride = nil;
- end
-end
-
-function GlowEmitterFactory:SetOffset(offsetX, offsetY)
- self.offsetXOverride = offsetX;
- self.offsetYOverride = offsetY;
-end
-
-function GlowEmitterFactory:SetHeight(height)
- self.heightOverride = height;
end
-GlowEmitterFactory:OnLoad();
\ No newline at end of file
+GlowEmitterFactory:Init("Frame", "GlowEmitterTemplate", "DIALOG");
\ No newline at end of file
diff --git a/Interface/AddOns/Blizzard_FrameEffects/GlowEmitter.xml b/Interface/AddOns/Blizzard_FrameEffects/GlowEmitter.xml
index 703a9c500b..a7eb8855c5 100644
--- a/Interface/AddOns/Blizzard_FrameEffects/GlowEmitter.xml
+++ b/Interface/AddOns/Blizzard_FrameEffects/GlowEmitter.xml
@@ -63,5 +63,8 @@
+
+
+
\ No newline at end of file
diff --git a/Interface/AddOns/Blizzard_FrameXML/Blizzard_FrameXML_Cata.toc b/Interface/AddOns/Blizzard_FrameXML/Blizzard_FrameXML_Cata.toc
index 770dd27273..c382ea0a15 100644
--- a/Interface/AddOns/Blizzard_FrameXML/Blizzard_FrameXML_Cata.toc
+++ b/Interface/AddOns/Blizzard_FrameXML/Blizzard_FrameXML_Cata.toc
@@ -54,8 +54,7 @@ Cata\TalentFrameBase.lua
Cata\Blizzard_TalentUITemplates.xml
Classic\MovieFrame.lua
Classic\MovieFrame.xml
-Wrath\RolePoll.lua
-Wrath\RolePoll.xml
+Classic\RolePoll.xml
Classic\StreamingFrame.lua
Classic\StreamingFrame.xml
IconIntroAnimation.lua
diff --git a/Interface/AddOns/Blizzard_FrameXML/Blizzard_FrameXML_TBC.toc b/Interface/AddOns/Blizzard_FrameXML/Blizzard_FrameXML_TBC.toc
index cd7dda74e6..827808c145 100644
--- a/Interface/AddOns/Blizzard_FrameXML/Blizzard_FrameXML_TBC.toc
+++ b/Interface/AddOns/Blizzard_FrameXML/Blizzard_FrameXML_TBC.toc
@@ -264,7 +264,7 @@ ItemTextFrame.xml
TaxiFrame.xml
..\..\Interface_TBC\Blizzard_FrameXML\BankFrame.xml
ItemRef.xml
-..\..\Interface_TBC\Blizzard_FrameXML\FriendsFrame.xml
+..\..\Interface_Wrath\Blizzard_FrameXML\FriendsFrame.xml
RaidFrame.xml
PetActionBarFrame.xml
MainMenuBarBagButtons.xml
@@ -294,6 +294,7 @@ TextToSpeechFrame.xml
TextToSpeech.xml
Classic\MovieFrame.lua
Classic\MovieFrame.xml
+Classic\RolePoll.xml
AnimationSystem.lua
CompactUnitFrame.xml
CompactRaidGroup.xml
diff --git a/Interface/AddOns/Blizzard_FrameXML/Blizzard_FrameXML_Vanilla.toc b/Interface/AddOns/Blizzard_FrameXML/Blizzard_FrameXML_Vanilla.toc
index 7a7fc4bc09..b5c44aa0b0 100644
--- a/Interface/AddOns/Blizzard_FrameXML/Blizzard_FrameXML_Vanilla.toc
+++ b/Interface/AddOns/Blizzard_FrameXML/Blizzard_FrameXML_Vanilla.toc
@@ -51,6 +51,7 @@ Vanilla\TalentFrameBase.lua
Classic\Blizzard_TalentUITemplates.xml
Classic\MovieFrame.lua
Classic\MovieFrame.xml
+Classic\RolePoll.xml
Classic\StreamingFrame.lua
Classic\StreamingFrame.xml
IconIntroAnimation.lua
diff --git a/Interface/AddOns/Blizzard_FrameXML/Blizzard_FrameXML_Wrath.toc b/Interface/AddOns/Blizzard_FrameXML/Blizzard_FrameXML_Wrath.toc
index 409daae19d..63f92215e4 100644
--- a/Interface/AddOns/Blizzard_FrameXML/Blizzard_FrameXML_Wrath.toc
+++ b/Interface/AddOns/Blizzard_FrameXML/Blizzard_FrameXML_Wrath.toc
@@ -53,8 +53,7 @@ Wrath\TalentFrameBase.lua
Classic\Blizzard_TalentUITemplates.xml
Classic\MovieFrame.lua
Classic\MovieFrame.xml
-Wrath\RolePoll.lua
-Wrath\RolePoll.xml
+Classic\RolePoll.xml
Classic\StreamingFrame.lua
Classic\StreamingFrame.xml
IconIntroAnimation.lua
diff --git a/Interface/AddOns/Blizzard_FrameXML/Classic/AlertFrameSystems.lua b/Interface/AddOns/Blizzard_FrameXML/Classic/AlertFrameSystems.lua
index efc57cda83..05dca2b818 100644
--- a/Interface/AddOns/Blizzard_FrameXML/Classic/AlertFrameSystems.lua
+++ b/Interface/AddOns/Blizzard_FrameXML/Classic/AlertFrameSystems.lua
@@ -17,6 +17,7 @@ function AlertFrameSystems_Register()
LegendaryItemAlertSystem = AlertFrame:AddSimpleAlertFrameSubSystem("LegendaryItemAlertFrameTemplate", LegendaryItemAlertFrame_SetUp);
NewPetAlertSystem = AlertFrame:AddSimpleAlertFrameSubSystem("NewPetAlertFrameTemplate", NewPetAlertFrame_SetUp);
NewMountAlertSystem = AlertFrame:AddSimpleAlertFrameSubSystem("NewMountAlertFrameTemplate", NewMountAlertFrame_SetUp);
+ NewToyAlertSystem = AlertFrame:AddQueuedAlertFrameSubSystem("NewToyAlertFrameTemplate", NewToyAlertFrame_SetUp);
end
-- [[ GuildChallengeAlertFrame ]] --
@@ -717,11 +718,11 @@ function StorePurchaseAlertFrame_OnClick(self, button, down)
OpenBag(slot);
end
elseif (self.type == Enum.StoreDeliveryType.Mount) then
- ToggleCollectionsJournal(1);
+ ToggleCollectionsJournal(COLLECTIONS_JOURNAL_TAB_INDEX_MOUNTS);
elseif (self.type == Enum.StoreDeliveryType.Battlepet) then
- ToggleCollectionsJournal(2);
+ ToggleCollectionsJournal(COLLECTIONS_JOURNAL_TAB_INDEX_PETS);
elseif (self.type == Enum.StoreDeliveryType.Collection) then
- ToggleCollectionsJournal(5);
+ ToggleCollectionsJournal(COLLECTIONS_JOURNAL_TAB_INDEX_TOYS);
end
end
@@ -1104,4 +1105,27 @@ function NewMountAlertFrameMixin:OnClick(button, down)
SetCollectionsJournalShown(true, COLLECTIONS_JOURNAL_TAB_INDEX_MOUNTS);
MountJournal_SelectByMountID(self.mountID);
+end
+
+-- [[ NewToyAlertFrame ]] --
+
+function NewToyAlertFrame_SetUp(frame, toyID)
+ frame:SetUp(toyID);
+end
+
+NewToyAlertFrameMixin = CreateFromMixins(ItemAlertFrameMixin);
+
+function NewToyAlertFrameMixin:SetUp(toyID)
+ self.toyID = toyID;
+
+ local itemID, toyName, icon, isFavorite, hasFanfare, itemQuality = C_ToyBox.GetToyInfo(self.toyID);
+ self:SetUpDisplay(icon, itemQuality, toyName, YOU_COLLECTED_LABEL);
+end
+
+function NewToyAlertFrameMixin:OnClick(button, down)
+ if AlertFrame_OnClick(self, button, down) then
+ return;
+ end
+
+ ToggleToyCollection(self.toyID);
end
\ No newline at end of file
diff --git a/Interface/AddOns/Blizzard_FrameXML/Classic/AlertFrameSystems.xml b/Interface/AddOns/Blizzard_FrameXML/Classic/AlertFrameSystems.xml
index 5af14e9505..f396e36741 100644
--- a/Interface/AddOns/Blizzard_FrameXML/Classic/AlertFrameSystems.xml
+++ b/Interface/AddOns/Blizzard_FrameXML/Classic/AlertFrameSystems.xml
@@ -2596,4 +2596,16 @@
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/Interface/AddOns/Blizzard_FrameXML/Classic/AlertFrames.lua b/Interface/AddOns/Blizzard_FrameXML/Classic/AlertFrames.lua
index 381539dfb2..c050c1a3a3 100644
--- a/Interface/AddOns/Blizzard_FrameXML/Classic/AlertFrames.lua
+++ b/Interface/AddOns/Blizzard_FrameXML/Classic/AlertFrames.lua
@@ -420,6 +420,7 @@ function AlertFrameMixin:OnLoad()
--self:RegisterEvent("CRITERIA_EARNED"); need to investigate what alerts criteria updates send out and whether or not they are directly related to the achievement system... tbd
self:RegisterEvent("ACHIEVEMENT_EARNED");
self:RegisterEvent("STORE_PRODUCT_DELIVERED");
+ self:RegisterEvent("NEW_TOY_ADDED");
end
function AlertFrameMixin:OnEvent(event, ...)
diff --git a/Interface/AddOns/Blizzard_FrameXML/Wrath/RolePoll.lua b/Interface/AddOns/Blizzard_FrameXML/Classic/RolePoll.lua
similarity index 89%
rename from Interface/AddOns/Blizzard_FrameXML/Wrath/RolePoll.lua
rename to Interface/AddOns/Blizzard_FrameXML/Classic/RolePoll.lua
index 3a90134e8f..c1c2f97399 100644
--- a/Interface/AddOns/Blizzard_FrameXML/Wrath/RolePoll.lua
+++ b/Interface/AddOns/Blizzard_FrameXML/Classic/RolePoll.lua
@@ -31,18 +31,18 @@ function RolePollPopup_Show(self)
RolePollPopupRoleButton_SetNotRecommended(RolePollPopupRoleButtonDPS);
end
- self.role = UnitGroupRolesAssigned("player");
+ self.role = UnitGroupRolesAssignedEnum("player");
RolePollPopup_UpdateChecked(self);
StaticPopupSpecial_Show(RolePollPopup);
end
function RolePollPopup_UpdateChecked(self)
- RolePollPopupRoleButtonTank.checkButton:SetChecked(self.role == "TANK");
- RolePollPopupRoleButtonHealer.checkButton:SetChecked(self.role == "HEALER");
- RolePollPopupRoleButtonDPS.checkButton:SetChecked(self.role == "DAMAGER");
+ RolePollPopupRoleButtonTank.checkButton:SetChecked(self.role == Enum.LFGRole.Tank);
+ RolePollPopupRoleButtonHealer.checkButton:SetChecked(self.role == Enum.LFGRole.Healer);
+ RolePollPopupRoleButtonDPS.checkButton:SetChecked(self.role == Enum.LFGRole.Damage);
- if ( self.role == "TANK" or self.role == "HEALER" or self.role == "DAMAGER" ) then
+ if ( self.role == Enum.LFGRole.Tank or self.role == Enum.LFGRole.Healer or self.role == Enum.LFGRole.Damage ) then
self.acceptButton:Enable();
else
self.acceptButton:Disable();
@@ -69,7 +69,7 @@ function RolePollPopupRoleButtonCheckButton_OnClick(self, button)
RolePollPopup.role = self:GetParent().role;
else
PlaySound(SOUNDKIT.IG_MAINMENU_OPTION_CHECKBOX_OFF);
- RolePollPopup.role = "NONE";
+ RolePollPopup.role = Constants.LFG_ROLEConstants.LFG_ROLE_NO_ROLE;
end
RolePollPopup_UpdateChecked(RolePollPopup);
@@ -77,7 +77,7 @@ end
function RolePollPopupAccept_OnClick(self, button)
PlaySound(SOUNDKIT.IG_MAINMENU_OPTION_CHECKBOX_ON);
- UnitSetRole("player", self:GetParent().role);
+ UnitSetRoleEnum("player", self:GetParent().role);
StaticPopupSpecial_Hide(self:GetParent());
end
@@ -105,4 +105,3 @@ function RoleChangedFrame_OnEvent(self, event, ...)
end
end
end
-
diff --git a/Interface/AddOns/Blizzard_FrameXML/Wrath/RolePoll.xml b/Interface/AddOns/Blizzard_FrameXML/Classic/RolePoll.xml
similarity index 71%
rename from Interface/AddOns/Blizzard_FrameXML/Wrath/RolePoll.xml
rename to Interface/AddOns/Blizzard_FrameXML/Classic/RolePoll.xml
index fce3a47ba2..33f9242ce5 100644
--- a/Interface/AddOns/Blizzard_FrameXML/Wrath/RolePoll.xml
+++ b/Interface/AddOns/Blizzard_FrameXML/Classic/RolePoll.xml
@@ -1,9 +1,8 @@
+
-
-
-
+
@@ -13,15 +12,9 @@
-
-
-
+
-
-
-
-
-
+
@@ -63,34 +56,21 @@
-
-
-
+
-
-
-
-
-
+
-
-
-
-
+
-
-
-
-
-
+
@@ -98,74 +78,47 @@
StaticPopupSpecial_Hide(self:GetParent());
-
-
-
-
-
-
+
-
-
-
-
-
+
self:GetNormalTexture():SetTexCoord(GetTexCoordsForRole("TANK"));
- self.role = "TANK";
+ self.role = Enum.LFGRole.Tank;
-
-
-
+
-
-
-
-
-
+
self:GetNormalTexture():SetTexCoord(GetTexCoordsForRole("HEALER"));
- self.role = "HEALER";
+ self.role = Enum.LFGRole.Healer;
-
-
-
+
-
-
-
-
-
+
self:GetNormalTexture():SetTexCoord(GetTexCoordsForRole("DAMAGER"));
- self.role = "DAMAGER";
+ self.role = Enum.LFGRole.Damage;
-
-
-
+
-
-
-
-
-
+
diff --git a/Interface/AddOns/Blizzard_FrameXML/TBC/Minimap.lua b/Interface/AddOns/Blizzard_FrameXML/TBC/Minimap.lua
index f6ad4ad62f..37429cd2f6 100644
--- a/Interface/AddOns/Blizzard_FrameXML/TBC/Minimap.lua
+++ b/Interface/AddOns/Blizzard_FrameXML/TBC/Minimap.lua
@@ -158,7 +158,7 @@ function MiniMapLFGFrame_OnClick(self, button)
local unlistButton = rootDescription:CreateButton(LFG_LIST_UNLIST, function()
C_LFGList.RemoveListing();
end);
- if not (C_LFGList.HasActiveEntryInfo() and LFGListingUtil_CanEditListing()) then
+ if not (C_LFGList.HasActiveEntryInfo() and LFGListUtil_IsAppEmpowered()) then
unlistButton:SetEnabled(false);
end
end);
diff --git a/Interface/AddOns/Blizzard_FrameXML/WardrobeOutfits.lua b/Interface/AddOns/Blizzard_FrameXML/WardrobeOutfits.lua
new file mode 100644
index 0000000000..57d0f0e4f5
--- /dev/null
+++ b/Interface/AddOns/Blizzard_FrameXML/WardrobeOutfits.lua
@@ -0,0 +1,468 @@
+WardrobeOutfitDropdownMixin = { };
+
+function WardrobeOutfitDropdownMixin:OnLoad()
+ WowStyle1DropdownMixin.OnLoad(self);
+ self:SetWidth(self.width or 200);
+ self:SetDefaultText(GRAY_FONT_COLOR:WrapTextInColorCode(TRANSMOG_OUTFIT_NONE));
+
+ self.SaveButton:SetScript("OnClick", function()
+ WardrobeOutfitManager:StartOutfitSave(self, self:GetSelectedOutfitID());
+ end);
+end
+
+function WardrobeOutfitDropdownMixin:SetSelectedOutfitID(outfitID)
+ self.selectedOutfitID = outfitID;
+end
+
+function WardrobeOutfitDropdownMixin:GetSelectedOutfitID()
+ return self.selectedOutfitID;
+end
+
+function WardrobeOutfitDropdownMixin:OnShow()
+ self:RegisterEvent("TRANSMOG_OUTFITS_CHANGED");
+ self:RegisterEvent("TRANSMOGRIFY_UPDATE");
+
+ self:SelectOutfit(self:GetLastOutfitID());
+ self:InitOutfitDropdown();
+end
+
+function WardrobeOutfitDropdownMixin:SelectOutfit(outfitID)
+ self:SetSelectedOutfitID(outfitID);
+ self:LoadOutfit(outfitID);
+ self:UpdateSaveButton();
+end
+
+function WardrobeOutfitDropdownMixin:OnHide()
+ self:UnregisterEvent("TRANSMOG_OUTFITS_CHANGED");
+ self:UnregisterEvent("TRANSMOGRIFY_UPDATE");
+ WardrobeOutfitManager:ClosePopups(self);
+end
+
+function WardrobeOutfitDropdownMixin:OnEvent(event)
+ if event == "TRANSMOG_OUTFITS_CHANGED" then
+ -- Outfits may have been deleted, or their names changed, so we need to
+ -- rebuild the menu state.
+ self:GenerateMenu();
+ self:UpdateSaveButton();
+ elseif event == "TRANSMOGRIFY_UPDATE" then
+ self:UpdateSaveButton();
+ end
+end
+
+function WardrobeOutfitDropdownMixin:UpdateSaveButton()
+ if self:GetSelectedOutfitID() then
+ self.SaveButton:SetEnabled(not self:IsOutfitDressed());
+ else
+ self.SaveButton:SetEnabled(false);
+ end
+end
+
+function WardrobeOutfitDropdownMixin:OnOutfitSaved(outfitID)
+ if self:ShouldReplaceInvalidSources() then
+ self:LoadOutfit(outfitID);
+ end
+end
+
+function WardrobeOutfitDropdownMixin:OnOutfitModified(outfitID)
+ if self:ShouldReplaceInvalidSources() then
+ self:LoadOutfit(outfitID);
+ end
+end
+
+function WardrobeOutfitDropdownMixin:InitOutfitDropdown()
+ local function IsOutfitSelected(outfitID)
+ return self:GetSelectedOutfitID() == outfitID;
+ end
+
+ local function SetOutfitSelected(outfitID)
+ self:SelectOutfit(outfitID);
+ end
+
+ self:SetupMenu(function(dropdown, rootDescription)
+ rootDescription:SetTag("MENU_WARDROBE_OUTFITS");
+
+ local outfits = C_TransmogCollection.GetOutfits();
+ for index, outfitID in ipairs(outfits) do
+ local name, icon = C_TransmogCollection.GetOutfitInfo(outfitID);
+ local text = NORMAL_FONT_COLOR:WrapTextInColorCode(name);
+
+ local radio = rootDescription:CreateButton(text, SetOutfitSelected, outfitID);
+ radio:SetIsSelected(IsOutfitSelected);
+ radio:AddInitializer(function(button, description, menu)
+ local texture = button:AttachTexture();
+ texture:SetSize(19,19);
+ texture:SetPoint("LEFT");
+ texture:SetTexture(icon);
+
+ local fontString = button.fontString;
+ fontString:SetPoint("LEFT", texture, "RIGHT", 3, 0);
+
+ if outfitID == self:GetSelectedOutfitID() then
+ local fontString2 = button:AttachFontString();
+ fontString2:SetPoint("LEFT", button.fontString, "RIGHT");
+ fontString2:SetHeight(16);
+
+ local size = 20;
+ fontString2:SetTextToFit(CreateSimpleTextureMarkup([[Interface\Buttons\UI-CheckBox-Check]], size, size));
+ end
+
+ local gearButton = MenuTemplates.AttachAutoHideGearButton(button);
+ gearButton:SetPoint("RIGHT");
+
+ MenuUtil.HookTooltipScripts(gearButton, function(tooltip)
+ GameTooltip_SetTitle(tooltip, TRANSMOG_OUTFIT_EDIT);
+ end);
+
+ gearButton:SetScript("OnClick", function()
+ WardrobeOutfitEditFrame:ShowForOutfit(outfitID)
+ menu:Close();
+ end);
+ end);
+ end
+
+ if #outfits < C_TransmogCollection.GetNumMaxOutfits() then
+ local text = GREEN_FONT_COLOR:WrapTextInColorCode(TRANSMOG_OUTFIT_NEW);
+ local button = rootDescription:CreateButton(text, function()
+ if WardrobeTransmogFrame and HelpTip:IsShowing(WardrobeTransmogFrame, TRANSMOG_OUTFIT_DROPDOWN_TUTORIAL) then
+ HelpTip:Hide(WardrobeTransmogFrame, TRANSMOG_OUTFIT_DROPDOWN_TUTORIAL);
+ SetCVarBitfield("closedInfoFrames", LE_FRAME_TUTORIAL_TRANSMOG_OUTFIT_DROPDOWN, true);
+ end
+ WardrobeOutfitManager:StartOutfitSave(self);
+ end);
+
+ button:AddInitializer(function(button, description, menu)
+ local texture = button:AttachTexture();
+ texture:SetSize(19,19);
+ texture:SetPoint("LEFT");
+ texture:SetTexture([[Interface\PaperDollInfoFrame\Character-Plus]]);
+
+ local fontString = button.fontString;
+ fontString:SetPoint("LEFT", texture, "RIGHT", 3, 0);
+ end);
+ end
+ end);
+end
+
+function WardrobeOutfitDropdownMixin:NewOutfit(outfitID)
+ self:SetSelectedOutfitID(outfitID);
+ self:InitOutfitDropdown();
+ self:UpdateSaveButton();
+
+ self:OnOutfitSaved(outfitID);
+end
+
+function WardrobeOutfitDropdownMixin:GetLastOutfitID()
+ -- Expected to return nil for the dropdown in DressUpModelFrame. See WardrobeOutfitMixin:GetLastOutfitID()
+ -- for the regular implementation.
+ return nil;
+end
+
+function WardrobeOutfitDropdownMixin:IsOutfitDressed()
+ local outfitID = self:GetSelectedOutfitID();
+ if not outfitID then
+ return true;
+ end
+
+ local outfitItemTransmogInfoList = C_TransmogCollection.GetOutfitItemTransmogInfoList(outfitID);
+ if not outfitItemTransmogInfoList then
+ return true;
+ end
+
+ local currentItemTransmogInfoList = self:GetItemTransmogInfoList();
+ if not currentItemTransmogInfoList then
+ return true;
+ end
+
+ for slotID, itemTransmogInfo in ipairs(currentItemTransmogInfoList) do
+ if not itemTransmogInfo:IsEqual(outfitItemTransmogInfoList[slotID]) then
+ if itemTransmogInfo.appearanceID ~= Constants.Transmog.NoTransmogID then
+ return false;
+ end
+ end
+ end
+ return true;
+end
+
+function WardrobeOutfitDropdownMixin:ShouldReplaceInvalidSources()
+ return self.replaceInvalidSources;
+end
+
+--===================================================================================================================================
+WardrobeOutfitManager = { };
+
+WardrobeOutfitManager.popups = {
+ "NAME_TRANSMOG_OUTFIT",
+ "CONFIRM_DELETE_TRANSMOG_OUTFIT",
+ "CONFIRM_SAVE_TRANSMOG_OUTFIT",
+ "CONFIRM_OVERWRITE_TRANSMOG_OUTFIT",
+ "TRANSMOG_OUTFIT_CHECKING_APPEARANCES",
+ "TRANSMOG_OUTFIT_SOME_INVALID_APPEARANCES",
+ "TRANSMOG_OUTFIT_ALL_INVALID_APPEARANCES",
+};
+
+function WardrobeOutfitManager:NewOutfit(name)
+ local icon;
+
+ for slotID, itemTransmogInfo in ipairs(self.itemTransmogInfoList) do
+ local appearanceID = itemTransmogInfo.appearanceID;
+ if appearanceID ~= Constants.Transmog.NoTransmogID then
+ icon = select(4, C_TransmogCollection.GetAppearanceSourceInfo(appearanceID));
+ if icon then
+ break;
+ end
+ end
+ end
+
+ local outfitID = C_TransmogCollection.NewOutfit(name, icon, self.itemTransmogInfoList);
+ if outfitID then
+ self:SaveLastOutfit(outfitID);
+ end
+ if ( self.dropdown ) then
+ self.dropdown:NewOutfit(outfitID);
+ end
+end
+
+function WardrobeOutfitManager:NameOutfit(newName, outfitID)
+ local outfits = C_TransmogCollection.GetOutfits();
+ for i = 1, #outfits do
+ local name, icon = C_TransmogCollection.GetOutfitInfo(outfits[i]);
+ if name == newName then
+ if ( outfitID ) then
+ UIErrorsFrame:AddMessage(TRANSMOG_OUTFIT_ALREADY_EXISTS, 1.0, 0.1, 0.1, 1.0);
+ else
+ WardrobeOutfitManager:ShowPopup("CONFIRM_OVERWRITE_TRANSMOG_OUTFIT", newName, nil, { name = name, outfitID = outfits[i] });
+ end
+ return;
+ end
+ end
+ if outfitID then
+ C_TransmogCollection.RenameOutfit(outfitID, newName);
+ else
+ self:NewOutfit(newName);
+ end
+end
+
+function WardrobeOutfitManager:ShowPopup(popup, ...)
+ -- close all other popups
+ for _, listPopup in pairs(self.popups) do
+ if ( listPopup ~= popup ) then
+ StaticPopup_Hide(listPopup);
+ end
+ end
+ if ( popup ~= WardrobeOutfitEditFrame ) then
+ StaticPopupSpecial_Hide(WardrobeOutfitEditFrame);
+ end
+
+ if ( popup == WardrobeOutfitEditFrame ) then
+ StaticPopupSpecial_Show(WardrobeOutfitEditFrame);
+ else
+ StaticPopup_Show(popup, ...);
+ end
+end
+
+function WardrobeOutfitManager:ClosePopups(requestingDropdown)
+ if ( requestingDropdown and requestingDropdown ~= self.popupDropdown ) then
+ return;
+ end
+ for _, popup in pairs(self.popups) do
+ StaticPopup_Hide(popup);
+ end
+ StaticPopupSpecial_Hide(WardrobeOutfitEditFrame);
+
+ -- clean up
+ self.itemTransmogInfoList = nil;
+ self.hasAnyPendingAppearances = nil;
+ self.hasAnyValidAppearances = nil;
+ self.hasAnyInvalidAppearances = nil;
+ self.outfitID = nil;
+ self.dropdown = nil;
+end
+
+function WardrobeOutfitManager:StartOutfitSave(dropdown, outfitID)
+ self.dropdown = dropdown;
+ self.outfitID = outfitID;
+ self:EvaluateAppearances();
+end
+
+function WardrobeOutfitManager:EvaluateAppearance(appearanceID, category, transmogLocation)
+ local preferredAppearanceID, hasAllData, canCollect;
+ if self.dropdown:ShouldReplaceInvalidSources() then
+ preferredAppearanceID, hasAllData, canCollect = CollectionWardrobeUtil.GetPreferredSourceID(appearanceID, nil, category, transmogLocation);
+ else
+ preferredAppearanceID = appearanceID;
+ hasAllData, canCollect = C_TransmogCollection.PlayerCanCollectSource(appearanceID);
+ end
+
+ if canCollect then
+ self.hasAnyValidAppearances = true;
+ else
+ if hasAllData then
+ self.hasAnyInvalidAppearances = true;
+ else
+ self.hasAnyPendingAppearances = true;
+ end
+ end
+ local isInvalidAppearance = hasAllData and not canCollect;
+ return preferredAppearanceID, isInvalidAppearance;
+end
+
+function WardrobeOutfitManager:EvaluateAppearances()
+ self.hasAnyInvalidAppearances = false;
+ self.hasAnyValidAppearances = false;
+ self.hasAnyPendingAppearances = false;
+ self.itemTransmogInfoList = self.dropdown:GetItemTransmogInfoList();
+ -- all illusions are collectible
+ for slotID, itemTransmogInfo in ipairs(self.itemTransmogInfoList) do
+ local isValidAppearance = false;
+ if TransmogUtil.IsValidTransmogSlotID(slotID) then
+ local appearanceID = itemTransmogInfo.appearanceID;
+ isValidAppearance = appearanceID ~= Constants.Transmog.NoTransmogID;
+ -- skip offhand if mainhand is an appeance from Legion Artifacts category and the offhand matches the paired appearance
+ if isValidAppearance and slotID == INVSLOT_OFFHAND then
+ local mhInfo = self.itemTransmogInfoList[INVSLOT_MAINHAND];
+ if mhInfo:IsMainHandPairedWeapon() then
+ isValidAppearance = appearanceID ~= C_TransmogCollection.GetPairedArtifactAppearance(mhInfo.appearanceID);
+ end
+ end
+ if isValidAppearance then
+ local transmogLocation = TransmogUtil.CreateTransmogLocation(slotID, Enum.TransmogType.Appearance, Enum.TransmogModification.Main);
+ local category = C_TransmogCollection.GetCategoryForItem(appearanceID);
+ local preferredAppearanceID, isInvalidAppearance = self:EvaluateAppearance(appearanceID, category, transmogLocation);
+ if isInvalidAppearance then
+ isValidAppearance = false;
+ else
+ itemTransmogInfo.appearanceID = preferredAppearanceID;
+ end
+ -- secondary check
+ if itemTransmogInfo.secondaryAppearanceID ~= Constants.Transmog.NoTransmogID and C_Transmog.CanHaveSecondaryAppearanceForSlotID(slotID) then
+ local secondaryTransmogLocation = TransmogUtil.CreateTransmogLocation(slotID, Enum.TransmogType.Appearance, Enum.TransmogModification.Secondary);
+ local secondaryCategory = C_TransmogCollection.GetCategoryForItem(itemTransmogInfo.secondaryAppearanceID);
+ local secondaryPreferredAppearanceID, secondaryIsInvalidAppearance = self:EvaluateAppearance(itemTransmogInfo.secondaryAppearanceID, secondaryCategory, secondaryTransmogLocation);
+ if secondaryIsInvalidAppearance then
+ -- secondary is invalid, clear it
+ itemTransmogInfo.secondaryAppearanceID = Constants.Transmog.NoTransmogID;
+ else
+ if isInvalidAppearance then
+ -- secondary is valid but primary is invalid, make the secondary the primary
+ isValidAppearance = true;
+ itemTransmogInfo.appearanceID = secondaryPreferredAppearanceID;
+ itemTransmogInfo.secondaryAppearanceID = Constants.Transmog.NoTransmogID;
+ else
+ -- both primary and secondary are valid
+ itemTransmogInfo.secondaryAppearanceID = secondaryPreferredAppearanceID;
+ end
+ end
+ end
+ end
+ end
+ if not isValidAppearance then
+ itemTransmogInfo:Clear();
+ end
+ end
+
+ self:EvaluateSaveState();
+end
+
+function WardrobeOutfitManager:EvaluateSaveState()
+ if self.hasAnyPendingAppearances then
+ -- wait
+ if ( not StaticPopup_Visible("TRANSMOG_OUTFIT_CHECKING_APPEARANCES") ) then
+ WardrobeOutfitManager:ShowPopup("TRANSMOG_OUTFIT_CHECKING_APPEARANCES", nil, nil, nil, WardrobeOutfitCheckAppearancesFrame);
+ end
+ else
+ StaticPopup_Hide("TRANSMOG_OUTFIT_CHECKING_APPEARANCES");
+ if not self.hasAnyValidAppearances then
+ -- stop
+ WardrobeOutfitManager:ShowPopup("TRANSMOG_OUTFIT_ALL_INVALID_APPEARANCES");
+ elseif self.hasAnyInvalidAppearances then
+ -- warn
+ WardrobeOutfitManager:ShowPopup("TRANSMOG_OUTFIT_SOME_INVALID_APPEARANCES");
+ else
+ WardrobeOutfitManager:ContinueWithSave();
+ end
+ end
+end
+
+function WardrobeOutfitManager:ContinueWithSave()
+ if self.outfitID then
+ C_TransmogCollection.ModifyOutfit(self.outfitID, self.itemTransmogInfoList);
+ self:SaveLastOutfit(self.outfitID);
+ if ( self.dropdown ) then
+ self.dropdown:OnOutfitModified(self.outfitID);
+ end
+ WardrobeOutfitManager:ClosePopups();
+ else
+ WardrobeOutfitManager:ShowPopup("NAME_TRANSMOG_OUTFIT");
+ end
+end
+
+function WardrobeOutfitManager:SaveLastOutfit(outfitID)
+ local value = outfitID or "";
+
+ -- Classic only cvar
+ local classicSpecValue = GetCVar("lastTransmogOutfitIDNoSpec");
+ if(classicSpecValue ~= nil) then
+ SetCVar("lastTransmogOutfitIDNoSpec", value);
+ return;
+ end
+
+ local currentSpecIndex = GetCVarBool("transmogCurrentSpecOnly") and GetSpecialization() or nil;
+ for specIndex = 1, GetNumSpecializations() do
+ if not currentSpecIndex or specIndex == currentSpecIndex then
+ SetCVar("lastTransmogOutfitIDSpec"..specIndex, value);
+ end
+ end
+end
+
+function WardrobeOutfitManager:OverwriteOutfit(outfitID)
+ self.outfitID = outfitID;
+ self:ContinueWithSave();
+end
+
+--===================================================================================================================================
+WardrobeOutfitEditFrameMixin = { };
+
+function WardrobeOutfitEditFrameMixin:ShowForOutfit(outfitID)
+ WardrobeOutfitManager:ShowPopup(self);
+ self.outfitID = outfitID;
+ local name, icon = C_TransmogCollection.GetOutfitInfo(outfitID);
+ self.EditBox:SetText(name);
+end
+
+function WardrobeOutfitEditFrameMixin:OnDelete()
+ local name = C_TransmogCollection.GetOutfitInfo(self.outfitID);
+ WardrobeOutfitManager:ShowPopup("CONFIRM_DELETE_TRANSMOG_OUTFIT", name, nil, self.outfitID);
+end
+
+function WardrobeOutfitEditFrameMixin:OnAccept()
+ if ( not self.AcceptButton:IsEnabled() ) then
+ return;
+ end
+ StaticPopupSpecial_Hide(self);
+ WardrobeOutfitManager:NameOutfit(self.EditBox:GetText(), self.outfitID);
+end
+
+--===================================================================================================================================
+WardrobeOutfitCheckAppearancesMixin = { };
+
+function WardrobeOutfitCheckAppearancesMixin:OnShow()
+ self:RegisterEvent("TRANSMOG_COLLECTION_ITEM_UPDATE");
+ self:RegisterEvent("TRANSMOG_SOURCE_COLLECTABILITY_UPDATE");
+end
+
+function WardrobeOutfitCheckAppearancesMixin:OnHide()
+ self:UnregisterEvent("TRANSMOG_COLLECTION_ITEM_UPDATE");
+ self:UnregisterEvent("TRANSMOG_SOURCE_COLLECTABILITY_UPDATE");
+ self.reevaluate = nil;
+end
+
+function WardrobeOutfitCheckAppearancesMixin:OnEvent(event)
+ self.reevaluate = true;
+end
+
+function WardrobeOutfitCheckAppearancesMixin:OnUpdate()
+ if self.reevaluate then
+ self.reevaluate = nil;
+ WardrobeOutfitManager:EvaluateAppearances();
+ end
+end
\ No newline at end of file
diff --git a/Interface/AddOns/Blizzard_FrameXML/WardrobeOutfits.xml b/Interface/AddOns/Blizzard_FrameXML/WardrobeOutfits.xml
new file mode 100644
index 0000000000..f120d1737b
--- /dev/null
+++ b/Interface/AddOns/Blizzard_FrameXML/WardrobeOutfits.xml
@@ -0,0 +1,180 @@
+
+
+
+
+
+
+ self:GetParent():GetParent():StopHideCountDown();
+ self.texture:SetAlpha(1.0);
+ GameTooltip:SetOwner(self, "ANCHOR_RIGHT");
+ GameTooltip:SetText(self.tooltipText);
+
+
+ self:GetParent():GetParent():StartHideCountDown();
+ self.texture:SetAlpha(0.5);
+ GameTooltip_Hide();
+
+
+ self.texture:SetPoint("TOPLEFT", 1, -1);
+
+
+ self.texture:SetPoint("TOPLEFT", 0, 0);
+
+
+ self.texture:SetPoint("TOPLEFT", 0, 0);
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ self:GetParent():OnAccept();
+
+
+ StaticPopupSpecial_Hide(self:GetParent());
+
+
+ if ( self:GetText() == "" ) then
+ self:GetParent().AcceptButton:Disable();
+ else
+ self:GetParent().AcceptButton:Enable();
+ end
+
+
+
+
+
+
+
+
+
+
+
+ PlaySound(SOUNDKIT.IG_MAINMENU_OPTION_CHECKBOX_ON);
+ self:GetParent():OnAccept();
+
+
+
+
+
+
+
+
+
+
+ StaticPopupSpecial_Hide(self:GetParent());
+
+
+
+
+
+
+
+
+
+
+ PlaySound(SOUNDKIT.IG_MAINMENU_OPTION_CHECKBOX_ON);
+ self:GetParent():OnDelete();
+
+
+
+
+
+
+ self.exclusive = true;
+ self.hideOnEscape = true;
+ self.DeleteButton:SetWidth(self.DeleteButton:GetTextWidth() + 50);
+
+
+ PlaySound(SOUNDKIT.IG_MAINMENU_CLOSE);
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/Interface/AddOns/Blizzard_FrameXMLBase/Vanilla/Constants.lua b/Interface/AddOns/Blizzard_FrameXMLBase/Vanilla/Constants.lua
index 75ce808937..d4ab84031c 100644
--- a/Interface/AddOns/Blizzard_FrameXMLBase/Vanilla/Constants.lua
+++ b/Interface/AddOns/Blizzard_FrameXMLBase/Vanilla/Constants.lua
@@ -113,8 +113,10 @@ PLAYER_FACTION_COLORS =
};
-- Guild
-MAX_GUILDBANK_TABS = 8;
+MAX_GUILDBANK_TABS = 6;
MAX_BUY_GUILDBANK_TABS = 6;
+MAX_GOLD_WITHDRAW = 1000;
+MAX_GOLD_WITHDRAW_DIGITS = 9;
-- Quest
diff --git a/Interface/AddOns/Blizzard_FrameXMLUtil/Classic/MapUtil.lua b/Interface/AddOns/Blizzard_FrameXMLUtil/Classic/MapUtil.lua
index d19bb9c567..aab0f2f67a 100644
--- a/Interface/AddOns/Blizzard_FrameXMLUtil/Classic/MapUtil.lua
+++ b/Interface/AddOns/Blizzard_FrameXMLUtil/Classic/MapUtil.lua
@@ -27,7 +27,7 @@ function MapUtil.ShouldMapTypeShowQuests(mapType)
end
function MapUtil.ShouldShowTask(mapID, info)
- return (mapID == info.mapID) and HaveQuestData(info.questId);
+ return (mapID == info.mapID) and HaveQuestData(info.questID);
end
function MapUtil.MapHasUnlockedBounties(mapID)
diff --git a/Interface/AddOns/Blizzard_FrameXMLUtil/DifficultyUtil.lua b/Interface/AddOns/Blizzard_FrameXMLUtil/DifficultyUtil.lua
index f7cf7b51de..d0471faaea 100644
--- a/Interface/AddOns/Blizzard_FrameXMLUtil/DifficultyUtil.lua
+++ b/Interface/AddOns/Blizzard_FrameXMLUtil/DifficultyUtil.lua
@@ -39,6 +39,7 @@ local DIFFICULTY_NAMES =
[DifficultyUtil.ID.DungeonTimewalker] = PLAYER_DIFFICULTY_TIMEWALKER,
[DifficultyUtil.ID.RaidTimewalker] = PLAYER_DIFFICULTY_TIMEWALKER,
[DifficultyUtil.ID.Raid40] = PLAYER_DIFFICULTY1,
+ [DifficultyUtil.ID.RaidStory] = PLAYER_DIFFICULTY_STORY_RAID,
}
local PRIMARY_RAIDS = { DifficultyUtil.ID.PrimaryRaidLFR, DifficultyUtil.ID.PrimaryRaidNormal, DifficultyUtil.ID.PrimaryRaidHeroic, DifficultyUtil.ID.PrimaryRaidMythic };
diff --git a/Interface/AddOns/Blizzard_GlueParent/Classic/GlueParent.lua b/Interface/AddOns/Blizzard_GlueParent/Classic/GlueParent.lua
index 70c7ea6952..3081cadc92 100644
--- a/Interface/AddOns/Blizzard_GlueParent/Classic/GlueParent.lua
+++ b/Interface/AddOns/Blizzard_GlueParent/Classic/GlueParent.lua
@@ -72,9 +72,6 @@ function GlueParent_OnEvent(self, event, ...)
GlueParent_EnsureValidScreen();
GlueParent_UpdateDialogs();
GlueParent_CheckCinematic();
- if ( AccountLogin:IsVisible() ) then
- SetGameLogo(AccountLogin.UI.GameLogo);
- end
elseif ( event == "LOGIN_STATE_CHANGED" ) then
GlueParent_EnsureValidScreen();
GlueParent_UpdateDialogs();
@@ -709,36 +706,6 @@ function IsKioskGlueEnabled()
return Kiosk.IsEnabled() and not IsCompetitiveModeEnabled();
end
-
-function GetDisplayedExpansionLogo(expansionLevel, desiredReleaseType)
- local expansionInfo = GetExpansionDisplayInfo(expansionLevel, desiredReleaseType);
-
- if expansionInfo then
- return expansionInfo.logo;
- end
-
- return nil;
-end
-
-
-function SetGameLogo(texture, desiredExpansionLevel, desiredReleaseType)
- local expansionLevel = desiredExpansionLevel or GetClientDisplayExpansionLevel();
- local releaseType = desiredReleaseType or LE_RELEASE_TYPE_CLASSIC;
-
- if(GetCNLogoReleaseType) then
- releaseType = GetCNLogoReleaseType();
- end
-
- local logo = GetDisplayedExpansionLogo(expansionLevel, releaseType);
-
- if logo then
- texture:SetTexture(logo);
- texture:Show();
- else
- texture:Hide();
- end
-end
-
function UpgradeAccount()
if not IsTrialAccount() and C_StorePublic.DoesGroupHavePurchaseableProducts(WOW_GAMES_CATEGORY_ID) then
StoreFrame_SetGamesCategory();
diff --git a/Interface/AddOns/Blizzard_GlueParent/Shared/GlueParentUtil.lua b/Interface/AddOns/Blizzard_GlueParent/Shared/GlueParentUtil.lua
index 7b119e74b3..26576c94ca 100644
--- a/Interface/AddOns/Blizzard_GlueParent/Shared/GlueParentUtil.lua
+++ b/Interface/AddOns/Blizzard_GlueParent/Shared/GlueParentUtil.lua
@@ -29,7 +29,13 @@ end
function GlueParentBlockingFrame_OnKeyDown(self, key)
if key == "ESCAPE" then
local frame = modalFrames[#modalFrames];
- frame:Hide();
+ local continueHide = true;
+ if frame.onCloseCallback then
+ continueHide = frame.onCloseCallback(self);
+ end
+ if continueHide then
+ frame:Hide();
+ end
elseif key == "PRINTSCREEN" then
Screenshot();
end
diff --git a/Interface/AddOns/Blizzard_GlueXML/Blizzard_GlueXML_Cata.toc b/Interface/AddOns/Blizzard_GlueXML/Blizzard_GlueXML_Cata.toc
index d7c6f0ac1c..22b1743d33 100644
--- a/Interface/AddOns/Blizzard_GlueXML/Blizzard_GlueXML_Cata.toc
+++ b/Interface/AddOns/Blizzard_GlueXML/Blizzard_GlueXML_Cata.toc
@@ -11,6 +11,8 @@ Classic\GlueTooltip.lua
Classic\GlueTooltip.xml
ServerAlert.lua
ServerAlert.xml
+Classic\GlueGameLogo.lua
+Classic\GlueGameLogo.xml
Classic\AccountLogin.lua
Classic\AccountLogin.xml
TBC\RealmList.lua
@@ -54,4 +56,6 @@ TBC\CreditsFrame.xml
Classic\GlueMenuFrame.lua
Classic\GlueMenuFrame.xml
SocialContract.lua
-SocialContract.xml
\ No newline at end of file
+SocialContract.xml
+Classic\RealmWarning.lua
+Classic\RealmWarning.xml
\ No newline at end of file
diff --git a/Interface/AddOns/Blizzard_GlueXML/Blizzard_GlueXML_TBC.toc b/Interface/AddOns/Blizzard_GlueXML/Blizzard_GlueXML_TBC.toc
index d381f90ca1..6e498de425 100644
--- a/Interface/AddOns/Blizzard_GlueXML/Blizzard_GlueXML_TBC.toc
+++ b/Interface/AddOns/Blizzard_GlueXML/Blizzard_GlueXML_TBC.toc
@@ -11,6 +11,8 @@ Classic\GlueTooltip.lua
Classic\GlueTooltip.xml
ServerAlert.lua
ServerAlert.xml
+Classic\GlueGameLogo.lua
+Classic\GlueGameLogo.xml
Classic\AccountLogin.lua
Classic\AccountLogin.xml
TBC\RealmList.lua
@@ -51,4 +53,6 @@ TBC\CreditsFrame.xml
Classic\GlueMenuFrame.lua
Classic\GlueMenuFrame.xml
SocialContract.lua
-SocialContract.xml
\ No newline at end of file
+SocialContract.xml
+Classic\RealmWarning.lua
+Classic\RealmWarning.xml
\ No newline at end of file
diff --git a/Interface/AddOns/Blizzard_GlueXML/Blizzard_GlueXML_Vanilla.toc b/Interface/AddOns/Blizzard_GlueXML/Blizzard_GlueXML_Vanilla.toc
index 3b2a8f3914..bc1950197b 100644
--- a/Interface/AddOns/Blizzard_GlueXML/Blizzard_GlueXML_Vanilla.toc
+++ b/Interface/AddOns/Blizzard_GlueXML/Blizzard_GlueXML_Vanilla.toc
@@ -11,6 +11,8 @@ Classic\GlueTooltip.lua
Classic\GlueTooltip.xml
ServerAlert.lua
ServerAlert.xml
+Classic\GlueGameLogo.lua
+Classic\GlueGameLogo.xml
Classic\AccountLogin.lua
Classic\AccountLogin.xml
Vanilla\RealmList.lua
@@ -56,4 +58,6 @@ Classic\GlueMenuFrame.xml
SocialContract.lua
SocialContract.xml
Classic\HardcoreFrames.lua
-Classic\HardcoreFrames.xml
\ No newline at end of file
+Classic\HardcoreFrames.xml
+Classic\RealmWarning.lua
+Classic\RealmWarning.xml
\ No newline at end of file
diff --git a/Interface/AddOns/Blizzard_GlueXML/Blizzard_GlueXML_Wrath.toc b/Interface/AddOns/Blizzard_GlueXML/Blizzard_GlueXML_Wrath.toc
index cb87d88251..ec2c414ec1 100644
--- a/Interface/AddOns/Blizzard_GlueXML/Blizzard_GlueXML_Wrath.toc
+++ b/Interface/AddOns/Blizzard_GlueXML/Blizzard_GlueXML_Wrath.toc
@@ -11,6 +11,8 @@ Classic\GlueTooltip.lua
Classic\GlueTooltip.xml
ServerAlert.lua
ServerAlert.xml
+Classic\GlueGameLogo.lua
+Classic\GlueGameLogo.xml
Classic\AccountLogin.lua
Classic\AccountLogin.xml
TBC\RealmList.lua
@@ -54,4 +56,6 @@ TBC\CreditsFrame.xml
Classic\GlueMenuFrame.lua
Classic\GlueMenuFrame.xml
SocialContract.lua
-SocialContract.xml
\ No newline at end of file
+SocialContract.xml
+Classic\RealmWarning.lua
+Classic\RealmWarning.xml
\ No newline at end of file
diff --git a/Interface/AddOns/Blizzard_GlueXML/Cata/CharacterCreate.xml b/Interface/AddOns/Blizzard_GlueXML/Cata/CharacterCreate.xml
index 878a8639d9..5310418bd7 100644
--- a/Interface/AddOns/Blizzard_GlueXML/Cata/CharacterCreate.xml
+++ b/Interface/AddOns/Blizzard_GlueXML/Cata/CharacterCreate.xml
@@ -217,27 +217,11 @@
-
-
-
-
+
+
-
+
-
-
-
-
-
-
-
-
-
-
-
-
-
-
@@ -245,7 +229,7 @@
-
+
@@ -453,7 +437,7 @@
-
+
@@ -462,7 +446,7 @@
-
+
diff --git a/Interface/AddOns/Blizzard_GlueXML/Classic/AccountLogin.lua b/Interface/AddOns/Blizzard_GlueXML/Classic/AccountLogin.lua
index 61a46f39e3..156870feb3 100644
--- a/Interface/AddOns/Blizzard_GlueXML/Classic/AccountLogin.lua
+++ b/Interface/AddOns/Blizzard_GlueXML/Classic/AccountLogin.lua
@@ -71,7 +71,6 @@ function AccountLogin_CheckLoginState(self)
end
function AccountLogin_OnShow(self)
- SetGameLogo(self.UI.GameLogo);
self.UI.AccountEditBox:SetText("");
AccountLogin_UpdateSavedData(self);
CharacterCreate_CancelReincarnation(); -- If we're back at this screen, we're not reincarnating
diff --git a/Interface/AddOns/Blizzard_GlueXML/Classic/AccountLogin.xml b/Interface/AddOns/Blizzard_GlueXML/Classic/AccountLogin.xml
index f64edffe31..2066e89cab 100644
--- a/Interface/AddOns/Blizzard_GlueXML/Classic/AccountLogin.xml
+++ b/Interface/AddOns/Blizzard_GlueXML/Classic/AccountLogin.xml
@@ -207,12 +207,6 @@
-
-
-
-
-
-
@@ -222,6 +216,12 @@
+
+
+
+
+
+
diff --git a/Interface/AddOns/Blizzard_GlueXML/Classic/CharacterCreate_Shared.lua b/Interface/AddOns/Blizzard_GlueXML/Classic/CharacterCreate_Shared.lua
index 2efdcdad37..1eaa209821 100644
--- a/Interface/AddOns/Blizzard_GlueXML/Classic/CharacterCreate_Shared.lua
+++ b/Interface/AddOns/Blizzard_GlueXML/Classic/CharacterCreate_Shared.lua
@@ -228,8 +228,6 @@ function CharacterCreateMixin:OnShow()
CharacterCreateRandomName:Show();
end
- SetGameLogo(CharacterCreateLogo);
-
if( IsKioskGlueEnabled() ) then
local templateIndex = Kiosk.GetCharacterTemplateSetIndex();
if (templateIndex) then
@@ -439,6 +437,11 @@ end
function CharacterCreate_Okay()
PlaySound(SOUNDKIT.GS_CHARACTER_CREATION_CREATE_CHAR);
+ -- CLASS-36892: Fixes self found state in CPP mismatching the UI
+ if CharacterCreateSelfFound then
+ C_CharacterCreation.ToggleSelfFoundMode(CharacterCreateSelfFound:GetChecked());
+ end
+
if CharacterCreateFrame.paidServiceType then
GlueDialog_Show("CONFIRM_PAID_SERVICE");
elseif CharacterCreateFrame.vasType == Enum.ValueAddedServiceType.PaidFactionChange or CharacterCreateFrame.vasType == Enum.ValueAddedServiceType.PaidRaceChange then
@@ -451,8 +454,13 @@ function CharacterCreate_Okay()
else
KioskModeSplash:SetAutoEnterWorld(false)
end
+
+ local isPvP = select(2, GetServerName()); -- Grabbing whether we're a PvP realm from GetServerName()
+
if (HardcorePopUpFrame and C_GameRules.IsHardcoreActive()) then
HardcorePopUpFrame:ShowCharacterCreationWarning();
+ elseif (RealmWarningPopUpFrame and isPvP == true) then
+ RealmWarningPopUpFrame:ShowCharacterCreationWarning();
else
C_CharacterCreation.CreateCharacter(CharacterCreateNameEdit:GetText());
end
diff --git a/Interface/AddOns/Blizzard_GlueXML/Classic/CharacterSelect.lua b/Interface/AddOns/Blizzard_GlueXML/Classic/CharacterSelect.lua
index e6cd424a40..e72862f7b0 100644
--- a/Interface/AddOns/Blizzard_GlueXML/Classic/CharacterSelect.lua
+++ b/Interface/AddOns/Blizzard_GlueXML/Classic/CharacterSelect.lua
@@ -141,7 +141,7 @@ function CharacterSelectLockedButtonMixin:OnClick()
end
local function ShouldShowHighResButton()
- return false;
+ return not C_BattleNet.AreHighResTexturesInstalled();
end
function CharacterSelectStoreButton_OnLoad(self)
@@ -1870,7 +1870,6 @@ end
function AccountUpgradePanel_Update(isExpanded)
local currentExpansionLevel, shouldShowBanner, upgradeButtonText, upgradeLogo, upgradeBanner, features = AccountUpgradePanel_GetBannerInfo();
- SetGameLogo(CharacterSelectLogo);
if ( shouldShowBanner ) then
CharSelectAccountUpgradeButton:SetText(upgradeButtonText);
CharacterSelectServerAlertFrame:SetPoint("TOP", CharSelectAccountUpgradeMiniPanel, "BOTTOM", 0, -35);
@@ -3678,8 +3677,8 @@ function CharacterSelect_ShowSeasonNotification()
if(GetSoMNotificationEnabled() and GetCVar("seenSoMNotification") == "0" and not C_Seasons.HasActiveSeason()) then
RealmCallout:Show();
- GlowEmitterFactory:SetOffset(3, 1);
- GlowEmitterFactory:Show(CharSelectChangeRealmButton, GlowEmitterMixin.Anims.NPE_RedButton_GreenGlow);
+ local offsetX, offsetY = 3, 1;
+ GlowEmitterFactory:Show(CharSelectChangeRealmButton, GlowEmitterMixin.Anims.NPE_RedButton_GreenGlow, offsetX, offsetY);
RealmCallout.Text:SetText(SEASON_CHARACTER_SELECT_NOTIFICATIONS[Enum.SeasonID.SeasonOfMastery]);
else
RealmCallout:Hide();
diff --git a/Interface/AddOns/Blizzard_GlueXML/Classic/CharacterServicesPaidCharacterTransfer.lua b/Interface/AddOns/Blizzard_GlueXML/Classic/CharacterServicesPaidCharacterTransfer.lua
index 9b44473f84..c0f9b172d1 100644
--- a/Interface/AddOns/Blizzard_GlueXML/Classic/CharacterServicesPaidCharacterTransfer.lua
+++ b/Interface/AddOns/Blizzard_GlueXML/Classic/CharacterServicesPaidCharacterTransfer.lua
@@ -7,7 +7,6 @@ local function RequestAssignPCTForResults(results, isValidationOnly)
results.destinationRealmAddress,
GetCurrentWoWAccountGUID(),
GetCurrentBNetAccountGUID(),
- false,
isValidationOnly
);
end
@@ -95,24 +94,17 @@ local PCTDestinationSelectBlock = {
};
function PCTDestinationSelectBlock:Initialize(results, wasFromRewind)
+ local controlsFrame = self.frame.ControlsFrame;
+
if not wasFromRewind then
local checkUpdate = function()
self:CheckUpdate();
end
- self.frame.ControlsFrame.TransferRealmEditbox:SetOnTextChangedCallback(checkUpdate);
+ controlsFrame.TransferRealmEditbox:SetOnTextChangedCallback(checkUpdate);
end
- self.frame.ControlsFrame.TransferRealmEditbox:Initialize(results, wasFromRewind);
-end
-
-function PCTDestinationSelectBlock:SetState(state)
- self.state = state;
- self:CheckUpdate();
-end
-
-function PCTDestinationSelectBlock:GetState()
- return self.state;
+ controlsFrame.TransferRealmEditbox:Initialize(results, wasFromRewind);
end
function PCTDestinationSelectBlock:CheckUpdate()
diff --git a/Interface/AddOns/Blizzard_GlueXML/Classic/GlueGameLogo.lua b/Interface/AddOns/Blizzard_GlueXML/Classic/GlueGameLogo.lua
new file mode 100644
index 0000000000..fa0b1cbca9
--- /dev/null
+++ b/Interface/AddOns/Blizzard_GlueXML/Classic/GlueGameLogo.lua
@@ -0,0 +1,90 @@
+GlueGameLogoMixin = { };
+
+function GlueGameLogoMixin:OnLoad()
+ self:RegisterEvent("GAME_MODE_CHANGED");
+ self.gameLogoDefaultHeight = self:GetHeight();
+end
+
+function GlueGameLogoMixin:OnShow()
+ self:UpdateLogoTexture();
+end
+
+function GlueGameLogoMixin:OnEvent(event)
+ if (event == "GAME_MODE_CHANGED") then
+ self:UpdateLogoTexture();
+ end
+end
+
+function GlueGameLogoMixin:SetExpansion(expansionLevel)
+ self.expansionLevel = expansionLevel;
+ self:UpdateLogoTexture();
+end
+
+function GlueGameLogoMixin:SetReleaseType(releaseType)
+ self.releaseType = releaseType;
+ self:UpdateLogoTexture();
+end
+
+function GlueGameLogoMixin:SetGameMode(gameModeRecordID)
+ self.gameModeRecordID = gameModeRecordID;
+ self:UpdateLogoTexture();
+end
+
+function GlueGameLogoMixin:SetGameLogoDefaultHeight(gameLogoDefaultHeight)
+ self.gameLogoDefaultHeight = gameLogoDefaultHeight;
+ self:UpdateLogoTexture();
+end
+
+function GlueGameLogoMixin:UpdateLogoTexture()
+ local expansionLevel = self.expansionLevel or GetClientDisplayExpansionLevel();
+ local releaseType = self.releaseType or LE_RELEASE_TYPE_CLASSIC;
+
+ if(GetCNLogoReleaseType) then
+ releaseType = GetCNLogoReleaseType();
+ end
+
+ local logo = nil;
+ local logoHeight = 0;
+ local logoVerticalOffset = 0;
+
+ local gameModeRecordID = self.gameModeRecordID or C_GameModeManager.GetCurrentGameModeRecordID();
+ if gameModeRecordID then
+ local gameModeDisplayInfo = C_GameModeManager.GetGameModeDisplayInfo(gameModeRecordID);
+ if gameModeDisplayInfo then
+ logo = gameModeDisplayInfo.logo;
+ if self.useShrunkenLogoHeight and gameModeDisplayInfo.logoShrunkenHeight > 0 then
+ logoHeight = gameModeDisplayInfo.logoShrunkenHeight;
+ else
+ logoHeight = gameModeDisplayInfo.logoHeight;
+ end
+ logoVerticalOffset = gameModeDisplayInfo.logoVerticalOffset;
+ end
+ end
+
+ local expansionLogo = self:GetDisplayedExpansionLogo(expansionLevel, releaseType, gameMode);
+ logo = logo or expansionLogo;
+
+ if logo then
+ self.LogoTexture:SetTexture(logo);
+ self:Show();
+ else
+ self:Hide();
+ end
+
+ if logoHeight == 0 then
+ logoHeight = self.gameLogoDefaultHeight;
+ end
+
+ self.LogoTexture:SetSize(logoHeight * 2, logoHeight);
+ self.LogoTexture:SetPoint("TOP", 0, logoVerticalOffset);
+end
+
+function GlueGameLogoMixin:GetDisplayedExpansionLogo(expansionLevel, desiredReleaseType)
+ local expansionInfo = GetExpansionDisplayInfo(expansionLevel, desiredReleaseType);
+
+ if expansionInfo then
+ return expansionInfo.logo;
+ end
+
+ return nil;
+end
\ No newline at end of file
diff --git a/Interface/AddOns/Blizzard_GlueXML/Classic/GlueGameLogo.xml b/Interface/AddOns/Blizzard_GlueXML/Classic/GlueGameLogo.xml
new file mode 100644
index 0000000000..60fedcff5a
--- /dev/null
+++ b/Interface/AddOns/Blizzard_GlueXML/Classic/GlueGameLogo.xml
@@ -0,0 +1,23 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/Interface/AddOns/Blizzard_GlueXML/Classic/GlueTooltip.lua b/Interface/AddOns/Blizzard_GlueXML/Classic/GlueTooltip.lua
index 3ee9cda616..0857a8a96b 100644
--- a/Interface/AddOns/Blizzard_GlueXML/Classic/GlueTooltip.lua
+++ b/Interface/AddOns/Blizzard_GlueXML/Classic/GlueTooltip.lua
@@ -36,8 +36,11 @@ function GlueTooltip_SetOwner(self, owner, anchor, xOffset, yOffset )
yOffset = yOffset or 0;
self:ClearAllPoints();
+ -- Fix for calling with ANCHOR_NONE and having points become nil
local points = tooltipAnchorPointMapping[anchor];
- self:SetPoint(points.myPoint, owner, points.ownerPoint, xOffset, yOffset);
+ if(points ~= nil) then
+ self:SetPoint(points.myPoint, owner, points.ownerPoint, xOffset, yOffset);
+ end
self:Show();
end
diff --git a/Interface/AddOns/Blizzard_GlueXML/Classic/HardcoreFrames.xml b/Interface/AddOns/Blizzard_GlueXML/Classic/HardcoreFrames.xml
index 8a958c209b..a13296a451 100644
--- a/Interface/AddOns/Blizzard_GlueXML/Classic/HardcoreFrames.xml
+++ b/Interface/AddOns/Blizzard_GlueXML/Classic/HardcoreFrames.xml
@@ -47,7 +47,7 @@
-
+
@@ -79,7 +79,7 @@
-
+
diff --git a/Interface/AddOns/Blizzard_GlueXML/Classic/KioskModeSplash.lua b/Interface/AddOns/Blizzard_GlueXML/Classic/KioskModeSplash.lua
index c8b0dc38a9..32e8c2db8d 100644
--- a/Interface/AddOns/Blizzard_GlueXML/Classic/KioskModeSplash.lua
+++ b/Interface/AddOns/Blizzard_GlueXML/Classic/KioskModeSplash.lua
@@ -99,7 +99,6 @@ end
function KioskModeSplashMixin:OnShow()
self.mode = nil;
- SetGameLogo(self.UI.GameLogo);
end
function KioskModeSplashMixin:SetMode(mode)
diff --git a/Interface/AddOns/Blizzard_GlueXML/Classic/KioskModeSplash.xml b/Interface/AddOns/Blizzard_GlueXML/Classic/KioskModeSplash.xml
index 9ef587e2c6..1e289a95f1 100644
--- a/Interface/AddOns/Blizzard_GlueXML/Classic/KioskModeSplash.xml
+++ b/Interface/AddOns/Blizzard_GlueXML/Classic/KioskModeSplash.xml
@@ -6,17 +6,13 @@
-
-
-
-
-
-
-
-
-
-
+
+
+
+
+
+
diff --git a/Interface/AddOns/Blizzard_GlueXML/Classic/RealmWarning.lua b/Interface/AddOns/Blizzard_GlueXML/Classic/RealmWarning.lua
new file mode 100644
index 0000000000..5c6149a4ee
--- /dev/null
+++ b/Interface/AddOns/Blizzard_GlueXML/Classic/RealmWarning.lua
@@ -0,0 +1,78 @@
+RealmWarningPopUpFrameMixin = {};
+
+REALM_WARNING_POPUP_SCREEN = {
+ REALM_SELECT = 1,
+ CHARACTER_SELECT = 2,
+}
+
+function RealmWarningPopUpFrameMixin:SetBodyText(text)
+ self.ScrollBox.Text:SetText(text);
+ self.ScrollBox:FullUpdate(ScrollBoxConstants.UpdateImmediately);
+ self.ScrollBox:ScrollToBegin();
+end
+
+function RealmWarningPopUpFrameMixin:Reset()
+ self:SetBodyText("");
+ self.screen = nil;
+ self.realmInfo = nil;
+end
+
+function RealmWarningPopUpFrameMixin:OnLoad()
+ NineSliceUtil.ApplyLayoutByName(self.Border, "Dialog");
+ ScrollUtil.InitScrollBoxWithScrollBar(self.ScrollBox, self.ScrollBar, CreateScrollBoxLinearView());
+ self.screen = nil;
+ self.realmInfo = nil;
+end
+
+function RealmWarningPopUpFrameMixin:OnShow()
+ GlueParent_AddModalFrame(self);
+ if (self.ScrollBar:GetVisibleExtentPercentage() == 1) then
+ -- Text is completely visible
+ self.ScrollBar:Hide();
+ else
+ self.ScrollBar:Show();
+ end
+end
+
+function RealmWarningPopUpFrameMixin:OnHide()
+ GlueParent_RemoveModalFrame(self);
+ self:Reset();
+end
+
+function RealmWarningPopUpFrameMixin:SetRealmInfo(realmInfo)
+ self.selectedRealm = realmInfo;
+end
+
+function RealmWarningPopUpFrameMixin:ShowRealmSelectionWarning()
+ self:SetBodyText(HTML_START .. PVP_REALM_WARNING .. HTML_END);
+ self:SetSize(510, 300);
+ self.ScrollBox:SetSize(400,300);
+ self.screen = REALM_WARNING_POPUP_SCREEN.REALM_SELECT;
+ self:Show();
+end
+
+function RealmWarningPopUpFrameMixin:ShowCharacterCreationWarning()
+ self:SetBodyText(HTML_START .. PVP_CHARACTER_CREATION_WARNING .. PVP_CHARACTER_CREATION_WARNING_TWO .. HTML_END);
+ self:SetSize(510, 560);
+ self.screen = REALM_WARNING_POPUP_SCREEN.CHARACTER_SELECT;
+ self.ScrollBox:SetSize(400,560);
+ self:Show();
+end
+
+RealmWarningPopUpAcceptButtonMixin = {};
+
+function RealmWarningPopUpAcceptButtonMixin:OnClick()
+ local screen = self:GetParent().screen;
+ if (screen == REALM_WARNING_POPUP_SCREEN.REALM_SELECT) then
+ C_RealmList.ConnectToRealm(self:GetParent().selectedRealm);
+ elseif (screen == REALM_WARNING_POPUP_SCREEN.CHARACTER_SELECT) then
+ C_CharacterCreation.CreateCharacter(CharacterCreateNameEdit:GetText());
+ end
+ self:GetParent():Hide();
+end
+
+RealmWarningPopUpDeclineButtonMixin = {};
+
+function RealmWarningPopUpDeclineButtonMixin:OnClick()
+ self:GetParent():Hide();
+end
\ No newline at end of file
diff --git a/Interface/AddOns/Blizzard_GlueXML/Classic/RealmWarning.xml b/Interface/AddOns/Blizzard_GlueXML/Classic/RealmWarning.xml
new file mode 100644
index 0000000000..d0cacd3942
--- /dev/null
+++ b/Interface/AddOns/Blizzard_GlueXML/Classic/RealmWarning.xml
@@ -0,0 +1,109 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/Interface/AddOns/Blizzard_GlueXML/TBC/CharacterCreate.xml b/Interface/AddOns/Blizzard_GlueXML/TBC/CharacterCreate.xml
index 17efe8fb4a..fba9eefcfa 100644
--- a/Interface/AddOns/Blizzard_GlueXML/TBC/CharacterCreate.xml
+++ b/Interface/AddOns/Blizzard_GlueXML/TBC/CharacterCreate.xml
@@ -740,33 +740,14 @@
-
-
-
-
+
+
+
+
+
-
-
-
-
-
+
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
diff --git a/Interface/AddOns/Blizzard_GlueXML/TBC/CharacterSelect.xml b/Interface/AddOns/Blizzard_GlueXML/TBC/CharacterSelect.xml
index ab6a6f155c..3727a48533 100644
--- a/Interface/AddOns/Blizzard_GlueXML/TBC/CharacterSelect.xml
+++ b/Interface/AddOns/Blizzard_GlueXML/TBC/CharacterSelect.xml
@@ -511,21 +511,11 @@
-
-
+
+
-
+
-
-
-
-
-
-
-
-
-
-
diff --git a/Interface/AddOns/Blizzard_GlueXML/TBC/CreditsFrame.lua b/Interface/AddOns/Blizzard_GlueXML/TBC/CreditsFrame.lua
index 1c8d6b8649..27884c9197 100644
--- a/Interface/AddOns/Blizzard_GlueXML/TBC/CreditsFrame.lua
+++ b/Interface/AddOns/Blizzard_GlueXML/TBC/CreditsFrame.lua
@@ -83,7 +83,9 @@ end
function CreditsFrameMixin:Update()
PlayCreditsMusic(self.expansion);
- SetGameLogo(self.Logo, self.expansion, self.releaseType);
+ self.GameLogo:SetExpansion(self.expansion);
+ self.GameLogo:SetReleaseType(self.releaseType);
+ self.GameLogo:SetGameMode(0);
self:SetSpeed(CREDITS_SCROLL_RATE_PLAY);
self.artCount = #CREDITS_ART_INFO[self.expansion][self.releaseType];
diff --git a/Interface/AddOns/Blizzard_GlueXML/TBC/CreditsFrame.xml b/Interface/AddOns/Blizzard_GlueXML/TBC/CreditsFrame.xml
index 590f48a371..2ccb109124 100644
--- a/Interface/AddOns/Blizzard_GlueXML/TBC/CreditsFrame.xml
+++ b/Interface/AddOns/Blizzard_GlueXML/TBC/CreditsFrame.xml
@@ -309,14 +309,6 @@
-
-
-
-
-
-
-
-
@@ -353,6 +345,12 @@
+
+
+
+
+
+
diff --git a/Interface/AddOns/Blizzard_GlueXML/TBC/Localization.lua b/Interface/AddOns/Blizzard_GlueXML/TBC/Localization.lua
index 03804c6782..321a1d4aea 100644
--- a/Interface/AddOns/Blizzard_GlueXML/TBC/Localization.lua
+++ b/Interface/AddOns/Blizzard_GlueXML/TBC/Localization.lua
@@ -55,7 +55,7 @@ local l10nTable = {
CLASSIC_MODERN_LOGO_OVERRIDE = {filename = 'Interface\\Glues\\Common\\GLUES-WOW-CLASSICLOGO', uv = { 0, 1, 0, 1 }};
BURNING_CRUSADE_ORIGINAL_LOGO_OVERRIDE = {filename = 'Interface\\Glues\\Common\\GLUES-WOW-CHINESEBCLOGO', uv = { 0, 1, 0, 1 }};
- _G["CharacterCreateWoWLogo"]:SetPoint("TOPLEFT", _G["CharacterCreateFrame"], 3, 14) -- -3, +11
+ _G["CharacterCreateConfigurationFrame"].GameLogo:SetPoint("TOPLEFT", _G["CharacterCreateFrame"], 34, -3);
_G["CharacterSelectLogo"]:SetPoint("TOPLEFT", 5, -5);
_G["AccountLogin"].UI.GameLogo:SetPoint("TOPLEFT", 5, -5);
diff --git a/Interface/AddOns/Blizzard_GlueXML/TBC/RealmList.lua b/Interface/AddOns/Blizzard_GlueXML/TBC/RealmList.lua
index 296d864bc3..166eaa74a1 100644
--- a/Interface/AddOns/Blizzard_GlueXML/TBC/RealmList.lua
+++ b/Interface/AddOns/Blizzard_GlueXML/TBC/RealmList.lua
@@ -240,6 +240,9 @@ function RealmList_OnOk()
if ( realmInfo.populationState == "FULL" and realmInfo.numCharacters == 0 ) then
GlueDialog_Show("REALM_IS_FULL");
+ elseif (realmInfo.isPvP == true and realmInfo.numCharacters == 0) then
+ RealmWarningPopUpFrame:SetRealmInfo(RealmList.selectedRealm)
+ RealmWarningPopUpFrame:ShowRealmSelectionWarning();
else
C_RealmList.ConnectToRealm(RealmList.selectedRealm);
end
diff --git a/Interface/AddOns/Blizzard_GlueXML/Vanilla/CharacterCreate.xml b/Interface/AddOns/Blizzard_GlueXML/Vanilla/CharacterCreate.xml
index bf74d17537..bfc47471a3 100644
--- a/Interface/AddOns/Blizzard_GlueXML/Vanilla/CharacterCreate.xml
+++ b/Interface/AddOns/Blizzard_GlueXML/Vanilla/CharacterCreate.xml
@@ -670,7 +670,7 @@
-
+
@@ -710,24 +710,6 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
@@ -750,30 +732,35 @@
-
-
-
-
+
+
-
-
-
-
-
+
-
-
-
-
+
-
+
-
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/Interface/AddOns/Blizzard_GlueXML/Vanilla/CharacterSelect.xml b/Interface/AddOns/Blizzard_GlueXML/Vanilla/CharacterSelect.xml
index 3f61e9381e..881d17557c 100644
--- a/Interface/AddOns/Blizzard_GlueXML/Vanilla/CharacterSelect.xml
+++ b/Interface/AddOns/Blizzard_GlueXML/Vanilla/CharacterSelect.xml
@@ -543,21 +543,11 @@
-
-
+
+
-
+
-
-
-
-
-
-
-
-
-
-
diff --git a/Interface/AddOns/Blizzard_GlueXML/Vanilla/CreditsFrame.lua b/Interface/AddOns/Blizzard_GlueXML/Vanilla/CreditsFrame.lua
index 91739ab059..6720e5ebb0 100644
--- a/Interface/AddOns/Blizzard_GlueXML/Vanilla/CreditsFrame.lua
+++ b/Interface/AddOns/Blizzard_GlueXML/Vanilla/CreditsFrame.lua
@@ -16,11 +16,13 @@ end
function CreditsFrame_Update(self)
PlayCreditsMusic(GLUE_CREDITS_SOUND_KITS[CreditsFrame.creditsType]);
+ self.GameLogo:SetExpansion(LE_EXPANSION_CLASSIC);
if (CreditsFrame.creditsType == CREDITS_TYPE_CLASSIC) then
- SetGameLogo(CreditsFrame.CreditsLogo, LE_EXPANSION_CLASSIC, LE_RELEASE_TYPE_CLASSIC);
+ self.GameLogo:SetReleaseType(LE_RELEASE_TYPE_CLASSIC);
elseif (CreditsFrame.creditsType == CREDITS_TYPE_VANILLA) then
- SetGameLogo(CreditsFrame.CreditsLogo, LE_EXPANSION_CLASSIC, LE_RELEASE_TYPE_ORIGINAL);
+ self.GameLogo:SetReleaseType(LE_RELEASE_TYPE_ORIGINAL);
end
+ self.GameLogo:SetGameMode(0);
CreditsFrame_SetSpeed(CREDITS_SCROLL_RATE_PLAY);
CreditsScrollFrame:SetVerticalScroll(0);
diff --git a/Interface/AddOns/Blizzard_GlueXML/Vanilla/CreditsFrame.xml b/Interface/AddOns/Blizzard_GlueXML/Vanilla/CreditsFrame.xml
index c2a6f5107a..d60fb6f27d 100644
--- a/Interface/AddOns/Blizzard_GlueXML/Vanilla/CreditsFrame.xml
+++ b/Interface/AddOns/Blizzard_GlueXML/Vanilla/CreditsFrame.xml
@@ -17,12 +17,6 @@
-
-
-
-
-
-
@@ -282,6 +276,12 @@
+
+
+
+
+
+
diff --git a/Interface/AddOns/Blizzard_GlueXML/Vanilla/Localization.lua b/Interface/AddOns/Blizzard_GlueXML/Vanilla/Localization.lua
index aea6ca4911..90496968ec 100644
--- a/Interface/AddOns/Blizzard_GlueXML/Vanilla/Localization.lua
+++ b/Interface/AddOns/Blizzard_GlueXML/Vanilla/Localization.lua
@@ -79,7 +79,7 @@ local l10nTable = {
CLASSIC_MODERN_LOGO_OVERRIDE = {filename = 'Interface\\Glues\\Common\\GLUES-WOW-CLASSICLOGO', uv = { 0, 1, 0, 1 }};
BURNING_CRUSADE_ORIGINAL_LOGO_OVERRIDE = {filename = 'Interface\\Glues\\Common\\GLUES-WOW-CHINESEBCLOGO', uv = { 0, 1, 0, 1 }};
- _G["CharacterCreateWoWLogo"]:SetPoint("TOPLEFT", _G["CharacterCreateFrame"], 3, 14) -- -3, +11
+ _G["CharacterCreateConfigurationFrame"].GameLogo:SetPoint("TOPLEFT", _G["CharacterCreateFrame"], 3, 14) -- -3, +11
_G["CharacterSelectLogo"]:SetPoint("TOPLEFT", 5, -5);
_G["AccountLogin"].UI.GameLogo:SetPoint("TOPLEFT", 5, -5);
@@ -89,6 +89,9 @@ local l10nTable = {
choicePaneOtherLogoAtlas = "classic-burningcrusadetransition-choice-logo-other-zhcn";
SHOW_CHINA_AGE_APPROPRIATENESS_WARNING = true;
+
+ CreditsFrameSwitchButton1:SetWidth(CreditsFrameSwitchButton2:GetWidth() + 32);
+ CreditsFrameSwitchButton2:SetWidth(CreditsFrameSwitchButton2:GetWidth() + 32);
end,
},
diff --git a/Interface/AddOns/Blizzard_GlueXML/Vanilla/RealmList.lua b/Interface/AddOns/Blizzard_GlueXML/Vanilla/RealmList.lua
index b0c190e4ce..b0a751142c 100644
--- a/Interface/AddOns/Blizzard_GlueXML/Vanilla/RealmList.lua
+++ b/Interface/AddOns/Blizzard_GlueXML/Vanilla/RealmList.lua
@@ -287,6 +287,9 @@ function RealmList_OnConnectToRealm()
if (realmInfo.seasonID == Enum.SeasonID.Hardcore and realmInfo.numCharacters == 0) then
HardcorePopUpFrame:SetRealmInfo(RealmList.selectedRealm)
HardcorePopUpFrame:ShowRealmSelectionWarning();
+ elseif (realmInfo.isPvP == true and realmInfo.numCharacters == 0) then
+ RealmWarningPopUpFrame:SetRealmInfo(RealmList.selectedRealm)
+ RealmWarningPopUpFrame:ShowRealmSelectionWarning();
else
C_RealmList.ConnectToRealm(RealmList.selectedRealm);
end
diff --git a/Interface/AddOns/Blizzard_GlueXML/Wrath/CharacterCreate.xml b/Interface/AddOns/Blizzard_GlueXML/Wrath/CharacterCreate.xml
index 2e34d70e00..97248c8304 100644
--- a/Interface/AddOns/Blizzard_GlueXML/Wrath/CharacterCreate.xml
+++ b/Interface/AddOns/Blizzard_GlueXML/Wrath/CharacterCreate.xml
@@ -217,27 +217,11 @@
-
-
-
-
+
+
-
+
-
-
-
-
-
-
-
-
-
-
-
-
-
-
@@ -245,7 +229,7 @@
-
+
diff --git a/Interface/AddOns/Blizzard_GlyphUI/Cata/Blizzard_GlyphUI.xml b/Interface/AddOns/Blizzard_GlyphUI/Cata/Blizzard_GlyphUI.xml
index ede7e629cf..8607d90d2c 100644
--- a/Interface/AddOns/Blizzard_GlyphUI/Cata/Blizzard_GlyphUI.xml
+++ b/Interface/AddOns/Blizzard_GlyphUI/Cata/Blizzard_GlyphUI.xml
@@ -1,5 +1,5 @@
+..\..\..\..\..\..\WoW\Data\Interface\AddOns\Blizzard_SharedXML\UI.xsd">
diff --git a/Interface/AddOns/Blizzard_GlyphUI/Wrath/Blizzard_GlyphUI.xml b/Interface/AddOns/Blizzard_GlyphUI/Wrath/Blizzard_GlyphUI.xml
index 6cf3b79825..991e3f543f 100644
--- a/Interface/AddOns/Blizzard_GlyphUI/Wrath/Blizzard_GlyphUI.xml
+++ b/Interface/AddOns/Blizzard_GlyphUI/Wrath/Blizzard_GlyphUI.xml
@@ -1,5 +1,5 @@
+..\..\..\..\..\..\WoW\Data\Interface\AddOns\Blizzard_SharedXML\UI.xsd">
@@ -142,8 +142,8 @@
-
-
+
+
self:GetParent():Hide();
diff --git a/Interface/AddOns/Blizzard_GroupFinder/Classic/LFGList.lua b/Interface/AddOns/Blizzard_GroupFinder/Classic/LFGList.lua
index fc603de67e..aea9a530f8 100644
--- a/Interface/AddOns/Blizzard_GroupFinder/Classic/LFGList.lua
+++ b/Interface/AddOns/Blizzard_GroupFinder/Classic/LFGList.lua
@@ -997,27 +997,43 @@ function LFGListEntryCreation_GetSanitizedName(self)
return string.match(self.Name:GetText(), "^%s*(.-)%s*$");
end
-function LFGListEntryCreation_ListGroupInternal(self, activityID, itemLevel, autoAccept, privateGroup, questID, mythicPlusRating, pvpRating, selectedPlaystyle, isCrossFaction, chosenRole)
- local honorLevel = 0;
+function LFGListEntryCreation_ListGroupInternal(self, activityID, itemLevel, autoAccept, privateGroup, questID, mythicPlusRating, pvpRating, selectedPlaystyle, isCrossFaction)
+ -- Arguments struct.
+ local createData = {
+ activityIDs = { activityID },
+ questID = questID,
+ isAutoAccept = autoAccept,
+ isCrossFactionListing = isCrossFaction,
+ isPrivateGroup = privateGroup,
+ playstyle = selectedPlaystyle,
+ requiredDungeonScore = mythicPlusRating,
+ requiredItemLevel = itemLevel,
+ requiredPvpRating = pvpRating,
+ };
+
if ( LFGListEntryCreation_IsEditMode(self) ) then
local activeEntryInfo = C_LFGList.GetActiveEntryInfo();
+ -- Pull these values from the active entry.
+ createData.isAutoAccept = activeEntryInfo.autoAccept;
+ createData.questID = activeEntryInfo.questID;
+
if activeEntryInfo.isCrossFactionListing == isCrossFaction then
- C_LFGList.UpdateListing(activityID, itemLevel, honorLevel, activeEntryInfo.autoAccept, privateGroup, activeEntryInfo.questID, mythicPlusRating, pvpRating, selectedPlaystyle, isCrossFaction, chosenRole);
+ C_LFGList.UpdateListing(createData);
else
-- Changing cross faction setting requires re-listing the group due to how listings are bucketed server side.
C_LFGList.RemoveListing();
- C_LFGList.CreateListing(activityID, itemLevel, honorLevel, activeEntryInfo.autoAccept, privateGroup, activeEntryInfo.questID, mythicPlusRating, pvpRating, selectedPlaystyle, isCrossFaction, chosenRole);
+ C_LFGList.CreateListing(createData);
end
LFGListFrame_SetActivePanel(self:GetParent(), self:GetParent().ApplicationViewer);
else
- if(C_LFGList.CreateListing(activityID, itemLevel, honorLevel, autoAccept, privateGroup, questID, mythicPlusRating, pvpRating, selectedPlaystyle, isCrossFaction, chosenRole)) then
+ if(C_LFGList.CreateListing(createData)) then
self.WorkingCover:Show();
LFGListEntryCreation_ClearFocus(self);
end
end
end
-function LFGListEntryCreation_ListGroup(self, chosenRole)
+function LFGListEntryCreation_ListGroup(self)
local itemLevel;
if(self.ItemLevel:IsShown()) then
@@ -1032,7 +1048,7 @@ function LFGListEntryCreation_ListGroup(self, chosenRole)
local isCrossFaction = self.CrossFactionGroup:IsShown() and not self.CrossFactionGroup.CheckButton:GetChecked();
local selectedPlaystyle = self.PlayStyleDropdown:IsShown() and self.selectedPlaystyle or nil;
- LFGListEntryCreation_ListGroupInternal(self, self.selectedActivity, itemLevel, autoAccept, privateGroup, 0, mythicPlusRating, pvpRating, selectedPlaystyle, isCrossFaction, chosenRole);
+ LFGListEntryCreation_ListGroupInternal(self, self.selectedActivity, itemLevel, autoAccept, privateGroup, 0, mythicPlusRating, pvpRating, selectedPlaystyle, isCrossFaction);
end
function LFGListEntryCreation_SetAutoCreateDataInternal(self, activityType, activityID, contextID)
@@ -1081,7 +1097,7 @@ function LFGListEntryCreation_UpdateValidState(self)
local errorText;
local activityInfo = C_LFGList.GetActivityInfoTable(self.selectedActivity)
local maxNumPlayers = activityInfo and activityInfo.maxNumPlayers or 0;
- local mythicPlusDisableActivity = not C_LFGList.IsPlayerAuthenticatedForLFG(self.selectedActivity) and (activityInfo.isMythicPlusActivity and not C_LFGList.GetKeystoneForActivity(self.selectedActivity));
+ local mythicPlusDisableActivity = not C_LFGList.IsPlayerAuthenticatedForLFG(activityInfo.categoryID) and (activityInfo.isMythicPlusActivity and not C_LFGList.GetKeystoneForActivity(self.selectedActivity));
if ( maxNumPlayers > 0 and GetNumGroupMembers(LE_PARTY_CATEGORY_HOME) >= maxNumPlayers ) then
errorText = string.format(LFG_LIST_TOO_MANY_FOR_ACTIVITY, maxNumPlayers);
elseif (mythicPlusDisableActivity) then
@@ -1108,7 +1124,7 @@ function LFGListEntryCreation_UpdateValidState(self)
end
function LFGListEntryCreation_UpdateAuthenticatedState(self)
- local isAuthenticated = C_LFGList.IsPlayerAuthenticatedForLFG(self.selectedActivity);
+ local isAuthenticated = C_LFGList.IsPlayerAuthenticatedForLFG(self.selectedCategory);
self.Description.EditBox:SetEnabled(isAuthenticated);
local activeEntryInfo = C_LFGList.GetActiveEntryInfo();
local isQuestListing = activeEntryInfo and activeEntryInfo.questID or nil;
@@ -1125,9 +1141,9 @@ function LFGListEntryCreation_SetTitleFromActivityInfo(self)
if(not self.selectedActivity or not self.selectedGroup or not self.selectedCategory) then
return;
end
- local activityID = activeEntryInfo and activeEntryInfo.activityID or (self.selectedActivity or 0);
+ local activityID = activeEntryInfo and activeEntryInfo.activityIDs[1] or (self.selectedActivity or 0);
local activityInfo = C_LFGList.GetActivityInfoTable(activityID);
- if((activityInfo and activityInfo.isMythicPlusActivity) or not C_LFGList.IsPlayerAuthenticatedForLFG(self.selectedActivity)) then
+ if((activityInfo and activityInfo.isMythicPlusActivity) or not C_LFGList.IsPlayerAuthenticatedForLFG(self.selectedCategory)) then
C_LFGList.SetEntryTitle(self.selectedActivity, self.selectedGroup, self.selectedPlaystyle);
end
end
@@ -1136,7 +1152,7 @@ function LFGListEntryCreation_SetEditMode(self, editMode)
self.editMode = editMode;
local descInstructions = nil;
- local isAccountSecured = C_LFGList.IsPlayerAuthenticatedForLFG(self:GetParent().selectedActivity);
+ local isAccountSecured = C_LFGList.IsPlayerAuthenticatedForLFG(self:GetParent().selectedCategory);
if (not isAccountSecured) then
descInstructions = LFG_AUTHENTICATOR_DESCRIPTION_BOX;
end
@@ -1146,7 +1162,7 @@ function LFGListEntryCreation_SetEditMode(self, editMode)
assert(activeEntryInfo);
--Update the dropdowns
- LFGListEntryCreation_Select(self, nil, nil, nil, activeEntryInfo.activityID);
+ LFGListEntryCreation_Select(self, nil, nil, nil, activeEntryInfo.activityIDs[1]);
self.GroupDropdown:Disable();
self.ActivityDropdown:Disable();
@@ -1212,7 +1228,7 @@ end
function LFGListEntryCreationListGroupButton_OnClick(self)
PlaySound(SOUNDKIT.IG_MAINMENU_OPTION_CHECKBOX_ON);
- LFGListCreateRoleDialog_OnShow(LFGListCreateRoleDialog, self:GetParent());
+ LFGListEntryCreation_ListGroup(self:GetParent());
end
function LFGListEntryCreationActivityFinder_OnLoad(self)
@@ -1369,13 +1385,13 @@ function LFGListApplicationViewer_UpdateGroupData(self)
end
local data = GetGroupMemberCountsForDisplay();
- LFGListGroupDataDisplay_Update(self.DataDisplay, activeEntryInfo.activityID, data);
+ LFGListGroupDataDisplay_Update(self.DataDisplay, activeEntryInfo.activityIDs[1], data);
end
function LFGListApplicationViewer_UpdateInfo(self)
local activeEntryInfo = C_LFGList.GetActiveEntryInfo();
assert(activeEntryInfo);
- local activityInfo = C_LFGList.GetActivityInfoTable(activeEntryInfo.activityID);
+ local activityInfo = C_LFGList.GetActivityInfoTable(activeEntryInfo.activityIDs[1]);
if(not activityInfo) then
return;
end
@@ -1526,7 +1542,7 @@ function LFGListApplicationViewer_UpdateInviteState(self)
return;
end
- local activityInfo = C_LFGList.GetActivityInfoTable(activeEntryInfo.activityID, activeEntryInfo.questID);
+ local activityInfo = C_LFGList.GetActivityInfoTable(activeEntryInfo.activityIDs[1], activeEntryInfo.questID);
local numAllowed = activityInfo and activityInfo.maxNumPlayers or 0;
if ( numAllowed == 0 ) then
numAllowed = MAX_RAID_MEMBERS;
@@ -1742,7 +1758,7 @@ function LFGListApplicationViewer_UpdateApplicantMember(member, appID, memberIdx
LFGListApplicationViewer_UpdateRoleIcons(member, grayedOut, tank, healer, damage, noTouchy, assignedRole);
local activeEntryInfo = C_LFGList.GetActiveEntryInfo();
- local activityInfo = C_LFGList.GetActivityInfoTable(activeEntryInfo.activityID);
+ local activityInfo = C_LFGList.GetActivityInfoTable(activeEntryInfo.activityIDs[1]);
member.ItemLevel:SetShown(not grayedOut);
if(activityInfo and activityInfo.isPvpActivity) then
@@ -1751,7 +1767,7 @@ function LFGListApplicationViewer_UpdateApplicantMember(member, appID, memberIdx
member.ItemLevel:SetText(math.floor(itemLevel));
end
- local pvpRatingForEntry = C_LFGList.GetApplicantPvpRatingInfoForListing(appID, memberIdx, activeEntryInfo.activityID);
+ local pvpRatingForEntry = C_LFGList.GetApplicantPvpRatingInfoForListing(appID, memberIdx, activeEntryInfo.activityIDs[1]);
if not grayedOut and LFGApplicationViewerRatingColumnHeader:IsShown() and pvpRatingForEntry then
member.Rating:SetText(pvpRatingForEntry.rating);
@@ -1800,7 +1816,7 @@ function LFGApplicationBrowseGroupsButtonMixin:OnClick()
local searchPanel = panel:GetParent().SearchPanel;
local activeEntryInfo = C_LFGList.GetActiveEntryInfo();
if(activeEntryInfo) then
- local activityInfo = C_LFGList.GetActivityInfoTable(activeEntryInfo.activityID);
+ local activityInfo = C_LFGList.GetActivityInfoTable(activeEntryInfo.activityIDs[1]);
if(activityInfo) then
LFGListSearchPanel_SetCategory(searchPanel, activityInfo.categoryID, activityInfo.filters, baseFilters);
LFGListFrame_SetActivePanel(panel:GetParent(), searchPanel);
@@ -1851,14 +1867,14 @@ function LFGListApplicantMember_OnEnter(self)
return;
end
- local activityInfo = C_LFGList.GetActivityInfoTable(activeEntryInfo.activityID);
+ local activityInfo = C_LFGList.GetActivityInfoTable(activeEntryInfo.activityIDs[1]);
if(not activityInfo) then
return;
end
local applicantInfo = C_LFGList.GetApplicantInfo(applicantID);
local name, class, localizedClass, level, itemLevel, honorLevel, tank, healer, damage, assignedRole, relationship, dungeonScore, pvpItemLevel, factionGroup, raceID = C_LFGList.GetApplicantMemberInfo(applicantID, memberIdx);
- local bestDungeonScoreForEntry = C_LFGList.GetApplicantDungeonScoreForListing(applicantID, memberIdx, activeEntryInfo.activityID);
- local pvpRatingForEntry = C_LFGList.GetApplicantPvpRatingInfoForListing(applicantID, memberIdx, activeEntryInfo.activityID);
+ local bestDungeonScoreForEntry = C_LFGList.GetApplicantDungeonScoreForListing(applicantID, memberIdx, activeEntryInfo.activityIDs[1]);
+ local pvpRatingForEntry = C_LFGList.GetApplicantPvpRatingInfoForListing(applicantID, memberIdx, activeEntryInfo.activityIDs[1]);
GameTooltip:SetOwner(self, "ANCHOR_NONE");
GameTooltip:SetPoint("BOTTOMLEFT", self, "TOPLEFT", 105, 0);
@@ -2541,7 +2557,7 @@ function LFGListSearchEntry_Update(self)
local panel = self:GetParent():GetParent():GetParent();
local searchResultInfo = C_LFGList.GetSearchResultInfo(resultID);
- local activityName = C_LFGList.GetActivityFullName(searchResultInfo.activityID, nil, searchResultInfo.isWarMode);
+ local activityName = C_LFGList.GetActivityFullName(searchResultInfo.activityIDs[1], nil, searchResultInfo.isWarMode);
self.resultID = resultID;
local selected = panel.selectedResult == resultID and not isApplication and not searchResultInfo.isDelisted;
@@ -2564,7 +2580,7 @@ function LFGListSearchEntry_Update(self)
self.VoiceChat.tooltip = searchResultInfo.voiceChat;
local displayData = C_LFGList.GetSearchResultMemberCounts(resultID);
- LFGListGroupDataDisplay_Update(self.DataDisplay, searchResultInfo.activityID, displayData, searchResultInfo.isDelisted);
+ LFGListGroupDataDisplay_Update(self.DataDisplay, searchResultInfo.activityIDs[1], displayData, searchResultInfo.isDelisted);
local nameWidth = isApplication and 165 or 176;
if ( searchResultInfo.voiceChat ~= "" ) then
@@ -2733,12 +2749,12 @@ end
function LFGListApplicationDialog_Show(self, resultID)
if resultID then
local searchResultInfo = C_LFGList.GetSearchResultInfo(resultID);
- if ( searchResultInfo.activityID ~= self.activityID ) then
+ if ( searchResultInfo.activityIDs[1] ~= self.activityID ) then
C_LFGList.ClearApplicationTextFields();
end
self.resultID = resultID;
- self.activityID = searchResultInfo.activityID;
+ self.activityID = searchResultInfo.activityIDs[1];
end
LFGListApplicationDialog_UpdateRoles(self);
StaticPopupSpecial_Show(self);
@@ -2844,40 +2860,6 @@ function LFGListRoleButtonCheckButton_OnClick(self)
end
end
-function LFGListCreateRoleDialog_OnClick(button)
- local dialog = button:GetParent();
- PlaySound(SOUNDKIT.IG_MAINMENU_OPTION_CHECKBOX_ON);
-
- local chosenRole;
- if(dialog.exclusive) then
- if dialog.TankButton.CheckButton:GetChecked() then
- chosenRole = "TANK";
- elseif dialog.HealerButton.CheckButton:GetChecked() then
- chosenRole = "HEALER";
- elseif dialog.DamagerButton.CheckButton:GetChecked() then
- chosenRole = "DAMAGER";
- end
- end
-
- LFGListEntryCreation_ListGroup(dialog.owner, chosenRole);
- StaticPopupSpecial_Hide(dialog);
-end
-
-function LFGListCreateRoleDialog_OnShow(self, owner)
- LFGListApplicationDialog_Show(self, nil);
- self.owner = owner;
-end
-
-function LFGListCreateRoleDialog_OnLoad(self)
- self.exclusive = true;
- -- default to one role since we are exclusive
- SetLFGRoles(false, false, false, true);
- LFGListApplicationDialog_OnLoad(self);
- self.Description:Hide();
- self.SignUpButton:SetScript("OnClick", LFGListCreateRoleDialog_OnClick);
- self.Label:SetText(LFG_LIST_CHOOSE_YOUR_ROLE);
-end
-
-------------------------------------------------------
----------Invite dialog functions
-------------------------------------------------------
@@ -2948,7 +2930,7 @@ end
function LFGListInviteDialog_Show(self, resultID, kstringGroupName)
local searchResultInfo = C_LFGList.GetSearchResultInfo(resultID);
- local activityName = C_LFGList.GetActivityFullName(searchResultInfo.activityID, nil, searchResultInfo.isWarMode);
+ local activityName = C_LFGList.GetActivityFullName(searchResultInfo.activityIDs[1], nil, searchResultInfo.isWarMode);
local _, status, _, _, role = C_LFGList.GetApplicationInfo(resultID);
local informational = (status ~= "invited");
@@ -3374,7 +3356,7 @@ function LFGListUtil_OpenBestWindow(toggle)
local activeEntryInfo = C_LFGList.GetActiveEntryInfo();
if ( activeEntryInfo ) then
--Open to the window of our active activity
- local activityInfo = C_LFGList.GetActivityInfoTable(activeEntryInfo.activityID);
+ local activityInfo = C_LFGList.GetActivityInfoTable(activeEntryInfo.activityIDs[1]);
if ( activityInfo and bit.band(activityInfo.filters, Enum.LFGListFilter.PvE) ~= 0 ) then
func("GroupFinderFrame", "LFGListPVEStub");
else
@@ -3485,9 +3467,20 @@ end
function LFGListUtil_SetAutoAccept(autoAccept)
local activeEntryInfo = C_LFGList.GetActiveEntryInfo();
+
if activeEntryInfo then
C_LFGList.CopyActiveEntryInfoToCreationFields();
- C_LFGList.UpdateListing(activeEntryInfo.activityID, activeEntryInfo.requiredItemLevel, activeEntryInfo.requiredHonorLevel, autoAccept, activeEntryInfo.privateGroup, activeEntryInfo.questID);
+ C_LFGList.UpdateListing({
+ activityIDs = activeEntryInfo.activityIDs,
+ questID = activeEntryInfo.questID,
+ isAutoAccept = autoAccept,
+ isCrossFactionListing = activeEntryInfo.isCrossFaction,
+ isPrivateGroup = activeEntryInfo.privateGroup,
+ playstyle = activeEntryInfo.playstyle,
+ requiredDungeonScore = activeEntryInfo.requiredDungeonScore,
+ requiredItemLevel = activeEntryInfo.requiredItemLevel,
+ requiredPvpRating = activeEntryInfo.requiredPvpRating,
+ });
end
end
@@ -3496,7 +3489,7 @@ LFG_LIST_UTIL_ALLOW_AUTO_ACCEPT_LINE = 2;
function LFGListUtil_SetSearchEntryTooltip(tooltip, resultID, autoAcceptOption)
local searchResultInfo = C_LFGList.GetSearchResultInfo(resultID);
- local activityInfo = C_LFGList.GetActivityInfoTable(searchResultInfo.activityID, nil, searchResultInfo.isWarMode);
+ local activityInfo = C_LFGList.GetActivityInfoTable(searchResultInfo.activityIDs[1], nil, searchResultInfo.isWarMode);
local categoryInfo = C_LFGList.GetLfgCategoryInfo(activityInfo.categoryID);
local allowsCrossFaction = (categoryInfo and categoryInfo.allowCrossFaction) and (activityInfo and activityInfo.allowCrossFaction);
@@ -3553,8 +3546,9 @@ function LFGListUtil_SetSearchEntryTooltip(tooltip, resultID, autoAcceptOption)
end
end
- if( activityInfo.isRatedPvpActivity and searchResultInfo.leaderPvpRatingInfo) then
- GameTooltip_AddNormalLine(tooltip, PVP_RATING_GROUP_FINDER:format(searchResultInfo.leaderPvpRatingInfo.activityName, searchResultInfo.leaderPvpRatingInfo.rating, PVPUtil.GetTierName(searchResultInfo.leaderPvpRatingInfo.tier)));
+ if( activityInfo.isRatedPvpActivity and #searchResultInfo.leaderPvpRatingInfo > 0) then
+ local leaderPvpRatingInfo = searchResultInfo.leaderPvpRatingInfo[1];
+ GameTooltip_AddNormalLine(tooltip, PVP_RATING_GROUP_FINDER:format(leaderPvpRatingInfo.activityName, leaderPvpRatingInfo.rating, PVPUtil.GetTierName(leaderPvpRatingInfo.tier)));
elseif ( isMythicPlusActivity and searchResultInfo.leaderOverallDungeonScore) then
local color = C_ChallengeMode.GetDungeonScoreRarityColor(searchResultInfo.leaderOverallDungeonScore);
if(not color) then
@@ -3563,8 +3557,8 @@ function LFGListUtil_SetSearchEntryTooltip(tooltip, resultID, autoAcceptOption)
GameTooltip_AddNormalLine(tooltip, DUNGEON_SCORE_LEADER:format(color:WrapTextInColorCode(searchResultInfo.leaderOverallDungeonScore)));
end
- if(activityInfo.isMythicPlusActivity and searchResultInfo.leaderDungeonScoreInfo) then
- local leaderDungeonScoreInfo = searchResultInfo.leaderDungeonScoreInfo;
+ if(activityInfo.isMythicPlusActivity and #searchResultInfo.leaderDungeonScoreInfo > 0) then
+ local leaderDungeonScoreInfo = searchResultInfo.leaderDungeonScoreInfo[1];
local color = C_ChallengeMode.GetSpecificDungeonOverallScoreRarityColor(leaderDungeonScoreInfo.mapScore);
if (not color) then
color = HIGHLIGHT_FONT_COLOR;
@@ -3588,9 +3582,11 @@ function LFGListUtil_SetSearchEntryTooltip(tooltip, resultID, autoAcceptOption)
if ( activityInfo.displayType == Enum.LFGListDisplayType.ClassEnumerate ) then
tooltip:AddLine(string.format(LFG_LIST_TOOLTIP_MEMBERS_SIMPLE, searchResultInfo.numMembers));
for i=1, searchResultInfo.numMembers do
- local role, class, classLocalized, specLocalized = C_LFGList.GetSearchResultMemberInfo(resultID, i);
- local classColor = RAID_CLASS_COLORS[class] or NORMAL_FONT_COLOR;
- tooltip:AddLine(string.format(LFG_LIST_TOOLTIP_CLASS_ROLE, classLocalized, specLocalized), classColor.r, classColor.g, classColor.b);
+ local memberInfo = C_LFGList.GetSearchResultPlayerInfo(resultID, i);
+ if (memberInfo) then
+ local classColor = RAID_CLASS_COLORS[memberInfo.classFilename] or NORMAL_FONT_COLOR;
+ tooltip:AddLine(string.format(LFG_LIST_TOOLTIP_CLASS_ROLE, memberInfo.className, memberInfo.specName), classColor.r, classColor.g, classColor.b);
+ end
end
else
tooltip:AddLine(string.format(LFG_LIST_TOOLTIP_MEMBERS, searchResultInfo.numMembers, memberCounts.TANK, memberCounts.HEALER, memberCounts.DAMAGER));
@@ -3741,8 +3737,12 @@ function LFGEditBoxMixin:GetSelectedActivityID()
return self:GetParent().selectedActivity or self:GetParent():GetParent().selectedActivity;
end
+function LFGEditBoxMixin:GetSelectedCategoryID()
+ return self:GetParent().selectedCategory or self:GetParent():GetParent().selectedCategory;
+end
+
function LFGEditBoxMixin:OnShow()
- local isAccountSecured = C_LFGList.IsPlayerAuthenticatedForLFG(self:GetSelectedActivityID());
+ local isAccountSecured = C_LFGList.IsPlayerAuthenticatedForLFG(self:GetSelectedCategoryID());
if(self:GetParent().numeric or isAccountSecured) then
self:SetEnabled(true);
self.LockButton:Hide();
@@ -3754,14 +3754,14 @@ function LFGEditBoxMixin:OnShow()
end
function LFGEditBoxMixin:OnEnter()
- if(not C_LFGList.IsPlayerAuthenticatedForLFG(self:GetSelectedActivityID()) and not self.editBoxEnabled) then
+ if(not C_LFGList.IsPlayerAuthenticatedForLFG(self:GetSelectedCategoryID()) and not self.editBoxEnabled) then
self:DisplayTooltip();
end
end
function LFGEditBoxMixin:OnMouseDown(button)
- if(not C_LFGList.IsPlayerAuthenticatedForLFG(self:GetSelectedActivityID()) and not self.editBoxEnabled) then
+ if(not C_LFGList.IsPlayerAuthenticatedForLFG(self:GetSelectedCategoryID()) and not self.editBoxEnabled) then
self:DisplayStaticPopup();
end
end
@@ -3791,7 +3791,7 @@ function LFGListCreationDescriptionMixin:OnLoad()
self.EditBox:EnableMouse(false);
InputScrollFrame_OnLoad(self);
- local isAccountSecured = C_LFGList.IsPlayerAuthenticatedForLFG(self:GetParent().selectedActivity);
+ local isAccountSecured = C_LFGList.IsPlayerAuthenticatedForLFG(self:GetParent().selectedCategory);
self.EditBox.Instructions:SetText(isAccountSecured and DESCRIPTION_OF_YOUR_GROUP or LFG_AUTHENTICATOR_DESCRIPTION_BOX);
self.EditBox:SetEnabled(isAccountSecured);
self.LockButton:SetShown(not isAccountSecured);
@@ -3799,7 +3799,7 @@ function LFGListCreationDescriptionMixin:OnLoad()
end
function LFGListCreationDescriptionMixin:OnShow()
- local isAccountSecured = C_LFGList.IsPlayerAuthenticatedForLFG(self:GetParent().selectedActivity);
+ local isAccountSecured = C_LFGList.IsPlayerAuthenticatedForLFG(self:GetParent().selectedCategory);
self.EditBox.Instructions:SetText(isAccountSecured and DESCRIPTION_OF_YOUR_GROUP or LFG_AUTHENTICATOR_DESCRIPTION_BOX);
self.EditBox:SetEnabled(isAccountSecured);
self.LockButton:SetShown(not isAccountSecured);
@@ -3809,7 +3809,7 @@ end
LFGListCreateGroupDisabledStateButtonMixin = CreateFromMixins(LFGAuthenticatorMessagingMixin);
function LFGListCreateGroupDisabledStateButtonMixin:OnClick()
- if(not C_LFGList.IsPlayerAuthenticatedForLFG(self:GetParent().selectedActivity)) then
+ if(not C_LFGList.IsPlayerAuthenticatedForLFG(self:GetParent().selectedCategory)) then
self:DisplayStaticPopup();
end
end
diff --git a/Interface/AddOns/Blizzard_GroupFinder/Classic/LFGList.xml b/Interface/AddOns/Blizzard_GroupFinder/Classic/LFGList.xml
index c3afa20ce0..83c5d5abae 100644
--- a/Interface/AddOns/Blizzard_GroupFinder/Classic/LFGList.xml
+++ b/Interface/AddOns/Blizzard_GroupFinder/Classic/LFGList.xml
@@ -1156,6 +1156,9 @@
+
+
+
@@ -2002,12 +2005,6 @@
-
-
-
-
-
-
diff --git a/Interface/AddOns/Blizzard_GroupFinder/Classic/PVEFrame.lua b/Interface/AddOns/Blizzard_GroupFinder/Classic/PVEFrame.lua
index 49ba1a2918..a36406d424 100644
--- a/Interface/AddOns/Blizzard_GroupFinder/Classic/PVEFrame.lua
+++ b/Interface/AddOns/Blizzard_GroupFinder/Classic/PVEFrame.lua
@@ -247,7 +247,7 @@ function GroupFinderFrame_EvaluateButtonVisibility(self)
GroupFinderFrameButton_SetEnabled(self.groupButton2, true);
end
- visible = C_LFGInfo.IsPremadeGroupEnabled();
+ visible = C_LFGList.IsPremadeGroupFinderEnabled();
canUse, failureReason = C_LFGInfo.CanPlayerUsePremadeGroup();
if not visible then
self.groupButton3:Hide();
diff --git a/Interface/AddOns/Blizzard_GroupFinder_VanillaStyle/Bindings.xml b/Interface/AddOns/Blizzard_GroupFinder_VanillaStyle/Bindings.xml
new file mode 100644
index 0000000000..7b0f749fd6
--- /dev/null
+++ b/Interface/AddOns/Blizzard_GroupFinder_VanillaStyle/Bindings.xml
@@ -0,0 +1,11 @@
+
+
+ ToggleLFGParentFrame();
+
+
+ ToggleLFGParentFrame(1);
+
+
+ ToggleLFGParentFrame(2);
+
+
diff --git a/Interface/AddOns/Blizzard_GroupFinder_VanillaStyle/Blizzard_GroupFinder_VanillaStyle.toc b/Interface/AddOns/Blizzard_GroupFinder_VanillaStyle/Blizzard_GroupFinder_VanillaStyle.toc
new file mode 100644
index 0000000000..5c083029c7
--- /dev/null
+++ b/Interface/AddOns/Blizzard_GroupFinder_VanillaStyle/Blizzard_GroupFinder_VanillaStyle.toc
@@ -0,0 +1,10 @@
+## Interface: 0
+## Title: Blizzard Group Finder (Vanilla Style)
+## Notes: A premade group finder with "Vanilla flavored" functionality.
+## Secure: 1
+## LoadOnDemand: 1
+
+Blizzard_LFGVanilla_Minimap.xml
+Blizzard_LFGVanilla_ParentFrame.xml
+Blizzard_LFGVanilla_Listing.xml
+Blizzard_LFGVanilla_Browse.xml
diff --git a/Interface/AddOns/Blizzard_GroupFinder_VanillaStyle/Blizzard_LFGVanilla_Browse.lua b/Interface/AddOns/Blizzard_GroupFinder_VanillaStyle/Blizzard_LFGVanilla_Browse.lua
new file mode 100644
index 0000000000..d2e8184ad1
--- /dev/null
+++ b/Interface/AddOns/Blizzard_GroupFinder_VanillaStyle/Blizzard_LFGVanilla_Browse.lua
@@ -0,0 +1,1365 @@
+-------------------------------------------------------
+----------Constants
+-------------------------------------------------------
+local LFGBROWSE_TOOLTIP_MIN_WIDTH = 200;
+local LFGBROWSE_DELISTED_FONT_COLOR = {r=0.3, g=0.3, b=0.3};
+local LFGBROWSE_ACTIVITY_NOMATCH_FONT_COLOR = GRAY_FONT_COLOR;
+local LFGBROWSE_ACTIVITY_MATCH_FONT_COLOR = BRIGHTBLUE_FONT_COLOR;
+local LFGBROWSE_SELF_FONT_COLOR = LIGHTGREEN_FONT_COLOR;
+local LFGBROWSE_GROUPDATA_ROLE_ORDER = { "TANK", "HEALER", "DAMAGER" };
+local LFGBROWSE_GROUPDATA_CLASS_ORDER = CLASS_SORT_ORDER;
+local LFGBROWSE_GROUPDATA_ATLASES = {
+ --Roles
+ TANK = "groupfinder-icon-role-large-tank",
+ HEALER = "groupfinder-icon-role-large-heal",
+ DAMAGER = "groupfinder-icon-role-large-dps",
+ -- Solo Roles
+ SOLO_TANK = "groupfinder-icon-role-micro-tank",
+ SOLO_HEALER = "groupfinder-icon-role-micro-heal",
+ SOLO_DAMAGER = "groupfinder-icon-role-micro-dps",
+};
+--Fill out classes
+for i=1, #CLASS_SORT_ORDER do
+ LFGBROWSE_GROUPDATA_ATLASES[CLASS_SORT_ORDER[i]] = "groupfinder-icon-class-"..string.lower(CLASS_SORT_ORDER[i]);
+end
+
+local LFGBROWSE_DUNGEON_NUM_TANKS_EXPECTED = 1;
+local LFGBROWSE_DUNGEON_NUM_HEALERS_EXPECTED = 1;
+local LFGBROWSE_DUNGEON_NUM_DPS_EXPECTED = 3;
+
+-- If a listing is queued for multiple activities with disparate displayTypes, pick the "best" one (i.e. most flexible/informative) based off this priority.
+local LFGBROWSE_DISPLAYTYPE_PRIORITY = {
+ [Enum.LFGListDisplayType.Comment] = 6, -- Highest priority.
+ [Enum.LFGListDisplayType.RoleCount] = 5,
+ [Enum.LFGListDisplayType.PlayerCount] = 4,
+ [Enum.LFGListDisplayType.RoleEnumerate] = 3,
+ [Enum.LFGListDisplayType.ClassEnumerate] = 2,
+ [Enum.LFGListDisplayType.HideAll] = 1, -- Lowest priority.
+};
+
+-------------------------------------------------------
+----------LFGBrowseMixin
+-------------------------------------------------------
+LFGBrowseMixin = {};
+
+function LFGBrowseMixin:OnLoad()
+ -- Event for entire list
+ self:RegisterEvent("CVAR_UPDATE");
+ self:RegisterEvent("LFG_LIST_AVAILABILITY_UPDATE");
+ self:RegisterEvent("LFG_LIST_SEARCH_FAILED");
+ self:RegisterEvent("LFG_LIST_SEARCH_RESULTS_RECEIVED");
+ self:RegisterEvent("REPORT_PLAYER_RESULT");
+
+ self.results = {};
+ self.searchFailed = false;
+ self.searching = false;
+ self.totalResults = 0;
+
+ UIDropDownMenu_Initialize(self.CategoryDropDown, LFGBrowseCategoryDropDown_Initialize);
+ UIDropDownMenu_Initialize(self.ActivityDropDown, LFGBrowseActivityDropDown_Initialize);
+
+ local view = CreateScrollBoxListLinearView();
+ view:SetElementFactory(function(factory, elementData)
+ factory("LFGBrowseSearchEntryTemplate", function(frame, elementData)
+ LFGBrowseSearchEntry_Init(frame, elementData);
+ end);
+ end);
+ view:SetElementExtent(36);
+ ScrollUtil.InitScrollBoxListWithScrollBar(self.ScrollBox, self.ScrollBar, view);
+
+ local scrollBoxAnchorsWithBar = {
+ CreateAnchor("TOPLEFT", 22, -128),
+ CreateAnchor("BOTTOMRIGHT", -66, 102);
+ };
+ local scrollBoxAnchorsWithoutBar = {
+ scrollBoxAnchorsWithBar[1],
+ CreateAnchor("BOTTOMRIGHT", -38, 102);
+ };
+ ScrollUtil.AddManagedScrollBarVisibilityBehavior(self.ScrollBox, self.ScrollBar, scrollBoxAnchorsWithBar, scrollBoxAnchorsWithoutBar);
+
+ local function OnSelectionChanged(o, elementData, selected)
+ local frame = self.ScrollBox:FindFrame(elementData);
+ if frame then
+ LFGBrowseSearchEntry_SetSelection(frame, selected);
+ end
+ self:UpdateButtonState();
+ end;
+
+ self.selectionBehavior = ScrollUtil.AddSelectionBehavior(self.ScrollBox, SelectionBehaviorFlags.Deselectable);
+ self.selectionBehavior:RegisterCallback(SelectionBehaviorMixin.Event.OnSelectionChanged, OnSelectionChanged, self);
+
+ self:UpdateButtonState();
+ if (C_LFGList.HasActiveEntryInfo()) then
+ LFGParentFrame_SearchActiveEntry();
+ end
+end
+
+function LFGBrowseMixin:OnEvent(event, ...)
+ if ( event == "CVAR_UPDATE" ) then
+ local name = ...;
+ if name == "disableSuggestedLevelActivityFilter" then
+ self:ActivityFiltersChanged();
+ end
+ elseif ( event == "LFG_LIST_AVAILABILITY_UPDATE" ) then
+ self:RefreshDropDowns();
+ elseif ( event == "LFG_LIST_SEARCH_RESULTS_RECEIVED" ) then
+ self.searching = false;
+ self.searchFailed = false;
+ self:UpdateResultList();
+ elseif ( event == "LFG_LIST_SEARCH_FAILED" ) then
+ self.searching = false;
+ self.searchFailed = true;
+ self:UpdateResultList();
+ elseif ( event == "REPORT_PLAYER_RESULT") then
+ local success, reportType = ...;
+ if (success and reportType == Enum.ReportType.GroupFinderPosting) then
+ LFGBrowseFrame:UpdateResultList();
+ end
+ end
+end
+
+function LFGBrowseMixin:OnShow()
+ self:RefreshDropDowns();
+ self:UpdateResultList();
+
+ -- Baby hack... the selected tab texture doesn't blend well with the LFG texture, so move it down a hair when it's selected.
+ LFGParentFrameTab1:SetPoint("BOTTOMLEFT", 16, 45);
+ LFGParentFrameTab2:SetPoint("LEFT", LFGParentFrameTab1, "RIGHT", -14, -2);
+end
+
+function LFGBrowseMixin:UpdateResultList()
+ self.totalResults, self.results = C_LFGList.GetFilteredSearchResults();
+ LFGBrowseUtil_SortSearchResults(self.results);
+ self:UpdateResults();
+end
+
+function LFGBrowseMixin:UpdateResults()
+ self.selectionBehavior:ClearSelections();
+ self.ScrollBox:RemoveDataProvider();
+
+ if ( self.searching ) then
+ self.SearchingSpinner:Show();
+ else
+ self.SearchingSpinner:Hide();
+
+ if(self.totalResults == 0 or self.searchFailed) then
+ self.NoResultsFound:Show();
+ self.NoResultsFound:SetText(self.searchFailed and LFG_LIST_SEARCH_FAILED or LFG_LIST_NO_RESULTS_FOUND);
+ else
+ self.NoResultsFound:Hide();
+
+ local dataProvider = CreateDataProvider();
+ local results = self.results;
+ for index = 1, #results do
+ dataProvider:Insert({resultID=results[index]});
+ end
+
+ self.ScrollBox:SetDataProvider(dataProvider, ScrollBoxConstants.RetainScrollPosition);
+ end
+ end
+ self:UpdateButtonState();
+end
+
+function LFGBrowseMixin:SearchActiveEntry()
+ if (not self.CategoryDropDown or not self.ActivityDropDown) then
+ return;
+ end
+
+ local activeEntryInfo = C_LFGList.GetActiveEntryInfo();
+ local firstCategoryID = 0;
+ if (activeEntryInfo) then
+ LFGBrowseActivityDropDown_ValueReset(self.ActivityDropDown);
+ for i=1, #activeEntryInfo.activityIDs do
+ local activityID = activeEntryInfo.activityIDs[i];
+ if (activityID ~= 0) then
+ local activityInfo = C_LFGList.GetActivityInfoTable(activityID);
+ local categoryID = activityInfo.categoryID;
+ if (firstCategoryID == 0) then
+ firstCategoryID = categoryID;
+ UIDropDownMenu_Initialize(self.CategoryDropDown, LFGBrowseCategoryDropDown_Initialize);
+ UIDropDownMenu_SetSelectedValue(self.CategoryDropDown, categoryID);
+ end
+ if (categoryID == firstCategoryID) then
+ LFGBrowseActivityDropDown_ValueSetSelected(self.ActivityDropDown, activityID, true)
+ end
+ end
+ end
+ end
+
+ LFGBrowse_DoSearch();
+end
+
+function LFGBrowseMixin:ValidateSelection()
+ local selectedResultID = self.selectionBehavior:HasSelection() and LFGBrowseFrame.selectionBehavior:GetSelectedElementData()[1].resultID or nil;
+ if (selectedResultID) then
+ local searchResultInfo = C_LFGList.GetSearchResultInfo(selectedResultID);
+ if (not searchResultInfo or searchResultInfo.isDelisted) then
+ self.selectionBehavior:ClearSelections();
+ end
+ end
+end
+
+function LFGBrowseMixin:RefreshDropDowns()
+ UIDropDownMenu_Initialize(self.CategoryDropDown, LFGBrowseCategoryDropDown_Initialize);
+ UIDropDownMenu_Initialize(self.ActivityDropDown, LFGBrowseActivityDropDown_Initialize);
+end
+
+function LFGBrowseMixin:ResetDropDowns()
+ LFGBrowseCategoryDropDown_Reset(self.CategoryDropDown);
+ LFGBrowseActivityDropDown_Reset(self.ActivityDropDown);
+end
+
+function LFGBrowseMixin:UpdateButtonState()
+ local selectedResultID = self.selectionBehavior:HasSelection() and LFGBrowseFrame.selectionBehavior:GetSelectedElementData()[1].resultID or nil;
+ local inviteText, inviteFunc = LFGBrowseUtil_GetInviteActionForResult(selectedResultID)
+
+ self.GroupInviteButton:SetText(inviteText);
+ self.GroupInviteButton.inviteFunc = inviteFunc;
+
+ self.SendMessageButton:SetEnabled(self.selectionBehavior:HasSelection());
+ self.GroupInviteButton:SetEnabled(self.selectionBehavior:HasSelection() and self.GroupInviteButton.inviteFunc);
+
+ self.RefreshButton:SetEnabled(not self.searching);
+end
+
+function LFGBrowseMixin:ActivityFiltersChanged()
+ self:ResetDropDowns();
+end
+
+-------------------------------------------------------
+----------Searching
+-------------------------------------------------------
+function LFGBrowseSearchButton_OnClick(self, button)
+ LFGBrowse_DoSearch();
+end
+
+function LFGBrowse_DoSearch()
+ if (not LFGBrowseFrame.searching) then
+ local categoryID = UIDropDownMenu_GetSelectedValue(LFGBrowseFrame.CategoryDropDown) or 0;
+ if (categoryID > 0) then
+ local activityIDs = LFGBrowseFrame.ActivityDropDown.selectedValues;
+ if (#activityIDs == 0) then -- If we have no activities selected in the filter, search for everything in this category.
+ activityIDs = LFGUtil_GetFilteredActivities(categoryID);
+ end
+
+ local filter = 0;
+ local preferredFilters = 0;
+ local languageFilter = nil;
+ local searchCrossFactionListings = false;
+ local advancedFilter = nil;
+ C_LFGList.Search(categoryID, filter, preferredFilters, languageFilter, searchCrossFactionListings, advancedFilter, activityIDs);
+
+ LFGBrowseFrame.searching = true;
+ LFGBrowseFrame.searchFailed = false;
+ LFGBrowseFrame:UpdateResults();
+ end
+ end
+end
+
+-------------------------------------------------------
+----------Search Entry
+-------------------------------------------------------
+function LFGBrowseSearchEntry_Init(self, elementData)
+ self.resultID = elementData.resultID;
+ self.isDelisted = false;
+ LFGBrowseSearchEntry_Update(self);
+end
+
+function LFGBrowseSearchEntry_Update(self)
+ local searchResultInfo = C_LFGList.GetSearchResultInfo(self.resultID);
+ local activeEntryInfo = C_LFGList.GetActiveEntryInfo();
+ local isSolo = searchResultInfo.numMembers == 1;
+ local soloRoles = nil;
+ if (isSolo) then
+ self.PartyIcon:Hide();
+ self.ClassIcon:Show();
+ self.Level:Show();
+
+ local memberInfo = C_LFGList.GetSearchResultPlayerInfo(self.resultID, 1);
+ if (memberInfo and memberInfo.classFilename and memberInfo.level) then
+ self.Level:SetText(LEVEL_ABBR .. " " ..memberInfo.level);
+ self.ClassIcon:SetAtlas(LFGBROWSE_GROUPDATA_ATLASES[memberInfo.classFilename], false);
+ else
+ self.Level:Hide();
+ self.ClassIcon:Hide();
+ end
+ self.Name:SetPoint("TOPLEFT", self.PartyIcon, "TOPLEFT", 1, -2);
+ self.NewPlayerFriendlyIcon:SetPoint("LEFT", self.ClassIcon, "RIGHT", 2, 0);
+
+ if (memberInfo) then
+ soloRoles = memberInfo.lfgRoles;
+ end
+ else
+ self.PartyIcon:Show();
+ self.Level:Hide();
+ self.ClassIcon:Hide();
+ self.Name:SetPoint("TOPLEFT", self.PartyIcon, "TOPRIGHT", 0, -2);
+ self.NewPlayerFriendlyIcon:SetPoint("LEFT", self.Name, "RIGHT", 2, 0);
+ end
+
+ self.isDelisted = searchResultInfo.isDelisted;
+ self.hasSelf = searchResultInfo.hasSelf;
+
+ local matchingActivities = {};
+ local hasMatchingActivity = false;
+ if (activeEntryInfo) then
+ for _, activityID in ipairs(activeEntryInfo.activityIDs) do
+ if (tContains(searchResultInfo.activityIDs, activityID)) then
+ hasMatchingActivity = true;
+ tinsert(matchingActivities, activityID);
+ end
+ end
+ end
+ local activitiesToDisplay = hasMatchingActivity and matchingActivities or searchResultInfo.activityIDs;
+
+ local activityText = "";
+ if ( searchResultInfo.hasSelf ) then
+ activityText = LFG_SELF_LISTING;
+ elseif ( #activitiesToDisplay == 1 ) then
+ local activityInfo = C_LFGList.GetActivityInfoTable(activitiesToDisplay[1]);
+ activityText = LFGUtil_GetActivityInfoName(activityInfo);
+ else
+ local activityString = hasMatchingActivity and LFGBROWSE_ACTIVITY_MATCHING_COUNT or LFGBROWSE_ACTIVITY_COUNT;
+ activityText = string.format(activityString, #activitiesToDisplay);
+ end
+
+ local matchesFilters = true;
+ if( #LFGBrowseFrame.ActivityDropDown.selectedValues > 0) then
+ matchesFilters = false;
+ for i=1, #searchResultInfo.activityIDs do
+ if (LFGBrowseActivityDropDown_ValueIsSelected(LFGBrowseFrame.ActivityDropDown, searchResultInfo.activityIDs[i])) then
+ matchesFilters = true;
+ break;
+ end
+ end
+ end
+
+ local leaderInfo = C_LFGList.GetSearchResultLeaderInfo(self.resultID);
+ local nameColor = NORMAL_FONT_COLOR;
+ if (leaderInfo and leaderInfo.classFilename) then
+ nameColor = RAID_CLASS_COLORS[leaderInfo.classFilename];
+ end
+ local levelColor = GRAY_FONT_COLOR;
+ local activityColor = LFGBROWSE_ACTIVITY_NOMATCH_FONT_COLOR;
+ if ( searchResultInfo.isDelisted or not matchesFilters) then
+ nameColor = LFGBROWSE_DELISTED_FONT_COLOR;
+ levelColor = LFGBROWSE_DELISTED_FONT_COLOR;
+ activityColor = LFGBROWSE_DELISTED_FONT_COLOR;
+ elseif ( searchResultInfo.hasSelf ) then
+ activityColor = LFGBROWSE_SELF_FONT_COLOR;
+ elseif ( hasMatchingActivity ) then
+ activityColor = LFGBROWSE_ACTIVITY_MATCH_FONT_COLOR;
+ end
+
+ self.Name:SetWidth(0);
+ self.Name:SetText(searchResultInfo.leaderName);
+ self.Name:SetTextColor(nameColor.r, nameColor.g, nameColor.b);
+ if ( self.Name:GetWidth() > 176 ) then
+ self.Name:SetWidth(176);
+ end
+ self.Level:SetTextColor(levelColor.r, levelColor.g, levelColor.b);
+ self.ClassIcon:SetDesaturated(searchResultInfo.isDelisted);
+ self.ActivityName:SetText(activityText);
+ self.ActivityName:SetTextColor(activityColor.r, activityColor.g, activityColor.b);
+
+ if ( searchResultInfo.newPlayerFriendly ) then
+ self.NewPlayerFriendlyIcon:Show();
+ else
+ self.NewPlayerFriendlyIcon:Hide();
+ end
+ self.NewPlayerFriendlyIcon:SetDesaturated(searchResultInfo.isDelisted);
+
+ local displayData = C_LFGList.GetSearchResultMemberCounts(self.resultID);
+ local displayType, maxNumPlayers = LFGBrowseUtil_GetBestDisplayTypeForActivityIDs(searchResultInfo.activityIDs);
+ LFGBrowseGroupDataDisplay_Update(self.DataDisplay, displayType, maxNumPlayers, displayData, searchResultInfo.isDelisted, isSolo, soloRoles, searchResultInfo.comment);
+
+ local mouseFoci = GetMouseFoci();
+ for _, mouseFocus in ipairs(mouseFoci) do
+ if ( mouseFocus == self ) then
+ LFGBrowseSearchEntry_OnEnter(self);
+ break;
+ end
+ end
+end
+
+function LFGBrowseSearchEntry_OnLoad(self)
+ self:RegisterEvent("LFG_LIST_SEARCH_RESULT_UPDATED");
+ self:RegisterForClicks("LeftButtonUp", "RightButtonUp");
+end
+
+function LFGBrowseSearchEntry_OnEvent(self, event, ...)
+ if ( event == "LFG_LIST_SEARCH_RESULT_UPDATED" ) then
+ local id = ...;
+ if ( id == self.resultID ) then
+ LFGBrowseFrame:ValidateSelection();
+ LFGBrowseSearchEntry_Update(self);
+ end
+ end
+end
+
+function LFGBrowseSearchEntry_OnClick(self, button)
+ if (self.isDelisted or self.hasSelf) then
+ return;
+ end
+
+ PlaySound(SOUNDKIT.IG_MAINMENU_OPTION_CHECKBOX_ON);
+ if ( button == "LeftButton" ) then
+ LFGBrowseFrame.selectionBehavior:ToggleSelect(self);
+ elseif ( button == "RightButton" ) then
+ LFGBrowseFrame:CreateSearchEntryMenu(self);
+ end
+end
+
+function LFGBrowseSearchEntry_OnEnter(self)
+ LFGBrowseSearchEntryTooltip_UpdateAndShow(LFGBrowseSearchEntryTooltip, self.resultID)
+ LFGBrowseSearchEntryTooltip:SetPoint("TOPLEFT", self, "TOPRIGHT", 8, 38);
+
+ if not self.Selected:IsShown() then
+ self.Highlight:Show();
+ end
+end
+
+function LFGBrowseSearchEntry_OnLeave(self)
+ LFGBrowseSearchEntryTooltip:Hide();
+ self.Highlight:Hide();
+end
+
+function LFGBrowseSearchEntry_SetSelection(self, selected)
+ self.Selected:SetShown(selected);
+ if (selected) then
+ self.Highlight:Hide();
+ elseif (MouseIsOver(self)) then
+ self.Highlight:Show();
+ end
+end
+
+-------------------------------------------------------
+----------Search Entry Tooltip
+-------------------------------------------------------
+function LFGBrowseSearchEntryTooltip_Load(self)
+ self.memberPool = CreateFramePool("FRAME", self, "LFGBrowseSearchEntryTooltipGroupMember");
+ self.activityPool = CreateFontStringPool(self, "ARTWORK", 0, "LFGBrowseSearchEntryTooltipActivityNameTemplate")
+end
+
+function LFGBrowseSearchEntryTooltip_UpdateAndShow(self, resultID)
+ local searchResultInfo = C_LFGList.GetSearchResultInfo(resultID);
+ local numMembers = searchResultInfo.numMembers;
+ local isSolo = numMembers == 1;
+ local memberCounts = C_LFGList.GetSearchResultMemberCounts(resultID);
+ local maxContentWidth = 0; -- Tracking the width of any variable-width content, so we can resize the container to match.
+
+ -- Delisted Alert
+ if (searchResultInfo.isDelisted) then
+ self.Delisted:Show();
+ else
+ self.Delisted:Hide();
+ end
+
+ -- New Player Friendly
+ if (searchResultInfo.newPlayerFriendly and not self.Delisted:IsShown()) then
+ self.NewPlayerFriendlyIcon:Show();
+ self.NewPlayerFriendlyText:Show();
+ else
+ self.NewPlayerFriendlyIcon:Hide();
+ self.NewPlayerFriendlyText:Hide();
+ end
+
+ -- Leader
+ if (self.NewPlayerFriendlyIcon:IsShown()) then
+ self.LeaderIcon:SetPoint("TOPLEFT", self.NewPlayerFriendlyIcon, "BOTTOMLEFT", 0, -5);
+ elseif (self.Delisted:IsShown()) then
+ self.LeaderIcon:SetPoint("TOPLEFT", self.Delisted, "BOTTOMLEFT", 0, -8);
+ else
+ self.LeaderIcon:SetPoint("TOPLEFT", 11, -10);
+ end
+ local lastMemberFrame = self.Leader;
+ local maxNameWidth = 0;
+ if (numMembers > 1) then
+ self.LeaderIcon:Show();
+ self.Leader:SetPoint("TOPLEFT", self.LeaderIcon, "TOPRIGHT", 0, -2)
+ else
+ self.LeaderIcon:Hide();
+ self.Leader:SetPoint("TOPLEFT", self.LeaderIcon, "TOPLEFT", 0, -2)
+ end
+ do
+ local leaderInfo = C_LFGList.GetSearchResultLeaderInfo(resultID);
+ if (leaderInfo and leaderInfo.name) then
+ local classColor = RAID_CLASS_COLORS[leaderInfo.classFilename];
+ self.Leader.Name:SetWidth(0); -- Reset the width so that we auto-expand to the text size correctly.
+ self.Leader.Name:SetText(leaderInfo.name);
+ self.Leader.Name:SetTextColor(classColor.r, classColor.g, classColor.b)
+ self.Leader.Level:SetText(LEVEL_ABBR .. " " .. leaderInfo.level);
+ if (isSolo) then
+ LFGBrowseUtil_MapRoleStatesToRoleIcons(self.Leader.Roles, leaderInfo.lfgRoles.tank, leaderInfo.lfgRoles.healer, leaderInfo.lfgRoles.dps, true);
+ else
+ -- If we're in a party, just show our party-level role.
+ local role = leaderInfo.assignedRole;
+ LFGBrowseUtil_MapRoleStatesToRoleIcons(self.Leader.Roles, role == "TANK", role == "HEALER", role == "DAMAGER", false);
+ end
+ self.Leader:Show();
+
+ maxNameWidth = math.max(maxNameWidth, self.Leader.Name:GetWidth());
+ else
+ self.Leader:Hide();
+ self.LeaderIcon:Hide();
+ end
+ end
+
+ -- Members
+ self.memberPool:ReleaseAll();
+ if (numMembers <= 10) then
+ for i=1, numMembers do
+ local memberInfo = C_LFGList.GetSearchResultPlayerInfo(resultID, i);
+ if (memberInfo and memberInfo.name and not memberInfo.isLeader) then -- Leader handled above.
+ local frame = self.memberPool:Acquire();
+ local classColor = RAID_CLASS_COLORS[memberInfo.classFilename];
+ frame.Name:SetWidth(0); -- Reset the width so that we auto-expand to the text size correctly.
+ frame.Name:SetText(memberInfo.name);
+ frame.Name:SetTextColor(classColor.r, classColor.g, classColor.b)
+ frame.Level:SetText(LEVEL_ABBR .. " " .. memberInfo.level);
+ frame.Role:SetAtlas(LFGBROWSE_GROUPDATA_ATLASES[memberInfo.assignedRole], false);
+
+ frame:SetPoint("TOPLEFT", lastMemberFrame, "BOTTOMLEFT", 0, 0);
+ lastMemberFrame = frame;
+ frame:Show();
+
+ maxNameWidth = math.max(maxNameWidth, frame.Name:GetWidth());
+ end
+ end
+ end
+
+ -- Standardize name width to whatever our max is.
+ if (maxNameWidth > 0) then
+ self.Leader.Name:SetWidth(maxNameWidth);
+ for frame in self.memberPool:EnumerateActive() do
+ frame.Name:SetWidth(maxNameWidth);
+ end
+ end
+
+ -- Comment
+ self.Comment:SetPoint("TOP", lastMemberFrame, "BOTTOM", 0, -8);
+ if ( searchResultInfo.comment ~= "" ) then
+ self.Comment:SetText(string.format(LFG_LIST_COMMENT_FORMAT, searchResultInfo.comment));
+ self.Comment:Show();
+ self.MemberCount:SetPoint("TOPLEFT", self.Comment, "BOTTOMLEFT", 0, -8);
+ else
+ self.Comment:Hide();
+ self.MemberCount:SetPoint("TOPLEFT", self.Comment, "TOPLEFT", 0, 0);
+ end
+
+ -- Member Count
+ if (isSolo) then
+ self.MemberCount:SetText(string.format(LFG_LIST_TOOLTIP_MEMBERS_SIMPLE, numMembers));
+ elseif (memberCounts) then
+ self.MemberCount:SetText(string.format(LFG_LIST_TOOLTIP_MEMBERS, numMembers, memberCounts.TANK, memberCounts.HEALER, memberCounts.DAMAGER));
+ end
+
+ -- Activities
+ local lastActivityString = nil
+ self.activityPool:ReleaseAll();
+ local numActivities = #searchResultInfo.activityIDs;
+ local numActivityGroups = 1; -- Used for height calculation; value updated later.
+ local ACTIVITY_GROUP_SPACER_HEIGHT = 6;
+ local activeEntryInfo = C_LFGList.GetActiveEntryInfo();
+
+ if (numActivities > 0) then
+ local organizedActivities = LFGUtil_OrganizeActivitiesByActivityGroup(searchResultInfo.activityIDs);
+ local activityGroupIDs = GetKeysArray(organizedActivities);
+ numActivityGroups = #activityGroupIDs;
+ LFGUtil_SortActivityGroupIDs(activityGroupIDs);
+
+ for i, activityGroupID in ipairs(activityGroupIDs) do
+ local activityIDs = organizedActivities[activityGroupID];
+ if (activityGroupID == 0) then -- Free-floating activities (no group)
+ for _, activityID in ipairs(activityIDs) do
+ local activityInfo = C_LFGList.GetActivityInfoTable(activityID);
+ local activityName = LFGUtil_GetActivityInfoName(activityInfo);
+ if (activityInfo and activityName ~= "") then
+ local fontString = self.activityPool:Acquire();
+ fontString:SetWidth(0);
+ fontString:SetText(activityName);
+
+ if (activeEntryInfo and tContains(activeEntryInfo.activityIDs, activityID)) then
+ fontString:SetTextColor(LFGBROWSE_ACTIVITY_MATCH_FONT_COLOR.r, LFGBROWSE_ACTIVITY_MATCH_FONT_COLOR.g, LFGBROWSE_ACTIVITY_MATCH_FONT_COLOR.b);
+ else
+ fontString:SetTextColor(LFGBROWSE_ACTIVITY_NOMATCH_FONT_COLOR.r, LFGBROWSE_ACTIVITY_NOMATCH_FONT_COLOR.g, LFGBROWSE_ACTIVITY_NOMATCH_FONT_COLOR.b);
+ end
+
+ fontString:Show();
+ if (lastActivityString) then
+ fontString:SetPoint("TOPLEFT", lastActivityString, "BOTTOMLEFT", 0, 0);
+ else
+ fontString:SetPoint("TOPLEFT", self.MemberCount, "BOTTOMLEFT", 0, -8);
+ end
+ maxContentWidth = math.max(maxContentWidth, fontString:GetWidth());
+ fontString:SetPoint("RIGHT", self, "RIGHT", -11, 0);
+ lastActivityString = fontString;
+ end
+ end
+ else -- Grouped activities
+ local activityGroupName = C_LFGList.GetActivityGroupInfo(activityGroupID);
+ local groupFontString = self.activityPool:Acquire();
+ groupFontString:SetWidth(0);
+ groupFontString:SetText(activityGroupName);
+ groupFontString:Show();
+ if (lastActivityString) then
+ if (i > 1) then
+ -- If this is a group after the first, add a bit more space.
+ groupFontString:SetPoint("TOPLEFT", lastActivityString, "BOTTOMLEFT", 0, -ACTIVITY_GROUP_SPACER_HEIGHT);
+ else
+ groupFontString:SetPoint("TOPLEFT", lastActivityString, "BOTTOMLEFT", 0, 0);
+ end
+ else
+ groupFontString:SetPoint("TOPLEFT", self.MemberCount, "BOTTOMLEFT", 0, -8);
+ end
+ maxContentWidth = math.max(maxContentWidth, groupFontString:GetWidth());
+ lastActivityString = groupFontString;
+ local groupHasMatchingActivity = false;
+
+ for _, activityID in ipairs(activityIDs) do
+ local activityInfo = C_LFGList.GetActivityInfoTable(activityID);
+ local activityName = LFGUtil_GetActivityInfoName(activityInfo);
+ if (activityInfo and activityName ~= "") then
+ local fontString = self.activityPool:Acquire();
+ fontString:SetWidth(0);
+ fontString:SetText(string.format(LFG_LIST_INDENT, activityName));
+
+ if (activeEntryInfo and tContains(activeEntryInfo.activityIDs, activityID)) then
+ groupHasMatchingActivity = true;
+ fontString:SetTextColor(LFGBROWSE_ACTIVITY_MATCH_FONT_COLOR.r, LFGBROWSE_ACTIVITY_MATCH_FONT_COLOR.g, LFGBROWSE_ACTIVITY_MATCH_FONT_COLOR.b);
+ else
+ fontString:SetTextColor(LFGBROWSE_ACTIVITY_NOMATCH_FONT_COLOR.r, LFGBROWSE_ACTIVITY_NOMATCH_FONT_COLOR.g, LFGBROWSE_ACTIVITY_NOMATCH_FONT_COLOR.b);
+ end
+
+ fontString:Show();
+ if (lastActivityString) then
+ fontString:SetPoint("TOPLEFT", lastActivityString, "BOTTOMLEFT", 0, 0);
+ else
+ fontString:SetPoint("TOPLEFT", self.MemberCount, "BOTTOMLEFT", 0, -8);
+ end
+ maxContentWidth = math.max(maxContentWidth, fontString:GetWidth());
+ fontString:SetPoint("RIGHT", self, "RIGHT", -11, 0);
+ lastActivityString = fontString;
+ end
+ end
+
+ if (groupHasMatchingActivity) then
+ groupFontString:SetTextColor(LFGBROWSE_ACTIVITY_MATCH_FONT_COLOR.r, LFGBROWSE_ACTIVITY_MATCH_FONT_COLOR.g, LFGBROWSE_ACTIVITY_MATCH_FONT_COLOR.b);
+ else
+ groupFontString:SetTextColor(LFGBROWSE_ACTIVITY_NOMATCH_FONT_COLOR.r, LFGBROWSE_ACTIVITY_NOMATCH_FONT_COLOR.g, LFGBROWSE_ACTIVITY_NOMATCH_FONT_COLOR.b);
+ end
+ end
+ end
+ end
+
+ -- Show
+ self:Show();
+
+ -- Set Width
+ self:SetWidth(math.max(maxContentWidth+22, LFGBROWSE_TOOLTIP_MIN_WIDTH));
+ -- Height calculation
+ local contentHeight = 40;
+ if ( self.Delisted:IsShown() ) then
+ contentHeight = contentHeight + self.Delisted:GetHeight();
+ contentHeight = contentHeight + 8;
+ end
+ if ( self.NewPlayerFriendlyText:IsShown() ) then
+ contentHeight = contentHeight + self.NewPlayerFriendlyText:GetHeight();
+ contentHeight = contentHeight + 8;
+ end
+ contentHeight = contentHeight + self.Leader:GetHeight();
+ for frame in self.memberPool:EnumerateActive() do
+ contentHeight = contentHeight + frame:GetHeight();
+ end
+ if ( self.Comment:IsShown() ) then
+ contentHeight = contentHeight + self.Comment:GetHeight();
+ contentHeight = contentHeight + 8;
+ end
+ contentHeight = contentHeight + self.MemberCount:GetHeight();
+ for fontString in self.activityPool:EnumerateActive() do
+ contentHeight = contentHeight + fontString:GetHeight();
+ end
+ contentHeight = contentHeight + ACTIVITY_GROUP_SPACER_HEIGHT * (numActivityGroups - 1); -- Gaps between activity groups.
+ self:SetHeight(contentHeight);
+end
+
+-------------------------------------------------------
+----------Group Data Display
+-------------------------------------------------------
+function LFGBrowseGroupDataDisplay_Update(self, displayType, maxNumPlayers, displayData, disabled, isSolo, soloRoles, comment)
+ if(not displayType) then
+ return;
+ end
+
+ self.Solo:Hide();
+ self.RoleCount:Hide();
+ self.Enumerate:Hide();
+ self.PlayerCount:Hide();
+ self.Comment:Hide();
+
+ if ( displayType == Enum.LFGListDisplayType.Comment ) then
+ self.Comment:Show();
+ LFGBrowseGroupDataDisplayComment_Update(self.Comment, comment, disabled);
+ elseif ( displayData ) then
+ if ( isSolo ) then
+ self.Solo:Show();
+ LFGBrowseGroupDataDisplaySolo_Update(self.Solo, soloRoles, disabled);
+ elseif ( displayType == Enum.LFGListDisplayType.RoleCount ) then
+ self.RoleCount:Show();
+ LFGBrowseGroupDataDisplayRoleCount_Update(self.RoleCount, displayData, disabled);
+ elseif ( displayType == Enum.LFGListDisplayType.RoleEnumerate ) then
+ self.Enumerate:Show();
+ LFGBrowseGroupDataDisplayEnumerate_Update(self.Enumerate, maxNumPlayers, displayData, disabled, LFGBROWSE_GROUPDATA_ROLE_ORDER);
+ elseif ( displayType == Enum.LFGListDisplayType.ClassEnumerate ) then
+ self.Enumerate:Show();
+ LFGBrowseGroupDataDisplayEnumerate_Update(self.Enumerate, maxNumPlayers, displayData, disabled, LFGBROWSE_GROUPDATA_CLASS_ORDER);
+ elseif ( displayType == Enum.LFGListDisplayType.PlayerCount ) then
+ self.PlayerCount:Show();
+ LFGBrowseGroupDataDisplayPlayerCount_Update(self.PlayerCount, displayData, disabled);
+ elseif ( displayType ~= Enum.LFGListDisplayType.HideAll ) then
+ GMError("Unknown display type");
+ end
+ end
+end
+
+function LFGBrowseGroupDataDisplayComment_Update(self, text, disabled)
+ self:SetText(text);
+ if (disabled) then
+ self:SetTextColor(LFGBROWSE_DELISTED_FONT_COLOR.r, LFGBROWSE_DELISTED_FONT_COLOR.g, LFGBROWSE_DELISTED_FONT_COLOR.b);
+ else
+ self:SetTextColor(LIGHTGRAY_FONT_COLOR.r, LIGHTGRAY_FONT_COLOR.g, LIGHTGRAY_FONT_COLOR.b);
+ end
+end
+
+function LFGBrowseGroupDataDisplaySolo_Update(self, soloRoles, disabled)
+ if (disabled) then
+ self.RolesText:SetTextColor(LFGBROWSE_DELISTED_FONT_COLOR.r, LFGBROWSE_DELISTED_FONT_COLOR.g, LFGBROWSE_DELISTED_FONT_COLOR.b);
+ else
+ self.RolesText:SetTextColor(HIGHLIGHT_FONT_COLOR.r, HIGHLIGHT_FONT_COLOR.g, HIGHLIGHT_FONT_COLOR.b);
+ end
+
+ if (soloRoles and (soloRoles.tank or soloRoles.healer or soloRoles.dps)) then
+ -- If we have at least one role, show it!
+ LFGBrowseUtil_MapRoleStatesToRoleIcons(self.Roles, soloRoles.tank, soloRoles.healer, soloRoles.dps, true, disabled);
+ self:Show();
+ else
+ self:Hide();
+ end
+end
+
+function LFGBrowseGroupDataDisplayRoleCount_Update(self, displayData, disabled)
+ self.TankCount:SetText(displayData.TANK);
+ self.HealerCount:SetText(displayData.HEALER);
+ self.DamagerCount:SetText(displayData.DAMAGER);
+
+ --Update for the disabled state
+ local r = disabled and LFGBROWSE_DELISTED_FONT_COLOR.r or HIGHLIGHT_FONT_COLOR.r;
+ local g = disabled and LFGBROWSE_DELISTED_FONT_COLOR.g or HIGHLIGHT_FONT_COLOR.g;
+ local b = disabled and LFGBROWSE_DELISTED_FONT_COLOR.b or HIGHLIGHT_FONT_COLOR.b;
+ self.TankCount:SetTextColor(r, g, b);
+ self.HealerCount:SetTextColor(r, g, b);
+ self.DamagerCount:SetTextColor(r, g, b);
+ self.TankIcon:SetDesaturated(disabled);
+ self.HealerIcon:SetDesaturated(disabled);
+ self.DamagerIcon:SetDesaturated(disabled);
+ self.TankIcon:SetAlpha(disabled and 0.5 or 0.70);
+ self.HealerIcon:SetAlpha(disabled and 0.5 or 0.70);
+ self.DamagerIcon:SetAlpha(disabled and 0.5 or 0.70);
+end
+
+function LFGBrowseGroupDataDisplayEnumerate_Update(self, numPlayers, displayData, disabled, iconOrder)
+ --Show/hide the required icons
+ for i=1, #self.Icons do
+ if ( i > numPlayers ) then
+ self.Icons[i]:Hide();
+ else
+ self.Icons[i]:Show();
+ self.Icons[i]:SetDesaturated(disabled);
+ self.Icons[i]:SetAlpha(disabled and 0.5 or 1.0);
+ end
+ end
+
+ --Note that icons are numbered from right to left
+ local iconIndex = numPlayers;
+ for i=1, #iconOrder do
+ for j=1, displayData[iconOrder[i]] do
+ self.Icons[iconIndex]:SetAtlas(LFGBROWSE_GROUPDATA_ATLASES[iconOrder[i]], false);
+ iconIndex = iconIndex - 1;
+ if ( iconIndex < 1 ) then
+ return;
+ end
+ end
+ end
+
+ for i=1, iconIndex do
+ self.Icons[i]:SetAtlas("groupfinder-icon-emptyslot", false);
+ end
+end
+
+function LFGBrowseGroupDataDisplayPlayerCount_Update(self, displayData, disabled)
+ local numPlayers = displayData.TANK + displayData.HEALER + displayData.DAMAGER + displayData.NOROLE;
+
+ local color = disabled and LFGBROWSE_DELISTED_FONT_COLOR or HIGHLIGHT_FONT_COLOR;
+ self.Count:SetText(numPlayers);
+ self.Count:SetTextColor(color.r, color.g, color.b);
+ self.Icon:SetDesaturated(disabled);
+ self.Icon:SetAlpha(disabled and 0.5 or 1);
+end
+
+-------------------------------------------------------
+----------Search Entry Menu
+-------------------------------------------------------
+function LFGBrowseMixin:CreateSearchEntryMenu(searchEntry)
+ local searchResultInfo = C_LFGList.GetSearchResultInfo(searchEntry.resultID);
+ if (searchResultInfo == nil) then
+ return;
+ end
+
+ MenuUtil.CreateContextMenu(LFGBrowseFrame.SearchEntryDropDown, function(owner, rootDescription)
+ -- Leader Name (Title)
+ rootDescription:CreateTitle(searchResultInfo.leaderName);
+
+ -- Send Message
+ local sendMessageButton = rootDescription:CreateButton(SEND_MESSAGE, function()
+ ChatFrame_SendTell(searchResultInfo.leaderName);
+ end);
+ sendMessageButton:SetEnabled(searchResultInfo.leaderName ~= nil);
+
+ -- Invite Function
+ local inviteText, inviteFunc = LFGBrowseUtil_GetInviteActionForResult(searchEntry.resultID);
+ local inviteButton = rootDescription:CreateButton(inviteText, inviteFunc);
+ inviteButton:SetEnabled(inviteFunc ~= nil);
+
+ -- Report Group
+ local reportGroupButton = rootDescription:CreateButton(LFG_LIST_REPORT_GROUP_FOR, function()
+ LFGBrowseUtil_ReportListing(searchEntry.resultID, searchResultInfo.leaderName);
+ end);
+
+ -- Report Group (Advertisement)
+ local reportAdvertisementButton = rootDescription:CreateButton(REPORT_GROUP_FINDER_ADVERTISEMENT, function()
+ LFGBrowseUtil_ReportAdvertisement(searchEntry.resultID, searchResultInfo.leaderName);
+ end);
+
+ end);
+end
+
+-------------------------------------------------------
+----------Category DropDown
+-------------------------------------------------------
+function LFGBrowseCategoryDropDown_Initialize(self)
+ local info = UIDropDownMenu_CreateInfo();
+ local hasActiveEntry = C_LFGList.HasActiveEntryInfo();
+ local categories = C_LFGList.GetAvailableCategories();
+ if (#categories == 0 and not hasActiveEntry) then
+ -- None button
+ info.text = LFG_TYPE_NONE;
+ info.value = 0;
+ info.func = LFGBrowseCategoryButton_OnClick;
+ info.owner = self;
+ info.checked = UIDropDownMenu_GetSelectedValue(self) == info.value;
+ info.classicChecks = true;
+ UIDropDownMenu_AddButton(info);
+ else
+ if (hasActiveEntry) then
+ info.text = LFG_SELF_LISTING;
+ info.value = 0;
+ info.func = function() LFGBrowseFrame:SearchActiveEntry(); end
+ info.owner = self;
+ info.checked = false;
+ info.classicChecks = true;
+ UIDropDownMenu_AddButton(info);
+ end
+
+ local currentSelectedValue = UIDropDownMenu_GetSelectedValue(self) or 0;
+ local foundChecked = false;
+ for i=1, #categories do
+ local activities = LFGUtil_GetFilteredActivities(categories[i]);
+ if (#activities ~= 0) then
+ local categoryInfo = C_LFGList.GetLfgCategoryInfo(categories[i]);
+
+ info.text = categoryInfo.name;
+ info.value = categories[i];
+ info.func = LFGBrowseCategoryButton_OnClick;
+ info.owner = self;
+ info.checked = currentSelectedValue == info.value;
+ info.classicChecks = true;
+ UIDropDownMenu_AddButton(info);
+ if (info.checked) then
+ UIDropDownMenu_SetSelectedValue(self, info.value);
+ foundChecked = true;
+ end
+ end
+ end
+
+ if (not foundChecked) then
+ UIDropDownMenu_SetText(self, CATEGORY);
+ end
+ end
+end
+
+function LFGBrowseCategoryDropDown_Reset(self)
+ UIDropDownMenu_ClearAll(self);
+ UIDropDownMenu_Initialize(self, LFGBrowseCategoryDropDown_Initialize);
+end
+
+function LFGBrowseCategoryButton_OnClick(self)
+ UIDropDownMenu_SetSelectedValue(self.owner, self.value);
+ LFGBrowseActivityDropDown_ValueReset(LFGBrowseFrame.ActivityDropDown);
+ UIDropDownMenu_ClearAll(LFGBrowseFrame.ActivityDropDown);
+ UIDropDownMenu_Initialize(LFGBrowseFrame.ActivityDropDown, LFGBrowseActivityDropDown_Initialize);
+ LFGBrowse_DoSearch();
+end
+
+-------------------------------------------------------
+----------Activity DropDown
+-------------------------------------------------------
+function LFGBrowseActivityDropDown_Initialize(self, level, menuList)
+ -- If we're a submenu, just display that.
+ if (menuList) then
+ for _, buttonInfo in pairs(menuList) do
+ UIDropDownMenu_AddButton(buttonInfo, level);
+ end
+ return;
+ end
+
+ -- If we're not a submenu, we need to generate the full menu from the top.
+ local selectedType = UIDropDownMenu_GetSelectedValue(LFGBrowseFrame.CategoryDropDown) or 0;
+
+ if ( selectedType > 0 ) then
+ UIDropDownMenu_EnableDropDown(self);
+ local activities = LFGUtil_GetFilteredActivities(selectedType);
+
+ if (#activities > 0) then
+ local organizedActivities = LFGUtil_OrganizeActivitiesByActivityGroup(activities);
+ local activityGroupIDs = GetKeysArray(organizedActivities);
+ LFGUtil_SortActivityGroupIDs(activityGroupIDs);
+
+ for _, activityGroupID in ipairs(activityGroupIDs) do
+ local activityIDs = organizedActivities[activityGroupID];
+ if (activityGroupID == 0) then
+ -- Free-floating activities (no group)
+ local buttonInfo = UIDropDownMenu_CreateInfo();
+ buttonInfo.func = LFGBrowseActivityButton_OnClick;
+ buttonInfo.owner = self;
+ buttonInfo.keepShownOnClick = true;
+ buttonInfo.classicChecks = true;
+
+ for _, activityID in pairs(activityIDs) do
+ local activityInfo = C_LFGList.GetActivityInfoTable(activityID);
+
+ buttonInfo.text = LFGUtil_GetActivityInfoName(activityInfo);
+ buttonInfo.value = activityID;
+ buttonInfo.checked = function(self)
+ return LFGBrowseActivityDropDown_ValueIsSelected(LFGBrowseFrame.ActivityDropDown, self.value);
+ end;
+ UIDropDownMenu_AddButton(buttonInfo, level);
+ end
+ else
+ -- Grouped activities.
+ local groupButtonInfo = UIDropDownMenu_CreateInfo();
+ groupButtonInfo.func = LFGBrowseActivityGroupButton_OnClick;
+ groupButtonInfo.owner = self;
+ groupButtonInfo.keepShownOnClick = true;
+ groupButtonInfo.classicChecks = true;
+ groupButtonInfo.text = C_LFGList.GetActivityGroupInfo(activityGroupID);
+ groupButtonInfo.value = activityGroupID;
+ groupButtonInfo.checked = function(self)
+ return LFGBrowseActivityDropDown_IsAnyValueSelectedForActivityGroup(LFGBrowseFrame.ActivityDropDown, self.value);
+ end;
+
+ if (#activityGroupIDs == 1) then -- If we only have one activityGroup, do everything in one menu.
+ UIDropDownMenu_AddButton(groupButtonInfo, level);
+
+ for _, activityID in pairs(activityIDs) do
+ local activityInfo = C_LFGList.GetActivityInfoTable(activityID);
+ local buttonInfo = UIDropDownMenu_CreateInfo();
+ buttonInfo.func = LFGBrowseActivityButton_OnClick;
+ buttonInfo.owner = self;
+ buttonInfo.keepShownOnClick = true;
+ buttonInfo.classicChecks = true;
+
+ buttonInfo.text = string.format(LFG_LIST_INDENT, LFGUtil_GetActivityInfoName(activityInfo)); -- Extra spacing to "indent" this from the group title.
+ buttonInfo.value = activityID;
+ buttonInfo.checked = function(self)
+ return LFGBrowseActivityDropDown_ValueIsSelected(LFGBrowseFrame.ActivityDropDown, self.value);
+ end;
+
+ UIDropDownMenu_AddButton(buttonInfo, level);
+ end
+ else -- If we have more than one group, do submenus.
+ groupButtonInfo.hasArrow = true;
+ groupButtonInfo.menuList = {};
+
+ for _, activityID in pairs(activityIDs) do
+ local activityInfo = C_LFGList.GetActivityInfoTable(activityID);
+ local buttonInfo = UIDropDownMenu_CreateInfo();
+ buttonInfo.func = LFGBrowseActivityButton_OnClick;
+ buttonInfo.owner = self;
+ buttonInfo.keepShownOnClick = true;
+ buttonInfo.classicChecks = true;
+
+ buttonInfo.text = LFGUtil_GetActivityInfoName(activityInfo);
+ buttonInfo.value = activityID;
+ buttonInfo.checked = function(self)
+ return LFGBrowseActivityDropDown_ValueIsSelected(LFGBrowseFrame.ActivityDropDown, self.value);
+ end;
+ tinsert(groupButtonInfo.menuList, buttonInfo);
+ end
+
+ UIDropDownMenu_AddButton(groupButtonInfo, level);
+ end
+ end
+ end
+ end
+ else
+ LFGBrowseActivityDropDown_ValueReset(self);
+ UIDropDownMenu_DisableDropDown(self);
+ UIDropDownMenu_ClearAll(self);
+ end
+
+ LFGBrowseActivityDropDown_UpdateHeader(self);
+end
+
+function LFGBrowseActivityDropDown_Reset(self)
+ LFGBrowseActivityDropDown_ValueReset(self);
+ UIDropDownMenu_ClearAll(self);
+ UIDropDownMenu_Initialize(self, LFGBrowseActivityDropDown_Initialize);
+end
+
+function LFGBrowseActivityDropDown_SetAllValuesForActivityGroup(self, activityGroupID, selected)
+ local selectedType = UIDropDownMenu_GetSelectedValue(LFGBrowseFrame.CategoryDropDown) or 0;
+
+ if ( selectedType > 0 ) then
+ local activities = LFGUtil_GetFilteredActivities(selectedType);
+ for i=1, #activities do
+ if (LFGUtil_GetActivityGroupForActivity(activities[i]) == activityGroupID) then
+ LFGBrowseActivityDropDown_ValueSetSelected(self, activities[i], selected);
+ end
+ end
+ end
+end
+
+function LFGBrowseActivityDropDown_IsAnyValueSelectedForActivityGroup(self, activityGroupID)
+ local selectedType = UIDropDownMenu_GetSelectedValue(LFGBrowseFrame.CategoryDropDown) or 0;
+
+ if ( selectedType > 0 ) then
+ local activities = LFGUtil_GetFilteredActivities(selectedType);
+ for i=1, #activities do
+ if (LFGUtil_GetActivityGroupForActivity(activities[i]) == activityGroupID) then
+ if (LFGBrowseActivityDropDown_ValueIsSelected(self, activities[i])) then
+ return true;
+ end
+ end
+ end
+ end
+
+ return false;
+end
+
+function LFGBrowseActivityDropDown_ValueReset(self)
+ wipe(self.selectedValues);
+end
+
+function LFGBrowseActivityDropDown_ValueIsSelected(self, value)
+ return tContains(self.selectedValues, value);
+end
+
+function LFGBrowseActivityDropDown_ValueSetSelected(self, value, selected)
+ if (selected) then
+ if (not tContains(self.selectedValues, value)) then
+ tinsert(self.selectedValues, value);
+ end
+ else
+ tDeleteItem(self.selectedValues, value);
+ end
+ LFGBrowseActivityDropDown_UpdateHeader(self);
+end
+
+function LFGBrowseActivityDropDown_ValueToggleSelected(self, value)
+ LFGBrowseActivityDropDown_ValueSetSelected(self, value, not LFGBrowseActivityDropDown_ValueIsSelected(self, value));
+end
+
+function LFGBrowseActivityDropDown_UpdateHeader(self)
+ if #self.selectedValues == 0 then
+ UIDropDownMenu_SetText(self, LFGBROWSE_ACTIVITY_HEADER_DEFAULT);
+ self.ResetButton:Hide();
+ elseif #self.selectedValues == 1 then
+ local activityInfo = C_LFGList.GetActivityInfoTable(self.selectedValues[1]);
+ UIDropDownMenu_SetText(self, LFGUtil_GetActivityInfoName(activityInfo));
+ self.ResetButton:Show();
+ else
+ UIDropDownMenu_SetText(self, string.format(LFGBROWSE_ACTIVITY_HEADER, #self.selectedValues));
+ self.ResetButton:Show();
+ end
+end
+
+function LFGBrowseActivityDropDownResetButton_OnClick(self)
+ CloseDropDownMenus();
+ LFGBrowseActivityDropDown_ValueReset(self:GetParent());
+ LFGBrowseActivityDropDown_UpdateHeader(self:GetParent());
+ LFGBrowse_DoSearch();
+end
+
+function LFGBrowseActivityGroupButton_OnClick(self)
+ LFGBrowseActivityDropDown_SetAllValuesForActivityGroup(self.owner, self.value, not LFGBrowseActivityDropDown_IsAnyValueSelectedForActivityGroup(self.owner, self.value));
+ UIDropDownMenu_Refresh(self.owner, true);
+ LFGBrowseActivityDropDown_UpdateHeader(self.owner);
+ LFGBrowse_DoSearch();
+end
+
+function LFGBrowseActivityButton_OnClick(self)
+ LFGBrowseActivityDropDown_ValueToggleSelected(self.owner, self.value);
+ UIDropDownMenu_RefreshAll(self.owner, true);
+ LFGBrowseActivityDropDown_UpdateHeader(self.owner);
+end
+
+-------------------------------------------------------
+----------Options Button
+-------------------------------------------------------
+LFGBrowseOptionsButton = { };
+
+function LFGBrowseOptionsButton:OnLoad()
+ self:SetupOptionsMenu();
+end
+
+function LFGBrowseOptionsButton:SetupOptionsMenu()
+ self:SetupMenu(function(dropdown, rootDescription)
+ rootDescription:SetTag("MENU_LFG_LISTING_SETTINGS");
+
+ local function getIgnoreSelectedLevel()
+ return GetCVarBool("disableSuggestedLevelActivityFilter");
+ end;
+ local function setIgnoreSelectedLevel()
+ SetCVar("disableSuggestedLevelActivityFilter", not getIgnoreSelectedLevel());
+ end;
+ rootDescription:CreateCheckbox(LFG_LIST_IGNORE_SUGGESTED_LEVEL, getIgnoreSelectedLevel, setIgnoreSelectedLevel);
+ end);
+end
+
+-------------------------------------------------------
+----------Buttons
+-------------------------------------------------------
+function LFGBrowseGroupInviteButton_OnClick(self, button)
+ self.inviteFunc();
+end
+
+function LFGBrowseSendMessageButton_OnClick(self, button)
+ local selectedElement = LFGBrowseFrame.selectionBehavior:GetSelectedElementData()[1];
+ if (selectedElement) then
+ local searchResultInfo = C_LFGList.GetSearchResultInfo(selectedElement.resultID);
+ if (searchResultInfo) then
+ ChatFrame_SendTell(searchResultInfo.leaderName);
+ end
+ end
+end
+
+-------------------------------------------------------
+----------Util
+-------------------------------------------------------
+local function HasRemainingSlotsForLocalPlayerRole(lfgSearchResultID)
+ local roles = C_LFGList.GetSearchResultMemberCounts(lfgSearchResultID);
+ local playerRoles = C_LFGListRoles.GetRoles();
+ local canTank = roles["TANK_REMAINING"] > 0 and playerRoles.tank;
+ local canHeal = roles["HEALER_REMAINING"] > 0 and playerRoles.healer;
+ local canDPS = roles["DAMAGER_REMAINING"] > 0 and playerRoles.dps;
+ local hasSlotForRole = canTank or canHeal or canDPS;
+ return hasSlotForRole, canTank, canHeal, canDPS;
+end
+
+function LFGBrowseUtil_SortSearchResults(results)
+ local activeEntryInfo = C_LFGList.GetActiveEntryInfo();
+ local activeEntryUseDungeonRoles = false;
+ if (activeEntryInfo) then
+ for _, activityID in ipairs(activeEntryInfo.activityIDs) do
+ local activityInfo = C_LFGList.GetActivityInfoTable(activityID);
+ if (activityInfo and activityInfo.useDungeonRoleExpectations) then
+ activeEntryUseDungeonRoles = true;
+ break;
+ end
+ end
+ end
+ local groupMemberCounts = GetGroupMemberCounts();
+
+ local function SortCB(searchResultID1, searchResultID2)
+ local searchResultInfo1 = C_LFGList.GetSearchResultInfo(searchResultID1);
+ local searchResultInfo2 = C_LFGList.GetSearchResultInfo(searchResultID2);
+
+ local hasSelf1 = searchResultInfo1.hasSelf;
+ local hasSelf2 = searchResultInfo2.hasSelf;
+ if (hasSelf1 ~= hasSelf2) then
+ return hasSelf1; -- Always put self at the top.
+ end
+
+ -- Prioritize results that have a match.
+ if (activeEntryInfo) then
+ local matchingActivity1 = false;
+ local matchingActivity2 = false;
+ for _, activityID in ipairs(activeEntryInfo.activityIDs) do
+ if (not matchingActivity1 and tContains(searchResultInfo1.activityIDs, activityID)) then
+ matchingActivity1 = true;
+ end
+ if (not matchingActivity2 and tContains(searchResultInfo2.activityIDs, activityID)) then
+ matchingActivity2 = true;
+ end
+ end
+
+ if (matchingActivity1 ~= matchingActivity2) then
+ return matchingActivity1;
+ end
+ end
+
+ local isSolo1 = searchResultInfo1.numMembers == 1;
+ local isSolo2 = searchResultInfo2.numMembers == 1;
+ if (isSolo1 ~= isSolo2) then
+ if (IsInGroup()) then
+ return isSolo1; -- When in a group, solo players go to the top.
+ else
+ return isSolo2; -- When solo, groups go to the top.
+ end
+ end
+
+ if (isSolo1) then
+ -- For solo players, canTank > canHeal > canDPS > timeInQueue.
+ -- Role ordering will change based on party if we're listed for a dungeon.
+ local roleOrderings = {"TANK", "HEALER", "DAMAGER"};
+ if (activeEntryUseDungeonRoles and groupMemberCounts) then
+ if (groupMemberCounts["TANK"] >= LFGBROWSE_DUNGEON_NUM_TANKS_EXPECTED) then
+ tDeleteItem(roleOrderings, "TANK");
+ tinsert(roleOrderings, "TANK");
+ end
+ if (groupMemberCounts["HEALER"] >= LFGBROWSE_DUNGEON_NUM_HEALERS_EXPECTED) then
+ tDeleteItem(roleOrderings, "HEALER");
+ tinsert(roleOrderings, "HEALER");
+ end
+ if (groupMemberCounts["DAMAGER"] >= LFGBROWSE_DUNGEON_NUM_DPS_EXPECTED) then
+ tDeleteItem(roleOrderings, "DAMAGER");
+ tinsert(roleOrderings, "DAMAGER");
+ end
+ end
+
+ local roles1 = C_LFGList.GetSearchResultMemberCounts(searchResultID1);
+ local roles2 = C_LFGList.GetSearchResultMemberCounts(searchResultID2);
+ for _, desiredRole in ipairs(roleOrderings) do
+ local canPerformRole1 = roles1["LEADER_ROLE_" .. desiredRole];
+ local canPerformRole2 = roles2["LEADER_ROLE_" .. desiredRole];
+ if (canPerformRole1 ~= canPerformRole2) then
+ return canPerformRole1;
+ end
+ if (canPerformRole1) then
+ -- If we found a role that both players can perform, then they're both equally desired as far as role diffentiation goes.
+ break;
+ end
+ end
+ else
+ -- For groups, hasSlotForRole > groupSize > canTank > canHeal > timeInQueue.
+
+ -- Groups with one of your current roles available are preferred.
+ local hasSlotForRole1, canTank1, canHeal1, canDPS1 = HasRemainingSlotsForLocalPlayerRole(searchResultID1);
+ local hasSlotForRole2, canTank2, canHeal2, canDPS2 = HasRemainingSlotsForLocalPlayerRole(searchResultID2);
+ if (hasSlotForRole1 ~= hasSlotForRole2) then
+ return hasSlotForRole1;
+ end
+
+ -- If both groups can accommodate one or more of our roles, prioritize the larger group.
+ if (searchResultInfo1.numMembers ~= searchResultInfo2.numMembers) then
+ return searchResultInfo1.numMembers > searchResultInfo2.numMembers;
+ end
+
+ -- If both groups are the same size... we'll start looking at the particular roles. Groups that need more in-demand roles should be higher.
+ if (canTank1 ~= canTank2) then
+ return canTank1;
+ end
+ if (canHeal1 ~= canHeal2) then
+ return canHeal1;
+ end
+ end
+
+ -- If we've gotten this far, prioritize the older one.
+ if (searchResultInfo1.age ~= searchResultInfo2.age) then
+ return searchResultInfo1.age > searchResultInfo2.age;
+ end
+
+ --If we aren't sorting by anything else, just go by ID
+ return searchResultID1 < searchResultID2;
+ end
+
+ table.sort(results, SortCB);
+end
+
+function LFGBrowseUtil_GetInviteActionForResult(resultID)
+ local inviteText = GROUP_INVITE;
+ local inviteFunc = nil;
+ if (resultID) then
+ local searchResultInfo = C_LFGList.GetSearchResultInfo(resultID);
+ if (searchResultInfo) then
+ local resultIsEligible = searchResultInfo.numMembers == 1;
+ local playerCanInvite = not IsInGroup() or (UnitIsGroupLeader("player") or UnitIsGroupAssistant("player"));
+ if (resultIsEligible and playerCanInvite) then
+ inviteText = GROUP_INVITE;
+ inviteFunc = function() InviteToGroup(searchResultInfo.leaderName); end;
+ end
+ end
+ end
+
+ return inviteText, inviteFunc;
+end
+function LFGBrowseUtil_MapRoleStatesToRoleIcons(iconArray, isTank, isHealer, isDPS, useSimple, useDisabled)
+ -- For each role flag, put its icon in the first available button slot. Then hide the rest.
+ -- iconArray must be an array of (at least) 3 Textures.
+ local roleStates = { isTank, isHealer, isDPS };
+ local roleButtonIndex = 1;
+ for i, roleEnabled in ipairs(roleStates) do
+ if (roleEnabled) then
+ local atlasKey = LFGBROWSE_GROUPDATA_ROLE_ORDER[i];
+ if (useSimple) then
+ atlasKey = "SOLO_" .. atlasKey;
+ end
+ iconArray[roleButtonIndex]:SetAtlas(LFGBROWSE_GROUPDATA_ATLASES[atlasKey], false);
+ iconArray[roleButtonIndex]:SetDesaturated(useDisabled);
+ iconArray[roleButtonIndex]:Show();
+ roleButtonIndex = roleButtonIndex+1;
+ end
+ end
+ for j = roleButtonIndex,#iconArray do
+ iconArray[j]:Hide();
+ end
+end
+
+function LFGBrowseUtil_ReportListing(searchResultID, leaderName)
+ local reportInfo = ReportInfo:CreateReportInfoFromType(Enum.ReportType.GroupFinderPosting);
+ reportInfo:SetGroupFinderSearchResultID(searchResultID);
+ ReportFrame:InitiateReport(reportInfo, leaderName);
+end
+
+function LFGBrowseUtil_ReportAdvertisement(searchResultID, leaderName)
+ ReportFrame:Hide(); -- Since we're about to submit a brand new report, close any existing report frames.
+ local reportInfo = ReportInfo:CreateReportInfoFromType(Enum.ReportType.GroupFinderPosting);
+ reportInfo:SetGroupFinderSearchResultID(searchResultID);
+ ReportFrame:SetMinorCategoryFlag(Enum.ReportMinorCategory.Advertisement, true);
+ ReportFrame:SetMajorType(Enum.ReportMajorCategory.InappropriateCommunication);
+ local sendReportWithoutDialog = true;
+ ReportFrame:InitiateReport(reportInfo, leaderName, nil, nil, sendReportWithoutDialog);
+end
+
+function LFGBrowseUtil_GetBestDisplayTypeForActivityIDs(activityIDs)
+ local bestDisplayType = nil;
+ local bestDisplayTypePriority = 0;
+ local maxNumPlayers = 0;
+
+ for _, activityID in ipairs(activityIDs) do
+ local activityInfo = C_LFGList.GetActivityInfoTable(activityID);
+ if (activityInfo) then
+ local displayTypePriority = LFGBROWSE_DISPLAYTYPE_PRIORITY[activityInfo.displayType];
+ if (displayTypePriority and displayTypePriority > bestDisplayTypePriority) then
+ bestDisplayType = activityInfo.displayType;
+ bestDisplayTypePriority = displayTypePriority;
+ end
+ if (activityInfo.maxNumPlayers > maxNumPlayers) then
+ maxNumPlayers = activityInfo.maxNumPlayers;
+ end
+ end
+ end
+
+
+ return bestDisplayType, maxNumPlayers;
+end
\ No newline at end of file
diff --git a/Interface/AddOns/Blizzard_GroupFinder_VanillaStyle/Blizzard_LFGVanilla_Browse.xml b/Interface/AddOns/Blizzard_GroupFinder_VanillaStyle/Blizzard_LFGVanilla_Browse.xml
new file mode 100644
index 0000000000..572d68fb7b
--- /dev/null
+++ b/Interface/AddOns/Blizzard_GroupFinder_VanillaStyle/Blizzard_LFGVanilla_Browse.xml
@@ -0,0 +1,469 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ UIDropDownMenu_SetWidth(self, 100);
+ UIDropDownMenu_Initialize(self, LFGBrowseCategoryDropDown_Initialize);
+ UIDropDownMenu_JustifyText(self, "LEFT");
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ self.selectedValues = {};
+ UIDropDownMenu_SetWidth(self, 150);
+ UIDropDownMenu_Initialize(self, LFGBrowseActivityDropDown_Initialize);
+ UIDropDownMenu_JustifyText(self, "LEFT");
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ self.Icon:SetPoint("CENTER", self, "CENTER", -2, -1);
+
+
+ self.Icon:SetPoint("CENTER", self, "CENTER", -1, 0);
+
+
+ GameTooltip:SetOwner(self, "ANCHOR_RIGHT");
+ GameTooltip:SetText(LFG_LIST_SEARCH_AGAIN, HIGHLIGHT_FONT_COLOR.r, HIGHLIGHT_FONT_COLOR.g, HIGHLIGHT_FONT_COLOR.b);
+
+
+
+ PlaySound(SOUNDKIT.IG_MAINMENU_OPTION_CHECKBOX_ON);
+ LFGBrowseSearchButton_OnClick(self, button);
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/Interface/AddOns/Blizzard_GroupFinder_VanillaStyle/Blizzard_LFGVanilla_Listing.lua b/Interface/AddOns/Blizzard_GroupFinder_VanillaStyle/Blizzard_LFGVanilla_Listing.lua
new file mode 100644
index 0000000000..6769b1aca5
--- /dev/null
+++ b/Interface/AddOns/Blizzard_GroupFinder_VanillaStyle/Blizzard_LFGVanilla_Listing.lua
@@ -0,0 +1,1229 @@
+-------------------------------------------------------
+----------Constants
+-------------------------------------------------------
+local LFGLISTING_DUNGEON_CATEGORY_ID = 2;
+
+local LFGLISTING_CATEGORY_TEXTURES = {
+ [LFGLISTING_DUNGEON_CATEGORY_ID] = "dungeons", -- Dungeons
+ [114] = "raids-classic", -- Raids
+ [116] = "questing", -- Quests & Zones
+ [118] = "battlegrounds", -- PvP
+ [120] = "custom-pve", -- Custom
+};
+
+local LFGLISTING_VIEWSTATE_CATEGORIES = 1;
+local LFGLISTING_VIEWSTATE_ACTIVITIES = 2;
+local LFGLISTING_VIEWSTATE_LOCKED = 3;
+
+local LFGLISTING_BUTTONTYPE_ACTIVITYGROUP = 1;
+local LFGLISTING_BUTTONTYPE_ACTIVITY = 2;
+
+local IN_SET_CATEGORY_SELECTION = false; -- Baby hack. This bool will be true when we're in code triggered by LFGListingMixin:SetCategorySelection. Useful for downstream effects.
+local PENDING_LISTING_UPDATE = false; -- Will be true after the player fires off an update to their listing from the UI. Used to determine what feedback we should give.
+
+-------------------------------------------------------
+----------LFGListingMixin
+-------------------------------------------------------
+LFGListingMixin = {};
+
+function LFGListingMixin:OnLoad()
+ self:RegisterEvent("CVAR_UPDATE");
+ self:RegisterEvent("GROUP_LEFT");
+ self:RegisterEvent("GROUP_ROSTER_UPDATE");
+ self:RegisterEvent("LFG_LIST_ACTIVE_ENTRY_UPDATE");
+ self:RegisterEvent("LFG_LIST_AVAILABILITY_UPDATE");
+ self:RegisterEvent("LFG_LIST_ENTRY_EXPIRED_TOO_MANY_PLAYERS");
+ self:RegisterEvent("LFG_LIST_ENTRY_EXPIRED_TIMEOUT");
+ self:RegisterEvent("LFG_LIST_ROLE_UPDATE");
+ self:RegisterEvent("PARTY_LEADER_CHANGED");
+ self:RegisterEvent("PLAYER_ROLES_ASSIGNED");
+ self:RegisterEvent("UPDATE_INSTANCE_INFO");
+
+ self.activities = {};
+ self.selectedActivities = 0;
+ self.categorySelection = nil;
+ self.dirty = false;
+ self.viewState = LFGLISTING_VIEWSTATE_ACTIVITIES;
+ self.savedInstances = {};
+
+ self:ClearUI();
+ self:LoadSoloRolesOnStartup();
+ self:UpdateFrameView();
+end
+
+function LFGListingMixin:OnEvent(event, ...)
+ if ( event == "CVAR_UPDATE" ) then
+ local name = ...;
+ if name == "disableSuggestedLevelActivityFilter" then
+ self:ActivityFiltersChanged();
+ end
+ elseif ( event == "GROUP_LEFT" ) then
+ local partyCategory, partyGUID = ...;
+ if ( partyCategory == LE_PARTY_CATEGORY_HOME and not C_LFGList.HasActiveEntryInfo() ) then
+ -- If we just left a party and we don't have an activeEntry, assume that
+ -- any activeEntry information we have was inherited from the group and should probably be thrown out.
+ self:ClearCategorySelection();
+ end
+ elseif ( event == "GROUP_ROSTER_UPDATE" or event == "PARTY_LEADER_CHANGED" ) then
+ self:UpdateFrameView();
+ elseif ( event == "LFG_LIST_ACTIVE_ENTRY_UPDATE" ) then
+ local createdNew = ...;
+ self:LoadActiveEntry();
+ if (C_LFGList.HasActiveEntryInfo()) then
+ if ( createdNew or PENDING_LISTING_UPDATE ) then
+ -- If this is either a brand new entry, or it was a manual update that we ourselves made, play a sound and swap to the browser.
+ -- Notable case: if this is an update to an existing listing from our party leader, but we ourselves didn't do anything, don't deliver feedback.
+ PlaySound(SOUNDKIT.PVP_ENTER_QUEUE);
+ LFGParentFrame_SearchActiveEntry();
+ end
+ else
+ if ( PENDING_LISTING_UPDATE ) then
+ -- Play sound, only if the update was manual.
+ PlaySound(SOUNDKIT.LFG_DENIED);
+ end
+ self:SetDirty(self:IsAnyActivitySelected());
+ end
+ PENDING_LISTING_UPDATE = false;
+ elseif ( event == "LFG_LIST_AVAILABILITY_UPDATE" ) then
+ -- If available activities change, attempt a "soft reset" back to category selection. Then reload the active entry, if there is one.
+ self:ClearCategorySelection();
+ self:LoadActiveEntry();
+ elseif ( event == "LFG_LIST_ENTRY_EXPIRED_TOO_MANY_PLAYERS" ) then
+ if ( UnitIsGroupLeader("player", LE_PARTY_CATEGORY_HOME) ) then
+ StaticPopup_Show("LFG_LIST_ENTRY_EXPIRED_TOO_MANY_PLAYERS");
+ end
+ elseif ( event == "LFG_LIST_ENTRY_EXPIRED_TIMEOUT" ) then
+ if ( UnitIsGroupLeader("player", LE_PARTY_CATEGORY_HOME) ) then
+ StaticPopup_Show("LFG_LIST_ENTRY_EXPIRED_TIMEOUT");
+ end
+ elseif ( event == "LFG_LIST_ROLE_UPDATE" ) then
+ self:LoadSoloRoles();
+ elseif ( event == "PLAYER_ROLES_ASSIGNED" ) then
+ UIDropDownMenu_Initialize(self.GroupRoleButtons.RoleDropDown, LFGListingRoleDropDown_Initialize);
+ LFGListingRoleIcon_UpdateRoleTexture(self.GroupRoleButtons.RoleIcon);
+ elseif ( event == "UPDATE_INSTANCE_INFO" ) then
+ self:FetchSavedInstances()
+ end
+end
+
+function LFGListingMixin:OnShow()
+ -- Baby hack... the selected tab texture doesn't blend well with the LFG texture, so move it down a hair when it's selected.
+ LFGParentFrameTab1:SetPoint("BOTTOMLEFT", 16, 43);
+ LFGParentFrameTab2:SetPoint("LEFT", LFGParentFrameTab1, "RIGHT", -14, 2);
+
+ if (C_LFGList.HasActiveEntryInfo()) then
+ self:LoadActiveEntry();
+ self:LoadSoloRoles();
+ else
+ self:SetDirty(self:IsAnyActivitySelected());
+ end
+
+ RequestRaidInfo();
+
+ self:UpdatePostButtonEnableState();
+ self:UpdateBackButtonEnableState();
+
+ UIDropDownMenu_Initialize(self.GroupRoleButtons.RoleDropDown, LFGListingRoleDropDown_Initialize);
+ LFGListingRoleIcon_UpdateRoleTexture(self.GroupRoleButtons.RoleIcon);
+end
+
+function LFGListingMixin:UpdateFrameView()
+ -- Content view.
+ self.CategoryView:Hide();
+ self.ActivityView:Hide();
+ self.LockedView:Hide();
+ if (not LFGListingUtil_CanEditListing()) then
+ self.viewState = LFGLISTING_VIEWSTATE_LOCKED;
+ self.LockedView:Show();
+ elseif (not self.categorySelection) then
+ self.viewState = LFGLISTING_VIEWSTATE_CATEGORIES;
+ self.CategoryView:Show();
+ else
+ self.viewState = LFGLISTING_VIEWSTATE_ACTIVITIES;
+ self.ActivityView:Show();
+ end
+
+ -- Role view.
+ if (IsInGroup(LE_PARTY_CATEGORY_HOME)) then
+ self.SoloRoleButtons:Hide();
+ self.GroupRoleButtons:Show();
+ else
+ self.SoloRoleButtons:Show();
+ self.GroupRoleButtons:Hide();
+ end
+
+ -- Buttons.
+ self:UpdatePostButtonEnableState();
+ self:UpdateBackButtonEnableState();
+ self:UpdateNewPlayerFriendlyButtonEnableState();
+end
+
+function LFGListingMixin:ClearUI()
+ self:ClearCategorySelection();
+ C_LFGList.ClearCreationTextFields();
+ self.ActivityView.Comment.EditBox:ClearFocus();
+ self:SetDirty(false);
+end
+
+function LFGListingMixin:SetDirty(state)
+ self.dirty = state;
+ self:UpdatePostButtonEnableState();
+end
+
+function LFGListingMixin:FetchSavedInstances()
+ self.savedInstances = {};
+ local numSavedInstances = GetNumSavedInstances();
+ if ( numSavedInstances > 0 ) then
+ for i=1, MAX_RAID_INFOS do
+ if ( i <= numSavedInstances) then
+ local instanceName, instanceID, _, difficultyID, _, _, _, _, _, _, encountersTotal, encountersCompleted, _, mapID = GetSavedInstanceInfo(i);
+ self.savedInstances[i] = {};
+ self.savedInstances[i].mapID = mapID;
+ self.savedInstances[i].difficultyID = difficultyID;
+ self.savedInstances[i].redirectedDifficultyID = C_RaidLocks.GetRedirectedDifficultyID(mapID, difficultyID);
+ self.savedInstances[i].encountersCompleted = encountersCompleted;
+ self.savedInstances[i].encountersTotal = encountersTotal;
+ end
+ end
+ end
+end
+
+function LFGListingMixin:GetSavedInstances()
+ return self.savedInstances;
+end
+
+function LFGListingMixin:ActivityFiltersChanged()
+ self:UpdateActivities();
+ if (self.viewState == LFGLISTING_VIEWSTATE_CATEGORIES) then
+ LFGListingCategorySelection_ActivityFiltersChanged(self.CategoryView);
+ elseif (self.viewState == LFGLISTING_VIEWSTATE_ACTIVITIES) then
+ LFGListingActivityView_ActivityFiltersChanged(self.ActivityView);
+ end
+end
+
+-------------------------------------------------------
+----------Active Entry
+-------------------------------------------------------
+function LFGListingMixin:LoadActiveEntry()
+ local activeEntryInfo = C_LFGList.GetActiveEntryInfo();
+
+ if (activeEntryInfo) then
+ -- Set LFG settings
+ local activityInfo = C_LFGList.GetActivityInfoTable(activeEntryInfo.activityIDs[1]);
+ self:SetCategorySelection(activityInfo.categoryID); -- This will call UpdateActivities.
+ C_LFGList.CopyActiveEntryInfoToCreationFields();
+ self.NewPlayerFriendlyButton.CheckButton:SetChecked(activeEntryInfo.newPlayerFriendly);
+
+ self:SetDirty(false);
+ end
+end
+
+function LFGListingMixin:CreateOrUpdateListing()
+ if (not self.dirty) then
+ return;
+ end
+
+ local selectedActivityIDs = {};
+ local hasSelectedActivity = false;
+ local i = 1;
+ for activityID, selected in pairs(self.activities) do
+ if (selected) then
+ hasSelectedActivity = true;
+ selectedActivityIDs[i] = activityID;
+ i = i+1;
+ end
+ end
+ local newPlayerFriendlyEnabled = self.NewPlayerFriendlyButton.CheckButton:GetChecked();
+
+ local saveSoloRoles = false;
+ if (C_LFGList.HasActiveEntryInfo()) then
+ if (hasSelectedActivity) then
+ -- Update.
+ PENDING_LISTING_UPDATE = true;
+ C_LFGList.UpdateListing({
+ activityIDs = selectedActivityIDs,
+ newPlayerFriendly = newPlayerFriendlyEnabled,
+ });
+ saveSoloRoles = true;
+ else
+ -- Delete.
+ PENDING_LISTING_UPDATE = true;
+ C_LFGList.RemoveListing();
+ end
+ else
+ if (hasSelectedActivity) then
+ -- Create.
+ PENDING_LISTING_UPDATE = true;
+ C_LFGList.CreateListing({
+ activityIDs = selectedActivityIDs,
+ newPlayerFriendly = newPlayerFriendlyEnabled,
+ });
+ saveSoloRoles = true;
+ end
+ end
+
+ if (saveSoloRoles) then
+ self:SaveSoloRoles();
+ end
+end
+
+function LFGListingMixin:RemoveListing()
+ PENDING_LISTING_UPDATE = true;
+ C_LFGList.RemoveListing();
+end
+
+-------------------------------------------------------
+----------Category Selection
+-------------------------------------------------------
+function LFGListingMixin:GetCategorySelection()
+ return self.categorySelection;
+end
+
+function LFGListingMixin:SetCategorySelection(categoryID)
+ IN_SET_CATEGORY_SELECTION = true;
+ self.categorySelection = categoryID;
+ self:UpdateActivities();
+ self:UpdateFrameView();
+ IN_SET_CATEGORY_SELECTION = false;
+end
+
+function LFGListingMixin:ClearCategorySelection()
+ self.categorySelection = nil;
+ self:UpdateActivities();
+ self:UpdateFrameView();
+end
+
+-------------------------------------------------------
+----------Activity Selection
+-------------------------------------------------------
+function LFGListingMixin:UpdateActivities()
+ self:ClearActivities();
+ if (self.categorySelection) then
+ local categoryInfo = C_LFGList.GetLfgCategoryInfo(self.categorySelection);
+ local activities = LFGUtil_GetFilteredActivities(self.categorySelection);
+ for i=1, #activities do
+ self:SetActivity(activities[i], false, true); -- Initialize to false, then overwrite later.
+ end
+
+ if (C_LFGList.HasActiveEntryInfo()) then
+ local activeEntryInfo = C_LFGList.GetActiveEntryInfo();
+ for i=1, #activeEntryInfo.activityIDs do
+ self:SetActivity(activeEntryInfo.activityIDs[i], true);
+ end
+ elseif (categoryInfo.autoChooseActivity) then
+ self:SetAllActivities(true);
+ end
+ end
+end
+
+function LFGListingMixin:ClearActivities()
+ self.activities = {};
+end
+
+function LFGListingMixin:IsActivitySelected(activityID)
+ return self.activities[activityID];
+end
+
+function LFGListingMixin:IsAnyActivitySelected()
+ for activityID, selected in pairs(self.activities) do
+ if selected then
+ return true;
+ end
+ end
+ return false;
+end
+
+function LFGListingMixin:IsAnyActivityForActivityGroupSelected(activityGroupID)
+ for activityID, selected in pairs(self.activities) do
+ if (LFGUtil_GetActivityGroupForActivity(activityID) == activityGroupID) then
+ if selected then
+ return true;
+ end
+ end
+ end
+ return false;
+end
+
+
+function LFGListingMixin:AreAllActivitiesSelected()
+ for activityID, selected in pairs(self.activities) do
+ if not selected then
+ return false;
+ end
+ end
+ return true;
+end
+
+function LFGListingMixin:AreAllActivitiesForActivityGroupSelected(activityGroupID)
+ for activityID, selected in pairs(self.activities) do
+ if (LFGUtil_GetActivityGroupForActivity(activityID) == activityGroupID) then
+ if not selected then
+ return false;
+ end
+ end
+ end
+ return true;
+end
+
+function LFGListingMixin:SetActivity(activityID, selected, allowCreate, userInput)
+ if (not allowCreate and self.activities[activityID] == nil) then
+ return;
+ end
+
+ if (selected ~= self.activities[activityID]) then
+ if (selected) then
+ self.selectedActivities = self.selectedActivities + 1;
+ elseif (self.selectedActivities > 0) then
+ self.selectedActivities = self.selectedActivities - 1;
+ end
+ end
+
+ self.activities[activityID] = selected;
+
+ self:UpdatePostButtonEnableState();
+ if (userInput) then
+ if (C_LFGList.HasActiveEntryInfo()) then
+ self:SetDirty(true);
+ else
+ self:SetDirty(self:IsAnyActivitySelected());
+ end
+ end
+end
+
+function LFGListingMixin:SetAllActivities(selected, userInput)
+ for activityID, _ in pairs(self.activities) do
+ self:SetActivity(activityID, selected, false, userInput);
+ end
+end
+
+function LFGListingMixin:SetAllActivitiesForActivityGroup(activityGroupID, selected, userInput)
+ for activityID, _ in pairs(self.activities) do
+ if (LFGUtil_GetActivityGroupForActivity(activityID) == activityGroupID) then
+ self:SetActivity(activityID, selected, false, userInput);
+ end
+ end
+end
+
+function LFGListingMixin:ToggleActivity(activityID, allowCreate, userInput)
+ self:SetActivity(activityID, not self:IsActivitySelected(activityID), allowCreate, userInput);
+end
+
+-------------------------------------------------------
+----------Button Control
+-------------------------------------------------------
+function LFGListingMixin:UpdatePostButtonEnableState()
+ if (not LFGListingUtil_CanEditListing()) then
+ if (C_LFGList.HasActiveEntryInfo()) then
+ self.PostButton.errorText = LFG_LIST_ONLY_LEADER_UPDATE;
+ else
+ self.PostButton.errorText = LFG_LIST_ONLY_LEADER_CREATE;
+ end
+ self.PostButton:SetEnabled(false);
+ return;
+ elseif (self.selectedActivities > Constants.LFGConstsExposed.GROUP_FINDER_MAX_ACTIVITY_CAPACITY) then
+ self.PostButton.errorText = LFG_LIST_TOO_MANY_ACTIVITIES_SELECTED;
+ self.PostButton:SetEnabled(false);
+ return;
+ end
+
+ -- If our dirty flag is not set, disable the Post button.
+ -- Alternatively, if we do not have an activeEntry, and also do not have any activities set, disable the Post button. (An initial listing needs at least one activity.)
+ if (not self.dirty or (not C_LFGList.HasActiveEntryInfo() and not self:IsAnyActivitySelected())) then
+ self.PostButton.errorText = nil;
+ self.PostButton:SetEnabled(false);
+ return;
+ end
+
+ if (not LFGListingActivityView_CanPostWithCurrentComment(self.ActivityView)) then
+ self.PostButton.errorText = nil;
+ self.PostButton:SetEnabled(false);
+ return;
+ end
+
+ -- Check party size state.
+ local allActivitiesHaveSpace = true;
+ local minPlayerCountForActivities = 0;
+ if (IsInGroup(LE_PARTY_CATEGORY_HOME)) then
+ local groupCount = GetNumGroupMembers(LE_PARTY_CATEGORY_HOME);
+ for activityID, selected in pairs(self.activities) do
+ if (selected) then
+ local activityInfo = C_LFGList.GetActivityInfoTable(activityID);
+ local maxPlayers = activityInfo.maxNumPlayers;
+ if (maxPlayers ~= 0) then
+ if (maxPlayers <= groupCount) then
+ allActivitiesHaveSpace = false;
+ end
+ if (maxPlayers < minPlayerCountForActivities or minPlayerCountForActivities == 0) then
+ -- Note: Using 0 as the "uninitialized" default value.
+ -- If minPlayerCountForActivities is 0, we haven't set it yet, so always overwrite it.
+ minPlayerCountForActivities = maxPlayers;
+ end
+ end
+ end
+ end
+
+ if (not allActivitiesHaveSpace) then
+ self.PostButton.errorText = string.format(LFG_LIST_TOO_MANY_FOR_ACTIVITY, minPlayerCountForActivities);
+ self.PostButton:SetEnabled(false);
+ return;
+ end
+ end
+
+ -- Success! Enable the button.
+ self.PostButton.errorText = nil;
+ self.PostButton:SetEnabled(true);
+end
+
+function LFGListingMixin:UpdateBackButtonEnableState()
+ self.BackButton:SetEnabled(self.viewState == LFGLISTING_VIEWSTATE_ACTIVITIES);
+end
+
+function LFGListingMixin:UpdateNewPlayerFriendlyButtonEnableState()
+ self.NewPlayerFriendlyButton.CheckButton:SetEnabled(LFGListingUtil_CanEditListing());
+end
+
+-------------------------------------------------------
+----------Solo Role UI
+-------------------------------------------------------
+function LFGListingMixin:LoadSoloRolesOnStartup()
+ local roles = C_LFGListRoles.GetSavedRoles();
+ self.SoloRoleButtons.Tank.CheckButton:SetChecked(roles.tank);
+ self.SoloRoleButtons.Healer.CheckButton:SetChecked(roles.healer);
+ self.SoloRoleButtons.DPS.CheckButton:SetChecked(roles.dps);
+
+ self:SaveSoloRoles();
+end
+
+function LFGListingMixin:LoadSoloRoles()
+ local roles = C_LFGListRoles.GetRoles();
+ self.SoloRoleButtons.Tank.CheckButton:SetChecked(roles.tank);
+ self.SoloRoleButtons.Healer.CheckButton:SetChecked(roles.healer);
+ self.SoloRoleButtons.DPS.CheckButton:SetChecked(roles.dps);
+end
+
+function LFGListingMixin:SaveSoloRoles()
+ return C_LFGListRoles.SetRoles({
+ tank = self.SoloRoleButtons.Tank.CheckButton:GetChecked(),
+ healer = self.SoloRoleButtons.Healer.CheckButton:GetChecked(),
+ dps = self.SoloRoleButtons.DPS.CheckButton:GetChecked(),
+ });
+end
+
+-------------------------------------------------------
+----------Group Role UI
+-------------------------------------------------------
+function LFGListingRoleDropDown_Initialize(self)
+ local info = UIDropDownMenu_CreateInfo();
+ local currentRole = UnitGroupRolesAssigned("player");
+
+ info.func = LFGListingRoleDropDownButton_OnClick;
+ info.classicChecks = true;
+
+ local buttons = {
+ { text = TANK, value = "TANK", },
+ { text = HEALER, value = "HEALER", },
+ { text = DAMAGER, value = "DAMAGER", },
+ };
+
+ for i, button in ipairs(buttons) do
+ info.text = button.text;
+ info.value = button.value;
+ info.checked = currentRole == info.value;
+ info.owner = self;
+ UIDropDownMenu_AddButton(info);
+ if (info.checked) then
+ UIDropDownMenu_SetSelectedValue(self, info.value);
+ end
+ end
+end
+
+function LFGListingRoleDropDownButton_OnClick(self)
+ UIDropDownMenu_SetSelectedValue(self.owner, self.value);
+ UnitSetRole("player", self.value);
+end
+
+function LFGListingRoleIcon_UpdateRoleTexture(self)
+ local currentRole = UnitGroupRolesAssigned("player");
+ if (currentRole == "NONE") then
+ self:Hide();
+ else
+ self:Show();
+ self:GetNormalTexture():SetTexCoord(GetTexCoordsForRole(currentRole));
+ self.Background:SetTexCoord(GetBackgroundTexCoordsForRole(currentRole));
+ self.roleID = currentRole;
+ end
+end
+
+-------------------------------------------------------
+----------Role Check Button
+-------------------------------------------------------
+function LFGListingRolePollButton_OnLoad(self)
+ self:RegisterEvent("PARTY_LEADER_CHANGED");
+ self:RegisterEvent("PLAYER_ROLES_ASSIGNED");
+ LFGListingRolePollButton_UpdateEnableState(self);
+end
+
+function LFGListingRolePollButton_OnEvent(self, event)
+ if (event == "PARTY_LEADER_CHANGED") then
+ LFGListingRolePollButton_UpdateEnableState(self);
+ elseif (event == "PLAYER_ROLES_ASSIGNED") then
+ LFGListingRolePollButton_UpdateEnableState(self);
+ end
+end
+
+function LFGListingRolePollButton_OnClick(self, button)
+ PlaySound(SOUNDKIT.IG_MAINMENU_OPTION_CHECKBOX_ON);
+ InitiateRolePoll();
+end
+
+function LFGListingRolePollButton_UpdateEnableState(self)
+ if (IsInGroup() and (UnitIsGroupLeader("player") or UnitIsGroupAssistant("player"))) then
+ self:Enable();
+ else
+ self:Disable();
+ end
+end
+
+-------------------------------------------------------
+----------New Player Friendly Button
+-------------------------------------------------------
+function LFGListingNewPlayerFriendlyButtonCheckButton_OnShow(self)
+ if (not C_LFGList.HasActiveEntryInfo()) then
+ self:SetChecked(GetCVarBool("lfgNewPlayerFriendly"));
+ end
+end
+
+function LFGListingNewPlayerFriendlyButtonCheckButton_OnClick(self, button)
+ if ( self:GetChecked() ) then
+ PlaySound(SOUNDKIT.IG_MAINMENU_OPTION_CHECKBOX_ON);
+ SetCVar("lfgNewPlayerFriendly", "1");
+ else
+ PlaySound(SOUNDKIT.IG_MAINMENU_OPTION_CHECKBOX_OFF);
+ SetCVar("lfgNewPlayerFriendly", "0");
+ end
+ LFGListingFrame:SetDirty(true);
+end
+
+-------------------------------------------------------
+----------Post Button
+-------------------------------------------------------
+function LFGListingPostButton_OnLoad(self)
+ self:RegisterEvent("GROUP_ROSTER_UPDATE");
+ self:RegisterEvent("LFG_LIST_ACTIVE_ENTRY_UPDATE");
+ LFGListingPostButton_UpdateText(self);
+end
+
+function LFGListingPostButton_OnEvent(self, event)
+ if ( event == "GROUP_ROSTER_UPDATE" or event == "LFG_LIST_ACTIVE_ENTRY_UPDATE" ) then
+ LFGListingPostButton_UpdateText(self);
+ end
+end
+
+function LFGListingPostButton_OnClick(self, button)
+ PlaySound(SOUNDKIT.IG_MAINMENU_OPTION_CHECKBOX_ON);
+ LFGListingFrame:CreateOrUpdateListing();
+end
+
+function LFGListingPostButton_UpdateText(self)
+ if (C_LFGList.HasActiveEntryInfo()) then
+ self:SetText(LFG_POST_GROUP_UPDATE);
+ elseif (IsInGroup(LE_PARTY_CATEGORY_HOME)) then
+ self:SetText(LFG_POST_GROUP_PARTY);
+ else
+ self:SetText(LFG_POST_GROUP_SOLO);
+ end
+end
+
+-------------------------------------------------------
+----------Back Button
+-------------------------------------------------------
+function LFGListingBackButton_OnLoad(self)
+ self:RegisterEvent("LFG_LIST_ACTIVE_ENTRY_UPDATE");
+ LFGListingBackButton_UpdateText(self);
+end
+
+function LFGListingBackButton_OnEvent(self, event)
+ if ( event == "LFG_LIST_ACTIVE_ENTRY_UPDATE" ) then
+ LFGListingBackButton_UpdateText(self);
+ end
+end
+
+function LFGListingBackButton_OnClick(self, button)
+ PlaySound(SOUNDKIT.IG_MAINMENU_OPTION_CHECKBOX_ON);
+ if (C_LFGList.HasActiveEntryInfo()) then
+ LFGListingFrame:RemoveListing();
+ else
+ LFGListingFrame:ClearUI();
+ end
+end
+
+function LFGListingBackButton_UpdateText(self)
+ if (C_LFGList.HasActiveEntryInfo()) then
+ self:SetText(LFG_LIST_UNLIST);
+ else
+ self:SetText(BACK);
+ end
+end
+
+-------------------------------------------------------
+----------Options Button
+-------------------------------------------------------
+LFGListingOptionsButton = { };
+
+function LFGListingOptionsButton:OnLoad()
+ self:SetupOptionsMenu();
+end
+
+function LFGListingOptionsButton:SetupOptionsMenu()
+ self:SetupMenu(function(dropdown, rootDescription)
+ rootDescription:SetTag("MENU_LFG_LISTING_SETTINGS");
+
+ local function getIgnoreSelectedLevel()
+ return GetCVarBool("disableSuggestedLevelActivityFilter");
+ end;
+ local function setIgnoreSelectedLevel()
+ SetCVar("disableSuggestedLevelActivityFilter", not getIgnoreSelectedLevel());
+ end;
+ rootDescription:CreateCheckbox(LFG_LIST_IGNORE_SUGGESTED_LEVEL, getIgnoreSelectedLevel, setIgnoreSelectedLevel);
+ end);
+end
+
+-------------------------------------------------------
+----------Category Selection
+-------------------------------------------------------
+function LFGListingCategorySelection_OnShow(self)
+ LFGListingCategorySelection_UpdateCategoryButtons(self);
+end
+
+function LFGListingCategorySelection_ActivityFiltersChanged(self)
+ LFGListingCategorySelection_UpdateCategoryButtons(self);
+end
+
+function LFGListingCategorySelection_UpdateCategoryButtons(self)
+ local categories = C_LFGList.GetAvailableCategories();
+ local nextBtn = 1;
+
+ --Update category buttons
+ for i=1, #categories do
+ local categoryID = categories[i];
+ nextBtn = LFGListingCategorySelection_AddButton(self, nextBtn, categoryID);
+ end
+
+ --Hide any extra buttons
+ for i=nextBtn, #self.CategoryButtons do
+ self.CategoryButtons[i]:Hide();
+ end
+end
+
+function LFGListingCategorySelection_AddButton(self, btnIndex, categoryID)
+ local availableActivities = LFGUtil_GetFilteredActivities(categoryID);
+ if ( #availableActivities == 0) then
+ return btnIndex;
+ end
+
+ local categoryInfo = C_LFGList.GetLfgCategoryInfo(categoryID);
+
+ local button = self.CategoryButtons[btnIndex];
+ if ( not button ) then
+ self.CategoryButtons[btnIndex] = CreateFrame("BUTTON", nil, self, "LFGListingCategoryTemplate");
+ self.CategoryButtons[btnIndex]:SetPoint("TOP", self.CategoryButtons[btnIndex - 1], "BOTTOM", 0, -8);
+ button = self.CategoryButtons[btnIndex];
+ end
+
+ button:SetText(categoryInfo.name);
+ button.categoryID = categoryID;
+
+ local atlasName = "groupfinder-button-"..(LFGLISTING_CATEGORY_TEXTURES[categoryID] or "questing");
+ button.Icon:SetAtlas(atlasName);
+
+ button:Show();
+
+ return btnIndex + 1;
+end
+
+function LFGListingCategorySelectionButton_OnClick(self)
+ PlaySound(SOUNDKIT.IG_MAINMENU_OPTION_CHECKBOX_ON);
+ LFGListingFrame:SetCategorySelection(self.categoryID);
+end
+
+-------------------------------------------------------
+----------Activity Selection
+-------------------------------------------------------
+function LFGListingActivityView_OnLoad(self)
+ self.commentRequired = false;
+
+ local view = CreateScrollBoxListTreeListView(0);
+
+ view:SetElementFactory(function(factory, node)
+ local elementData = node:GetData();
+
+ if (elementData.buttonType == LFGLISTING_BUTTONTYPE_ACTIVITYGROUP) then
+ factory("LFGListingActivityRowTemplate", function(frame, unused)
+ LFGListingActivityView_InitActivityGroupButton(frame, elementData, node:IsCollapsed());
+
+ frame.CheckButton:SetScript("OnClick", function(button, buttonName, down)
+ local node = button:GetParent():GetElementData();
+ local parentFrame = view:FindFrame(node);
+ local parentData = node:GetData();
+ local activityGroupID = parentData.activityGroupID;
+ local allSelected = LFGListingFrame:IsAnyActivityForActivityGroupSelected(activityGroupID);
+ LFGListingFrame:SetAllActivitiesForActivityGroup(activityGroupID, not allSelected, true);
+
+ LFGListingActivityView_InitActivityGroupButton(parentFrame, parentData, node:IsCollapsed());
+ for index, child in ipairs(node.nodes) do
+ local childFrame = view:FindFrame(child);
+ if (childFrame) then
+ LFGListingActivityView_InitActivityButton(childFrame, child:GetData());
+ end
+ end
+ end)
+
+ frame.ExpandOrCollapseButton:SetScript("OnClick", function(button, buttonName, down)
+ local node = button:GetParent():GetElementData();
+ node:ToggleCollapsed(true);
+ LFGListingActivityView_InitActivityGroupButton(view:FindFrame(node), node:GetData(), node:IsCollapsed());
+ end)
+ end)
+ elseif (elementData.buttonType == LFGLISTING_BUTTONTYPE_ACTIVITY) then
+ factory("LFGListingActivityRowTemplate", function(frame, unused)
+ LFGListingActivityView_InitActivityButton(frame, elementData);
+
+ frame.CheckButton:SetScript("OnClick", function(button, buttonName, down)
+ local node = button:GetParent():GetElementData();
+ local activityID = node:GetData().activityID;
+ LFGListingFrame:ToggleActivity(activityID, false, true);
+
+ if (node.parent) then
+ local parentFrame = view:FindFrame(node.parent);
+ if (parentFrame) then
+ LFGListingActivityView_InitActivityGroupButton(parentFrame, node.parent:GetData(), node.parent:IsCollapsed());
+ end
+ end
+ end)
+ end)
+ end
+ end);
+
+ view:SetPadding(4,4,4,4,0);
+ view:SetElementExtent(18);
+ ScrollUtil.InitScrollBoxListWithScrollBar(self.ScrollBox, self.ScrollBar, view);
+
+ local scrollBoxAnchorsWithBar = {
+ CreateAnchor("TOPLEFT", 0, 0),
+ CreateAnchor("BOTTOMRIGHT", -28, 88);
+ };
+ local scrollBoxAnchorsWithoutBar = {
+ scrollBoxAnchorsWithBar[1],
+ CreateAnchor("BOTTOMRIGHT", 0, 88);
+ };
+ ScrollUtil.AddManagedScrollBarVisibilityBehavior(self.ScrollBox, self.ScrollBar, scrollBoxAnchorsWithBar, scrollBoxAnchorsWithoutBar);
+end
+
+function LFGListingActivityView_OnShow(self)
+ local categoryID = LFGListingFrame:GetCategorySelection();
+ local categoryInfo = C_LFGList.GetLfgCategoryInfo(categoryID);
+ local isAccountSecured = C_LFGList.IsPlayerAuthenticatedForLFG(categoryID);
+ self.Comment.EditBox:ClearFocus();
+ if (categoryInfo.autoChooseActivity) then
+ -- For auto-choose activity categories, we're going to check everything, so only show the comment.
+ self.BarLeft:Hide();
+ self.BarMiddle:Hide();
+ self.BarRight:Hide();
+ self.ScrollBox:Hide();
+ self.commentRequired = true;
+ self.Comment:ClearAllPoints();
+ self.Comment:SetPoint("CENTER", 0, 20);
+ self.Comment:SetHeight(110);
+ self.Comment.EditBox.Instructions:SetText(isAccountSecured and DESCRIPTION_OF_YOUR_GROUP_MANDATORY or LFG_AUTHENTICATOR_DESCRIPTION_BOX);
+ self.Comment.EditBox:SetEnabled(isAccountSecured);
+ if (IN_SET_CATEGORY_SELECTION) then -- If this is being invoked because the user is choosing a category, auto-select the comment box.
+ self.Comment.EditBox:SetFocus();
+ end
+ else
+ self.BarLeft:Show();
+ self.BarMiddle:Show();
+ self.BarRight:Show();
+ self.ScrollBox:Show();
+ self.commentRequired = false;
+ self.Comment:ClearAllPoints();
+ self.Comment:SetPoint("BOTTOM", 0, 19);
+ self.Comment:SetHeight(47);
+ self.Comment.EditBox.Instructions:SetText(isAccountSecured and DESCRIPTION_OF_YOUR_GROUP or LFG_AUTHENTICATOR_DESCRIPTION_BOX);
+ self.Comment.EditBox:SetEnabled(isAccountSecured);
+ end
+
+ LFGListingActivityView_UpdateActivities(self);
+end
+
+function LFGListingActivityView_ActivityFiltersChanged(self)
+ LFGListingActivityView_UpdateActivities(self);
+end
+
+function LFGListingActivityView_UpdateActivities(self)
+ local function ActivitySortComparator(lhsNode, rhsNode)
+ local lhs = lhsNode:GetData();
+ local rhs = rhsNode:GetData();
+
+ if (lhs.orderIndex ~= rhs.orderIndex) then
+ return lhs.orderIndex > rhs.orderIndex;
+ elseif (lhs.maxLevel ~= rhs.maxLevel) then
+ if (lhs.maxLevel == 0 or rhs.maxLevel == 0) then
+ return lhs.maxLevel == 0;
+ end
+ return lhs.maxLevel > rhs.maxLevel;
+ elseif (lhs.minLevel ~= rhs.minLevel) then
+ return lhs.minLevel > rhs.minLevel;
+ else
+ return strcmputf8i(lhs.name, rhs.name) < 0;
+ end
+ end
+ local function ActivityGroupSortComparator(lhsNode, rhsNode)
+ local lhs = lhsNode:GetData();
+ local rhs = rhsNode:GetData();
+
+ if (lhs.buttonType ~= rhs.buttonType) then return lhs.buttonType > rhs.buttonType; -- If we have any free-floating activities, put them above any activity groups.
+ elseif (lhs.orderIndex ~= rhs.orderIndex) then return lhs.orderIndex < rhs.orderIndex;
+ elseif (lhs.buttonType == LFGLISTING_BUTTONTYPE_ACTIVITY) then return ActivitySortComparator(lhsNode, rhsNode);
+ else return strcmputf8i(lhs.name, rhs.name) < 0;
+ end
+ end
+
+ local categoryID = LFGListingFrame:GetCategorySelection();
+ local dataProvider = CreateTreeDataProvider();
+
+ -- Handle any activities without a group first.
+ do
+ local activities = LFGUtil_GetFilteredActivities(categoryID, 0);
+
+ for _, activityID in ipairs(activities) do
+ local activityInfo = C_LFGList.GetActivityInfoTable(activityID);
+ local name = LFGUtil_GetActivityInfoName(activityInfo);
+ dataProvider:Insert({
+ buttonType = LFGLISTING_BUTTONTYPE_ACTIVITY,
+ activityID = activityID,
+ name = name,
+ minLevel = activityInfo.minLevelSuggestion,
+ maxLevel = activityInfo.maxLevelSuggestion,
+ orderIndex = activityInfo.orderIndex,
+ });
+ end
+ end
+
+ local playerLevel = UnitLevel("player");
+ -- Now loop over groups and handle each of them.
+ local activityGroups = C_LFGList.GetAvailableActivityGroups(categoryID);
+ local isMultiActivityGroup = #activityGroups > 1;
+ for _, activityGroupID in ipairs(activityGroups) do
+ local activities = LFGUtil_GetFilteredActivities(categoryID, activityGroupID);
+ if (#activities > 0) then
+ local groupName, groupOrderIndex = C_LFGList.GetActivityGroupInfo(activityGroupID);
+ local groupTree = dataProvider:Insert({
+ buttonType = LFGLISTING_BUTTONTYPE_ACTIVITYGROUP,
+ activityGroupID = activityGroupID,
+ name = groupName,
+ orderIndex = groupOrderIndex,
+ showExpandCollapseButton = isMultiActivityGroup,
+ });
+
+ local hasSuggestedActivity = false;
+ for _, activityID in ipairs(activities) do
+ local activityInfo = C_LFGList.GetActivityInfoTable(activityID);
+ local name = LFGUtil_GetActivityInfoName(activityInfo);
+
+ groupTree:Insert({
+ buttonType = LFGLISTING_BUTTONTYPE_ACTIVITY,
+ activityID = activityID,
+ name = name,
+ minLevel = activityInfo.minLevelSuggestion,
+ maxLevel = activityInfo.maxLevelSuggestion,
+ orderIndex = activityInfo.orderIndex
+ });
+
+ if (playerLevel and not hasSuggestedActivity) then
+ hasSuggestedActivity = activityInfo.minLevelSuggestion <= playerLevel and playerLevel <= activityInfo.maxLevelSuggestion;
+ end
+ end
+ if (playerLevel and not hasSuggestedActivity and isMultiActivityGroup) then
+ groupTree:SetCollapsed(true);
+ end
+ groupTree:SetSortComparator(ActivitySortComparator);
+ end
+ end
+
+ dataProvider:SetSortComparator(ActivityGroupSortComparator);
+
+ self.ScrollBox:SetDataProvider(dataProvider);
+end
+
+function LFGListingActivityView_InitActivityGroupButton(button, elementData, isCollapsed)
+ -- Controls
+ button.ExpandOrCollapseButton:SetShown(elementData.showExpandCollapseButton);
+ if (elementData.showExpandCollapseButton) then
+ button.CheckButton:SetPoint("LEFT", button.ExpandOrCollapseButton, "RIGHT", 4, 0);
+ else
+ button.CheckButton:SetPoint("LEFT", button.ExpandOrCollapseButton, "LEFT", 4, 0);
+ end
+
+ if (isCollapsed) then
+ button.ExpandOrCollapseButton:SetNormalTexture("Interface\\Buttons\\UI-PlusButton-Up");
+ else
+ button.ExpandOrCollapseButton:SetNormalTexture("Interface\\Buttons\\UI-MinusButton-Up");
+ end
+
+ local allActivitiesSelected = LFGListingFrame:AreAllActivitiesForActivityGroupSelected(elementData.activityGroupID);
+ local anyActivitySelected = LFGListingFrame:IsAnyActivityForActivityGroupSelected(elementData.activityGroupID);
+ if (allActivitiesSelected) then
+ button.CheckButton:SetChecked(true);
+ button.CheckButton:SetCheckedTexture("Interface\\Buttons\\UI-CheckBox-Check");
+ button.CheckButton:SetDisabledCheckedTexture("Interface\\Buttons\\UI-CheckBox-Check-Disabled");
+ elseif (anyActivitySelected) then
+ button.CheckButton:SetChecked(true);
+ button.CheckButton:SetCheckedTexture("Interface\\Buttons\\UI-MultiCheck-Up");
+ button.CheckButton:SetDisabledCheckedTexture("Interface\\Buttons\\UI-MultiCheck-Disabled");
+ else
+ button.CheckButton:SetChecked(false);
+ button.CheckButton:SetCheckedTexture("Interface\\Buttons\\UI-CheckBox-Check");
+ button.CheckButton:SetDisabledCheckedTexture("Interface\\Buttons\\UI-CheckBox-Check-Disabled");
+ end
+
+ -- Name
+ button.NameButton.Name:SetWidth(0);
+ button.NameButton.Name:SetText(elementData.name);
+ button.NameButton.Name:SetFontObject(LFGActivityHeader);
+ button.NameButton:SetWidth(button.NameButton.Name:GetWidth());
+
+ -- Instance Lock Warning
+ button.InstanceLockWarningIcon:Hide();
+
+ -- Level
+ button.Level:Hide();
+end
+
+function LFGListingActivityView_InitActivityButton(button, elementData)
+ -- Controls
+ button.ExpandOrCollapseButton:Hide();
+ button.CheckButton:SetPoint("LEFT", button.ExpandOrCollapseButton, "RIGHT", 4, 0);
+
+ button.CheckButton:SetChecked(LFGListingFrame:IsActivitySelected(elementData.activityID));
+ button.CheckButton:SetCheckedTexture("Interface\\Buttons\\UI-CheckBox-Check");
+ button.CheckButton:SetDisabledCheckedTexture("Interface\\Buttons\\UI-CheckBox-Check-Disabled");
+
+ -- Name
+ button.NameButton.Name:SetWidth(0);
+ button.NameButton.Name:SetText(elementData.name);
+ local playerLevel = UnitLevel("player");
+ local fontObject = LFGActivityEntry;
+ if (elementData.maxLevel ~= 0 and elementData.maxLevel < playerLevel) then
+ fontObject = LFGActivityEntryTrivial;
+ elseif (elementData.minLevel ~= 0 and elementData.minLevel > playerLevel) then
+ fontObject = LFGActivityEntryDifficult;
+ end
+ button.NameButton.Name:SetFontObject(fontObject);
+ button.Level:SetFontObject(fontObject);
+ button.NameButton:SetWidth(button.NameButton.Name:GetWidth());
+
+ -- Instance Lock Warning
+ button.InstanceLockWarningIcon:Hide();
+ local activityInfo = C_LFGList.GetActivityInfoTable(elementData.activityID);
+ local savedInstances = LFGListingFrame:GetSavedInstances();
+ if (activityInfo and savedInstances) then
+ for i, instance in pairs(savedInstances) do
+ if (activityInfo.mapID and activityInfo.difficultyID and (activityInfo.mapID == instance.mapID)) then
+ local isSameInstanceDifficulty = activityInfo.difficultyID == instance.difficultyID;
+ local isInstanceLockShared = instance.redirectedDifficultyID == activityInfo.redirectedDifficultyID;
+ local isInstanceInProgressOrCompleted = (instance.encountersCompleted > 0) and (instance.encountersTotal > 0);
+
+ if (isInstanceInProgressOrCompleted and (isSameInstanceDifficulty or isInstanceLockShared)) then
+ button.InstanceLockWarningIcon.encountersCompleted = instance.encountersCompleted;
+ button.InstanceLockWarningIcon.encountersTotal = instance.encountersTotal;
+ button.InstanceLockWarningIcon:Show();
+ end
+ end
+ end
+ end
+
+ -- Level
+ button.Level:Show();
+ if ( elementData.minLevel == elementData.maxLevel or elementData.maxLevel == 0 ) then
+ if (elementData.minLevel == 0) then
+ button.Level:SetText("");
+ else
+ button.Level:SetText(format(LFD_LEVEL_FORMAT_SINGLE, elementData.minLevel));
+ end
+ else
+ button.Level:SetText(format(LFD_LEVEL_FORMAT_RANGE, elementData.minLevel, elementData.maxLevel));
+ end
+end
+
+function LFGListingActivityView_CanPostWithCurrentComment(self)
+ if (self.commentRequired) then
+ local commentText = LFGListingComment_GetComment(self.Comment);
+ return commentText and commentText ~= "";
+ end
+
+ return true;
+end
+
+-------------------------------------------------------
+----------Comment
+-------------------------------------------------------
+function LFGListingComment_OnTextChanged(self, userInput)
+ if (userInput) then
+ LFGListingFrame:SetDirty(true);
+ end
+end
+
+function LFGListingComment_OnMouseDown(self, button)
+ if (not self.EditBox:IsEnabled() and not C_LFGList.IsPlayerAuthenticatedForLFG(LFGListingFrame:GetCategorySelection())) then
+ StaticPopup_Show("GROUP_FINDER_AUTHENTICATOR_POPUP");
+ end
+end
+
+function LFGListingComment_GetComment(self)
+ return self.EditBox:GetText();
+end
+
+-------------------------------------------------------
+----------Locked View
+-------------------------------------------------------
+function LFGListingLockedView_OnLoad(self)
+ self:RegisterEvent("LFG_LIST_ACTIVE_ENTRY_UPDATE");
+ self.framePool = CreateFramePool("Button", self, "LFGListingLockedViewActivityTemplate")
+ self.maxActivityLines = 13; -- Max number of activity lines to show.
+ LFGListingLockedView_RefreshContent(self);
+end
+
+function LFGListingLockedView_OnEvent(self, event)
+ if (event == "LFG_LIST_ACTIVE_ENTRY_UPDATE") then
+ LFGListingLockedView_RefreshContent(self);
+ end
+end
+
+function LFGListingLockedView_RefreshContent(self)
+ self.framePool:ReleaseAll();
+
+ if (not C_LFGList.HasActiveEntryInfo()) then
+ self.ErrorText:SetText(LFG_LIST_ONLY_LEADER_CREATE);
+ self.ActivityText:Hide();
+ else
+ self.ErrorText:SetText(LFG_LIST_ONLY_LEADER_UPDATE);
+ self.ActivityText:Show();
+
+ local activeEntryInfo = C_LFGList.GetActiveEntryInfo();
+ local organizedActivities = LFGUtil_OrganizeActivitiesByActivityGroup(activeEntryInfo.activityIDs);
+ local activityGroupIDs = GetKeysArray(organizedActivities);
+ LFGUtil_SortActivityGroupIDs(activityGroupIDs);
+ local numVerboseLines = 0; -- Predicted number of lines if we use verbose mode...
+ for _, activityGroupID in ipairs(activityGroupIDs) do
+ if (activityGroupID ~= 0) then
+ numVerboseLines = numVerboseLines + 1;
+ end
+ numVerboseLines = numVerboseLines + #organizedActivities[activityGroupID];
+ end
+ local verboseMode = numVerboseLines <= self.maxActivityLines;
+
+ local lastFrame = nil;
+ for _, activityGroupID in ipairs(activityGroupIDs) do
+ local activityIDs = organizedActivities[activityGroupID];
+ if (activityGroupID == 0) then -- Free-floating activities (no group)
+ for _, activityID in ipairs(activityIDs) do
+ local activityInfo = C_LFGList.GetActivityInfoTable(activityID);
+ local frame = LFGListingLockedView_SafeAcquireFrame(self);
+ if (not frame) then
+ return;
+ end
+
+ LFGListingLockedView_SetLineContent(self, frame, LFGUtil_GetActivityInfoName(activityInfo), nil);
+
+ if (lastFrame) then
+ frame:SetPoint("TOPLEFT", lastFrame, "BOTTOMLEFT", 0, -2);
+ else
+ frame:SetPoint("TOPLEFT", self.ActivityText, "BOTTOMLEFT", 12, -6)
+ end
+ lastFrame = frame;
+ end
+ else -- Grouped activities
+ if (verboseMode) then
+ do
+ local activityGroupName = C_LFGList.GetActivityGroupInfo(activityGroupID);
+ local frame = LFGListingLockedView_SafeAcquireFrame(self);
+ if (not frame) then
+ return;
+ end
+
+ local lineText = activityGroupName.." "..HIGHLIGHT_FONT_COLOR:WrapTextInColorCode("("..string.format(LFGBROWSE_ACTIVITY_COUNT, #activityIDs)..")");
+ LFGListingLockedView_SetLineContent(self, frame, lineText, nil);
+
+ if (lastFrame) then
+ frame:SetPoint("TOPLEFT", lastFrame, "BOTTOMLEFT", 0, -2);
+ else
+ frame:SetPoint("TOPLEFT", self.ActivityText, "BOTTOMLEFT", 12, -6)
+ end
+ lastFrame = frame;
+ end
+ for _, activityID in ipairs(activityIDs) do
+ local activityInfo = C_LFGList.GetActivityInfoTable(activityID);
+ local frame = LFGListingLockedView_SafeAcquireFrame(self);
+ if (not frame) then
+ return;
+ end
+
+ local lineText = string.format(LFG_LIST_INDENT, LFGUtil_GetActivityInfoName(activityInfo));
+ LFGListingLockedView_SetLineContent(self, frame, lineText, nil);
+
+ if (lastFrame) then
+ frame:SetPoint("TOPLEFT", lastFrame, "BOTTOMLEFT", 0, -2);
+ else
+ frame:SetPoint("TOPLEFT", self.ActivityText, "BOTTOMLEFT", 12, -6)
+ end
+ lastFrame = frame;
+ end
+ else
+ local activityGroupName = C_LFGList.GetActivityGroupInfo(activityGroupID);
+ local frame = LFGListingLockedView_SafeAcquireFrame(self);
+ if (not frame) then
+ return;
+ end
+
+ local lineText = activityGroupName.." "..HIGHLIGHT_FONT_COLOR:WrapTextInColorCode("("..string.format(LFGBROWSE_ACTIVITY_COUNT, #activityIDs)..")");
+ local tooltip = activityGroupName;
+ for _, activityID in ipairs(activityIDs) do
+ local activityInfo = C_LFGList.GetActivityInfoTable(activityID);
+ tooltip = tooltip.."\n"..string.format(LFG_LIST_INDENT, LFGUtil_GetActivityInfoName(activityInfo));
+ end
+ LFGListingLockedView_SetLineContent(self, frame, lineText, tooltip);
+
+ if (lastFrame) then
+ frame:SetPoint("TOPLEFT", lastFrame, "BOTTOMLEFT", 0, -2);
+ else
+ frame:SetPoint("TOPLEFT", self.ActivityText, "BOTTOMLEFT", 12, -6)
+ end
+ lastFrame = frame;
+ end
+ end
+ end
+ end
+end
+
+function LFGListingLockedView_SafeAcquireFrame(self)
+ if (self.framePool:GetNumActive() >= self.maxActivityLines) then
+ return nil;
+ else
+ return self.framePool:Acquire();
+ end
+end
+
+function LFGListingLockedView_SetLineContent(self, frame, text, tooltip)
+ frame.Text:SetSize(0, 0);
+ frame.Text:SetText(text);
+ frame.tooltip = tooltip;
+ frame:SetSize(frame.Text:GetWidth(), frame.Text:GetHeight());
+ frame:Show();
+end
+
+-------------------------------------------------------
+----------Util
+-------------------------------------------------------
+function LFGListingUtil_CanEditListing()
+ return not IsInGroup(LE_PARTY_CATEGORY_HOME) or UnitIsGroupLeader("player", LE_PARTY_CATEGORY_HOME);
+end
diff --git a/Interface/AddOns/Blizzard_GroupFinder_VanillaStyle/Blizzard_LFGVanilla_Listing.xml b/Interface/AddOns/Blizzard_GroupFinder_VanillaStyle/Blizzard_LFGVanilla_Listing.xml
new file mode 100644
index 0000000000..807e80a175
--- /dev/null
+++ b/Interface/AddOns/Blizzard_GroupFinder_VanillaStyle/Blizzard_LFGVanilla_Listing.xml
@@ -0,0 +1,629 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ GameTooltip:SetOwner(self, "ANCHOR_RIGHT");
+ GameTooltip:SetText(_G["ROLE_DESCRIPTION_"..self.roleID], nil, nil, nil, nil, 1);
+
+ local recommendedTank, recommendedHealer, recommendedDPS = UnitGetAvailableRoles("player");
+ if ((self.roleID == "TANK" and not recommendedTank) or (self.roleID == "HEALER" and not recommendedHealer) or (self.roleID == "DAMAGER" and not recommendedDPS)) then
+ GameTooltip:AddLine(CLASS_ROLE_NOT_RECOMMENDED, RED_FONT_COLOR.r, RED_FONT_COLOR.g, RED_FONT_COLOR.b, true);
+ end
+
+ GameTooltip:Show();
+
+
+ GameTooltip:Hide();
+
+
+
+
+
+
+
+
+
+
+
+
+
+ if ( self:GetChecked() ) then
+ PlaySound(SOUNDKIT.IG_MAINMENU_OPTION_CHECKBOX_ON);
+ else
+ PlaySound(SOUNDKIT.IG_MAINMENU_OPTION_CHECKBOX_OFF);
+ end
+ if ( self.onClick ) then
+ self.onClick(self, button);
+ end
+ if (not LFGListingFrame:SaveSoloRoles()) then
+ -- If SaveSoloRoles return false, the update failed. Revert the checkbox to its previous state.
+ self:SetChecked(not self:GetChecked());
+ end
+
+
+
+
+
+
+
+
+
+
+
+
+ local recommendedTank, recommendedHealer, recommendedDPS = UnitGetAvailableRoles("player");
+ if ((self.roleID == "TANK" and not recommendedTank) or (self.roleID == "HEALER" and not recommendedHealer) or (self.roleID == "DAMAGER" and not recommendedDPS)) then
+ self.cover:Show();
+ else
+ self.cover:Hide();
+ end
+
+
+ if ( self.CheckButton:IsEnabled() ) then
+ self.CheckButton:LockHighlight();
+ end
+
+
+ if ( self.CheckButton:IsEnabled() ) then
+ self.CheckButton:Click();
+ end
+
+
+ self.CheckButton:UnlockHighlight();
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ self:GetParent().CheckButton:LockHighlight();
+
+
+ self:GetParent().CheckButton:UnlockHighlight();
+
+
+ self:GetParent().CheckButton:Click();
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ GameTooltip:SetOwner(self, "ANCHOR_RIGHT");
+ GameTooltip:AddLine(string.format(BOSSES_KILLED, self.encountersCompleted, self.encountersTotal), 1, 0.1, 0.1);
+ GameTooltip:Show();
+
+
+ GameTooltip:Hide();
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ if (self.tooltip) then
+ GameTooltip:SetOwner(self, "ANCHOR_RIGHT");
+ GameTooltip:SetText(self.tooltip);
+ end
+
+
+ GameTooltip:Hide();
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ if ( self.errorText ) then
+ GameTooltip:SetOwner(self, "ANCHOR_RIGHT");
+ GameTooltip:SetText(self.errorText, nil, nil, nil, nil, true);
+ GameTooltip:Show();
+ end
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ self.roleID = "TANK";
+ self:GetNormalTexture():SetTexCoord(GetTexCoordsForRole("TANK"));
+ self.Background:SetTexCoord(GetBackgroundTexCoordsForRole("TANK"));
+ self.Background:SetAlpha(0.6);
+
+
+
+
+
+
+
+
+
+ self.roleID = "HEALER";
+ self:GetNormalTexture():SetTexCoord(GetTexCoordsForRole("HEALER"));
+ self.Background:SetTexCoord(GetBackgroundTexCoordsForRole("HEALER"));
+ self.Background:SetAlpha(0.4);
+
+
+
+
+
+
+
+
+
+ self.roleID = "DAMAGER";
+ self:GetNormalTexture():SetTexCoord(GetTexCoordsForRole("DAMAGER"));
+ self.Background:SetTexCoord(GetBackgroundTexCoordsForRole("DAMAGER"));
+ self.Background:SetAlpha(0.6);
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ self.Background:SetAlpha(0.6);
+ LFGListingRoleIcon_UpdateRoleTexture(self);
+
+
+
+
+
+
+
+
+
+
+
+
+
+ if (not self:IsEnabled()) then
+ GameTooltip:SetOwner(self, "ANCHOR_RIGHT");
+ GameTooltip:SetText(ERR_LFG_ROLE_CHECK_ONLY_LEADER, nil, nil, nil, nil, 1);
+ GameTooltip:Show();
+ end
+
+
+ GameTooltip:Hide();
+
+
+
+
+
+
+
+
+
+ UIDropDownMenu_SetWidth(self, 102);
+ UIDropDownMenu_Initialize(self, LFGListingRoleDropDown_Initialize);
+ UIDropDownMenu_SetAnchor(self, -15, 10, "TOPRIGHT", self, "BOTTOMRIGHT");
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ self:GetNormalTexture():SetTexCoord(GetTexCoordsForRole("GUIDE"));
+
+
+ if ( self.CheckButton:IsEnabled() ) then
+ self.CheckButton:LockHighlight();
+ end
+
+ GameTooltip:SetOwner(self, "ANCHOR_RIGHT");
+ GameTooltip:SetText(LFG_LIST_NEW_PLAYER_FRIENDLY_TOOLTIP, nil, nil, nil, nil, 1);
+ GameTooltip:Show();
+
+
+ if ( self.CheckButton:IsEnabled() ) then
+ self.CheckButton:Click();
+ end
+
+
+ self.CheckButton:UnlockHighlight();
+ GameTooltip:Hide();
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ StoreSecureReference("LFGListingComment", self.EditBox);
+ self.EditBox:SetSecurityDisableSetText();
+ self.EditBox:SetSecurityDisablePaste();
+ UIPanelInputScrollFrame_OnLoad(self);
+
+ self.EditBox:SetScript("OnTextChanged", function(self, userInput)
+ LFGListingComment_OnTextChanged(self:GetParent(), userInput);
+ InputScrollFrame_OnTextChanged(self, userInput);
+ end);
+ self.EditBox:SetScript("OnMouseDown", function(self, button)
+ LFGListingComment_OnMouseDown(self:GetParent(), button);
+ end);
+ self.EditBox:SetScript("OnEscapePressed", function(self) self:ClearFocus(); end);
+
+
+ LFGListingComment_OnMouseDown(self, button);
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/Interface/AddOns/Blizzard_GroupFinder_VanillaStyle/Blizzard_LFGVanilla_Minimap.lua b/Interface/AddOns/Blizzard_GroupFinder_VanillaStyle/Blizzard_LFGVanilla_Minimap.lua
new file mode 100644
index 0000000000..b1c8ebb2f2
--- /dev/null
+++ b/Interface/AddOns/Blizzard_GroupFinder_VanillaStyle/Blizzard_LFGVanilla_Minimap.lua
@@ -0,0 +1,152 @@
+-------------------------------------------------------
+----------Constants
+-------------------------------------------------------
+local MAX_VERBOSE_LFG_ACTIVITIES_MINIMAP_TOOLTIP = 20;
+
+-------------------------------------------------------
+----------LFGEyeTemplateMixin
+-------------------------------------------------------
+LFGEyeTemplateMixin = {};
+
+function LFGEyeTemplateMixin:OnLoad()
+ self:StopAnimating();
+end
+
+function LFGEyeTemplateMixin:OnUpdate(elapsed)
+ local textureInfo = LFG_EYE_TEXTURES[self.queueType or "default"];
+ AnimateTexCoords(self.Texture, textureInfo.width, textureInfo.height, textureInfo.iconSize, textureInfo.iconSize, textureInfo.frames, elapsed, textureInfo.delay)
+end
+
+function LFGEyeTemplateMixin:StartAnimating()
+ self:SetScript("OnUpdate", self.OnUpdate);
+end
+
+function LFGEyeTemplateMixin:StopAnimating()
+ self:SetScript("OnUpdate", nil);
+ if ( self.Texture.frame ) then
+ self.Texture.frame = 1; --To start the animation over.
+ end
+ local textureInfo = LFG_EYE_TEXTURES[self.queueType or "default"];
+ self.Texture:SetTexCoord(0, textureInfo.iconSize / textureInfo.width, 0, textureInfo.iconSize / textureInfo.height);
+end
+
+-------------------------------------------------------
+----------LFGMinimapMixin
+-------------------------------------------------------
+LFGMinimapMixin = {};
+
+function LFGMinimapMixin:OnLoad()
+ self:RegisterEvent("LFG_LIST_ACTIVE_ENTRY_UPDATE");
+ self:RegisterEvent("PLAYER_ENTERING_WORLD");
+ self:RegisterUnitEvent("UNIT_LEVEL", "player");
+ self:RegisterEvent("UPDATE_BINDINGS");
+ self:RegisterForClicks("LeftButtonUp", "RightButtonUp");
+ self:SetFrameLevel(self:GetFrameLevel()+1)
+
+ self:UpdateTooltipText();
+ self:UpdateVisibility();
+end
+
+function LFGMinimapMixin:UpdateVisibility()
+ local canUse, failureReason = C_LFGInfo.CanPlayerUsePremadeGroup();
+ self:SetShown(canUse);
+end
+
+function LFGMinimapMixin:UpdateTooltipText()
+ self.tooltipText = MicroButtonTooltipText(LFG_BUTTON, "TOGGLEGROUPFINDER");
+ self.newbieText = NEWBIE_TOOLTIP_LFGPARENT;
+end
+
+function LFGMinimapMixin:OnEvent(event)
+ if ( event == "LFG_LIST_ACTIVE_ENTRY_UPDATE" ) then
+ if ( C_LFGList.HasActiveEntryInfo() ) then
+ self.eye:StartAnimating();
+ else
+ self.eye:StopAnimating();
+ end
+ elseif ( event == "PLAYER_ENTERING_WORLD" ) then
+ self:UpdateVisibility();
+ elseif ( event == "UNIT_LEVEL" ) then
+ self:UpdateVisibility();
+ elseif ( event == "UPDATE_BINDINGS" ) then
+ self:UpdateTooltipText();
+ end
+end
+
+function LFGMinimapMixin:OnClick(button)
+ local hasEditableListing = C_LFGList.HasActiveEntryInfo() and LFGListingUtil_CanEditListing();
+ if ( button == "LeftButton" or not hasEditableListing ) then
+ ToggleLFGParentFrame();
+ elseif ( button == "RightButton" ) then
+ MenuUtil.CreateContextMenu(self, function(owner, rootDescription)
+ local editButton = rootDescription:CreateButton(LFG_LIST_EDIT, function()
+ ShowLFGParentFrame(1);
+ end);
+ editButton:SetEnabled(hasEditableListing);
+
+
+ local unlistButton = rootDescription:CreateButton(LFG_LIST_UNLIST, function()
+ C_LFGList.RemoveListing();
+ end);
+ unlistButton:SetEnabled(hasEditableListing);
+ end);
+ end
+end
+
+function LFGMinimapMixin:OnEnter()
+ GameTooltip:SetOwner(self, "ANCHOR_BOTTOMLEFT");
+ local activeEntryInfo = C_LFGList.GetActiveEntryInfo();
+
+ if (activeEntryInfo) then
+ local numActivities = #activeEntryInfo.activityIDs;
+ if (numActivities > 0) then
+ local verbose = numActivities <= MAX_VERBOSE_LFG_ACTIVITIES_MINIMAP_TOOLTIP;
+ GameTooltip:SetText(LFG_LIST_MY_ACTIVITY_LIST_HEADER, HIGHLIGHT_FONT_COLOR.r, HIGHLIGHT_FONT_COLOR.g, HIGHLIGHT_FONT_COLOR.b);
+
+ local organizedActivities = LFGUtil_OrganizeActivitiesByActivityGroup(activeEntryInfo.activityIDs);
+ local activityGroupIDs = GetKeysArray(organizedActivities);
+ LFGUtil_SortActivityGroupIDs(activityGroupIDs);
+ for _, activityGroupID in ipairs(activityGroupIDs) do
+ local activityIDs = organizedActivities[activityGroupID];
+ if (activityGroupID == 0) then -- Free-floating activities (no group)
+ for _, activityID in ipairs(activityIDs) do
+ local activityInfo = C_LFGList.GetActivityInfoTable(activityID);
+ local activityName = LFGUtil_GetActivityInfoName(activityInfo);
+ if (activityInfo and activityName ~= "") then
+ GameTooltip:AddLine(activityName);
+ end
+ end
+ else -- Grouped activities
+ local activityGroupName = C_LFGList.GetActivityGroupInfo(activityGroupID);
+ if (verbose) then
+ GameTooltip:AddLine(activityGroupName, NORMAL_FONT_COLOR.r, NORMAL_FONT_COLOR.g, NORMAL_FONT_COLOR.b);
+ for _, activityID in ipairs(activityIDs) do
+ local activityInfo = C_LFGList.GetActivityInfoTable(activityID);
+ local activityName = LFGUtil_GetActivityInfoName(activityInfo);
+ if (activityInfo and activityName ~= "") then
+ GameTooltip:AddLine(string.format(LFG_LIST_INDENT, activityName));
+ end
+ end
+ else
+ GameTooltip:AddLine(activityGroupName.." ("..string.format(LFGBROWSE_ACTIVITY_COUNT, #activityIDs)..")", NORMAL_FONT_COLOR.r, NORMAL_FONT_COLOR.g, NORMAL_FONT_COLOR.b);
+ end
+ end
+ end
+
+ if (activeEntryInfo.comment and activeEntryInfo.comment ~= "") then
+ GameTooltip:AddLine(string.format(LFG_LIST_COMMENT_FORMAT, activeEntryInfo.comment), DISABLED_FONT_COLOR.r, DISABLED_FONT_COLOR.g, DISABLED_FONT_COLOR.b);
+ end
+
+ GameTooltip:Show();
+ else
+ GameTooltip:Hide();
+ end
+ else
+ -- No Active Entry; show standard button tooltip.
+ GameTooltip_AddNewbieTip(self, self.tooltipText, 1.0, 1.0, 1.0, self.newbieText);
+ end
+end
+
+function LFGMinimapMixin:OnLeave()
+ GameTooltip:Hide();
+end
\ No newline at end of file
diff --git a/Interface/AddOns/Blizzard_GroupFinder_VanillaStyle/Blizzard_LFGVanilla_Minimap.xml b/Interface/AddOns/Blizzard_GroupFinder_VanillaStyle/Blizzard_LFGVanilla_Minimap.xml
new file mode 100644
index 0000000000..83d1efc91d
--- /dev/null
+++ b/Interface/AddOns/Blizzard_GroupFinder_VanillaStyle/Blizzard_LFGVanilla_Minimap.xml
@@ -0,0 +1,47 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/Interface/AddOns/Blizzard_GroupFinder_VanillaStyle/Blizzard_LFGVanilla_ParentFrame.lua b/Interface/AddOns/Blizzard_GroupFinder_VanillaStyle/Blizzard_LFGVanilla_ParentFrame.lua
new file mode 100644
index 0000000000..ce7aa311b5
--- /dev/null
+++ b/Interface/AddOns/Blizzard_GroupFinder_VanillaStyle/Blizzard_LFGVanilla_ParentFrame.lua
@@ -0,0 +1,239 @@
+---------------------------------------------------
+----------Constants
+-------------------------------------------------------
+UIPanelWindows["LFGParentFrame"] = { area = "left", pushable = 7, xoffset = -16, yoffset = 12, bottomClampOverride = 140+12, width = 353, height = 424, whileDead = 1 };
+CVarCallbackRegistry:SetCVarCachable("disableSuggestedLevelActivityFilter");
+
+-------------------------------------------------------
+----------LFG Parent
+-------------------------------------------------------
+LFGParentFrameMixin = {};
+
+function LFGParentFrameMixin:OnLoad()
+ self:RegisterEvent("LFG_LIST_ACTIVE_ENTRY_UPDATE");
+ self:RegisterEvent("PLAYER_LEVEL_UP");
+ self:UpdateEyePortrait();
+
+ PanelTemplates_SetNumTabs(self, 2);
+ LFGParentFrame.selectedTab = 1;
+ PanelTemplates_UpdateTabs(self);
+end
+
+function LFGParentFrameMixin:OnEvent(event, ...)
+ if (event == "PLAYER_LEVEL_UP") then
+ C_LFGList.RequestAvailableActivities();
+ elseif (event == "LFG_LIST_ACTIVE_ENTRY_UPDATE") then
+ self:UpdateTabs();
+ self:UpdateEyePortrait();
+ end
+end
+
+function LFGParentFrameMixin:UpdateTabs()
+ if (C_LFGList.HasActiveEntryInfo()) then
+ self.Tab1:SetText(LFG_LIST_EDIT);
+ else
+ self.Tab1:SetText(LFG_LIST_TAB_1);
+ end
+ PanelTemplates_TabResize(self.Tab1, 0);
+end
+
+function LFGParentFrameMixin:UpdateEyePortrait()
+ if (C_LFGList.HasActiveEntryInfo()) then
+ LFGParentFramePortrait:StartAnimating();
+ else
+ LFGParentFramePortrait:StopAnimating();
+ end
+end
+
+function ShowLFGParentFrame(tab)
+ ShowUIPanel(LFGParentFrame);
+ -- Decide which subframe to show
+ local tabToShow = tab or LFGParentFrame.selectedTab;
+ if (tabToShow == 2) then
+ LFGParentFrameTab2_OnClick();
+ else -- Default to tab 1.
+ LFGParentFrameTab1_OnClick();
+ end
+
+ UpdateMicroButtons();
+end
+
+function ToggleLFGParentFrame(tab)
+ local hideLFGParent = false;
+
+ if ((C_LFGList.GetPremadeGroupFinderStyle() ~= Enum.PremadeGroupFinderStyle.Vanilla) or
+ (not C_LFGInfo.CanPlayerUsePremadeGroup()) or
+ (LFGParentFrame:IsShown() and tab == LFGParentFrame.selectedTab and LFGParentFrameTab1:IsShown()) or
+ (LFGParentFrame:IsShown() and not tab)
+ ) then
+ hideLFGParent = true;
+ end
+
+ if ( hideLFGParent ) then
+ HideUIPanel(LFGParentFrame);
+ UpdateMicroButtons();
+ else
+ ShowLFGParentFrame(tab);
+ end
+end
+
+function LFGParentFrameTab1_OnClick()
+ PanelTemplates_SetTab(LFGParentFrame, 1);
+ LFGListingFrame:Show();
+ LFGBrowseFrame:Hide();
+ PlaySound(SOUNDKIT.IG_CHARACTER_INFO_TAB);
+end
+
+function LFGParentFrameTab2_OnClick()
+ PanelTemplates_SetTab(LFGParentFrame, 2);
+ LFGListingFrame:Hide();
+ LFGBrowseFrame:Show();
+ PlaySound(SOUNDKIT.IG_CHARACTER_INFO_TAB);
+end
+
+function LFGParentFrame_SearchActiveEntry()
+ LFGBrowseFrame:SearchActiveEntry();
+ PanelTemplates_SetTab(LFGParentFrame, 2);
+ LFGListingFrame:Hide();
+ LFGBrowseFrame:Show();
+end
+
+-------------------------------------------------------
+----------Util
+-------------------------------------------------------
+function LFGUtil_SortActivityIDs(activityIDList)
+ local function SortCB(activityID1, activityID2)
+ local activityInfo1 = C_LFGList.GetActivityInfoTable(activityID1);
+ local activityInfo2 = C_LFGList.GetActivityInfoTable(activityID2);
+
+ if (activityInfo1.orderIndex ~= activityInfo2.orderIndex) then
+ return activityInfo1.orderIndex < activityInfo2.orderIndex;
+ end
+
+ local name1 = LFGUtil_GetActivityInfoName(activityInfo1);
+ local name2 = LFGUtil_GetActivityInfoName(activityInfo2);
+ if (name1 ~= name2) then
+ return strcmputf8i(name1, name2) < 0;
+ end
+
+ return activityID1 < activityID2;
+ end
+
+ table.sort(activityIDList, SortCB);
+end
+
+function LFGUtil_SortActivityGroupIDs(activityGroupIDList)
+ local function SortCB(activityGroupID1, activityGroupID2)
+ local name1, orderIndex1 = C_LFGList.GetActivityGroupInfo(activityGroupID1);
+ local name2, orderIndex2 = C_LFGList.GetActivityGroupInfo(activityGroupID2);
+
+ if (orderIndex1 and orderIndex2 and orderIndex1 ~= orderIndex2) then
+ return orderIndex1 < orderIndex2;
+ end
+
+ if (name1 and name2 and name1 ~= name2) then
+ return strcmputf8i(name1, name2) < 0;
+ end
+
+ return activityGroupID1 < activityGroupID2;
+ end
+
+ table.sort(activityGroupIDList, SortCB);
+end
+
+local ACTIVITY_ACTIVITYGROUP_CACHE = {};
+function LFGUtil_GetActivityGroupForActivity(activityID)
+ if (not ACTIVITY_ACTIVITYGROUP_CACHE[activityID]) then
+ local activityInfo = C_LFGList.GetActivityInfoTable(activityID);
+ if (activityInfo) then
+ ACTIVITY_ACTIVITYGROUP_CACHE[activityID] = activityInfo.groupFinderActivityGroupID;
+ end
+ end
+
+ return ACTIVITY_ACTIVITYGROUP_CACHE[activityID];
+end
+
+function LFGUtil_OrganizeActivitiesByActivityGroup(activities)
+ local organizedActivities = {};
+ for i, activityID in ipairs(activities) do
+ local activityInfo = C_LFGList.GetActivityInfoTable(activityID);
+ if (activityInfo) then
+ if (not organizedActivities[activityInfo.groupFinderActivityGroupID]) then
+ organizedActivities[activityInfo.groupFinderActivityGroupID] = {};
+ end
+ tinsert(organizedActivities[activityInfo.groupFinderActivityGroupID], activityID);
+ end
+ end
+
+ for activityGroupID, activityIDs in pairs(organizedActivities) do
+ LFGUtil_SortActivityIDs(activityIDs);
+ end
+
+ return organizedActivities;
+end
+
+function LFGUtil_GetFilteredActivities(categoryID, activityGroupID)
+ local activities = C_LFGList.GetAvailableActivities(categoryID, activityGroupID);
+
+ local activeEntryInfo = C_LFGList.GetActiveEntryInfo();
+
+ local disableSuggestedLevelActivityFilter = CVarCallbackRegistry:GetCVarValueBool("disableSuggestedLevelActivityFilter");
+ if (not disableSuggestedLevelActivityFilter) then
+ local playerLevel = UnitLevel("player");
+ for i=#activities, 1, -1 do
+ local activityID = activities[i];
+ -- Only filter out activities that are not part of the active entry.
+ if (not (activeEntryInfo and tContains(activeEntryInfo.activityIDs, activityID))) then
+ local activityInfo = C_LFGList.GetActivityInfoTable(activityID);
+ if ((activityInfo.minLevelSuggestion > 0 and activityInfo.minLevelSuggestion > playerLevel)
+ or (activityInfo.maxLevelSuggestion > 0 and activityInfo.maxLevelSuggestion < playerLevel)) then
+ tremove(activities, i);
+ end
+ end
+ end
+ end
+
+ return activities;
+end
+
+function LFGUtil_GetActivityInfoName(activityInfo)
+ -- For consistency, prefer the short name.
+ return activityInfo.shortName ~= "" and activityInfo.shortName or activityInfo.fullName;
+end
+
+-------------------------------------------------------
+----------Drop-Down QoL
+-------------------------------------------------------
+function LFGDropDown_OnEnter(self)
+ self.Button:LockHighlight();
+end
+
+function LFGDropDown_OnLeave(self)
+ self.Button:UnlockHighlight();
+end
+
+function LFGDropDown_OnClick(self)
+ ToggleDropDownMenu(nil, nil, self);
+ PlaySound(SOUNDKIT.IG_MAINMENU_OPTION_CHECKBOX_ON);
+end
+
+-------------------------------------------------------
+----------Options Button Template
+-------------------------------------------------------
+LFGOptionsButton = { };
+
+function LFGOptionsButton:OnEnter()
+ self.Icon:SetAlpha(1.0);
+end
+
+function LFGOptionsButton:OnLeave()
+ self.Icon:SetAlpha(0.8);
+end
+
+function LFGOptionsButton:OnMouseDown()
+ self.Icon:AdjustPointsOffset(1, -1);
+end
+
+function LFGOptionsButton:OnMouseUp()
+ self.Icon:AdjustPointsOffset(-1, 1);
+end
\ No newline at end of file
diff --git a/Interface/AddOns/Blizzard_GroupFinder_VanillaStyle/Blizzard_LFGVanilla_ParentFrame.xml b/Interface/AddOns/Blizzard_GroupFinder_VanillaStyle/Blizzard_LFGVanilla_ParentFrame.xml
new file mode 100644
index 0000000000..2b7b8be3e4
--- /dev/null
+++ b/Interface/AddOns/Blizzard_GroupFinder_VanillaStyle/Blizzard_LFGVanilla_ParentFrame.xml
@@ -0,0 +1,135 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ self.selectedTextY = 4;
+ LowerFrameLevel(self);
+ self:RegisterEvent("DISPLAY_SIZE_CHANGED");
+
+
+ PanelTemplates_TabResize(self, 0);
+
+
+ LFGParentFrameTab1_OnClick();
+
+
+ if (C_LFGList.HasActiveEntryInfo()) then
+ GameTooltip_AddNewbieTip(self, MicroButtonTooltipText(LFG_LIST_EDIT, "TOGGLELFGTAB"), 1.0, 1.0, 1.0, NEWBIE_TOOLTIP_LFG_LIST_EDIT, 1);
+ else
+ GameTooltip_AddNewbieTip(self, MicroButtonTooltipText(LFG_LIST_TAB_1, "TOGGLELFGTAB"), 1.0, 1.0, 1.0, NEWBIE_TOOLTIP_LFG_LIST_TAB_1, 1);
+ end
+
+
+ GameTooltip:Hide();
+
+
+
+
+
+
+
+
+
+
+ self.selectedTextY = 4;
+ LowerFrameLevel(self);
+ self:RegisterEvent("DISPLAY_SIZE_CHANGED");
+
+
+ PanelTemplates_TabResize(self, 0);
+
+
+ LFGParentFrameTab2_OnClick();
+
+
+ GameTooltip_AddNewbieTip(self, MicroButtonTooltipText(LFG_LIST_TAB_2, "TOGGLELFMTAB"), 1.0, 1.0, 1.0, NEWBIE_TOOLTIP_LFG_LIST_TAB_2, 1);
+
+
+ GameTooltip:Hide();
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ UpdateMicroButtons();
+ PlaySound(SOUNDKIT.IG_CHARACTER_INFO_OPEN);
+
+
+ UpdateMicroButtons();
+ PlaySound(SOUNDKIT.IG_CHARACTER_INFO_CLOSE);
+
+
+
+
+
diff --git a/Interface/AddOns/Blizzard_GuildControlUI/Blizzard_GuildControlUI.lua b/Interface/AddOns/Blizzard_GuildControlUI/Blizzard_GuildControlUI.lua
index 733b84334c..9069f7fa88 100644
--- a/Interface/AddOns/Blizzard_GuildControlUI/Blizzard_GuildControlUI.lua
+++ b/Interface/AddOns/Blizzard_GuildControlUI/Blizzard_GuildControlUI.lua
@@ -74,6 +74,9 @@ end
function GuildControlUI_OnEvent(self, event)
+ if(C_CVar.GetCVarBool("useClassicGuildUI")) then
+ return;
+ end
-- if the user clicks a checkbox while the results of a previous click still hasn't been
-- received back from the server, that checkbox will flicker unless we skip updates.
GuildControlUI.numSkipUpdates = GuildControlUI.numSkipUpdates - 1;
@@ -344,7 +347,6 @@ function GuildControlUI_RankOrder_Update(self)
rankFrame.deleteButton:Enable();
rankFrame.deleteButton.tooltip = nil;
if ( i == numRanks ) then
- GuildControlSetRank(i - 1);
local requiresAuthenticator = C_GuildInfo.GuildControlGetRankFlags(i - 1)[18];
if ( requiresAuthenticator ) then
rankFrame.deleteButton:Disable();
diff --git a/Interface/AddOns/Blizzard_HelpFrame/HelpFrame.lua b/Interface/AddOns/Blizzard_HelpFrame/HelpFrame.lua
index 2288b461c7..4bbbd5a0a4 100644
--- a/Interface/AddOns/Blizzard_HelpFrame/HelpFrame.lua
+++ b/Interface/AddOns/Blizzard_HelpFrame/HelpFrame.lua
@@ -129,15 +129,23 @@ end
--
function HelpOpenWebTicketButton_OnEnter(self, elapsed)
- if ( self.haveTicket ) then
- if ( self.haveResponse ) then
- GameTooltip:SetOwner(self, "ANCHOR_TOP");
- GameTooltip:SetText(GM_RESPONSE_ALERT, nil, nil, nil, nil, true);
+ if (self.haveTicket) then
+ GameTooltip:SetOwner(self, "ANCHOR_TOP");
+ if (self.overrideTitle or self.overrideDescription) then
+ if (self.overrideTitle) then
+ GameTooltip:AddLine(self.overrideTitle, HIGHLIGHT_FONT_COLOR.r, HIGHLIGHT_FONT_COLOR.g, HIGHLIGHT_FONT_COLOR.b, true);
+ end
+ if (self.overrideDescription) then
+ GameTooltip:AddLine(self.overrideDescription);
+ end
else
- GameTooltip:SetOwner(self, "ANCHOR_TOP");
- GameTooltip:AddLine(self.titleText, HIGHLIGHT_FONT_COLOR.r, HIGHLIGHT_FONT_COLOR.g, HIGHLIGHT_FONT_COLOR.b, true);
- if (self.statusText) then
- GameTooltip:AddLine(self.statusText);
+ if ( self.haveResponse ) then
+ GameTooltip:SetText(GM_RESPONSE_ALERT, nil, nil, nil, nil, true);
+ else
+ GameTooltip:AddLine(self.titleText, HIGHLIGHT_FONT_COLOR.r, HIGHLIGHT_FONT_COLOR.g, HIGHLIGHT_FONT_COLOR.b, true);
+ if (self.statusText) then
+ GameTooltip:AddLine(self.statusText);
+ end
end
end
GameTooltip:AddLine(" ");
@@ -159,10 +167,12 @@ end
function HelpOpenWebTicketButton_OnEvent(self, event, ...)
if ( event == "UPDATE_WEB_TICKET" ) then
- local hasTicket, numTickets, ticketStatus, caseIndex, waitTime, waitMsg = ...;
+ local hasTicket, numTickets, ticketStatus, caseIndex, waitTime, waitMsg, title, description = ...;
self.titleText = nil;
self.statusText = nil;
self.caseIndex = nil;
+ self.overrideTitle = title;
+ self.overrideDescription = description;
if (hasTicket) then
self.haveTicket = true;
self.haveResponse = false;
@@ -211,7 +221,7 @@ end
function TicketStatusFrame_OnEvent(self, event, ...)
if (event == "UPDATE_WEB_TICKET") then
- local hasTicket, numTickets, ticketStatus, caseIndex = ...;
+ local hasTicket, numTickets, ticketStatus, caseIndex, waitTime, waitMsg, title, description = ...;
self.haveWebSurvey = false;
if (hasTicket and ticketStatus ~= LE_TICKET_STATUS_OPEN) then
self.hasWebTicket = true;
diff --git a/Interface/AddOns/Blizzard_ItemSocketingUI/Blizzard_ItemSocketingUI.xml b/Interface/AddOns/Blizzard_ItemSocketingUI/Blizzard_ItemSocketingUI.xml
index 0738ba54ad..5190714d6c 100644
--- a/Interface/AddOns/Blizzard_ItemSocketingUI/Blizzard_ItemSocketingUI.xml
+++ b/Interface/AddOns/Blizzard_ItemSocketingUI/Blizzard_ItemSocketingUI.xml
@@ -143,7 +143,7 @@
- l
+
diff --git a/Interface/AddOns/Blizzard_MacroUI/Blizzard_MacroIconSelector.lua b/Interface/AddOns/Blizzard_MacroUI/Blizzard_MacroIconSelector.lua
index 420de666bc..9fb7ce8cfe 100644
--- a/Interface/AddOns/Blizzard_MacroUI/Blizzard_MacroIconSelector.lua
+++ b/Interface/AddOns/Blizzard_MacroUI/Blizzard_MacroIconSelector.lua
@@ -112,10 +112,10 @@ function MacroPopupFrameMixin:OkayButton_OnClick()
index = EditMacro(actualIndex, text, iconTexture) - macroFrame.macroBase;
end
- macroFrame:SelectMacro(index);
+ local scrollToSelected = true;
+ macroFrame:SelectMacro(index, scrollToSelected);
- local retainScrollPosition = true;
- macroFrame:Update(retainScrollPosition);
+ macroFrame:Update();
end
function MacroPopupFrameMixin:GetMacroFrame()
diff --git a/Interface/AddOns/Blizzard_MacroUI/Blizzard_MacroUI.lua b/Interface/AddOns/Blizzard_MacroUI/Blizzard_MacroUI.lua
index 038f1cff8a..7c48225ba0 100644
--- a/Interface/AddOns/Blizzard_MacroUI/Blizzard_MacroUI.lua
+++ b/Interface/AddOns/Blizzard_MacroUI/Blizzard_MacroUI.lua
@@ -70,7 +70,8 @@ function MacroFrameMixin:OnLoad()
local function MacroFrameMacroButtonSelectedCallback(selectionIndex)
MacroFrame:SaveMacro();
- MacroFrame:SelectMacro(selectionIndex);
+ local scrollToSelected = true;
+ MacroFrame:SelectMacro(selectionIndex, scrollToSelected);
MacroPopupFrame:Hide();
MacroFrameText:ClearFocus();
end
@@ -112,7 +113,7 @@ end
function MacroFrameMixin:OnEvent(event, ...)
if event == "UPDATE_MACROS" then
- self:Update(true);
+ self:Update();
self:SelectMacro(self.MacroSelector:GetSelectedIndex());
end
end
@@ -146,14 +147,16 @@ function MacroFrameMixin:SetAccountMacros()
self.macroBase = 0;
self.macroMax = MAX_ACCOUNT_MACROS;
self:Update();
- self:SelectMacro(1);
+ local scrollToSelected = true;
+ self:SelectMacro(1, scrollToSelected);
end
function MacroFrameMixin:SetCharacterMacros()
self.macroBase = MAX_ACCOUNT_MACROS;
self.macroMax = MAX_CHARACTER_MACROS;
self:Update();
- self:SelectMacro(1);
+ local scrollToSelected = true;
+ self:SelectMacro(1, scrollToSelected);
end
function MacroFrameMixin:Update()
@@ -242,8 +245,7 @@ function MacroFrameSaveButton_OnClick()
PlaySound(SOUNDKIT.IG_MAINMENU_OPTION_CHECKBOX_ON);
MacroFrame:SaveMacro();
- local retainScrollPosition = true;
- MacroFrame:Update(retainScrollPosition);
+ MacroFrame:Update();
MacroPopupFrame:Hide();
MacroFrameText:ClearFocus();
@@ -252,14 +254,13 @@ end
function MacroFrameCancelButton_OnClick()
PlaySound(SOUNDKIT.IG_MAINMENU_OPTION_CHECKBOX_ON);
- local retainScrollPosition = true;
- MacroFrame:Update(retainScrollPosition);
+ MacroFrame:Update();
MacroPopupFrame:Hide();
MacroFrameText:ClearFocus();
end
-function MacroFrameMixin:SelectMacro(index)
+function MacroFrameMixin:SelectMacro(index, scrollToSelected)
if index then
local macroCount = select(PanelTemplates_GetSelectedTab(self), GetNumMacros());
if macroCount < index then
@@ -267,7 +268,11 @@ function MacroFrameMixin:SelectMacro(index)
end
end
- self.MacroSelector:SetSelectedIndex(index);
+ self.MacroSelector:SetSelectedIndex(index or 1);
+
+ if scrollToSelected then
+ self.MacroSelector:ScrollToElementDataIndex(index or 1, ScrollBoxConstants.AlignNearest);
+ end
if index then
local actualIndex = self:GetMacroDataIndex(index);
@@ -293,10 +298,10 @@ function MacroFrameMixin:DeleteMacro()
local macroCount = select(PanelTemplates_GetSelectedTab(self), GetNumMacros());
local newMacroIndex = math.min(macroCount, selectedMacroIndex);
- self:SelectMacro(newMacroIndex > 0 and newMacroIndex or nil);
+ local scrollToSelected = true;
+ self:SelectMacro(newMacroIndex > 0 and newMacroIndex or nil, scrollToSelected);
- local retainScrollPosition = true;
- self:Update(retainScrollPosition);
+ self:Update();
MacroFrameText:ClearFocus();
end
diff --git a/Interface/AddOns/Blizzard_MacroUI/Blizzard_MacroUI.xml b/Interface/AddOns/Blizzard_MacroUI/Blizzard_MacroUI.xml
index 69920d454e..96cf270e4a 100644
--- a/Interface/AddOns/Blizzard_MacroUI/Blizzard_MacroUI.xml
+++ b/Interface/AddOns/Blizzard_MacroUI/Blizzard_MacroUI.xml
@@ -96,6 +96,7 @@
+
diff --git a/Interface/AddOns/Blizzard_MacroUI/Localization.lua b/Interface/AddOns/Blizzard_MacroUI/Localization.lua
index 2b1c7f592c..3cd6299cfd 100644
--- a/Interface/AddOns/Blizzard_MacroUI/Localization.lua
+++ b/Interface/AddOns/Blizzard_MacroUI/Localization.lua
@@ -39,9 +39,6 @@ local l10nTable = {
-- Adjust Macro Name Input Box's Texture Width
MacroPopupFrame.BorderBox.IconSelectorEditBox.IconSelectorPopupNameMiddle:SetWidth(190);
-
- -- Adjust MacroTab2 size
- PanelTemplates_TabResize(MacroFrameTab2, -15, nil, 130);
end,
},
};
diff --git a/Interface/AddOns/Blizzard_Menu/Blizzard_Menu_Classic.toc b/Interface/AddOns/Blizzard_Menu/Blizzard_Menu_Cata.toc
similarity index 87%
rename from Interface/AddOns/Blizzard_Menu/Blizzard_Menu_Classic.toc
rename to Interface/AddOns/Blizzard_Menu/Blizzard_Menu_Cata.toc
index 10ba9cb9d4..b2e8ac2356 100644
--- a/Interface/AddOns/Blizzard_Menu/Blizzard_Menu_Classic.toc
+++ b/Interface/AddOns/Blizzard_Menu/Blizzard_Menu_Cata.toc
@@ -4,11 +4,11 @@
## Dependencies: Blizzard_SharedXMLBase
## LoadFirst: 1
## AllowLoad: Both
-## AllowLoadGameType: classic
+## AllowLoadGameType: cata
MenuConstants.lua
Classic\MenuConstants.lua
MenuVariants.lua
-Classic\MenuVariants.lua
+Cata\MenuVariants.lua
Compositor.lua
Menu.lua
Menu.xml
diff --git a/Interface/AddOns/Blizzard_Menu/Blizzard_Menu_Vanilla.toc b/Interface/AddOns/Blizzard_Menu/Blizzard_Menu_Vanilla.toc
new file mode 100644
index 0000000000..da6a988dcf
--- /dev/null
+++ b/Interface/AddOns/Blizzard_Menu/Blizzard_Menu_Vanilla.toc
@@ -0,0 +1,21 @@
+## Title: Blizzard_Menu
+## Author: Blizzard Entertainment
+## DefaultState: enabled
+## Dependencies: Blizzard_SharedXMLBase
+## LoadFirst: 1
+## AllowLoad: Both
+## AllowLoadGameType: vanilla, tbc, wrath
+MenuConstants.lua
+Classic\MenuConstants.lua
+MenuVariants.lua
+Vanilla\MenuVariants.lua
+Compositor.lua
+Menu.lua
+Menu.xml
+DropdownButton.lua
+DropdownButton.xml
+MenuTemplates.lua
+MenuTemplates.xml
+Classic\MenuTemplates.lua
+Classic\MenuTemplates.xml
+MenuUtil.lua
\ No newline at end of file
diff --git a/Interface/AddOns/Blizzard_Menu/Classic/MenuVariants.lua b/Interface/AddOns/Blizzard_Menu/Cata/MenuVariants.lua
similarity index 100%
rename from Interface/AddOns/Blizzard_Menu/Classic/MenuVariants.lua
rename to Interface/AddOns/Blizzard_Menu/Cata/MenuVariants.lua
diff --git a/Interface/AddOns/Blizzard_Menu/Menu.lua b/Interface/AddOns/Blizzard_Menu/Menu.lua
index 74c20e9436..8e41a297a1 100644
--- a/Interface/AddOns/Blizzard_Menu/Menu.lua
+++ b/Interface/AddOns/Blizzard_Menu/Menu.lua
@@ -21,6 +21,10 @@ MenuAttributeDelegate:SetForbidden();
Menu = {};
local frameDummy = CreateFrame("Frame");
+local mouseEventEnterData = nil;
+local mouseEventLeaveData = nil;
+local mouseEventTime = .33;
+local mouseEventTimeRemaining = nil;
local isEditorShown = nil;
local isEditMenuShown = nil;
@@ -1699,6 +1703,36 @@ end
local MenuManagerMixin = CreateFromMixinsPrivate(ProxyConvertablePrivateMixin);
+function MenuManagerMixin:ProcessMouseEventLeaveData()
+ if not mouseEventLeaveData then
+ return;
+ end
+ mouseEventLeaveData = nil;
+
+ if not self:ContainsCursor() then
+ self:CollapseMenusUntilLevel(self:GetRetainMenuLevel());
+ end
+end
+
+function MenuManagerMixin:ProcessMouseEventEnterData()
+ if not mouseEventEnterData then
+ return;
+ end
+
+ local frame = mouseEventEnterData.frame;
+ local level = mouseEventEnterData.level;
+ mouseEventEnterData = nil;
+
+ if frame:IsMouseOver() then
+ self:CheckForSubmenu(frame, level);
+ end
+end
+
+function MenuManagerMixin:CancelMouseEventTimer()
+ mouseEventTimeRemaining = nil;
+ frameDummy:SetScript("OnUpdate", nil);
+end
+
function MenuManagerMixin:Init(proxy)
local tags = ProxyConvertablePrivateMixin.Init(self, proxy, Proxies);
tags[proxy] = "MenuManagerMixin";
@@ -1707,6 +1741,36 @@ function MenuManagerMixin:Init(proxy)
self.frameFactory = CreateFrameFactory();
self:SetRetainMenuLevel(0);
+
+ self.mouseEventTimerCallback = function(frame, dt)
+ if not (mouseEventEnterData or mouseEventLeaveData) then
+ return;
+ end
+
+ mouseEventTimeRemaining = mouseEventTimeRemaining - dt;
+ if mouseEventTimeRemaining > 0 then
+ return;
+ end
+
+ self:ProcessMouseEventLeaveData();
+ self:ProcessMouseEventEnterData();
+
+ self:CancelMouseEventTimer();
+ end
+end
+
+function MenuManagerMixin:RestartMouseEventTimer()
+ if mouseEventTimeRemaining == nil then
+ frameDummy:SetScript("OnUpdate", self.mouseEventTimerCallback);
+ end
+ mouseEventTimeRemaining = mouseEventTime;
+end
+
+function MenuManagerMixin:StopMouseEventTimer()
+ mouseEventEnterData = nil;
+ mouseEventLeaveData = nil;
+
+ self:CancelMouseEventTimer();
end
local function GetMenuDescriptionTag(tags, menu)
@@ -1787,6 +1851,8 @@ function MenuManagerMixin:RemoveMenu(menu)
self:CollapseMenusUntilLevel(menu:GetLevel());
+ local proxy = menu:ToProxy();
+
-- All scripts must be finished before the compositor flushes our keys.
-- Notify listeners that the menu is closing.
menu.menuDescription:GetMenuReleasedCallbacks():ExecuteRange(function(index, onReleased)
@@ -1804,7 +1870,6 @@ function MenuManagerMixin:RemoveMenu(menu)
The proxy for a menu must be manually removed because a pool frame is never
dereferenced and will always persist.
]]
- local proxy = menu:ToProxy();
Proxies:RemoveProxy(proxy);
-- Renable any scrolling we disabled when the menu was opened.
@@ -1815,6 +1880,10 @@ function MenuManagerMixin:RemoveMenu(menu)
end
self.frameFactory:Release(proxy);
+
+ if self.menus:IsEmpty() then
+ self:StopMouseEventTimer();
+ end
end
function MenuManagerMixin:FindMenu(menuDescription)
@@ -2102,19 +2171,27 @@ do
end
end
+function MenuManagerMixin:SetEventLeaveData()
+ mouseEventLeaveData = true;
+ self:RestartMouseEventTimer();
+end
+
+function MenuManagerMixin:SetEventEnterData(frame, menu, level)
+ mouseEventEnterData = {frame = frame, menu = menu, level = level};
+ self:RestartMouseEventTimer();
+end
+
function MenuManagerMixin:EnterFrame(frame, menu, level)
- self:SetRetainMenuLevel(level);
+ self:SetEventEnterData(frame, menu, level);
- self:CheckForSubmenu(frame, level);
+ self:SetRetainMenuLevel(level);
local descriptionProxy = frame:GetElementDescription();
descriptionProxy:HandleOnEnter(frame);
end
function MenuManagerMixin:LeaveFrame(frame, menu)
- if not self:ContainsCursor() then
- self:CollapseMenusUntilLevel(self:GetRetainMenuLevel());
- end
+ self:SetEventLeaveData();
local descriptionProxy = frame:GetElementDescription();
descriptionProxy:HandleOnLeave(frame);
@@ -2125,9 +2202,7 @@ function MenuManagerMixin:OnMenuEnter(level)
end
function MenuManagerMixin:OnMenuLeave()
- if not self:ContainsCursor() then
- self:CollapseMenusUntilLevel(self:GetRetainMenuLevel());
- end
+ self:SetEventLeaveData();
end
local function SecureTaggedMenuOpened(menuDescription)
@@ -2169,6 +2244,10 @@ function MenuManagerMixin:GenerateMenuInternal(params)
menuPositionFunc(menu:ToProxy());
local function OnMouseDown(frame)
+ -- The enter is discarded when we stop the timer, but we still need to process the leave.
+ self:ProcessMouseEventLeaveData();
+ self:StopMouseEventTimer();
+
self:CheckForSubmenu(frame, menu:GetLevel());
end
diff --git a/Interface/AddOns/Blizzard_Menu/MenuTemplates.lua b/Interface/AddOns/Blizzard_Menu/MenuTemplates.lua
index d2655ad7b3..678e5818cc 100644
--- a/Interface/AddOns/Blizzard_Menu/MenuTemplates.lua
+++ b/Interface/AddOns/Blizzard_Menu/MenuTemplates.lua
@@ -166,7 +166,12 @@ function MenuTemplates.RecurseSetupFontString(frame)
if originalSetTextColor then
fontString.SetTextColor = function(self, r, g, b, a)
- autoEnableTextColors[true] = CreateColor(r, g, b, a);
+ -- The intention here is to update the cached color for 'enabled/true' so that it can be
+ -- restored as the frame changes enabled state. This treats any color other than
+ -- DISABLED_FONT_COLOR as an enabled color.
+ if not IsRGBAEqualToColor(r, g, b, a, autoEnableTextColors[false]) then
+ autoEnableTextColors[true] = CreateColor(r, g, b, a);
+ end
originalSetTextColor(self, r, g, b, a);
end;
fontString.autoEnableTextColors = autoEnableTextColors;
diff --git a/Interface/AddOns/Blizzard_Menu/Vanilla/MenuVariants.lua b/Interface/AddOns/Blizzard_Menu/Vanilla/MenuVariants.lua
new file mode 100644
index 0000000000..10521295fb
--- /dev/null
+++ b/Interface/AddOns/Blizzard_Menu/Vanilla/MenuVariants.lua
@@ -0,0 +1,54 @@
+function MenuVariants.GetDefaultMenuMixin()
+ return MenuStyle1Mixin;
+end
+
+function MenuVariants.GetDefaultContextMenuMixin()
+ return MenuStyle2Mixin;
+end
+
+function MenuVariants.CreateCheckbox(text, frame, isSelected, data)
+ local leftTexture1 = frame:AttachTexture();
+ frame.leftTexture1 = leftTexture1;
+ leftTexture1:SetPoint("LEFT");
+
+ local atlas = nil;
+ if isSelected(data) then
+ atlas = "common-dropdown-icon-checkmark-yellow-classic-2";
+ else
+ -- For Vanilla checkmarks, show nothing if not selected.
+ end
+
+ leftTexture1:SetAtlas(atlas);
+ leftTexture1:SetSize(20, 20);
+
+ local fontString = frame:AttachFontString();
+ frame.fontString = fontString;
+ fontString:SetPoint("LEFT", leftTexture1, "RIGHT", 2, 0);
+ fontString:SetHeight(20);
+ fontString:SetTextToFit(text);
+
+ return leftTexture1;
+end
+
+function MenuVariants.CreateRadio(text, frame, isSelected, data)
+ local leftTexture1 = frame:AttachTexture();
+ frame.leftTexture1 = leftTexture1;
+ leftTexture1:SetPoint("LEFT");
+
+ local atlas = nil;
+ if isSelected(data) then
+ atlas = "common-dropdown-icon-radialtick-yellow-classic";
+ else
+ atlas = "common-dropdown-tickradial-classic";
+ end
+
+ leftTexture1:SetAtlas(atlas, TextureKitConstants.UseAtlasSize);
+
+ local fontString = frame:AttachFontString();
+ frame.fontString = fontString;
+ fontString:SetPoint("LEFT", leftTexture1, "RIGHT", 2, 0);
+ fontString:SetHeight(20);
+ fontString:SetTextToFit(text);
+
+ return leftTexture1, leftTexture2;
+end
\ No newline at end of file
diff --git a/Interface/AddOns/Blizzard_Minimap/Cata/Minimap.lua b/Interface/AddOns/Blizzard_Minimap/Cata/Minimap.lua
index c3c4e9bbd6..f428e99c8c 100644
--- a/Interface/AddOns/Blizzard_Minimap/Cata/Minimap.lua
+++ b/Interface/AddOns/Blizzard_Minimap/Cata/Minimap.lua
@@ -797,31 +797,4 @@ function MiniMapBattlefieldFrame_isArena()
MiniMapBattlefieldIcon:SetHeight(32);
MiniMapBattlefieldIcon:SetPoint("CENTER", "MiniMapBattlefieldFrame", "CENTER", -1, 0);
end
-end
-
--- ============================================ LookingForGroup ===============================================================================
-function MiniMapLFGFrame_OnClick(self, button)
- if ( button == "RightButton" ) then
- if (C_LFGList.HasActiveEntryInfo() and LFGListingUtil_CanEditListing()) then
- MenuUtil.CreateContextMenu(MiniMapLFGFrame, function(dropdown, rootDescription)
- rootDescription:SetTag("MENU_MINIMAP_LFG");
-
- local editListButton = rootDescription:CreateButton(LFG_LIST_EDIT, function()
- PVEFrame_ShowFrame();
- end);
- if not (C_LFGList.HasActiveEntryInfo() and LFGListingUtil_CanEditListing()) then
- editListButton:SetEnabled(false);
- end
-
- local unlistButton = rootDescription:CreateButton(LFG_LIST_UNLIST, function()
- C_LFGList.RemoveListing();
- end);
- if not (C_LFGList.HasActiveEntryInfo() and LFGListingUtil_CanEditListing()) then
- unlistButton:SetEnabled(false);
- end
- end);
- end
- else
- PVEFrame_ToggleFrame();
- end
end
\ No newline at end of file
diff --git a/Interface/AddOns/Blizzard_Minimap/Vanilla/Minimap.lua b/Interface/AddOns/Blizzard_Minimap/Vanilla/Minimap.lua
index 587811b53f..c091364523 100644
--- a/Interface/AddOns/Blizzard_Minimap/Vanilla/Minimap.lua
+++ b/Interface/AddOns/Blizzard_Minimap/Vanilla/Minimap.lua
@@ -145,108 +145,6 @@ function Minimap_ZoomOut()
MinimapZoomOut:Click();
end
-function MiniMapLFGFrame_OnLoad(self)
- self:RegisterEvent("PLAYER_ENTERING_WORLD");
- self:RegisterEvent("GROUP_ROSTER_UPDATE");
- self:RegisterEvent("LFG_UPDATE");
- self:RegisterEvent("LFG_QUEUE_STATUS_UPDATE");
- self:RegisterForClicks("LeftButtonUp", "RightButtonUp");
- self:SetFrameLevel(self:GetFrameLevel()+1)
-end
-
-function MiniMapLFGFrame_OnClick(self, button)
- if ( button == "RightButton" ) then
- QueueStatusDropdown_Show(self);
- else
- local inBattlefield, showScoreboard = QueueStatus_InActiveBattlefield();
- if ( IsInLFDBattlefield() ) then
- inBattlefield = true;
- showScoreboard = true;
- end
- local lfgListActiveEntry = C_LFGList.HasActiveEntryInfo();
- if ( inBattlefield ) then
- if ( showScoreboard ) then
- TogglePVPScoreboardOrResults();
- end
- elseif ( lfgListActiveEntry ) then
- LFGListUtil_OpenBestWindow(true);
- else
- --See if we have any active LFGList applications
- local apps = C_LFGList.GetApplications();
- for i=1, #apps do
- local _, appStatus = C_LFGList.GetApplicationInfo(apps[i]);
- if ( appStatus == "applied" or appStatus == "invited" ) then
- --We want to open to the LFGList screen
- LFGListUtil_OpenBestWindow(true);
- return;
- end
- end
-
- PVEFrame_ShowFrame();
- end
- end
-end
-
-function MiniMapLFGFrame_OnEvent(self, event, ...)
- if ( event == "PLAYER_ENTERING_WORLD" or
- event == "GROUP_ROSTER_UPDATE" or
- event == "LFG_UPDATE" or
- event == "LFG_QUEUE_STATUS_UPDATE" ) then
- --Try each LFG type
- local hasLFGMode = false;
- for i=1, NUM_LE_LFG_CATEGORYS do
- local mode, submode = GetLFGMode(i);
- if ( mode and submode ~= "noteleport" ) then
- hasLFGMode = true;
- break;
- end
- end
-
- --Try LFGList entries
- local hasApp = false;
- local apps = C_LFGList.GetApplications();
- for i=1, #apps do
- local _, appStatus = C_LFGList.GetApplicationInfo(apps[i]);
- if ( appStatus == "applied" or appStatus == "invited" ) then
- hasApp = true;
- break;
- end
- end
-
- if ( C_LFGList.HasActiveEntryInfo() or hasLFGMode or hasApp) then
- self:Show();
- else
- self:Hide();
- end
- end
-end
-
-function MiniMapLFGFrame_OnEnter(self)
- QueueStatusFrame:Show();
-end
-
-function MiniMapLFGFrame_OnLeave(self)
- QueueStatusFrame:Hide();
-end
-
-function EyeTemplate_OnUpdate(self, elapsed)
- local textureInfo = LFG_EYE_TEXTURES[self.queueType or "default"];
- AnimateTexCoords(self.Texture, textureInfo.width, textureInfo.height, textureInfo.iconSize, textureInfo.iconSize, textureInfo.frames, elapsed, textureInfo.delay)
-end
-
-function EyeTemplate_StartAnimating(eye)
- eye:SetScript("OnUpdate", EyeTemplate_OnUpdate);
-end
-
-function EyeTemplate_StopAnimating(eye)
- eye:SetScript("OnUpdate", nil);
- if ( eye.Texture.frame ) then
- eye.Texture.frame = 1; --To start the animation over.
- end
- local textureInfo = LFG_EYE_TEXTURES[eye.queueType or "default"];
- eye.Texture:SetTexCoord(0, textureInfo.iconSize / textureInfo.width, 0, textureInfo.iconSize / textureInfo.height);
-end
-
function MinimapButton_OnMouseDown(self, mouseButton)
if ( self.isDown ) then
return;
diff --git a/Interface/AddOns/Blizzard_Minimap/Vanilla/Minimap.xml b/Interface/AddOns/Blizzard_Minimap/Vanilla/Minimap.xml
index 919a293377..3107a971e5 100644
--- a/Interface/AddOns/Blizzard_Minimap/Vanilla/Minimap.xml
+++ b/Interface/AddOns/Blizzard_Minimap/Vanilla/Minimap.xml
@@ -22,21 +22,6 @@
-->
-
-
-
-
-
-
-
-
-
-
-
- AnimateTexCoords(self.Texture, 512, 256, 64, 64, 29, elapsed, 0.1)
-
-
-
@@ -139,72 +124,6 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- self:RegisterEvent("MINIMAP_UPDATE_TRACKING");
-
-
- if ( event == "MINIMAP_UPDATE_TRACKING" ) then
- local icon = GetTrackingTexture();
- if ( icon ) then
- MiniMapTrackingIcon:SetTexture(icon);
- MiniMapTracking:Show();
- else
- MiniMapTracking:Hide();
- end
- end
-
-
- if ( button == "RightButton" ) then
- CancelTrackingBuff();
- end
-
-
- GameTooltip:SetOwner(self, "ANCHOR_BOTTOMLEFT");
- GameTooltip:SetTrackingSpell();
-
-
- GameTooltip:Hide();
-
-
-
@@ -389,17 +308,23 @@
-
+
-
+
-
-
-
-
-
+
+
+
+
+
+
+
+
+
+
+
@@ -408,86 +333,33 @@
- self.tooltipText = MicroButtonTooltipText(WORLDMAP_BUTTON, "TOGGLEWORLDMAP");
- self.newbieText = NEWBIE_TOOLTIP_WORLDMAP;
- self:RegisterEvent("UPDATE_BINDINGS");
+ self:RegisterEvent("MINIMAP_UPDATE_TRACKING");
-
- GameTooltip_AddNewbieTip(self, self.tooltipText, 1.0, 1.0, 1.0, self.newbieText);
-
-
- self.tooltipText = MicroButtonTooltipText(WORLDMAP_BUTTON, "TOGGLEWORLDMAP");
- self.newbieText = NEWBIE_TOOLTIP_WORLDMAP;
+ if ( event == "MINIMAP_UPDATE_TRACKING" ) then
+ local icon = GetTrackingTexture();
+ if ( icon ) then
+ MiniMapTrackingIcon:SetTexture(icon);
+ MiniMapTracking:Show();
+ else
+ MiniMapTracking:Hide();
+ end
+ end
-
- ToggleWorldMap();
-
+
+ if ( button == "RightButton" ) then
+ CancelTrackingBuff();
+ end
+
+
+ GameTooltip:SetOwner(self, "ANCHOR_BOTTOMLEFT");
+ GameTooltip:SetTrackingSpell();
+
+
+ GameTooltip:Hide();
+
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
+
diff --git a/Interface/AddOns/Blizzard_QueueStatusFrame/Classic/QueueStatusFrame.lua b/Interface/AddOns/Blizzard_QueueStatusFrame/Classic/QueueStatusFrame.lua
index 8f41416f32..8e6e059a91 100644
--- a/Interface/AddOns/Blizzard_QueueStatusFrame/Classic/QueueStatusFrame.lua
+++ b/Interface/AddOns/Blizzard_QueueStatusFrame/Classic/QueueStatusFrame.lua
@@ -367,7 +367,7 @@ end
function QueueStatusEntry_SetUpLFGListApplication(entry, resultID)
local searchResultInfo = C_LFGList.GetSearchResultInfo(resultID);
- local activityName = C_LFGList.GetActivityFullName(searchResultInfo.activityID, nil, searchResultInfo.isWarMode);
+ local activityName = C_LFGList.GetActivityFullName(searchResultInfo.activityIDs[1], nil, searchResultInfo.isWarMode);
QueueStatusEntry_SetMinimalDisplay(entry, searchResultInfo.name, QUEUED_STATUS_SIGNED_UP, activityName);
end
@@ -581,15 +581,7 @@ end
----------------------------------------------
function QueueStatusDropdown_Show(source)
MenuUtil.CreateContextMenu(source, function(owner, rootDescription)
- rootDescription:SetTag("MENU_QUEUE_STATUS_FRAME");
-
- --All LFG types
- for i=1, NUM_LE_LFG_CATEGORYS do
- local mode, submode = GetLFGMode(i);
- if ( mode and submode ~= "noteleport" ) then
- QueueStatusDropdown_AddLFGButtons(rootDescription, i);
-end
-end
+ rootDescription:SetTag("MENU_QUEUE_STATUS_FRAME");
--All LFG types
for i=1, NUM_LE_LFG_CATEGORYS do
diff --git a/Interface/AddOns/Blizzard_SettingsDefinitions_Frame/Classic/CombatOverrides.lua b/Interface/AddOns/Blizzard_SettingsDefinitions_Frame/Classic/CombatOverrides.lua
index 10404846e1..608cf57f06 100644
--- a/Interface/AddOns/Blizzard_SettingsDefinitions_Frame/Classic/CombatOverrides.lua
+++ b/Interface/AddOns/Blizzard_SettingsDefinitions_Frame/Classic/CombatOverrides.lua
@@ -1,14 +1,41 @@
CombatOverrides = {}
function CombatOverrides.CreateRaidSelfHighlightSetting(category)
+-- The get and set essentially perform bitwise operations with powers of 2 instead of bits
+ local function GetValue()
+ local circleOn = GetCVarBool("findYourselfModeCircle");
+ local iconOn = GetCVarBool("findYourselfModeIcon");
+
+ local value = (circleOn and 1 or 0) + (iconOn and 2 or 0);
+ return value;
+ end
+
+ local function SetValue(value)
+ local NUM_COMBINATIONS = 4;
+ SetCVar("findYourselfAnywhere", value > 0 and value < NUM_COMBINATIONS);
+
+ SetCVar("findYourselfModeIcon", value >= 2);
+ if (value >= 2) then
+ value = value - 2;
+ end
+
+ SetCVar("findYourselfModeCircle", value >= 1);
+ end
+
local function GetOptions()
local container = Settings.CreateControlTextContainer();
- container:Add(0, SELF_HIGHLIGHT_MODE_CIRCLE);
- container:Add(-1, OFF);
+ container:Add(1, SELF_HIGHLIGHT_MODE_CIRCLE);
+ container:Add(2, SELF_HIGHLIGHT_MODE_ICON);
+ container:Add(3, SELF_HIGHLIGHT_MODE_CIRCLE_AND_ICON);
+
+ container:Add(0, OFF);
return container:GetData();
end
- return Settings.SetupCVarDropdown(category, "findYourselfMode", Settings.VarType.Number, GetOptions, SELF_HIGHLIGHT_OPTION, OPTION_TOOLTIP_SELF_HIGHLIGHT);
+ local defaultValue = 0;
+ local setting = Settings.RegisterProxySetting(category, "PROXY_SELF_HIGHLIGHT",
+ Settings.VarType.Number, SELF_HIGHLIGHT_OPTION, defaultValue, GetValue, SetValue);
+ return setting, Settings.CreateDropdown(category, setting, GetOptions, OPTION_TOOLTIP_SELF_HIGHLIGHT);
end
function CombatOverrides.CreateFloatingCombatTextSetting(category)
diff --git a/Interface/AddOns/Blizzard_SettingsDefinitions_Frame/Classic/InterfaceOverrides.lua b/Interface/AddOns/Blizzard_SettingsDefinitions_Frame/Classic/InterfaceOverrides.lua
index fada6135d8..67d6fe5643 100644
--- a/Interface/AddOns/Blizzard_SettingsDefinitions_Frame/Classic/InterfaceOverrides.lua
+++ b/Interface/AddOns/Blizzard_SettingsDefinitions_Frame/Classic/InterfaceOverrides.lua
@@ -169,6 +169,10 @@ function InterfaceOverrides.AdjustDisplaySettings(category)
Settings.SetupCVarCheckbox(category, "alwaysShowRuneIcons", ALWAYS_SHOW_RUNE_ICONS, OPTION_TOOLTIP_ALWAYS_SHOW_RUNE_ICONS);
end
+ if GetClassicExpansionLevel() <= LE_EXPANSION_WRATH_OF_THE_LICH_KING then
+ Settings.SetupCVarCheckbox(category, "useClassicGuildUI", CLASSIC_GUILD_UI_TEXT, OPTION_TOOLTIP_CLASSIC_GUILD_UI);
+ end
+
if ClassicExpansionAtLeast(LE_EXPANSION_WRATH_OF_THE_LICH_KING) then
do
-- Use Equipment Manager
diff --git a/Interface/AddOns/Blizzard_SettingsDefinitions_Shared/Audio.lua b/Interface/AddOns/Blizzard_SettingsDefinitions_Shared/Audio.lua
index 9f1bb36f3a..5b3c7ab5f6 100644
--- a/Interface/AddOns/Blizzard_SettingsDefinitions_Shared/Audio.lua
+++ b/Interface/AddOns/Blizzard_SettingsDefinitions_Shared/Audio.lua
@@ -528,7 +528,7 @@ local function Register()
AudioOverrides.CreatePingSoundSettings(category, layout);
--Voice
- if not IsOnGlueScreen() then
+ if not C_Glue.IsOnGlueScreen() then
--[[
Initializing the voice settings requires the voice proxy process to be initialized. Continue to
make attempts until this occurs. No timeout.
diff --git a/Interface/AddOns/Blizzard_SettingsDefinitions_Shared/Groups.lua b/Interface/AddOns/Blizzard_SettingsDefinitions_Shared/Groups.lua
index 703c89f355..507dcf65b9 100644
--- a/Interface/AddOns/Blizzard_SettingsDefinitions_Shared/Groups.lua
+++ b/Interface/AddOns/Blizzard_SettingsDefinitions_Shared/Groups.lua
@@ -1,4 +1,4 @@
-if IsOnGlueScreen() then
+if C_Glue.IsOnGlueScreen() then
Settings.GetOrCreateSettingsGroup(SETTING_GROUP_SYSTEM, 1);
else
Settings.GetOrCreateSettingsGroup(SETTING_GROUP_GAMEPLAY, 1);
diff --git a/Interface/AddOns/Blizzard_Settings_Shared/Blizzard_Dialogs.lua b/Interface/AddOns/Blizzard_Settings_Shared/Blizzard_Dialogs.lua
index 389829884d..33c42ade12 100644
--- a/Interface/AddOns/Blizzard_Settings_Shared/Blizzard_Dialogs.lua
+++ b/Interface/AddOns/Blizzard_Settings_Shared/Blizzard_Dialogs.lua
@@ -65,7 +65,7 @@ local function DefineGameSettingsTimedRevertDialog()
fullScreenCover = true,
};
- if IsOnGlueScreen() then
+ if C_Glue.IsOnGlueScreen() then
StaticPopupDialogs["GAME_SETTINGS_TIMED_CONFIRMATION"].OnUpdate = function(self, elapsed)
self.duration = self.duration - elapsed;
local time = math.max(self.duration + 1, 1);
diff --git a/Interface/AddOns/Blizzard_Settings_Shared/Blizzard_Registration.lua b/Interface/AddOns/Blizzard_Settings_Shared/Blizzard_Registration.lua
index 83ff382901..6b8080efaa 100644
--- a/Interface/AddOns/Blizzard_Settings_Shared/Blizzard_Registration.lua
+++ b/Interface/AddOns/Blizzard_Settings_Shared/Blizzard_Registration.lua
@@ -1,5 +1,5 @@
do
- if not IsOnGlueScreen() then
+ if not C_Glue.IsOnGlueScreen() then
local attributes =
{
area = "center",
diff --git a/Interface/AddOns/Blizzard_Settings_Shared/Blizzard_Settings.lua b/Interface/AddOns/Blizzard_Settings_Shared/Blizzard_Settings.lua
index 4ba6f201e6..dd6e769d60 100644
--- a/Interface/AddOns/Blizzard_Settings_Shared/Blizzard_Settings.lua
+++ b/Interface/AddOns/Blizzard_Settings_Shared/Blizzard_Settings.lua
@@ -141,7 +141,7 @@ function Settings.OpenToCategory(categoryID, scrollToElementName)
end
function Settings.SafeLoadBindings(bindingSet)
- if not IsOnGlueScreen() then
+ if not C_Glue.IsOnGlueScreen() then
LoadBindings(bindingSet);
end
end
diff --git a/Interface/AddOns/Blizzard_Settings_Shared/Blizzard_SettingsPanel.lua b/Interface/AddOns/Blizzard_Settings_Shared/Blizzard_SettingsPanel.lua
index 3457080363..81c1815131 100644
--- a/Interface/AddOns/Blizzard_Settings_Shared/Blizzard_SettingsPanel.lua
+++ b/Interface/AddOns/Blizzard_Settings_Shared/Blizzard_SettingsPanel.lua
@@ -154,7 +154,7 @@ function SettingsPanelMixin:OnShow()
end
-- WOW10-16900
- if IsOnGlueScreen() then
+ if C_Glue.IsOnGlueScreen() then
self:SetFrameStrata("DIALOG");
GlueParent_AddModalFrame(self);
@@ -186,7 +186,7 @@ function SettingsPanelMixin:OnHide()
self:ClearActiveCategoryTutorial();
- if IsOnGlueScreen() then
+ if C_Glue.IsOnGlueScreen() then
GlueParent_RemoveModalFrame(self);
GlueParent_CloseSecondaryScreen();
return;
@@ -248,7 +248,7 @@ end
function SettingsPanelMixin:TransitionBackOpeningPanel()
HideUIPanel(self);
- if not IsOnGlueScreen() then
+ if not C_Glue.IsOnGlueScreen() then
if EditModeManagerFrame:IsEditModeActive() then
ShowUIPanel(EditModeManagerFrame);
else
@@ -286,7 +286,7 @@ function SettingsPanelMixin:SetKeybindingsCategory(category)
end
function SettingsPanelMixin:CommitBindings()
- if not IsOnGlueScreen() then
+ if not C_Glue.IsOnGlueScreen() then
SaveBindings(GetCurrentBindingSet());
local shouldSave = true;
diff --git a/Interface/AddOns/Blizzard_Settings_Shared/Blizzard_SettingsRegistrar.lua b/Interface/AddOns/Blizzard_Settings_Shared/Blizzard_SettingsRegistrar.lua
index 1c2cab3336..74b7f47d6c 100644
--- a/Interface/AddOns/Blizzard_Settings_Shared/Blizzard_SettingsRegistrar.lua
+++ b/Interface/AddOns/Blizzard_Settings_Shared/Blizzard_SettingsRegistrar.lua
@@ -3,7 +3,7 @@ local securecallfunction = securecallfunction;
SettingsRegistrar = {};
function SettingsRegistrar:OnLoad()
- if IsOnGlueScreen() then
+ if C_Glue.IsOnGlueScreen() then
self.allowCallRegistrants = true;
else
self.registrants = {};
diff --git a/Interface/AddOns/Blizzard_Settings_Shared/Classic/GraphicsOverrides.lua b/Interface/AddOns/Blizzard_Settings_Shared/Classic/GraphicsOverrides.lua
index 391832a5ad..06d65daa0b 100644
--- a/Interface/AddOns/Blizzard_Settings_Shared/Classic/GraphicsOverrides.lua
+++ b/Interface/AddOns/Blizzard_Settings_Shared/Classic/GraphicsOverrides.lua
@@ -66,6 +66,53 @@ function GraphicsOverrides.GetTextureResolutionOptions(settingTextureResolution,
end
function GraphicsOverrides.CreateHiResOptions(category, layout)
+ if (not AreHighResTexturesAvailable()) then
+ return;
+ end
+
+ local function GetOptions()
+ local container = Settings.CreateControlTextContainer();
+ container:Add(false, VIDEO_OPTIONS_DISABLED);
+ container:Add(true, VIDEO_OPTIONS_ENABLED);
+ return container:GetData();
+ end
+
+ local function GetValue()
+ if C_BattleNet.AreHighResTexturesInstalled() then
+ return GetCVarBool("useHighResTextures");
+ end
+ return false;
+ end
+
+ local function SetValue(value)
+ if C_BattleNet.AreHighResTexturesInstalled() then
+ SetCVar("useHighResTextures", value);
+ end
+ end
+
+ local setting = Settings.RegisterProxySetting(category, "PROXY_HIGH_RES_TEXTURES",
+ Settings.VarType.Boolean, OPTION_HD_TEXTURES, Settings.Default.True, GetValue, SetValue);
+ setting:SetCommitFlags(Settings.CommitFlag.Apply);
+
+ local initializer = Settings.CreateDropdown(category, setting, GetOptions, OPTION_TOOLTIP_HD_TEXTURES);
+ initializer:AddShownPredicate(BNConnected);
+ initializer:AddModifyPredicate(C_BattleNet.AreHighResTexturesInstalled);
+
+ if not C_BattleNet.AreHighResTexturesInstalled() then
+ local function OnClick()
+ local dialog = GlueDialog_Show or StaticPopup_Show;
+ dialog("DOWNLOAD_HIGH_RES_TEXTURES");
+ end
+
+ local addSearchTags = true;
+ local hdTexturesInitializer = CreateSettingsButtonInitializer(OPTION_HD_TEXTURES, HD_TEXTURES_BUTTON, OnClick, OPTION_TOOLTIP_HD_TEXTURES, addSearchTags);
+ hdTexturesInitializer.hideText = true;
+
+ local version = GetBuildInfo();
+ hdTexturesInitializer.showNew = version == "4.4.1";
+ hdTexturesInitializer:AddShownPredicate(BNConnected);
+ layout:AddInitializer(hdTexturesInitializer);
+ end
end
function GraphicsOverrides.RunSettingsCallback(callback)
diff --git a/Interface/AddOns/Blizzard_SharedMapDataProviders/BonusObjectiveDataProvider.lua b/Interface/AddOns/Blizzard_SharedMapDataProviders/BonusObjectiveDataProvider.lua
index db82720e86..1bde1af70a 100644
--- a/Interface/AddOns/Blizzard_SharedMapDataProviders/BonusObjectiveDataProvider.lua
+++ b/Interface/AddOns/Blizzard_SharedMapDataProviders/BonusObjectiveDataProvider.lua
@@ -13,11 +13,11 @@ function BonusObjectiveDataProviderMixin:RefreshAllData(fromOnShow)
end
local mapID = self:GetMap():GetMapID();
- local taskInfo = C_TaskQuest.GetQuestsForPlayerByMapID(mapID);
+ local taskInfo = C_TaskQuest.GetQuestsOnMap(mapID);
if taskInfo and #taskInfo > 0 then
for i, info in ipairs(taskInfo) do
- if MapUtil.ShouldShowTask(mapID, info) and not QuestUtils_IsQuestWorldQuest(info.questId) then
+ if MapUtil.ShouldShowTask(mapID, info) and not QuestUtils_IsQuestWorldQuest(info.questID) then
self:GetMap():AcquirePin("BonusObjectivePinTemplate", info);
end
end
@@ -34,7 +34,7 @@ end
function BonusObjectivePinMixin:OnAcquired(taskInfo)
self:SetPosition(taskInfo.x, taskInfo.y);
- self.questID = taskInfo.questId;
+ self.questID = taskInfo.questID;
self.numObjectives = taskInfo.numObjectives;
end
diff --git a/Interface/AddOns/Blizzard_SharedMapDataProviders/WorldQuestDataProvider.lua b/Interface/AddOns/Blizzard_SharedMapDataProviders/WorldQuestDataProvider.lua
index 3cd57f8d00..8766f0a679 100644
--- a/Interface/AddOns/Blizzard_SharedMapDataProviders/WorldQuestDataProvider.lua
+++ b/Interface/AddOns/Blizzard_SharedMapDataProviders/WorldQuestDataProvider.lua
@@ -193,8 +193,8 @@ end
function WorldQuestDataProviderMixin:RefreshAllData(fromOnShow)
local pinsToRemove = {};
- for questId in pairs(self.activePins) do
- pinsToRemove[questId] = true;
+ for questID in pairs(self.activePins) do
+ pinsToRemove[questID] = true;
end
--[[
local taskInfo;
@@ -202,26 +202,26 @@ function WorldQuestDataProviderMixin:RefreshAllData(fromOnShow)
local mapID = mapCanvas:GetMapID();
if (mapID) then
- taskInfo = C_TaskQuest.GetQuestsForPlayerByMapID(mapID);
+ taskInfo = C_TaskQuest.GetQuestsOnMap(mapID);
self.matchWorldMapFilters = MapUtil.MapHasEmissaries(mapID);
end
if taskInfo then
for i, info in ipairs(taskInfo) do
- if self:ShouldShowQuest(info) and HaveQuestData(info.questId) then
- if QuestUtils_IsQuestWorldQuest(info.questId) then
+ if self:ShouldShowQuest(info) and HaveQuestData(info.questID) then
+ if QuestUtils_IsQuestWorldQuest(info.questID) then
if self:DoesWorldQuestInfoPassFilters(info) then
- pinsToRemove[info.questId] = nil;
- local pin = self.activePins[info.questId];
+ pinsToRemove[info.questID] = nil;
+ local pin = self.activePins[info.questID];
if pin then
pin:RefreshVisuals();
pin:SetPosition(info.x, info.y); -- Fix for WOW8-48605 - WQ starting location may move based on player location and viewed map
- if self.pingPin and self.pingPin:IsAttachedToQuest(info.questId) then
+ if self.pingPin and self.pingPin:IsAttachedToQuest(info.questID) then
self.pingPin:SetPosition(info.x, info.y);
end
else
- self.activePins[info.questId] = self:AddWorldQuest(info);
+ self.activePins[info.questID] = self:AddWorldQuest(info);
end
end
end
@@ -229,20 +229,20 @@ function WorldQuestDataProviderMixin:RefreshAllData(fromOnShow)
end
end
]]
- for questId in pairs(pinsToRemove) do
- if self.pingPin and self.pingPin:IsAttachedToQuest(questId) then
+ for questID in pairs(pinsToRemove) do
+ if self.pingPin and self.pingPin:IsAttachedToQuest(questID) then
self.pingPin:Stop();
end
- mapCanvas:RemovePin(self.activePins[questId]);
- self.activePins[questId] = nil;
+ mapCanvas:RemovePin(self.activePins[questID]);
+ self.activePins[questID] = nil;
end
mapCanvas:TriggerEvent("WorldQuestsUpdate", mapCanvas:GetNumActivePinsByTemplate(self:GetPinTemplate()));
end
function WorldQuestDataProviderMixin:ShouldShowQuest(info)
- return not self.focusedQuestID and not self:IsQuestSuppressed(info.questId);
+ return not self.focusedQuestID and not self:IsQuestSuppressed(info.questID);
end
function WorldQuestDataProviderMixin:GetPinTemplate()
@@ -251,14 +251,14 @@ end
function WorldQuestDataProviderMixin:AddWorldQuest(info)
local pin = self:GetMap():AcquirePin(self:GetPinTemplate());
- pin.questID = info.questId;
+ pin.questID = info.questID;
pin.dataProvider = self;
pin.worldQuest = true;
pin.numObjectives = info.numObjectives;
pin:UseFrameLevelType("PIN_FRAME_LEVEL_WORLD_QUEST", self:GetMap():GetNumActivePinsByTemplate(self:GetPinTemplate()));
- local tagID, tagName, worldQuestType, rarity, isElite, tradeskillLineIndex, displayTimeLeft = GetQuestTagInfo(info.questId);
+ local tagID, tagName, worldQuestType, rarity, isElite, tradeskillLineIndex, displayTimeLeft = GetQuestTagInfo(info.questID);
local tradeskillLineID = tradeskillLineIndex and select(7, GetProfessionInfo(tradeskillLineIndex));
pin.worldQuestType = worldQuestType;
@@ -307,7 +307,7 @@ function WorldQuestDataProviderMixin:AddWorldQuest(info)
pin.Underlay:Hide();
end
- local timeLeftMinutes = C_TaskQuest.GetQuestTimeLeftMinutes(info.questId);
+ local timeLeftMinutes = C_TaskQuest.GetQuestTimeLeftMinutes(info.questID);
if timeLeftMinutes and timeLeftMinutes <= WORLD_QUESTS_TIME_LOW_MINUTES then
pin.TimeLowFrame:Show();
else
@@ -316,7 +316,7 @@ function WorldQuestDataProviderMixin:AddWorldQuest(info)
pin:SetPosition(info.x, info.y);
- C_TaskQuest.RequestPreloadRewardData(info.questId);
+ C_TaskQuest.RequestPreloadRewardData(info.questID);
return pin;
end
diff --git a/Interface/AddOns/Blizzard_SharedMapDataProviders/WorldQuestDataProvider.xml b/Interface/AddOns/Blizzard_SharedMapDataProviders/WorldQuestDataProvider.xml
index 8d23111877..be75cef0b1 100644
--- a/Interface/AddOns/Blizzard_SharedMapDataProviders/WorldQuestDataProvider.xml
+++ b/Interface/AddOns/Blizzard_SharedMapDataProviders/WorldQuestDataProvider.xml
@@ -36,7 +36,7 @@
-
+
diff --git a/Interface/AddOns/Blizzard_SharedMapDataProviders/Wrath/BonusObjectiveDataProvider.lua b/Interface/AddOns/Blizzard_SharedMapDataProviders/Wrath/BonusObjectiveDataProvider.lua
index 9255e46996..f7853fd1eb 100644
--- a/Interface/AddOns/Blizzard_SharedMapDataProviders/Wrath/BonusObjectiveDataProvider.lua
+++ b/Interface/AddOns/Blizzard_SharedMapDataProviders/Wrath/BonusObjectiveDataProvider.lua
@@ -6,11 +6,11 @@ function BonusObjectiveDataProviderMixin:RefreshAllData(fromOnShow)
return;
end
- local taskInfo = C_TaskQuest.GetQuestsForPlayerByMapID(mapID);
+ local taskInfo = C_TaskQuest.GetQuestsOnMap(mapID);
if taskInfo and #taskInfo > 0 then
for i, info in ipairs(taskInfo) do
- if MapUtil.ShouldShowTask(mapID, info) and not QuestUtils_IsQuestWorldQuest(info.questId) then
+ if MapUtil.ShouldShowTask(mapID, info) and not QuestUtils_IsQuestWorldQuest(info.questID) then
self:GetMap():AcquirePin("BonusObjectivePinTemplate", info);
end
end
diff --git a/Interface/AddOns/Blizzard_SharedXML/Classic/GlueCheck.lua b/Interface/AddOns/Blizzard_SharedXML/Classic/GlueCheck.lua
index 34fe460112..752c08649a 100644
--- a/Interface/AddOns/Blizzard_SharedXML/Classic/GlueCheck.lua
+++ b/Interface/AddOns/Blizzard_SharedXML/Classic/GlueCheck.lua
@@ -1,3 +1,3 @@
function InGlue()
- return IsOnGlueScreen();
+ return C_Glue.IsOnGlueScreen();
end
\ No newline at end of file
diff --git a/Interface/AddOns/Blizzard_SharedXML/Classic/ModelFrames.lua b/Interface/AddOns/Blizzard_SharedXML/Classic/ModelFrames.lua
index 47658d3c95..36c508494d 100644
--- a/Interface/AddOns/Blizzard_SharedXML/Classic/ModelFrames.lua
+++ b/Interface/AddOns/Blizzard_SharedXML/Classic/ModelFrames.lua
@@ -52,7 +52,7 @@ local ModelSettings = {
}
local playerRaceSex;
-if ( not IsOnGlueScreen() ) then
+if ( not C_Glue.IsOnGlueScreen() ) then
local _;
_, playerRaceSex = UnitRace("player");
if ( UnitSex("player") == 2 ) then
diff --git a/Interface/AddOns/Blizzard_SharedXML/Classic/Selector/Blizzard_ScrollBoxSelector.xml b/Interface/AddOns/Blizzard_SharedXML/Classic/Selector/Blizzard_ScrollBoxSelector.xml
index c1b9dc77bf..c5465f149e 100644
--- a/Interface/AddOns/Blizzard_SharedXML/Classic/Selector/Blizzard_ScrollBoxSelector.xml
+++ b/Interface/AddOns/Blizzard_SharedXML/Classic/Selector/Blizzard_ScrollBoxSelector.xml
@@ -2,6 +2,9 @@
..\..\UI.xsd">
+
+
+
diff --git a/Interface/AddOns/Blizzard_SharedXML/Classic/SharedUIPanelTemplates.xml b/Interface/AddOns/Blizzard_SharedXML/Classic/SharedUIPanelTemplates.xml
index 78d981d329..9329a6b0d3 100644
--- a/Interface/AddOns/Blizzard_SharedXML/Classic/SharedUIPanelTemplates.xml
+++ b/Interface/AddOns/Blizzard_SharedXML/Classic/SharedUIPanelTemplates.xml
@@ -789,7 +789,7 @@
This is the inner frame used by ButtonFrameTemplate
*******************************************************************************
-->
-
+
diff --git a/Interface/AddOns/Blizzard_SharedXML/Classic/Stubs.lua b/Interface/AddOns/Blizzard_SharedXML/Classic/Stubs.lua
index 1c7cd58c8c..4ec8b334ed 100644
--- a/Interface/AddOns/Blizzard_SharedXML/Classic/Stubs.lua
+++ b/Interface/AddOns/Blizzard_SharedXML/Classic/Stubs.lua
@@ -18,10 +18,13 @@ end
function HelpTip:Hide( p1, p2 )
end
-
function HelpTip:HideAll(parent)
end
+function HelpTip:IsShowing( p1, p2 )
+ return false;
+end
+
HelpTip.Alignment = {
Left = 1,
Center = 2,
diff --git a/Interface/AddOns/Blizzard_SharedXML/Classic/VASErrorLookup.lua b/Interface/AddOns/Blizzard_SharedXML/Classic/VASErrorLookup.lua
index dcf044afd0..8f02d28553 100644
--- a/Interface/AddOns/Blizzard_SharedXML/Classic/VASErrorLookup.lua
+++ b/Interface/AddOns/Blizzard_SharedXML/Classic/VASErrorLookup.lua
@@ -135,22 +135,30 @@ local vasErrorData = {
local str = "";
local moneyCapForLevel = 0;
if GetExpansionLevel() >= LE_EXPANSION_WRATH_OF_THE_LICH_KING then
- if (character.level > 80) then
- moneyCapForLevel = 50000 * COPPER_PER_SILVER * SILVER_PER_GOLD;
- elseif (character.level > 50) then
- moneyCapForLevel = 25000 * COPPER_PER_SILVER * SILVER_PER_GOLD;
- elseif (character.level > 30) then
+ -- PAY_MONEY_LEVEL_01
+ if (character.level < 31) then
+ -- PAY_MONEY_LIMIT_01
+ moneyCapForLevel = 500 * COPPER_PER_SILVER * SILVER_PER_GOLD;
+ -- PAY_MONEY_LEVEL_02
+ elseif (character.level < 51) then
+ -- PAY_MONEY_LIMIT_02
moneyCapForLevel = 2500 * COPPER_PER_SILVER * SILVER_PER_GOLD;
+ -- Additional breakpoints 81, 86, 91, 101, 111 and 121 all cap at 50000
else
- moneyCapForLevel = 500 * COPPER_PER_SILVER * SILVER_PER_GOLD;
+ moneyCapForLevel = 50000 * COPPER_PER_SILVER * SILVER_PER_GOLD;
end
else
- if (character.level > 50) then
- moneyCapForLevel = 5000 * COPPER_PER_SILVER * SILVER_PER_GOLD;
- elseif (character.level > 30) then
+ -- PAY_MONEY_LEVEL_01
+ if (character.level < 31) then
+ -- PAY_MONEY_LIMIT_01
+ moneyCapForLevel = 100 * COPPER_PER_SILVER * SILVER_PER_GOLD;
+ -- PAY_MONEY_LEVEL_02
+ elseif (character.level < 51) then
+ -- PAY_MONEY_LIMIT_02
moneyCapForLevel = 500 * COPPER_PER_SILVER * SILVER_PER_GOLD;
+ -- Additional breakpoints 61, 71, 81, 81, 100, 110, and 121 all cap at 50000
else
- moneyCapForLevel = 100 * COPPER_PER_SILVER * SILVER_PER_GOLD;
+ moneyCapForLevel = 50000 * COPPER_PER_SILVER * SILVER_PER_GOLD;
end
end
if (moneyCapForLevel > 0) then
diff --git a/Interface/AddOns/Blizzard_SharedXML/ColorUtil.lua b/Interface/AddOns/Blizzard_SharedXML/ColorUtil.lua
index 403ca482fa..7452076584 100644
--- a/Interface/AddOns/Blizzard_SharedXML/ColorUtil.lua
+++ b/Interface/AddOns/Blizzard_SharedXML/ColorUtil.lua
@@ -44,6 +44,10 @@ function AreColorsEqual(left, right)
return left == right;
end
+function IsRGBAEqualToColor(r, g, b, a, color)
+ return (color.r == r) and (color.g == g) and (color.b == b) and (color.a == a);
+end
+
function GetClassColor(classFilename)
local color = RAID_CLASS_COLORS[classFilename];
if color then
diff --git a/Interface/AddOns/Blizzard_SharedXML/DebugBarManager.lua b/Interface/AddOns/Blizzard_SharedXML/DebugBarManager.lua
index c3341f04fb..9b52d9e1a6 100644
--- a/Interface/AddOns/Blizzard_SharedXML/DebugBarManager.lua
+++ b/Interface/AddOns/Blizzard_SharedXML/DebugBarManager.lua
@@ -23,7 +23,7 @@ local sortFunc = function(lhs, rhs)
end
function DebugBarManager:GetScreenScale()
- if IsOnGlueScreen() then
+ if C_Glue.IsOnGlueScreen() then
return PixelUtil.GetPixelToUIUnitFactor();
else
return UIParent:GetScale();
@@ -104,7 +104,7 @@ do
EventRegistry:RegisterCallback("UI_SCALE_CHANGED", DebugBarManager.UpdateAnchors, DebugBarManager);
EventRegistry:RegisterFrameEvent("DISPLAY_SIZE_CHANGED");
EventRegistry:RegisterCallback("DISPLAY_SIZE_CHANGED", DebugBarManager.UpdateAnchors, DebugBarManager);
- if IsOnGlueScreen() then
+ if C_Glue.IsOnGlueScreen() then
local watcherFrame = CreateFrame("FRAME");
watcherFrame:SetScript("OnUpdate", function() DebugBarManager:UpdateAnchors(); end);
else
diff --git a/Interface/AddOns/Blizzard_SharedXML/DialogUtil.lua b/Interface/AddOns/Blizzard_SharedXML/DialogUtil.lua
index 258f2340a9..044cc8bb9b 100644
--- a/Interface/AddOns/Blizzard_SharedXML/DialogUtil.lua
+++ b/Interface/AddOns/Blizzard_SharedXML/DialogUtil.lua
@@ -1,6 +1,6 @@
function ShowAppropriateDialog(popupType, textArg1, textArg2, data, insertedFrame)
- if IsOnGlueScreen() then
+ if C_Glue.IsOnGlueScreen() then
GlueDialog_Show(popupType, textArg1, data);
else
StaticPopup_Show(popupType, textArg1, textArg2, data, insertedFrame);
@@ -8,7 +8,7 @@ function ShowAppropriateDialog(popupType, textArg1, textArg2, data, insertedFram
end
function HideAppropriateDialog(popupType)
- if IsOnGlueScreen() then
+ if C_Glue.IsOnGlueScreen() then
GlueDialog_Hide(popupType);
else
StaticPopup_Hide(popupType);
diff --git a/Interface/AddOns/Blizzard_SharedXML/EnvironmentUtil.lua b/Interface/AddOns/Blizzard_SharedXML/EnvironmentUtil.lua
index 3b58b5f9e1..edbb254682 100644
--- a/Interface/AddOns/Blizzard_SharedXML/EnvironmentUtil.lua
+++ b/Interface/AddOns/Blizzard_SharedXML/EnvironmentUtil.lua
@@ -1,5 +1,5 @@
function InGlue()
- return IsOnGlueScreen and IsOnGlueScreen();
+ return C_Glue and C_Glue.IsOnGlueScreen and C_Glue.IsOnGlueScreen();
end
function nop()
diff --git a/Interface/AddOns/Blizzard_SharedXML/ModelPreviewFrame.lua b/Interface/AddOns/Blizzard_SharedXML/ModelPreviewFrame.lua
index b64a9b1b17..7981a7ceef 100644
--- a/Interface/AddOns/Blizzard_SharedXML/ModelPreviewFrame.lua
+++ b/Interface/AddOns/Blizzard_SharedXML/ModelPreviewFrame.lua
@@ -130,7 +130,7 @@ function ModelPreviewFrame_ShowModelInternal(displayID, modelSceneID, allowZoom,
local autoDress = bit.band(flags, Enum.UIModelSceneFlags.Autodress) == Enum.UIModelSceneFlags.Autodress;
local playerRaceName;
- if IsOnGlueScreen() then
+ if C_Glue.IsOnGlueScreen() then
local characterGuid = GetCharacterGUID(GetCharacterSelection());
if characterGuid then
local basicCharacterInfo = GetBasicCharacterInfo(characterGuid);
diff --git a/Interface/AddOns/Blizzard_SharedXML/ModelSceneMixin.lua b/Interface/AddOns/Blizzard_SharedXML/ModelSceneMixin.lua
index 5686fe9752..93cc452d0e 100644
--- a/Interface/AddOns/Blizzard_SharedXML/ModelSceneMixin.lua
+++ b/Interface/AddOns/Blizzard_SharedXML/ModelSceneMixin.lua
@@ -159,7 +159,7 @@ function GetPlayerActorLabelTag()
local playerGender;
local playerRaceNameActorTag = nil;
local hasAlternateForm, inAlternateForm = false, false;
- if IsOnGlueScreen() then
+ if C_Glue.IsOnGlueScreen() then
local characterGuid = GetCharacterGUID(GetCharacterSelection());
if characterGuid then
local basicCharacterInfo = GetBasicCharacterInfo(characterGuid);
diff --git a/Interface/AddOns/Blizzard_SharedXML/NineSlice.lua b/Interface/AddOns/Blizzard_SharedXML/NineSlice.lua
index a034016c0e..c1e99b0d98 100644
--- a/Interface/AddOns/Blizzard_SharedXML/NineSlice.lua
+++ b/Interface/AddOns/Blizzard_SharedXML/NineSlice.lua
@@ -87,7 +87,10 @@ local function SetupPieceVisuals(piece, setupInfo, pieceLayout, textureKit, user
local info = C_Texture.GetAtlasInfo(atlasName);
piece:SetHorizTile(info and info.tilesHorizontally or false);
piece:SetVertTile(info and info.tilesVertically or false);
- piece:SetAtlas(atlasName, true);
+
+ if info then
+ piece:SetAtlas(atlasName, true);
+ end
end
local function SetupCorner(container, piece, setupInfo, pieceLayout)
diff --git a/Interface/AddOns/Blizzard_SharedXML/SecureUtil.lua b/Interface/AddOns/Blizzard_SharedXML/SecureUtil.lua
index 544e6b0521..c70a41ff94 100644
--- a/Interface/AddOns/Blizzard_SharedXML/SecureUtil.lua
+++ b/Interface/AddOns/Blizzard_SharedXML/SecureUtil.lua
@@ -114,7 +114,7 @@ function SetupPlayerForModelScene(modelScene, overrideActorName, itemModifiedApp
sheatheWeapons = (sheatheWeapons == nil) or sheatheWeapons;
hideWeapons = (hideWeapons == nil) or hideWeapons;
useNativeForm = (useNativeForm == nil) or useNativeForm;
- if IsOnGlueScreen() then
+ if C_Glue.IsOnGlueScreen() then
local characterIndex = nil; -- defaults to selected character.
actor:SetPlayerModelFromGlues(characterIndex, sheatheWeapons, autoDress, hideWeapons, useNativeForm);
else
diff --git a/Interface/AddOns/Blizzard_SharedXML/Shared/Scroll/ScrollBar.lua b/Interface/AddOns/Blizzard_SharedXML/Shared/Scroll/ScrollBar.lua
index 7577e97bfe..2fef792b12 100644
--- a/Interface/AddOns/Blizzard_SharedXML/Shared/Scroll/ScrollBar.lua
+++ b/Interface/AddOns/Blizzard_SharedXML/Shared/Scroll/ScrollBar.lua
@@ -129,10 +129,6 @@ function ScrollBarMixin:EnableInternalPriority()
self.internalPriority = true;
end
-function ScrollBarMixin:EnableSnapToInterval(snapToInterval)
- self.snapToInterval = true;
-end
-
function ScrollBarMixin:SetScrollPercentage(scrollPercentage, forceImmediate)
-- While steppers, track, or thumb is held, attempts to change the scroll percentage
-- externally are discarded. This is to prevent scroll bars from jittering when receiving
@@ -150,19 +146,8 @@ function ScrollBarMixin:SetScrollPercentage(scrollPercentage, forceImmediate)
end
end
+
function ScrollBarMixin:SetScrollPercentageInternal(scrollPercentage)
- -- Constrains the scroll percentage to intervals. This is useful for SMF where message
- -- lines are never partially visible and it is undesirable to have the thumb position change
- -- without actually causing any messages to scroll.
- if self.snapToInterval then
- local visibleExtentPercentage = self:GetVisibleExtentPercentage();
- if visibleExtentPercentage > 0 then
- local intervals = math.floor((1 / visibleExtentPercentage) + MathUtil.Epsilon);
- local r = intervals - 1;
- scrollPercentage = math.min(math.floor(scrollPercentage / visibleExtentPercentage), r) / math.max(r, 1);
- end
- end
-
ScrollControllerMixin.SetScrollPercentage(self, scrollPercentage);
self:Update();
diff --git a/Interface/AddOns/Blizzard_SharedXML/Shared/Scroll/ScrollController.lua b/Interface/AddOns/Blizzard_SharedXML/Shared/Scroll/ScrollController.lua
index de9fb254f5..872ebacf0a 100644
--- a/Interface/AddOns/Blizzard_SharedXML/Shared/Scroll/ScrollController.lua
+++ b/Interface/AddOns/Blizzard_SharedXML/Shared/Scroll/ScrollController.lua
@@ -67,6 +67,22 @@ function ScrollControllerMixin:OnMouseWheel(value)
end
end
+-- Constrains the scroll percentage to intervals, which can be used to prevent elements
+-- from being partially clipped when dragging the scrollbar thumb. See most uses of
+-- ScrollingMessageFrame for an example.
+function ScrollControllerMixin:EnableSnapToInterval()
+ self.snapToInterval = true;
+end
+
+function ScrollControllerMixin:GetIntervalRange()
+ local visibleExtentPercentage = self:GetVisibleExtentPercentage();
+ if visibleExtentPercentage > 0 then
+ local intervals = math.floor((1 / visibleExtentPercentage) + MathUtil.Epsilon);
+ return intervals - 1;
+ end
+ return 0;
+end
+
function ScrollControllerMixin:ScrollIncrease(panFactor)
local panPercentage = self:GetWheelPanPercentage() * (panFactor or 1.0);
self:ScrollInDirection(panPercentage, ScrollControllerMixin.Directions.Increase);
@@ -78,10 +94,19 @@ function ScrollControllerMixin:ScrollDecrease(panFactor)
end
function ScrollControllerMixin:ScrollInDirection(scrollPercentage, direction)
- if self:IsScrollAllowed() then
- local delta = scrollPercentage * direction;
- self:SetScrollPercentage(Saturate(self:GetScrollPercentage() + delta));
+ if not self:IsScrollAllowed() then
+ return;
+ end
+
+ if self.snapToInterval then
+ local range = self:GetIntervalRange();
+ if range > 0 then
+ scrollPercentage = math.max(1 / range, scrollPercentage);
+ end
end
+
+ local delta = scrollPercentage * direction;
+ self:SetScrollPercentage(Saturate(self:GetScrollPercentage() + delta));
end
function ScrollControllerMixin:GetPanExtentPercentage()
@@ -109,6 +134,14 @@ function ScrollControllerMixin:IsAtEnd()
end
function ScrollControllerMixin:SetScrollPercentage(scrollPercentage)
+ if self.snapToInterval then
+ local range = self:GetIntervalRange();
+ if range > 0 then
+ local percentage = 1 / range;
+ scrollPercentage = Round(scrollPercentage / percentage) / range;
+ end
+ end
+
self.scrollPercentage = Saturate(scrollPercentage);
end
diff --git a/Interface/AddOns/Blizzard_SharedXML/Shared/Scroll/ScrollUtil.lua b/Interface/AddOns/Blizzard_SharedXML/Shared/Scroll/ScrollUtil.lua
index 953e0c02b2..ee0f40de00 100644
--- a/Interface/AddOns/Blizzard_SharedXML/Shared/Scroll/ScrollUtil.lua
+++ b/Interface/AddOns/Blizzard_SharedXML/Shared/Scroll/ScrollUtil.lua
@@ -236,6 +236,11 @@ function ScrollUtil.InitScrollFrameWithScrollBar(scrollFrame, scrollBar)
scrollBar:RegisterCallback(BaseScrollBoxEvents.OnScroll, onScrollBarScroll, scrollFrame);
end
+function ScrollUtil.EnableSnapToInterval(scrollBox, scrollBar)
+ scrollBox:EnableSnapToInterval();
+ scrollBar:EnableSnapToInterval();
+end
+
-- Utility for managing the visibility of a ScrollBar and reanchoring of the
-- ScrollBox as the visibility changes.
ManagedScrollBarVisibilityBehaviorMixin = CreateFromMixins(CallbackRegistryMixin);
diff --git a/Interface/AddOns/Blizzard_SharedXML/Shared/Selector/Blizzard_ScrollBoxSelector.lua b/Interface/AddOns/Blizzard_SharedXML/Shared/Selector/Blizzard_ScrollBoxSelector.lua
index 4252b24f9c..1ff751b839 100644
--- a/Interface/AddOns/Blizzard_SharedXML/Shared/Selector/Blizzard_ScrollBoxSelector.lua
+++ b/Interface/AddOns/Blizzard_SharedXML/Shared/Selector/Blizzard_ScrollBoxSelector.lua
@@ -30,7 +30,7 @@ end
function ScrollBoxSelectorMixin:UpdateSelections()
if self.initialized then
local dataProvider = CreateIndexRangeDataProvider(self:GetNumSelections());
- self.ScrollBox:SetDataProvider(dataProvider);
+ self.ScrollBox:SetDataProvider(dataProvider, self.retainScrollPosition);
end
end
diff --git a/Interface/AddOns/Blizzard_SharedXML/SharedBasicControls.lua b/Interface/AddOns/Blizzard_SharedXML/SharedBasicControls.lua
index d3a68b64c6..c86e523a97 100644
--- a/Interface/AddOns/Blizzard_SharedXML/SharedBasicControls.lua
+++ b/Interface/AddOns/Blizzard_SharedXML/SharedBasicControls.lua
@@ -355,7 +355,7 @@ function ScriptErrorsFrameMixin:ShowNext()
end
local function IsErrorCVarEnabled(errorTypeCVar)
- return IsOnGlueScreen() or GetCVarBool(errorTypeCVar);
+ return C_Glue.IsOnGlueScreen() or GetCVarBool(errorTypeCVar);
end
local function DisplayMessageInternal(errorTypeCVar, warnType, msg, messageType)
diff --git a/Interface/AddOns/Blizzard_SharedXMLBase/CvarUtil.lua b/Interface/AddOns/Blizzard_SharedXMLBase/CvarUtil.lua
index 7ff2d2b4fa..6a5ac266d8 100644
--- a/Interface/AddOns/Blizzard_SharedXMLBase/CvarUtil.lua
+++ b/Interface/AddOns/Blizzard_SharedXMLBase/CvarUtil.lua
@@ -118,22 +118,19 @@ end
function CVarCallbackRegistry:GetCVarValue(cvar)
local value = self.cvarValueCache[cvar];
- if value then
- return value;
- end
-
- value = GetCVar(cvar);
+ if value == nil then
+ value = GetCVar(cvar);
- if self.cachable[cvar] then
- self.cvarValueCache[cvar] = value;
+ if self.cachable[cvar] then
+ self.cvarValueCache[cvar] = value;
+ end
end
-
return value;
end
function CVarCallbackRegistry:GetCVarValueBool(cvar)
local value = self:GetCVarValue(cvar);
- return value and value ~= "0";
+ return (value ~= nil) and value ~= "0";
end
function CVarCallbackRegistry:SetCVarCachable(cvar)
diff --git a/Interface/AddOns/Blizzard_SharedXMLBase/TextureUtil.lua b/Interface/AddOns/Blizzard_SharedXMLBase/TextureUtil.lua
index c3dd15a05c..8392d5e2a3 100644
--- a/Interface/AddOns/Blizzard_SharedXMLBase/TextureUtil.lua
+++ b/Interface/AddOns/Blizzard_SharedXMLBase/TextureUtil.lua
@@ -369,4 +369,13 @@ function GetFinalAtlasFromTextureKitIfExists(texture, textureKit)
local atlas = GetFinalNameFromTextureKit(texture, textureKit);
local atlasInfo = C_Texture.GetAtlasInfo(atlas);
return atlasInfo and atlas or nil;
+end
+
+function CheckSetAtlas(texture, atlasName, ...)
+ if C_Texture.GetAtlasInfo(atlasName) then
+ texture:SetAtlas(atlasName, ...);
+ return true;
+ end
+
+ return false;
end
\ No newline at end of file
diff --git a/Interface/AddOns/Blizzard_StaticPopup_Frame/Classic/StaticPopup.lua b/Interface/AddOns/Blizzard_StaticPopup_Frame/Classic/StaticPopup.lua
index ffe1f9a3d2..d9147dc8bd 100644
--- a/Interface/AddOns/Blizzard_StaticPopup_Frame/Classic/StaticPopup.lua
+++ b/Interface/AddOns/Blizzard_StaticPopup_Frame/Classic/StaticPopup.lua
@@ -2604,7 +2604,7 @@ StaticPopupDialogs["REMOVE_GUILDMEMBER"] = {
if data then
self.text:SetFormattedText(REMOVE_GUILDMEMBER_LABEL, data.name);
else
- self.text:SetText(GuildFrame.selectedName);
+ self.text:SetFormattedText(REMOVE_GUILDMEMBER_LABEL, GuildFrame.selectedName);
end
end,
timeout = 0,
@@ -4280,9 +4280,9 @@ StaticPopupDialogs["CONFIRM_OVERWRITE_TRANSMOG_OUTFIT"] = {
text = TRANSMOG_OUTFIT_CONFIRM_OVERWRITE,
button1 = YES,
button2 = NO,
- OnAccept = function (self) WardrobeOutfitManager:SaveOutfit(self.data) end,
+ OnAccept = function (self) WardrobeOutfitManager:OverwriteOutfit(self.data.outfitID) end,
OnCancel = function (self)
- local name = self.data;
+ local name = self.data.name;
self:Hide();
local dialog = StaticPopup_Show("NAME_TRANSMOG_OUTFIT");
if ( dialog ) then
diff --git a/Interface/AddOns/Blizzard_StoreUI/Classic/Blizzard_SimpleCheckout.lua b/Interface/AddOns/Blizzard_StoreUI/Classic/Blizzard_SimpleCheckout.lua
index ecab7948e1..0dc528a1dd 100644
--- a/Interface/AddOns/Blizzard_StoreUI/Classic/Blizzard_SimpleCheckout.lua
+++ b/Interface/AddOns/Blizzard_StoreUI/Classic/Blizzard_SimpleCheckout.lua
@@ -24,7 +24,7 @@ function SimpleCheckoutMixin:OnEvent(event, ...)
self:CalculateDesiredSize();
self:RecalculateSize();
elseif (event == "SUBSCRIPTION_CHANGED_KICK_IMMINENT") then
- if (IsOnGlueScreen()) then
+ if (C_Glue.IsOnGlueScreen()) then
self.closeShopOnHide = true;
end
end
@@ -42,7 +42,7 @@ function SimpleCheckoutMixin:OnHide()
self:UnregisterEvent("DISPLAY_SIZE_CHANGED");
self:UnregisterEvent("SUBSCRIPTION_CHANGED_KICK_IMMINENT");
- if (IsOnGlueScreen() and self.closeShopOnHide) then
+ if (C_Glue.IsOnGlueScreen() and self.closeShopOnHide) then
_G.SetStoreUIShown(false);
_G.GlueDialog_Show("SUBSCRIPTION_CHANGED_KICK_WARNING");
self.closeShopOnHide = false;
diff --git a/Interface/AddOns/Blizzard_StoreUI/TBC/Blizzard_StoreUISecure.lua b/Interface/AddOns/Blizzard_StoreUI/TBC/Blizzard_StoreUISecure.lua
index 4b34e0917c..ff7daf0339 100644
--- a/Interface/AddOns/Blizzard_StoreUI/TBC/Blizzard_StoreUISecure.lua
+++ b/Interface/AddOns/Blizzard_StoreUI/TBC/Blizzard_StoreUISecure.lua
@@ -124,7 +124,7 @@ function GetSecureMoneyString(money, separateThousands, forceColorBlind)
local silver = floor((money - (gold * COPPER_PER_SILVER * SILVER_PER_GOLD)) / COPPER_PER_SILVER);
local copper = money % COPPER_PER_SILVER;
- if ( (not IsOnGlueScreen() and GetCVar("colorblindMode") == "1" ) or forceColorBlind ) then
+ if ( (not C_Glue.IsOnGlueScreen() and GetCVar("colorblindMode") == "1" ) or forceColorBlind ) then
if (separateThousands) then
goldString = SecureCurrencyUtil.FormatLargeNumber(gold)..GOLD_AMOUNT_SYMBOL;
else
@@ -518,7 +518,7 @@ function StoreFrame_UpdateCard(card, entryID, discountReset, forceModelUpdate)
end
if (card.DisabledOverlay) then
- local restrictedInGame = entryInfo.sharedData.productDecorator == Enum.BattlepayProductDecorator.VasService and not IsOnGlueScreen();
+ local restrictedInGame = entryInfo.sharedData.productDecorator == Enum.BattlepayProductDecorator.VasService and not C_Glue.IsOnGlueScreen();
local disabled = not card:IsEnabled();
-- If the only reason we can't buy this product is that we're in-world, redirect to the glue shop.
@@ -992,7 +992,7 @@ function StoreFrame_OnLoad(self)
-- We have to call this from CharacterSelect on the glue screen because the addon engine will load
-- the store addon more than once if we try to make it ondemand, forcing us to load it before we
-- have a connection.
- if (not IsOnGlueScreen()) then
+ if (not C_Glue.IsOnGlueScreen()) then
C_StoreSecure.GetPurchaseList();
end
@@ -1002,7 +1002,7 @@ function StoreFrame_OnLoad(self)
SetPortraitToTexture(self.portrait, "Interface\\Icons\\Inv_Misc_Note_02");
StoreFrame_UpdateBuyButton();
- if ( IsOnGlueScreen() ) then
+ if ( C_Glue.IsOnGlueScreen() ) then
self:SetFrameStrata("FULLSCREEN_DIALOG");
-- block keys
self:EnableKeyboard(true);
@@ -1155,7 +1155,7 @@ function StoreFrame_OnEvent(self, event, ...)
GlueDialog_Show("SUBSCRIPTION_CHANGED_KICK_WARNING");
end
elseif (event == "LOGIN_STATE_CHANGED") then
- if (IsOnGlueScreen()) then
+ if (C_Glue.IsOnGlueScreen()) then
local auroraState, connectedToWoW, wowConnectionState, hasRealmList, waitingForRealmList = C_Login.GetState();
if ( wowConnectionState == LE_WOW_CONNECTION_STATE_NONE ) then
self:Hide();
@@ -1170,7 +1170,7 @@ function StoreFrame_OnShow(self)
self:SetAttribute("isshown", true);
WasVeteran = IsVeteranTrialAccount();
StoreFrame_UpdateActivePanel(self);
- if ( not IsOnGlueScreen() ) then
+ if ( not C_Glue.IsOnGlueScreen() ) then
StoreOutbound.UpdateMicroButtons();
else
GlueParent_AddModalFrame(self);
@@ -1196,7 +1196,7 @@ function StoreFrame_OnHide(self)
self:SetAttribute("isshown", false);
-- TODO: Fix so will only hide if Store showed the preview frame
StoreOutbound.HidePreviewFrame();
- if ( not IsOnGlueScreen() ) then
+ if ( not C_Glue.IsOnGlueScreen() ) then
StoreOutbound.UpdateMicroButtons();
else
GlueParent_RemoveModalFrame(self);
@@ -1205,7 +1205,7 @@ function StoreFrame_OnHide(self)
if (VASReady) then
StoreVASValidationFrame_OnVasProductComplete(StoreVASValidationFrame);
- elseif (WaitingOnVASToComplete > 0 and IsOnGlueScreen()) then
+ elseif (WaitingOnVASToComplete > 0 and C_Glue.IsOnGlueScreen()) then
GetCharacterListUpdate();
end
@@ -1227,11 +1227,11 @@ function StoreFrame_OnMouseWheel(self, value)
end
function StoreFrame_OnCharacterBoostDelivered(self)
- if (IsOnGlueScreen() and BoostDeliveredUsageReason and not StoreOutbound.IsCharacterSelectUndeleting()) then
+ if (C_Glue.IsOnGlueScreen() and BoostDeliveredUsageReason and not StoreOutbound.IsCharacterSelectUndeleting()) then
self:Hide();
CharacterUpgradePopup_OnCharacterBoostDelivered(BoostType, BoostDeliveredUsageGUID, BoostDeliveredUsageReason);
- elseif (not IsOnGlueScreen() and StoreFrameHasBeenShown and not StoreOutbound.IsExpansionTrialUpgradeDialogShowing()) then
+ elseif (not C_Glue.IsOnGlueScreen() and StoreFrameHasBeenShown and not StoreOutbound.IsExpansionTrialUpgradeDialogShowing()) then
self:Hide();
local showReason = "forBoost";
@@ -1248,7 +1248,7 @@ end
function StoreFrame_OnLegionDelivered(self)
self:Hide();
- if (IsOnGlueScreen()) then
+ if (C_Glue.IsOnGlueScreen()) then
GlueDialog_Show("LEGION_PURCHASE_READY");
else
ServicesLogoutPopup_SetShowReason(ServicesLogoutPopup, "forLegion");
@@ -1409,7 +1409,7 @@ function StoreFrame_OnAttributeChanged(self, name, value)
buyButton:GetScript("OnClick")(buyButton);
end
elseif ( name == "getvaserrormessage" ) then
- if (IsOnGlueScreen()) then
+ if (C_Glue.IsOnGlueScreen()) then
self:SetAttribute("vaserrormessageresult", nil);
local data = value;
local character = C_StoreSecure.GetCharacterInfoByGUID(data.guid);
@@ -1492,7 +1492,7 @@ function StoreFrame_UpdateActivePanel(self, fromVASPurchaseCompletion)
StoreFrame_SetAlert(self, BLIZZARD_STORE_LOADING, BLIZZARD_STORE_PLEASE_WAIT);
elseif ( #GetStoreProductGroups() == 0 ) then
StoreFrame_SetAlert(self, BLIZZARD_STORE_NO_ITEMS, BLIZZARD_STORE_CHECK_BACK_LATER);
- elseif ( not IsOnGlueScreen() and not StoreFrame_HasFreeBagSlots() ) then
+ elseif ( not C_Glue.IsOnGlueScreen() and not StoreFrame_HasFreeBagSlots() ) then
StoreFrame_SetAlert(self, BLIZZARD_STORE_BAG_FULL, BLIZZARD_STORE_BAG_FULL_DESC);
elseif ( not SecureCurrencyUtil.GetActiveCurrencyInfo() ) then
StoreFrame_SetAlert(self, BLIZZARD_STORE_INTERNAL_ERROR, BLIZZARD_STORE_INTERNAL_ERROR_SUBTEXT);
@@ -1713,7 +1713,7 @@ function StoreFrame_CheckForFree(self, event)
if (event == "PRODUCT_DISTRIBUTIONS_UPDATED") then
self.distributionsUpdated = true;
end
- if (self.variablesLoaded and self.distributionsUpdated and C_SharedCharacterServices.HasFreePromotionalUpgrade() and not C_SharedCharacterServices.HasSeenFreePromotionalUpgradePopup() and not IsOnGlueScreen()) then
+ if (self.variablesLoaded and self.distributionsUpdated and C_SharedCharacterServices.HasFreePromotionalUpgrade() and not C_SharedCharacterServices.HasSeenFreePromotionalUpgradePopup() and not C_Glue.IsOnGlueScreen()) then
C_SharedCharacterServices.SetPromotionalPopupSeen(true);
self:Hide();
ServicesLogoutPopup.Background.Title:SetText(FREE_CHARACTER_UPGRADE_READY);
@@ -2027,7 +2027,7 @@ function StoreVASValidationFrame_OnLoad(self)
self.CharacterSelectionFrame[checkbox].Label:SetFontObjectsToTry("GameFontBlack", "GameFontBlackSmall", "GameFontBlackSmall2", "GameFontBlackTiny", "GameFontBlackTiny2");
end
- if (IsOnGlueScreen()) then
+ if (C_Glue.IsOnGlueScreen()) then
self.CharacterSelectionFrame.NewCharacterName:SetFontObject("GlueEditBoxFont");
self.CharacterSelectionFrame.TransferRealmEditbox:SetFontObject("GlueEditBoxFont");
self.CharacterSelectionFrame.TransferBattlenetAccountEditbox:SetFontObject("GlueEditBoxFont");
@@ -2156,7 +2156,7 @@ function StoreVASValidationFrame_UpdateCharacterTransferValidationPosition()
end
local VasQueueStatusToString
-if (IsOnGlueScreen()) then
+if (C_Glue.IsOnGlueScreen()) then
VasQueueStatusToString = {
[Enum.VasQueueStatus.UnderAnHour] = "SEVERAL_MINUTES",
[Enum.VasQueueStatus.OneToThreeHours] = "ONE_THREE_HOURS",
@@ -2224,7 +2224,7 @@ function StoreVASValidationFrame_OnEvent(self, event, ...)
JustFinishedOrdering = WaitingOnVASToComplete == WaitingOnVASToCompleteToken;
local fromVASPurchaseCompletion = true;
StoreFrame_UpdateActivePanel(StoreFrame, fromVASPurchaseCompletion);
- elseif (IsOnGlueScreen() and StoreOutbound.IsCharacterSelectVisible()) then
+ elseif (C_Glue.IsOnGlueScreen() and StoreOutbound.IsCharacterSelectVisible()) then
StoreVASValidationFrame_OnVasProductComplete(StoreVASValidationFrame);
end
elseif ( event == "VAS_TRANSFER_VALIDATION_UPDATE" ) then
@@ -2348,7 +2348,7 @@ function StoreVASValidationFrame_OnVasProductComplete(self)
return;
end
local productInfo = C_StoreSecure.GetProductInfo(productID);
- if (IsOnGlueScreen()) then
+ if (C_Glue.IsOnGlueScreen()) then
self:GetParent():Hide();
StoreOutbound.StoreFrameShowGlueDialog(string.format(BLIZZARD_STORE_VAS_PRODUCT_READY, productInfo.sharedData.name), guid, realmName, shouldHandle);
else
@@ -2419,7 +2419,7 @@ function StoreProductCard_UpdateState(card)
if (card.HighlightTexture) then
local entryID = card:GetID();
local entryInfo = C_StoreSecure.GetEntryInfo(entryID);
- local enableHighlight = card:GetID() ~= selectedEntryID and not isRotating and (entryInfo.sharedData.productDecorator ~= Enum.BattlepayProductDecorator.VasService or IsOnGlueScreen());
+ local enableHighlight = card:GetID() ~= selectedEntryID and not isRotating and (entryInfo.sharedData.productDecorator ~= Enum.BattlepayProductDecorator.VasService or C_Glue.IsOnGlueScreen());
card.HighlightTexture:SetAlpha(enableHighlight and 1 or 0);
if (not card.Description and card:IsMouseMotionFocus()) then
if (isRotating) then
@@ -2466,7 +2466,7 @@ function StoreProductCard_UpdateState(card)
StoreTooltip:ClearAllPoints();
StoreTooltip:SetPoint(point, card, rpoint, xoffset, 0);
- if (entryInfo.sharedData.productDecorator == Enum.BattlepayProductDecorator.VasService and not IsOnGlueScreen()) then
+ if (entryInfo.sharedData.productDecorator == Enum.BattlepayProductDecorator.VasService and not C_Glue.IsOnGlueScreen()) then
name = "";
description = BLIZZARD_STORE_LOG_OUT_TO_PURCHASE_THIS_PRODUCT;
end
@@ -2510,7 +2510,7 @@ end
function StoreProductCard_OnEnter(self)
local entryInfo = C_StoreSecure.GetEntryInfo(self:GetID());
- if (entryInfo.sharedData.productDecorator ~= Enum.BattlepayProductDecorator.VasService or IsOnGlueScreen()) then
+ if (entryInfo.sharedData.productDecorator ~= Enum.BattlepayProductDecorator.VasService or C_Glue.IsOnGlueScreen()) then
if (self.HighlightTexture) then
self.HighlightTexture:SetShown(selectedEntryID ~= self:GetID());
end
@@ -2532,7 +2532,7 @@ end
function StoreProductCard_CheckShowStorePreviewOnClick(self)
local showPreview;
- if ( IsOnGlueScreen() ) then
+ if ( C_Glue.IsOnGlueScreen() ) then
showPreview = IsControlKeyDown();
else
showPreview = IsModifiedClick("DRESSUP");
@@ -2558,7 +2558,7 @@ function StoreProductCard_OnClick(self,button,down)
end
end
- if (entryInfo.sharedData.productDecorator == Enum.BattlepayProductDecorator.VasService and not IsOnGlueScreen()) then
+ if (entryInfo.sharedData.productDecorator == Enum.BattlepayProductDecorator.VasService and not C_Glue.IsOnGlueScreen()) then
return;
end
@@ -2929,7 +2929,7 @@ function StoreProductCardItem_OnEnter(self)
point = "BOTTOMLEFT";
end
- if entryInfo.sharedData.itemID and not tbl.IsOnGlueScreen() then
+ if entryInfo.sharedData.itemID and not C_Glue.IsOnGlueScreen() then
self.hasItemTooltip = true;
StoreTooltip:Hide();
StoreOutbound.SetItemTooltip(entryInfo.sharedData.itemID, x, y, point);
diff --git a/Interface/AddOns/Blizzard_StoreUI/Vanilla/Blizzard_StoreUISecure.lua b/Interface/AddOns/Blizzard_StoreUI/Vanilla/Blizzard_StoreUISecure.lua
index 58f1c10f1c..78c4d1d0bd 100644
--- a/Interface/AddOns/Blizzard_StoreUI/Vanilla/Blizzard_StoreUISecure.lua
+++ b/Interface/AddOns/Blizzard_StoreUI/Vanilla/Blizzard_StoreUISecure.lua
@@ -108,7 +108,7 @@ function GetSecureMoneyString(money, separateThousands, forceColorBlind)
local silver = floor((money - (gold * COPPER_PER_SILVER * SILVER_PER_GOLD)) / COPPER_PER_SILVER);
local copper = money % COPPER_PER_SILVER;
- if ( (not IsOnGlueScreen() and GetCVar("colorblindMode") == "1" ) or forceColorBlind ) then
+ if ( (not C_Glue.IsOnGlueScreen() and GetCVar("colorblindMode") == "1" ) or forceColorBlind ) then
if (separateThousands) then
goldString = SecureCurrencyUtil.FormatLargeNumber(gold)..GOLD_AMOUNT_SYMBOL;
else
@@ -494,7 +494,7 @@ function StoreFrame_UpdateCard(card, entryID, discountReset, forceModelUpdate)
end
if (card.DisabledOverlay) then
- local restrictedInGame = entryInfo.sharedData.productDecorator == Enum.BattlepayProductDecorator.VasService and not IsOnGlueScreen();
+ local restrictedInGame = entryInfo.sharedData.productDecorator == Enum.BattlepayProductDecorator.VasService and not C_Glue.IsOnGlueScreen();
local disabled = not card:IsEnabled();
-- If the only reason we can't buy this product is that we're in-world, redirect to the glue shop.
@@ -915,7 +915,7 @@ function StoreFrame_OnLoad(self)
-- We have to call this from CharacterSelect on the glue screen because the addon engine will load
-- the store addon more than once if we try to make it ondemand, forcing us to load it before we
-- have a connection.
- if (not IsOnGlueScreen()) then
+ if (not C_Glue.IsOnGlueScreen()) then
C_StoreSecure.GetPurchaseList();
end
@@ -925,7 +925,7 @@ function StoreFrame_OnLoad(self)
SetPortraitToTexture(self.portrait, "Interface\\Icons\\Inv_Misc_Note_02");
StoreFrame_UpdateBuyButton();
- if ( IsOnGlueScreen() ) then
+ if ( C_Glue.IsOnGlueScreen() ) then
self:SetFrameStrata("FULLSCREEN_DIALOG");
-- block keys
self:EnableKeyboard(true);
@@ -1078,7 +1078,7 @@ function StoreFrame_OnEvent(self, event, ...)
GlueDialog_Show("SUBSCRIPTION_CHANGED_KICK_WARNING");
end
elseif (event == "LOGIN_STATE_CHANGED") then
- if (IsOnGlueScreen()) then
+ if (C_Glue.IsOnGlueScreen()) then
local auroraState, connectedToWoW, wowConnectionState, hasRealmList, waitingForRealmList = C_Login.GetState();
if ( wowConnectionState == LE_WOW_CONNECTION_STATE_NONE ) then
self:Hide();
@@ -1093,7 +1093,7 @@ function StoreFrame_OnShow(self)
self:SetAttribute("isshown", true);
WasVeteran = IsVeteranTrialAccount();
StoreFrame_UpdateActivePanel(self);
- if ( not IsOnGlueScreen() ) then
+ if ( not C_Glue.IsOnGlueScreen() ) then
StoreOutbound.UpdateMicroButtons();
else
GlueParent_AddModalFrame(self);
@@ -1119,7 +1119,7 @@ function StoreFrame_OnHide(self)
self:SetAttribute("isshown", false);
-- TODO: Fix so will only hide if Store showed the preview frame
StoreOutbound.HidePreviewFrame();
- if ( not IsOnGlueScreen() ) then
+ if ( not C_Glue.IsOnGlueScreen() ) then
StoreOutbound.UpdateMicroButtons();
else
GlueParent_RemoveModalFrame(self);
@@ -1128,7 +1128,7 @@ function StoreFrame_OnHide(self)
if (VASReady) then
StoreVASValidationFrame_OnVasProductComplete(StoreVASValidationFrame);
- elseif (WaitingOnVASToComplete > 0 and IsOnGlueScreen()) then
+ elseif (WaitingOnVASToComplete > 0 and C_Glue.IsOnGlueScreen()) then
GetCharacterListUpdate();
end
@@ -1150,11 +1150,11 @@ function StoreFrame_OnMouseWheel(self, value)
end
function StoreFrame_OnCharacterBoostDelivered(self)
- if (IsOnGlueScreen() and BoostDeliveredUsageReason and not StoreOutbound.IsCharacterSelectUndeleting()) then
+ if (C_Glue.IsOnGlueScreen() and BoostDeliveredUsageReason and not StoreOutbound.IsCharacterSelectUndeleting()) then
self:Hide();
CharacterUpgradePopup_OnCharacterBoostDelivered(BoostType, BoostDeliveredUsageGUID, BoostDeliveredUsageReason);
- elseif (not IsOnGlueScreen() and StoreFrameHasBeenShown and not StoreOutbound.IsExpansionTrialUpgradeDialogShowing()) then
+ elseif (not C_Glue.IsOnGlueScreen() and StoreFrameHasBeenShown and not StoreOutbound.IsExpansionTrialUpgradeDialogShowing()) then
self:Hide();
local showReason = "forBoost";
@@ -1171,7 +1171,7 @@ end
function StoreFrame_OnLegionDelivered(self)
self:Hide();
- if (IsOnGlueScreen()) then
+ if (C_Glue.IsOnGlueScreen()) then
GlueDialog_Show("LEGION_PURCHASE_READY");
else
ServicesLogoutPopup_SetShowReason(ServicesLogoutPopup, "forLegion");
@@ -1332,7 +1332,7 @@ function StoreFrame_OnAttributeChanged(self, name, value)
buyButton:GetScript("OnClick")(buyButton);
end
elseif ( name == "getvaserrormessage" ) then
- if (IsOnGlueScreen()) then
+ if (C_Glue.IsOnGlueScreen()) then
self:SetAttribute("vaserrormessageresult", nil);
local data = value;
local character = C_StoreSecure.GetCharacterInfoByGUID(data.guid);
@@ -1415,7 +1415,7 @@ function StoreFrame_UpdateActivePanel(self, fromVASPurchaseCompletion)
StoreFrame_SetAlert(self, BLIZZARD_STORE_LOADING, BLIZZARD_STORE_PLEASE_WAIT);
elseif ( #GetStoreProductGroups() == 0 ) then
StoreFrame_SetAlert(self, BLIZZARD_STORE_NO_ITEMS, BLIZZARD_STORE_CHECK_BACK_LATER);
- elseif ( not IsOnGlueScreen() and not StoreFrame_HasFreeBagSlots() ) then
+ elseif ( not C_Glue.IsOnGlueScreen() and not StoreFrame_HasFreeBagSlots() ) then
StoreFrame_SetAlert(self, BLIZZARD_STORE_BAG_FULL, BLIZZARD_STORE_BAG_FULL_DESC);
elseif ( not SecureCurrencyUtil.GetActiveCurrencyInfo() ) then
StoreFrame_SetAlert(self, BLIZZARD_STORE_INTERNAL_ERROR, BLIZZARD_STORE_INTERNAL_ERROR_SUBTEXT);
@@ -1636,7 +1636,7 @@ function StoreFrame_CheckForFree(self, event)
if (event == "PRODUCT_DISTRIBUTIONS_UPDATED") then
self.distributionsUpdated = true;
end
- if (self.variablesLoaded and self.distributionsUpdated and C_SharedCharacterServices.HasFreePromotionalUpgrade() and not C_SharedCharacterServices.HasSeenFreePromotionalUpgradePopup() and not IsOnGlueScreen()) then
+ if (self.variablesLoaded and self.distributionsUpdated and C_SharedCharacterServices.HasFreePromotionalUpgrade() and not C_SharedCharacterServices.HasSeenFreePromotionalUpgradePopup() and not C_Glue.IsOnGlueScreen()) then
C_SharedCharacterServices.SetPromotionalPopupSeen(true);
self:Hide();
ServicesLogoutPopup.Background.Title:SetText(FREE_CHARACTER_UPGRADE_READY);
@@ -1950,7 +1950,7 @@ function StoreVASValidationFrame_OnLoad(self)
self.CharacterSelectionFrame[checkbox].Label:SetFontObjectsToTry("GameFontBlack", "GameFontBlackSmall", "GameFontBlackSmall2", "GameFontBlackTiny", "GameFontBlackTiny2");
end
- if (IsOnGlueScreen()) then
+ if (C_Glue.IsOnGlueScreen()) then
self.CharacterSelectionFrame.NewCharacterName:SetFontObject("GlueEditBoxFont");
self.CharacterSelectionFrame.TransferRealmEditbox:SetFontObject("GlueEditBoxFont");
self.CharacterSelectionFrame.TransferBattlenetAccountEditbox:SetFontObject("GlueEditBoxFont");
@@ -2079,7 +2079,7 @@ function StoreVASValidationFrame_UpdateCharacterTransferValidationPosition()
end
local VasQueueStatusToString
-if (IsOnGlueScreen()) then
+if (C_Glue.IsOnGlueScreen()) then
VasQueueStatusToString = {
[Enum.VasQueueStatus.UnderAnHour] = "SEVERAL_MINUTES",
[Enum.VasQueueStatus.OneToThreeHours] = "ONE_THREE_HOURS",
@@ -2147,7 +2147,7 @@ function StoreVASValidationFrame_OnEvent(self, event, ...)
JustFinishedOrdering = WaitingOnVASToComplete == WaitingOnVASToCompleteToken;
local fromVASPurchaseCompletion = true;
StoreFrame_UpdateActivePanel(StoreFrame, fromVASPurchaseCompletion);
- elseif (IsOnGlueScreen() and StoreOutbound.IsCharacterSelectVisible()) then
+ elseif (C_Glue.IsOnGlueScreen() and StoreOutbound.IsCharacterSelectVisible()) then
StoreVASValidationFrame_OnVasProductComplete(StoreVASValidationFrame);
end
elseif ( event == "VAS_TRANSFER_VALIDATION_UPDATE" ) then
@@ -2271,7 +2271,7 @@ function StoreVASValidationFrame_OnVasProductComplete(self)
return;
end
local productInfo = C_StoreSecure.GetProductInfo(productID);
- if (IsOnGlueScreen()) then
+ if (C_Glue.IsOnGlueScreen()) then
self:GetParent():Hide();
StoreOutbound.StoreFrameShowGlueDialog(string.format(BLIZZARD_STORE_VAS_PRODUCT_READY, productInfo.sharedData.name), guid, realmName, shouldHandle);
else
@@ -2342,7 +2342,7 @@ function StoreProductCard_UpdateState(card)
if (card.HighlightTexture) then
local entryID = card:GetID();
local entryInfo = C_StoreSecure.GetEntryInfo(entryID);
- local enableHighlight = card:GetID() ~= selectedEntryID and not isRotating and (entryInfo.sharedData.productDecorator ~= Enum.BattlepayProductDecorator.VasService or IsOnGlueScreen());
+ local enableHighlight = card:GetID() ~= selectedEntryID and not isRotating and (entryInfo.sharedData.productDecorator ~= Enum.BattlepayProductDecorator.VasService or C_Glue.IsOnGlueScreen());
card.HighlightTexture:SetAlpha(enableHighlight and 1 or 0);
if (not card.Description and card:IsMouseMotionFocus()) then
if (isRotating) then
@@ -2389,7 +2389,7 @@ function StoreProductCard_UpdateState(card)
StoreTooltip:ClearAllPoints();
StoreTooltip:SetPoint(point, card, rpoint, xoffset, 0);
- if (entryInfo.sharedData.productDecorator == Enum.BattlepayProductDecorator.VasService and not IsOnGlueScreen()) then
+ if (entryInfo.sharedData.productDecorator == Enum.BattlepayProductDecorator.VasService and not C_Glue.IsOnGlueScreen()) then
name = "";
description = BLIZZARD_STORE_LOG_OUT_TO_PURCHASE_THIS_PRODUCT;
end
@@ -2433,7 +2433,7 @@ end
function StoreProductCard_OnEnter(self)
local entryInfo = C_StoreSecure.GetEntryInfo(self:GetID());
- if (entryInfo.sharedData.productDecorator ~= Enum.BattlepayProductDecorator.VasService or IsOnGlueScreen()) then
+ if (entryInfo.sharedData.productDecorator ~= Enum.BattlepayProductDecorator.VasService or C_Glue.IsOnGlueScreen()) then
if (self.HighlightTexture) then
self.HighlightTexture:SetShown(selectedEntryID ~= self:GetID());
end
@@ -2455,7 +2455,7 @@ end
function StoreProductCard_CheckShowStorePreviewOnClick(self)
local showPreview;
- if ( IsOnGlueScreen() ) then
+ if ( C_Glue.IsOnGlueScreen() ) then
showPreview = IsControlKeyDown();
else
showPreview = IsModifiedClick("DRESSUP");
@@ -2481,7 +2481,7 @@ function StoreProductCard_OnClick(self,button,down)
end
end
- if (entryInfo.sharedData.productDecorator == Enum.BattlepayProductDecorator.VasService and not IsOnGlueScreen()) then
+ if (entryInfo.sharedData.productDecorator == Enum.BattlepayProductDecorator.VasService and not C_Glue.IsOnGlueScreen()) then
return;
end
@@ -4283,4 +4283,4 @@ function StoreFrameSplashSingle_SetStyle(self, style, overrideBackground)
self.Checkmark:ClearAllPoints();
self.Checkmark:SetPoint("BOTTOM", self.Magnifier, "TOP", 5, 2);
end
-end
\ No newline at end of file
+end
diff --git a/Interface/AddOns/Blizzard_TokenUI/Cata/Blizzard_TokenUI.xml b/Interface/AddOns/Blizzard_TokenUI/Cata/Blizzard_TokenUI.xml
index ec355e5517..0e9917796c 100644
--- a/Interface/AddOns/Blizzard_TokenUI/Cata/Blizzard_TokenUI.xml
+++ b/Interface/AddOns/Blizzard_TokenUI/Cata/Blizzard_TokenUI.xml
@@ -1,5 +1,5 @@
+..\..\..\..\..\..\WoW\Data\Interface\AddOns\Blizzard_SharedXML\UI.xsd">
diff --git a/Interface/AddOns/Blizzard_UIPanels_Game/Blizzard_UIPanels_Game_Cata.toc b/Interface/AddOns/Blizzard_UIPanels_Game/Blizzard_UIPanels_Game_Cata.toc
index 4a49ebccba..d38baa178f 100644
--- a/Interface/AddOns/Blizzard_UIPanels_Game/Blizzard_UIPanels_Game_Cata.toc
+++ b/Interface/AddOns/Blizzard_UIPanels_Game/Blizzard_UIPanels_Game_Cata.toc
@@ -45,9 +45,8 @@ Classic\ItemRef.lua
Classic\ItemRef.xml
Classic\ProductChoice.lua
Classic\ProductChoice.xml
-Classic\FriendsFrame_Shared.lua
-Wrath\FriendsFrame.lua
-Wrath\FriendsFrame.xml
+Classic\FriendsFrame.lua
+Classic\FriendsFrame.xml
Wrath\RaidFrame.lua
Wrath\RaidFrame.xml
Classic\UnitPositionFrameTemplates.lua
diff --git a/Interface/AddOns/Blizzard_UIPanels_Game/Blizzard_UIPanels_Game_Vanilla.toc b/Interface/AddOns/Blizzard_UIPanels_Game/Blizzard_UIPanels_Game_Vanilla.toc
index 42d8088392..1ab2cf5844 100644
--- a/Interface/AddOns/Blizzard_UIPanels_Game/Blizzard_UIPanels_Game_Vanilla.toc
+++ b/Interface/AddOns/Blizzard_UIPanels_Game/Blizzard_UIPanels_Game_Vanilla.toc
@@ -39,9 +39,8 @@ Classic\ItemRef.lua
Classic\ItemRef.xml
Classic\ProductChoice.lua
Classic\ProductChoice.xml
-Classic\FriendsFrame_Shared.lua
-Vanilla\FriendsFrame.lua
-Vanilla\FriendsFrame.xml
+Classic\FriendsFrame.lua
+Classic\FriendsFrame.xml
Classic\RaidFrame.lua
Classic\RaidFrame.xml
Classic\UnitPositionFrameTemplates.lua
diff --git a/Interface/AddOns/Blizzard_UIPanels_Game/Blizzard_UIPanels_Game_Wrath.toc b/Interface/AddOns/Blizzard_UIPanels_Game/Blizzard_UIPanels_Game_Wrath.toc
index 631cb7012e..50fa13537a 100644
--- a/Interface/AddOns/Blizzard_UIPanels_Game/Blizzard_UIPanels_Game_Wrath.toc
+++ b/Interface/AddOns/Blizzard_UIPanels_Game/Blizzard_UIPanels_Game_Wrath.toc
@@ -44,9 +44,8 @@ Classic\ItemRef.lua
Classic\ItemRef.xml
Classic\ProductChoice.lua
Classic\ProductChoice.xml
-Classic\FriendsFrame_Shared.lua
-Wrath\FriendsFrame.lua
-Wrath\FriendsFrame.xml
+Classic\FriendsFrame.lua
+Classic\FriendsFrame.xml
Wrath\RaidFrame.lua
Wrath\RaidFrame.xml
Classic\UnitPositionFrameTemplates.lua
diff --git a/Interface/AddOns/Blizzard_UIPanels_Game/Classic/FriendsFrame_Shared.lua b/Interface/AddOns/Blizzard_UIPanels_Game/Classic/FriendsFrame.lua
similarity index 68%
rename from Interface/AddOns/Blizzard_UIPanels_Game/Classic/FriendsFrame_Shared.lua
rename to Interface/AddOns/Blizzard_UIPanels_Game/Classic/FriendsFrame.lua
index 37803e074b..475de0c339 100644
--- a/Interface/AddOns/Blizzard_UIPanels_Game/Classic/FriendsFrame_Shared.lua
+++ b/Interface/AddOns/Blizzard_UIPanels_Game/Classic/FriendsFrame.lua
@@ -1,5 +1,3 @@
--- See FriendsFrame_Vanilla, FriendsFrame_TBC, etc for expansion-specific functions
-
FRIENDS_TO_DISPLAY = 10;
FRIENDS_FRAME_FRIEND_HEIGHT = 34;
IGNORES_TO_DISPLAY = 19;
@@ -50,18 +48,16 @@ ADDFRIENDFRAME_BNETHEIGHT = 296;
FRIEND_TABS_MAX_WIDTH = 280;
-FRIEND_TAB_COUNT = 3;
-FRIEND_OPTIONAL_TAB_COUNT = 0;
+FRIEND_TAB_COUNT = 4; -- This is the max number of tabs we can have shown. (Some may be hidden.)
+FRIEND_TAB_BASE_COUNT = 3; -- This is the base number of tabs we're guaranteed to have shown.
FRIEND_TAB_FRIENDS = 1;
FRIEND_TAB_WHO = 2;
-FRIEND_TAB_RAID = 3;
-FRIEND_TAB_GUILD = 4;
-FRIEND_TAB_BLIZZARDGROUPS = 5;
+FRIEND_TAB_GUILD = 3; -- May or may not be shown.
+FRIEND_TAB_RAID = 4;
FRIEND_HEADER_TAB_FRIENDS = 1;
FRIEND_HEADER_TAB_IGNORE = 2;
-COMMUNITY_FRAME_HAS_BEEN_SHOWN = false; -- Flag for whether the Community Frame has been shown this session.
-FRIENDS_COMMUNITY_SWAP_IN_PROGRESS = false; -- Flag that should be set when we're toggling between the Friends / Community frames (and unset afterwards).
+PENDING_GUILDBANK_PERMISSIONS = {};
local INVITE_RESTRICTION_NO_GAME_ACCOUNTS = 0;
local INVITE_RESTRICTION_CLIENT = 1;
@@ -91,7 +87,9 @@ local ONE_YEAR = 12 * ONE_MONTH;
local whoSortValue = 1;
-FRIENDSFRAME_SUBFRAMES = { "FriendsListFrame", "IgnoreListFrame", "WhoFrame", "GuildFrame", "RaidFrame", "CommunitiesFrame" };
+CVarCallbackRegistry:SetCVarCachable("useClassicGuildUI");
+
+FRIENDSFRAME_SUBFRAMES = { "FriendsListFrame", "IgnoreListFrame", "WhoFrame", "GuildFrame", "RaidFrame" };
function FriendsFrame_ShowSubFrame(frameName)
for index, value in pairs(FRIENDSFRAME_SUBFRAMES) do
if ( value == frameName ) then
@@ -100,10 +98,6 @@ function FriendsFrame_ShowSubFrame(frameName)
if ( RaidFrame:GetParent() == FriendsFrame ) then
RaidFrame:Hide();
end
- elseif ( value == "CommunitiesFrame") then
- if ( CommunitiesFrame and CommunitiesFrame:IsVisible() ) then
- CommunitiesFrame:Hide();
- end
else
_G[value]:Hide();
end
@@ -247,15 +241,209 @@ function FriendsFrame_CheckDethroneStatus()
GuildFrameControlButton:SetShown(not canReplaceGM);
end
+function FriendsFrame_OnLoad(self)
+ PanelTemplates_SetNumTabs(self, FRIEND_TAB_COUNT);
+ self.selectedTab = FRIEND_TAB_FRIENDS;
+ PanelTemplates_UpdateTabs(self);
+ self:RegisterEvent("FRIENDLIST_UPDATE");
+ self:RegisterEvent("IGNORELIST_UPDATE");
+ self:RegisterEvent("WHO_LIST_UPDATE");
+ self:RegisterEvent("GROUP_ROSTER_UPDATE");
+ self:RegisterEvent("PLAYER_GUILD_UPDATE");
+ self:RegisterEvent("GUILD_MOTD");
+ self:RegisterEvent("PLAYER_FLAGS_CHANGED");
+ self:RegisterEvent("BN_FRIEND_LIST_SIZE_CHANGED");
+ self:RegisterEvent("BN_FRIEND_INFO_CHANGED");
+ self:RegisterEvent("BN_FRIEND_INVITE_LIST_INITIALIZED");
+ self:RegisterEvent("BN_FRIEND_INVITE_ADDED");
+ self:RegisterEvent("BN_FRIEND_INVITE_REMOVED");
+ self:RegisterEvent("BN_CUSTOM_MESSAGE_CHANGED");
+ self:RegisterEvent("BN_CUSTOM_MESSAGE_LOADED");
+ self:RegisterEvent("BN_BLOCK_LIST_UPDATED");
+ self:RegisterEvent("PLAYER_ENTERING_WORLD");
+ self:RegisterEvent("BN_CONNECTED");
+ self:RegisterEvent("BN_DISCONNECTED");
+ self:RegisterEvent("BN_INFO_CHANGED");
+ self:RegisterEvent("SPELL_UPDATE_COOLDOWN");
+ self:RegisterEvent("BATTLETAG_INVITE_SHOW");
+ self:RegisterEvent("GUILD_ROSTER_UPDATE");
+ self:RegisterEvent("GROUP_JOINED");
+ self:RegisterEvent("GROUP_LEFT");
+ self:RegisterEvent("GUILD_RENAME_REQUIRED");
+ self:RegisterEvent("REQUIRED_GUILD_RENAME_RESULT");
+ self:RegisterEvent("GUILD_EVENT_LOG_UPDATE");
+ self.playerStatusFrame = 1;
+ self.selectedFriend = 1;
+ self.selectedIgnore = 1;
+ -- guild
+ self.guildStatus = 0;
+ GuildFrame.notesToggle = 1;
+ GuildFrame.selectedGuildMember = 0;
+ GuildFrame.hasForcedNameChange = GetGuildRenameRequired();
+ SetGuildRosterSelection(0);
+ local currentGuildMOTD = GetGuildRosterMOTD();
+ GuildFrameNotesText:SetText(currentGuildMOTD);
+ GuildMemberDetailRankText:SetPoint("RIGHT", GuildFramePromoteButton, "LEFT");
+ -- friends list
+ local scrollFrame = FriendsFrameFriendsScrollFrame;
+ scrollFrame.update = FriendsFrame_UpdateFriends;
+ scrollFrame.dynamic = FriendsList_GetScrollFrameTopButton;
+ scrollFrame.dividerPool = CreateFramePool("FRAME", self, "FriendsFrameFriendDividerTemplate");
+ scrollFrame.invitePool = CreateFramePool("FRAME", self, "FriendsFrameFriendInviteTemplate");
+ -- can't do this in XML because we're inheriting from a template
+ scrollFrame.PendingInvitesHeaderButton:SetParent(scrollFrame.ScrollChild);
+ FriendsFrameFriendsScrollFrameScrollBarTrack:Hide();
+ FriendsFrameFriendsScrollFrameScrollBar.doNotHide = true;
+ HybridScrollFrame_CreateButtons(scrollFrame, "FriendsFrameButtonTemplate");
+ FriendsFrameIcon:SetTexture("Interface\\FriendsFrame\\FriendsFrameScrollIcon");
+
+ GuildControlPopupFrame.numSkipUpdates = 0;
+
+ FriendsFrameBroadcastInputClearButton.icon:SetVertexColor(FRIENDS_BNET_NAME_COLOR.r, FRIENDS_BNET_NAME_COLOR.g, FRIENDS_BNET_NAME_COLOR.b);
+ if ( not BNFeaturesEnabled() ) then
+ FriendsFrameBattlenetFrame:Hide();
+ FriendsFrameBroadcastInput:Hide();
+ end
+
+ --Create lists of buttons for various subframes
+ for i = 2, 19 do
+ local button = CreateFrame("Button", "FriendsFrameIgnoreButton"..i, IgnoreListFrame, "FriendsFrameIgnoreButtonTemplate");
+ button:SetPoint("TOP", _G["FriendsFrameIgnoreButton"..(i-1)], "BOTTOM");
+ end
+ for i = 2, 17 do
+ local button = CreateFrame("Button", "WhoFrameButton"..i, WhoFrame, "FriendsFrameWhoButtonTemplate");
+ button:SetID(i);
+ button:SetPoint("TOP", _G["WhoFrameButton"..(i-1)], "BOTTOM");
+ end
+end
+
+function FriendsFrame_OnEvent(self, event, ...)
+ if ( event == "SPELL_UPDATE_COOLDOWN" ) then
+ if ( self:IsShown() ) then
+ local buttons = FriendsFrameFriendsScrollFrame.buttons;
+ for _, button in pairs(buttons) do
+ if ( button.summonButton:IsShown() ) then
+ FriendsFrame_SummonButton_Update(button.summonButton);
+ end
+ end
+ end
+ elseif ( event == "FRIENDLIST_UPDATE" or event == "GROUP_ROSTER_UPDATE" ) then
+ FriendsList_Update();
+ elseif ( event == "BN_FRIEND_LIST_SIZE_CHANGED" or event == "BN_FRIEND_INFO_CHANGED" ) then
+ FriendsList_Update();
+ -- update Friends of Friends
+ local bnetIDAccount = ...;
+ if ( event == "BN_FRIEND_LIST_SIZE_CHANGED" and bnetIDAccount ) then
+ FriendsFriendsFrame.requested[bnetIDAccount] = nil;
+ if ( FriendsFriendsFrame:IsShown() ) then
+ FriendsFriendsList_Update();
+ end
+ end
+ elseif ( event == "BN_CUSTOM_MESSAGE_CHANGED" ) then
+ local arg1 = ...;
+ if ( arg1 ) then --There is no bnetIDAccount given if this is ourself.
+ FriendsList_Update();
+ else
+ FriendsFrameBattlenetFrame_UpdateBroadcast();
+ end
+ elseif ( event == "BN_CUSTOM_MESSAGE_LOADED" ) then
+ FriendsFrameBattlenetFrame_UpdateBroadcast();
+ elseif ( event == "BN_FRIEND_INVITE_ADDED" ) then
+ -- flash the invites header if collapsed
+ local collapsed = GetCVarBool("friendInvitesCollapsed");
+ if ( collapsed ) then
+ FriendsFrameFriendsScrollFrame.PendingInvitesHeaderButton.Flash.Anim:Play();
+ end
+ FriendsList_Update();
+ elseif ( event == "BN_FRIEND_INVITE_LIST_INITIALIZED" ) then
+ FriendsList_Update();
+ elseif ( event == "BN_FRIEND_INVITE_REMOVED" ) then
+ FriendsList_Update();
+ elseif ( event == "IGNORELIST_UPDATE" or event == "BN_BLOCK_LIST_UPDATED" ) then
+ IgnoreList_Update();
+ elseif ( event == "WHO_LIST_UPDATE" ) then
+ WhoFrame.selectedWho = nil;
+ WhoList_Update();
+ FriendsFrame_Update();
+ elseif ( event == "PLAYER_FLAGS_CHANGED" or event == "BN_INFO_CHANGED") then
+ FriendsFrameStatusDropdown:GenerateMenu();
+ FriendsFrame_CheckBattlenetStatus();
+ elseif ( event == "PLAYER_ENTERING_WORLD" or event == "BN_CONNECTED" or event == "BN_DISCONNECTED") then
+ FriendsFrame_CheckBattlenetStatus();
+ -- We want to remove any friends from the frame so they don't linger when it's first re-opened.
+ if (event == "BN_DISCONNECTED") then
+ FriendsList_Update(true);
+ end
+ elseif ( event == "BATTLETAG_INVITE_SHOW" ) then
+ BattleTagInviteFrame_Show(...);
+ elseif ( event == "SOCIAL_QUEUE_UPDATE" or event == "GROUP_LEFT" or event == "GROUP_JOINED" ) then
+ if ( self:IsVisible() ) then
+ FriendsFrame_Update(); --TODO - Only update the buttons that need updating
+ end
+ elseif ( event == "GUILD_ROSTER_UPDATE" ) then
+ FriendsFrame_CheckDethroneStatus();
+
+ GuildInfoFrame.cachedText = nil;
+ if ( GuildFrame:IsShown() ) then
+ local arg1 = ...;
+ if ( arg1 ) then
+ C_GuildInfo.GuildRoster();
+ end
+ GuildStatus_Update();
+ FriendsFrame_Update();
+ GuildControlPopupFrame_Initialize();
+ end
+ if ( GuildEventLogFrame:IsShown() ) then
+ QueryGuildEventLog();
+ end
+ elseif ( event == "PLAYER_GUILD_UPDATE" ) then
+ if ( FriendsFrame:IsVisible() ) then
+ InGuildCheck();
+ end
+ if ( not IsInGuild() ) then
+ GuildControlPopupFrame.initialized = false;
+ end
+ elseif ( event == "GUILD_MOTD") then
+ local currentGuildMOTD = ...;
+ GuildFrameNotesText:SetText(currentGuildMOTD);
+ elseif ( event == "GUILD_RENAME_REQUIRED" ) then
+ GuildFrame.hasForcedNameChange = ...;
+ GuildFrame_CheckName();
+ elseif ( event == "REQUIRED_GUILD_RENAME_RESULT" ) then
+ local success = ...
+ if ( success ) then
+ GuildFrame.hasForcedNameChange = GetGuildRenameRequired();
+ GuildFrame_CheckName();
+ else
+ UIErrorsFrame:AddMessage(ERR_GUILD_NAME_INVALID, 1.0, 0.1, 0.1, 1.0);
+ end
+ elseif ( event == "GUILD_EVENT_LOG_UPDATE" ) then
+ GuildEventLog_Update();
+ end
+end
+
+function FriendsFrame_InviteOrRequestToJoin(guid, gameAccountID)
+ local inviteType = GetDisplayedInviteType(guid);
+ if ( inviteType == "INVITE" or inviteType == "SUGGEST_INVITE" ) then
+ if inviteType == "SUGGEST_INVITE" and C_PartyInfo.IsPartyFull() then
+ ChatFrame_DisplaySystemMessageInPrimary(ERR_GROUP_FULL);
+ return;
+ end
+
+ BNInviteFriend(gameAccountID);
+ elseif ( inviteType == "REQUEST_INVITE" ) then
+ BNRequestInviteFriend(gameAccountID);
+ end
+end
+
function FriendsFrame_OnShow()
+ FriendsFrame_UpdateVisibleTabs();
FriendsList_Update(true);
FriendsFrame_Update();
UpdateMicroButtons();
PlaySound(SOUNDKIT.IG_CHARACTER_INFO_TAB);
C_GuildInfo.GuildRoster();
InGuildCheck();
- BlizzardGroups_UpdateNotifications();
- FriendsFrame_UpdateVisibleTabs();
FriendsFrame_CheckDethroneStatus();
end
@@ -307,25 +495,18 @@ function FriendsFrame_Update()
FriendsFrameTitleText:SetText(RAID);
ClaimRaidFrame(FriendsFrame);
FriendsFrame_ShowSubFrame("RaidFrame");
- elseif ( selectedTab == FRIEND_TAB_BLIZZARDGROUPS ) then
- -- Hide the current frame and swap to the Communities Frame.
- FriendsFrame_ToggleToCommunities(selectedTab);
end
end
function FriendsFrame_OnHide()
UpdateMicroButtons();
- if (not FRIENDS_COMMUNITY_SWAP_IN_PROGRESS) then
- PlaySound(SOUNDKIT.IG_MAINMENU_CLOSE);
- end
+ PlaySound(SOUNDKIT.IG_MAINMENU_CLOSE);
RaidInfoFrame:Hide();
for index, value in pairs(FRIENDSFRAME_SUBFRAMES) do
if ( value == "RaidFrame" ) then
if ( RaidFrame:GetParent() == FriendsFrame ) then
RaidFrame:Hide();
end
- elseif ( value == "CommunitiesFrame") then
- -- Do nothing.
else
_G[value]:Hide();
end
@@ -1005,15 +1186,14 @@ function FriendsFrame_GroupInvite()
PlaySound(SOUNDKIT.U_CHAT_SCROLL_BUTTON);
end
-function ToggleFriendsFrame(tab, fromCommunityFrame)
+function ToggleFriendsFrame(tab)
if (Kiosk.IsEnabled()) then
return;
end
if ( not tab ) then
- if ( FriendsFrame:IsShown() or (CommunitiesFrame and CommunitiesFrame:IsShown()) ) then
+ if ( FriendsFrame:IsShown() ) then
HideUIPanel(FriendsFrame);
- HideUIPanel(CommunitiesFrame);
else
ShowUIPanel(FriendsFrame);
end
@@ -1022,13 +1202,12 @@ function ToggleFriendsFrame(tab, fromCommunityFrame)
if ( tab == FRIEND_TAB_GUILD and not IsInGuild() ) then
return;
end
- if (CommunitiesFrame) then
- HideUIPanel(CommunitiesFrame);
- end
if ( tab == PanelTemplates_GetSelectedTab(FriendsFrame) and FriendsFrame:IsShown() ) then
HideUIPanel(FriendsFrame);
return;
end
+
+ -- If we made it here, show the tab.
PanelTemplates_SetTab(FriendsFrame, tab);
if ( FriendsFrame:IsShown() ) then
FriendsFrame_OnShow();
@@ -2231,13 +2410,797 @@ function GroupsButton_Update(self)
self.Icon:SetDesaturated(false);
end
+
+
-- ============================================ GUILD ===============================================================================
GUILDFRAME_POPUPS = {
+ "GuildEventLogFrame",
"GuildInfoFrame",
"GuildMemberDetailFrame",
"GuildControlPopupFrame",
};
+function GuildControlPopupFrame_OnLoad()
+ local buttonText;
+ for i=1, 17 do
+ buttonText = _G["GuildControlPopupFrameCheckbox"..i.."Text"];
+ if ( buttonText ) then
+ buttonText:SetText(_G["GUILDCONTROL_OPTION"..i]);
+ end
+ end
+ GuildControlTabPermissionsViewTabText:SetText(GUILDCONTROL_VIEW_TAB);
+ GuildControlTabPermissionsDepositItemsText:SetText(GUILDCONTROL_DEPOSIT_ITEMS);
+ GuildControlTabPermissionsUpdateTextText:SetText(GUILDCONTROL_OPTION19); --option # is a lie, we're simply repurposing this globalstring from mainline
+ ClearPendingGuildBankPermissions();
+
+ if not C_GuildBank.IsGuildBankEnabled() then
+ GuildControlPopupFrame_HideGuildBankOptions();
+ end
+end
+
+--Need to call this function on an event since the guildroster is not available during OnLoad()
+function GuildControlPopupFrame_Initialize()
+ if ( GuildControlPopupFrame.initialized ) then
+ return;
+ end
+
+ GuildControlSetRank(1);
+
+ -- Select tab 1
+ GuildBankTabPermissionsTab_OnClick(1);
+ GuildControlPopupFrameDropdownButton_ClickedRank(1);
+
+ GuildControlPopupFrame:SetScript("OnEvent", GuildControlPopupFrame_OnEvent);
+ GuildControlPopupFrame.initialized = 1;
+ GuildControlPopupFrame.rank = GuildControlGetRankName(1);
+end
+
+function GuildControlPopupFrame_OnShow()
+ FriendsFrame:SetAttribute("UIPanelLayout-defined", nil);
+ FriendsFrame.guildControlShow = 1;
+ GuildControlPopupAcceptButton:Disable();
+ -- Update popup
+ GuildControlPopupFrame_Initialize();
+ GuildControlPopupframe_Update();
+
+ UIPanelWindows["FriendsFrame"].width = FriendsFrame:GetWidth() + GuildControlPopupFrame:GetWidth();
+ UpdateUIPanelPositions(FriendsFrame);
+ --GuildControlPopupFrame:RegisterEvent("GUILD_ROSTER_UPDATE"); --It was decided that having a risk of conflict when two people are editing the guild permissions at once is better than resetting whenever someone joins the guild or changes ranks.
+ GuildControlPopupFrame:RegisterEvent("GUILD_RANKS_UPDATE");
+end
+
+function GuildControlPopupFrame_OnEvent (self, event, ...)
+ if ( not IsGuildLeader(UnitName("player")) ) then
+ GuildControlPopupFrame:Hide();
+ return;
+ end
+
+ for i=1, GuildControlGetNumRanks() do
+ if GuildControlGetRank() == i then
+ GuildControlPopupFrameDropdown:GenerateMenu();
+ break;
+ end
+ end
+
+ local skipCheckboxUpdate = true;
+ GuildControlPopupFrame.numSkipUpdates = GuildControlPopupFrame.numSkipUpdates - 1;
+ if ( GuildControlPopupFrame.numSkipUpdates < 1 ) then
+ GuildControlPopupFrame.numSkipUpdates = 0;
+ skipCheckboxUpdate = false;
+ end
+
+ GuildControlPopupframe_Update(false, skipCheckboxUpdate);
+end
+
+function GuildControlPopupFrame_OnHide()
+ FriendsFrame:SetAttribute("UIPanelLayout-defined", nil);
+ FriendsFrame.guildControlShow = 0;
+
+ UIPanelWindows["FriendsFrame"].width = FriendsFrame:GetWidth();
+ UpdateUIPanelPositions();
+
+ GuildControlPopupFrame.goldChanged = nil;
+ GuildControlPopupFrame:UnregisterEvent("GUILD_ROSTER_UPDATE");
+end
+
+function GuildControlPopupframe_Update(loadPendingTabPermissions, skipCheckboxUpdate)
+ local rankID = GuildControlGetRank();
+ -- Skip non-tab specific updates to fix Bug ID: 110210
+ if ( not skipCheckboxUpdate ) then
+ -- Update permission flags
+ GuildControlCheckboxUpdate(C_GuildInfo.GuildControlGetRankFlags(rankID));
+ end
+
+ GuildControlPopupFrameEditBox:SetText(GuildControlGetRankName(rankID));
+ if ( GuildControlPopupFrame.previousSelectedRank and GuildControlPopupFrame.previousSelectedRank ~= rankID ) then
+ ClearPendingGuildBankPermissions();
+ end
+ GuildControlPopupFrame.previousSelectedRank = rankID;
+
+ --If rank to modify is guild master then gray everything out
+ if ( IsGuildLeader() and rankID == 1 ) then
+ GuildBankTabLabel:SetVertexColor(GRAY_FONT_COLOR.r, GRAY_FONT_COLOR.g, GRAY_FONT_COLOR.b);
+ GuildControlTabPermissionsDepositItems:SetChecked(1);
+ GuildControlTabPermissionsViewTab:SetChecked(1);
+ GuildControlTabPermissionsUpdateText:SetChecked(1);
+ GuildControlTabPermissionsDepositItems:Disable();
+ GuildControlTabPermissionsViewTab:Disable();
+ GuildControlTabPermissionsUpdateText:Disable();
+ GuildControlTabPermissionsWithdrawItemsText:SetVertexColor(GRAY_FONT_COLOR.r, GRAY_FONT_COLOR.g, GRAY_FONT_COLOR.b);
+ GuildControlWithdrawItemsEditBox:SetNumeric(nil);
+ GuildControlWithdrawItemsEditBox:SetTextColor(GRAY_FONT_COLOR.r, GRAY_FONT_COLOR.g, GRAY_FONT_COLOR.b);
+ GuildControlWithdrawItemsEditBox:SetText(UNLIMITED);
+ GuildControlWithdrawItemsEditBox:ClearFocus();
+ GuildControlWithdrawItemsEditBoxMask:Show();
+ GuildControlWithdrawGoldText:SetVertexColor(GRAY_FONT_COLOR.r, GRAY_FONT_COLOR.g, GRAY_FONT_COLOR.b);
+ GuildControlWithdrawGoldAmountText:SetVertexColor(GRAY_FONT_COLOR.r, GRAY_FONT_COLOR.g, GRAY_FONT_COLOR.b);
+ GuildControlWithdrawGoldEditBox:SetNumeric(nil);
+ GuildControlWithdrawGoldEditBox:SetMaxLetters(0);
+ GuildControlWithdrawGoldEditBox:SetTextColor(GRAY_FONT_COLOR.r, GRAY_FONT_COLOR.g, GRAY_FONT_COLOR.b);
+ GuildControlWithdrawGoldEditBox:SetText(UNLIMITED);
+ GuildControlWithdrawGoldEditBox:ClearFocus();
+ GuildControlWithdrawGoldEditBoxMask:Show();
+ GuildControlPopupFrameCheckbox15:Disable();
+ GuildControlPopupFrameCheckbox16:Disable();
+ else
+ if ( GetNumGuildBankTabs() == 0 ) then
+ -- No tabs, no permissions! Disable the tab related doohickies
+ GuildBankTabLabel:SetVertexColor(GRAY_FONT_COLOR.r, GRAY_FONT_COLOR.g, GRAY_FONT_COLOR.b);
+ GuildControlTabPermissionsViewTab:Disable();
+ GuildControlTabPermissionsDepositItems:Disable();
+ GuildControlTabPermissionsUpdateText:Disable();
+ GuildControlTabPermissionsWithdrawItemsText:SetVertexColor(GRAY_FONT_COLOR.r, GRAY_FONT_COLOR.g, GRAY_FONT_COLOR.b);
+ GuildControlWithdrawItemsEditBox:SetText(UNLIMITED);
+ GuildControlWithdrawItemsEditBox:ClearFocus();
+ GuildControlWithdrawItemsEditBoxMask:Show();
+ else
+ GuildBankTabLabel:SetVertexColor(NORMAL_FONT_COLOR.r, NORMAL_FONT_COLOR.g, NORMAL_FONT_COLOR.b);
+ GuildControlTabPermissionsViewTab:Enable();
+ GuildControlTabPermissionsWithdrawItemsText:SetVertexColor(NORMAL_FONT_COLOR.r, NORMAL_FONT_COLOR.g, NORMAL_FONT_COLOR.b);
+ GuildControlWithdrawItemsEditBox:SetNumeric(1);
+ GuildControlWithdrawItemsEditBox:SetTextColor(HIGHLIGHT_FONT_COLOR.r, HIGHLIGHT_FONT_COLOR.g, HIGHLIGHT_FONT_COLOR.b);
+ GuildControlWithdrawItemsEditBoxMask:Hide();
+ end
+
+ GuildControlWithdrawGoldText:SetVertexColor(NORMAL_FONT_COLOR.r, NORMAL_FONT_COLOR.g, NORMAL_FONT_COLOR.b);
+ GuildControlWithdrawGoldAmountText:SetVertexColor(NORMAL_FONT_COLOR.r, NORMAL_FONT_COLOR.g, NORMAL_FONT_COLOR.b);
+ GuildControlWithdrawGoldEditBox:SetNumeric(1);
+ GuildControlWithdrawGoldEditBox:SetMaxLetters(MAX_GOLD_WITHDRAW_DIGITS);
+ GuildControlWithdrawGoldEditBox:SetTextColor(HIGHLIGHT_FONT_COLOR.r, HIGHLIGHT_FONT_COLOR.g, HIGHLIGHT_FONT_COLOR.b);
+ GuildControlWithdrawGoldEditBoxMask:Hide();
+ GuildControlPopupFrameCheckbox15:Enable();
+ GuildControlPopupFrameCheckbox16:Enable();
+
+ -- Update tab specific info
+ local viewTab, canDeposit, canUpdateText, numWithdrawals = GetGuildBankTabPermissions(GuildControlPopupFrameTabPermissions.selectedTab);
+ if ( rankID == 1 ) then
+ --If is guildmaster then force checkboxes to be selected
+ viewTab = 1;
+ canDeposit = 1;
+ canUpdateText = 1;
+ elseif ( loadPendingTabPermissions ) then
+ local permissions = PENDING_GUILDBANK_PERMISSIONS[GuildControlPopupFrameTabPermissions.selectedTab];
+ local value;
+ value = permissions[GuildControlTabPermissionsViewTab:GetID()];
+ if ( value ) then
+ viewTab = value;
+ end
+ value = permissions[GuildControlTabPermissionsDepositItems:GetID()];
+ if ( value ) then
+ canDeposit = value;
+ end
+ value = permissions[GuildControlTabPermissionsUpdateText:GetID()];
+ if ( value ) then
+ canUpdateText = value;
+ end
+ value = permissions["withdraw"];
+ if ( value ) then
+ numWithdrawals = value;
+ end
+ end
+ GuildControlTabPermissionsViewTab:SetChecked(viewTab);
+ GuildControlTabPermissionsDepositItems:SetChecked(canDeposit);
+ GuildControlTabPermissionsUpdateText:SetChecked(canUpdateText);
+ GuildControlWithdrawItemsEditBox:SetText(numWithdrawals);
+ local goldWithdrawLimit = GetGuildBankWithdrawGoldLimit();
+ -- Only write to the editbox if the value hasn't been changed by the player
+ if ( not GuildControlPopupFrame.goldChanged ) then
+ if ( goldWithdrawLimit >= 0 ) then
+ GuildControlWithdrawGoldEditBox:SetText(goldWithdrawLimit);
+ else
+ -- This is for the guild leader who defaults to -1
+ GuildControlWithdrawGoldEditBox:SetText(MAX_GOLD_WITHDRAW);
+ end
+ end
+ GuildControlPopup_UpdateDepositCheckbox();
+ end
+
+ --Only show available tabs
+ local tab;
+ local numTabs = GetNumGuildBankTabs();
+ local name, permissionsTabBackground, permissionsText;
+ for i=1, MAX_GUILDBANK_TABS do
+ name = GetGuildBankTabInfo(i);
+ tab = _G["GuildBankTabPermissionsTab"..i];
+
+ if ( i <= numTabs ) then
+ tab:Show();
+ tab.tooltip = name;
+ permissionsTabBackground = _G["GuildBankTabPermissionsTab"..i.."Background"];
+ permissionsText = _G["GuildBankTabPermissionsTab"..i.."Text"];
+ if ( GuildControlPopupFrameTabPermissions.selectedTab == i ) then
+ tab:LockHighlight();
+ permissionsTabBackground:SetTexCoord(0, 1.0, 0, 1.0);
+ permissionsTabBackground:SetHeight(32);
+ permissionsText:SetPoint("CENTER", permissionsTabBackground, "CENTER", 0, -3);
+ else
+ tab:UnlockHighlight();
+ permissionsTabBackground:SetTexCoord(0, 1.0, 0, 0.875);
+ permissionsTabBackground:SetHeight(28);
+ permissionsText:SetPoint("CENTER", permissionsTabBackground, "CENTER", 0, -5);
+ end
+ if ( IsGuildLeader() and rankID == 1 ) then
+ tab:Disable();
+ else
+ tab:Enable();
+ end
+ else
+ tab:Hide();
+ end
+ end
+end
+
+function WithdrawGoldEditBox_Update()
+ if ( not GuildControlPopupFrameCheckbox15:GetChecked() and not GuildControlPopupFrameCheckbox16:GetChecked() ) then
+ GuildControlWithdrawGoldAmountText:SetVertexColor(GRAY_FONT_COLOR.r, GRAY_FONT_COLOR.g, GRAY_FONT_COLOR.b);
+ GuildControlWithdrawGoldEditBox:SetTextColor(GRAY_FONT_COLOR.r, GRAY_FONT_COLOR.g, GRAY_FONT_COLOR.b);
+ GuildControlWithdrawGoldEditBox:ClearFocus();
+ GuildControlWithdrawGoldEditBoxMask:Show();
+ else
+ GuildControlWithdrawGoldAmountText:SetVertexColor(NORMAL_FONT_COLOR.r, NORMAL_FONT_COLOR.g, NORMAL_FONT_COLOR.b);
+ GuildControlWithdrawGoldEditBox:SetTextColor(HIGHLIGHT_FONT_COLOR.r, HIGHLIGHT_FONT_COLOR.g, HIGHLIGHT_FONT_COLOR.b);
+ GuildControlWithdrawGoldEditBoxMask:Hide();
+ end
+end
+
+function GuildControlPopupAcceptButton_OnClick()
+ local amount = GuildControlWithdrawGoldEditBox:GetText();
+ if(amount and amount ~= "" and amount ~= UNLIMITED and tonumber(amount) and tonumber(amount) > 0) then
+ SetGuildBankWithdrawGoldLimit(amount);
+ else
+ SetGuildBankWithdrawGoldLimit(0);
+ end
+ SavePendingGuildBankTabPermissions()
+ GuildControlSaveRank(GuildControlPopupFrameEditBox:GetText());
+ GuildStatus_Update();
+ GuildControlPopupAcceptButton:Disable();
+ GuildControlPopupFrameDropdown:GenerateMenu();
+ GuildControlPopupFrame:Hide();
+ ClearPendingGuildBankPermissions();
+end
+
+function GuildControlPopupFrameDropdown_OnLoad(self)
+ WowStyle1DropdownMixin.OnLoad(self);
+
+ self:SetWidth(110);
+
+ local function IsSelected(i)
+ return GuildControlGetRank() == i;
+ end
+
+ local function SetSelected(i)
+ GuildControlPopupFrame.numSkipUpdates = 0;
+ GuildControlSetRank(i);
+ GuildControlCheckboxUpdate(C_GuildInfo.GuildControlGetRankFlags(i));
+ GuildControlPopupFrameEditBox:SetText(GuildControlGetRankName(i));
+ GuildControlPopupFrameAddRankButton_OnUpdate();
+ GuildControlPopupFrameRemoveRankButton_OnUpdate();
+ GuildControlPopupAcceptButton:Disable();
+ end
+
+ self:SetupMenu(function(dropdown, rootDescription)
+ rootDescription:SetTag("MENU_FRIENDS_GUILD_CONTROL");
+
+ for i=1, GuildControlGetNumRanks() do
+ local text = GuildControlGetRankName(i);
+ rootDescription:CreateRadio(text, IsSelected, SetSelected, i);
+ end
+ end);
+end
+
+function GuildControlPopupFrameDropdownButton_ClickedRank(rank)
+ GuildControlSetRank(rank);
+ GuildControlPopupFrame.rank = GuildControlGetRankName(rank);
+ GuildControlPopupFrame.goldChanged = nil;
+ GuildControlPopupframe_Update();
+ GuildControlPopupFrameAddRankButton_OnUpdate(GuildControlPopupFrameAddRankButton);
+ GuildControlPopupFrameRemoveRankButton_OnUpdate();
+ GuildControlPopupAcceptButton:Disable();
+ GuildControlPopupFrameDropdown:GenerateMenu();
+end
+
+function GuildControlCheckboxUpdate(flags)
+ for i=1, GUILD_NUM_RANK_FLAGS do
+ local checkbox = _G["GuildControlPopupFrameCheckbox"..i];
+ if ( checkbox ) then
+ checkbox:SetChecked(flags[i]);
+ else
+ message("GuildControlPopupFrameCheckbox"..i.." does not exist!");
+ end
+ end
+end
+
+function GuildControlPopupFrameRemoveRankButton_OnClick()
+ GuildControlDelRank(GuildControlGetRank());
+ GuildControlPopupFrame.rank = GuildControlGetRankName(1);
+ GuildControlSetRank(1);
+ GuildStatus_Update();
+ GuildControlPopupFrameEditBox:SetText(GuildControlGetRankName(1));
+ GuildControlCheckboxUpdate(C_GuildInfo.GuildControlGetRankFlags(1));
+ GuildControlPopupFrameDropdownButton_ClickedRank(1);
+
+ -- Set this to call guildroster in the next frame
+ --C_GuildInfo.GuildRoster();
+ --GuildControlPopupFrame.update = 1;
+end
+
+function GuildControlPopupFrameRemoveRankButton_OnUpdate()
+ local numRanks = GuildControlGetNumRanks()
+ if ( (GuildControlGetRank() == numRanks) and (numRanks > 5) ) then
+ GuildControlPopupFrameRemoveRankButton:Show();
+ if ( FriendsFrame.playersInBotRank > 0 ) then
+ GuildControlPopupFrameRemoveRankButton:Disable();
+ else
+ GuildControlPopupFrameRemoveRankButton:Enable();
+ end
+ else
+ GuildControlPopupFrameRemoveRankButton:Hide();
+ end
+end
+
+function GuildControlPopup_UpdateDepositCheckbox()
+ if(GuildControlTabPermissionsViewTab:GetChecked()) then
+ GuildControlTabPermissionsDepositItems:Enable();
+ GuildControlTabPermissionsUpdateText:Enable();
+ else
+ GuildControlTabPermissionsDepositItems:Disable();
+ GuildControlTabPermissionsUpdateText:Disable();
+ end
+end
+
+function GuildBankTabPermissionsTab_OnClick(tab)
+ GuildControlPopupFrameTabPermissions.selectedTab = tab;
+ GuildControlPopupframe_Update(true, true);
+end
+
+-- Functions to allow canceling
+function ClearPendingGuildBankPermissions()
+ for i=1, MAX_GUILDBANK_TABS do
+ PENDING_GUILDBANK_PERMISSIONS[i] = {};
+ end
+end
+
+function SetPendingGuildBankTabPermissions(tab, id, checked)
+ if ( not checked ) then
+ checked = 0;
+ end
+ PENDING_GUILDBANK_PERMISSIONS[tab][id] = checked;
+end
+
+function SetPendingGuildBankTabWithdraw(tab, amount)
+ PENDING_GUILDBANK_PERMISSIONS[tab]["withdraw"] = amount;
+end
+
+function SavePendingGuildBankTabPermissions()
+ for index, value in pairs(PENDING_GUILDBANK_PERMISSIONS) do
+ for i=1, 3 do
+ if ( value[i] ) then
+ -- treat 0 as false
+ local boolValue = value[i];
+ if ( type(boolValue) == "number" ) then
+ boolValue = boolValue ~= 0;
+ end
+ SetGuildBankTabPermissions(index, i, boolValue);
+ end
+ end
+ if ( value["withdraw"] ) then
+ SetGuildBankTabItemWithdraw(index, value["withdraw"]);
+ end
+ end
+end
+
+function GuildControlPopupFrame_HideGuildBankOptions()
+ GuildControlPopupFrameTabPermissions:Hide();
+ GuildControlWithdrawGold:Hide();
+ -- Guild Bank Repair
+ GuildControlPopupFrameCheckbox15:Hide();
+ -- Guild Bank Withdraw
+ GuildControlPopupFrameCheckbox16:Hide();
+
+ GuildControlPopupFrame:SetSize(320,321);
+end
+
+-- Guild event log functions
+function ToggleGuildEventLog()
+ if ( GuildEventLogFrame:IsShown() ) then
+ GuildEventLogFrame:Hide();
+ else
+ GuildFramePopup_Show(GuildEventLogFrame);
+ end
+end
+
+function GuildEventLog_Update()
+ local numEvents = GetNumGuildEvents();
+ local type, player1, player2, rank, year, month, day, hour;
+ local msg;
+ local buffer = "";
+ local max = GuildEventMessage:GetFieldSize()
+ local length = 0;
+ for i=numEvents, 1, -1 do
+ type, player1, player2, rank, year, month, day, hour = GetGuildEventInfo(i);
+ if ( not player1 ) then
+ player1 = UNKNOWN;
+ end
+ if ( not player2 ) then
+ player2 = UNKNOWN;
+ end
+ if ( type == "invite" ) then
+ msg = format(GUILDEVENT_TYPE_INVITE, player1, player2);
+ elseif ( type == "join" ) then
+ msg = format(GUILDEVENT_TYPE_JOIN, player1);
+ elseif ( type == "promote" ) then
+ msg = format(GUILDEVENT_TYPE_PROMOTE, player1, player2, rank);
+ elseif ( type == "demote" ) then
+ msg = format(GUILDEVENT_TYPE_DEMOTE, player1, player2, rank);
+ elseif ( type == "remove" ) then
+ msg = format(GUILDEVENT_TYPE_REMOVE, player1, player2);
+ elseif ( type == "quit" ) then
+ msg = format(GUILDEVENT_TYPE_QUIT, player1);
+ end
+ if ( msg ) then
+ msg = msg.."|cff009999 "..format(GUILD_BANK_LOG_TIME, RecentTimeDate(year, month, day, hour)).."|r|n";
+ length = length + msg:len();
+ if(length>max) then
+ i=0
+ else
+ buffer = buffer..msg
+ end
+ end
+ end
+ GuildEventMessage:SetText(buffer);
+end
+
+function FriendsFrameGuildStatusButton_OnClick(self, button)
+ if ( button == "LeftButton" ) then
+ GuildFrame.previousSelectedGuildMember = GuildFrame.selectedGuildMember;
+ GuildFrame.selectedGuildMember = self.guildIndex;
+ GuildFrame.selectedName = getglobal(self:GetName().."Name"):GetText();
+ SetGuildRosterSelection(GuildFrame.selectedGuildMember);
+ -- Toggle guild details frame
+ if ( GuildMemberDetailFrame:IsVisible() and (GuildFrame.previousSelectedGuildMember and (GuildFrame.previousSelectedGuildMember == GuildFrame.selectedGuildMember)) ) then
+ GuildMemberDetailFrame:Hide();
+ GuildFrame.selectedGuildMember = 0;
+ SetGuildRosterSelection(0);
+ else
+ GuildFramePopup_Show(GuildMemberDetailFrame);
+ end
+ GuildStatus_Update();
+ else
+ local guildIndex = self.guildIndex;
+ local name, rank, rankIndex, level, class, zone, note, officernote, online = GetGuildRosterInfo(guildIndex);
+ FriendsFrame_ShowDropdown(name, online);
+ end
+end
+
+function GuildStatus_Update()
+ -- Set the tab
+ PanelTemplates_SetTab(FriendsFrame, FRIEND_TAB_GUILD);
+ -- Show the frame
+ ShowUIPanel(FriendsFrame);
+ -- Number of players in the lowest rank
+ FriendsFrame.playersInBotRank = 0
+
+ local totalMembers, onlineMembers = GetNumGuildMembers();
+ local numGuildMembers = 0;
+ local showOffline = GetGuildRosterShowOffline();
+ if (showOffline) then
+ numGuildMembers = totalMembers;
+ else
+ numGuildMembers = onlineMembers;
+ end
+ local name, isAway;
+ local fullName, rank, rankIndex, level, class, zone, note, officernote, online;
+ local guildName, guildRankName, guildRankIndex = GetGuildInfo("player");
+ local maxRankIndex = GuildControlGetNumRanks() - 1;
+ local button;
+ local onlinecount = 0;
+ local guildIndex;
+
+ -- Get selected guild member info
+ fullName, rank, rankIndex, level, class, zone, note, officernote, online = GetGuildRosterInfo(GetGuildRosterSelection());
+ GuildFrame.selectedName = fullName;
+ -- If there's a selected guildmember
+ if ( GetGuildRosterSelection() > 0 ) then
+ local displayedName = Ambiguate(fullName, "guild");
+ -- Update the guild member details frame
+ GuildMemberDetailName:SetText(displayedName);
+ GuildMemberDetailLevel:SetText(format(FRIENDS_LEVEL_TEMPLATE, level, class));
+ GuildMemberDetailZoneText:SetText(zone);
+ GuildMemberDetailRankText:SetText(rank);
+ if ( online ) then
+ GuildMemberDetailOnlineText:SetText(GUILD_ONLINE_LABEL);
+ else
+ GuildMemberDetailOnlineText:SetText(GuildFrame_GetLastOnline(GetGuildRosterSelection()));
+ end
+ -- Update public note
+ if ( CanEditPublicNote() ) then
+ PersonalNoteText:SetTextColor(1.0, 1.0, 1.0);
+ if ( (not note) or (note == "") ) then
+ note = GUILD_NOTE_EDITLABEL;
+ end
+ else
+ PersonalNoteText:SetTextColor(0.65, 0.65, 0.65);
+ end
+ GuildMemberNoteBackground:EnableMouse(CanEditPublicNote());
+ PersonalNoteText:SetText(note);
+ -- Update officer note
+ if ( C_GuildInfo.CanViewOfficerNote() ) then
+ if ( C_GuildInfo.CanEditOfficerNote() ) then
+ if ( (not officernote) or (officernote == "") ) then
+ officernote = GUILD_OFFICERNOTE_EDITLABEL;
+ end
+ OfficerNoteText:SetTextColor(1.0, 1.0, 1.0);
+ else
+ OfficerNoteText:SetTextColor(0.65, 0.65, 0.65);
+ end
+ GuildMemberOfficerNoteBackground:EnableMouse(C_GuildInfo.CanEditOfficerNote());
+ OfficerNoteText:SetText(officernote);
+
+ -- Resize detail frame
+ GuildMemberDetailOfficerNoteLabel:Show();
+ GuildMemberOfficerNoteBackground:Show();
+ GuildMemberDetailFrame:SetHeight(GUILD_DETAIL_OFFICER_HEIGHT);
+ else
+ GuildMemberDetailOfficerNoteLabel:Hide();
+ GuildMemberOfficerNoteBackground:Hide();
+ GuildMemberDetailFrame:SetHeight(GUILD_DETAIL_NORM_HEIGHT);
+ end
+
+ -- Manage guild member related buttons
+ if ( CanGuildPromote() and ( rankIndex > 1 ) and ( rankIndex > (guildRankIndex + 1) ) ) then
+ GuildFramePromoteButton:Enable();
+ else
+ GuildFramePromoteButton:Disable();
+ end
+ if ( CanGuildDemote() and ( rankIndex >= 1 ) and ( rankIndex > guildRankIndex ) and ( rankIndex ~= maxRankIndex ) ) then
+ GuildFrameDemoteButton:Enable();
+ else
+ GuildFrameDemoteButton:Disable();
+ end
+ -- Hide promote/demote buttons if both disabled
+ if ( not GuildFrameDemoteButton:IsEnabled() and not GuildFramePromoteButton:IsEnabled() ) then
+ GuildFramePromoteButton:Hide();
+ GuildFrameDemoteButton:Hide();
+ GuildMemberDetailRankText:SetPoint("RIGHT", "GuildMemberDetailFrame", "RIGHT", -10, 0);
+ else
+ GuildFramePromoteButton:Show();
+ GuildFrameDemoteButton:Show();
+ GuildMemberDetailRankText:SetPoint("RIGHT", "GuildFramePromoteButton", "LEFT", 3, 0);
+ end
+ if ( CanGuildRemove() and ( rankIndex >= 1 ) and ( rankIndex > guildRankIndex ) ) then
+ GuildMemberRemoveButton:Enable();
+ else
+ GuildMemberRemoveButton:Disable();
+ end
+ if ( (UnitName("player") == displayedName) or (not online) ) then
+ GuildMemberGroupInviteButton:Disable();
+ else
+ GuildMemberGroupInviteButton:Enable();
+ end
+
+ GuildFrame.selectedName = GetGuildRosterInfo(GetGuildRosterSelection());
+ end
+
+ -- Message of the day stuff
+ local guildMOTD = GetGuildRosterMOTD();
+ if ( CanEditMOTD() ) then
+ if ( (not guildMOTD) or (guildMOTD == "") ) then
+ --guildMOTD = GUILD_MOTD_EDITLABEL; -- A bug in the 1.12 lua code caused this to never actually appear.
+ end
+ GuildFrameNotesText:SetTextColor(1.0, 1.0, 1.0);
+ GuildMOTDEditButton:Enable();
+ else
+ GuildFrameNotesText:SetTextColor(0.65, 0.65, 0.65);
+ GuildMOTDEditButton:Disable();
+ end
+ GuildFrameNotesText:SetText(guildMOTD);
+
+ -- Scrollbar stuff
+ local showScrollBar = nil;
+ if ( numGuildMembers > GUILDMEMBERS_TO_DISPLAY ) then
+ showScrollBar = 1;
+ end
+
+ -- Get number of online members
+ for i=1, numGuildMembers, 1 do
+ name, rank, rankIndex, level, class, zone, note, officernote, online = GetGuildRosterInfo(i);
+ if ( online ) then
+ onlinecount = onlinecount + 1;
+ end
+ if ( rankIndex == maxRankIndex ) then
+ FriendsFrame.playersInBotRank = FriendsFrame.playersInBotRank + 1;
+ end
+ end
+ GuildFrameTotals:SetText(format(GetText("GUILD_TOTAL", nil, numGuildMembers), numGuildMembers));
+ GuildFrameOnlineTotals:SetText(format(GUILD_TOTALONLINE, onlineMembers));
+
+ -- Update global guild frame buttons
+ if ( IsGuildLeader() ) then
+ GuildFrameControlButton:Enable();
+ else
+ GuildFrameControlButton:Disable();
+ end
+ if ( CanGuildInvite() ) then
+ GuildFrameAddMemberButton:Enable();
+ else
+ GuildFrameAddMemberButton:Disable();
+ end
+
+
+ if ( FriendsFrame.playerStatusFrame ) then
+ -- Player specific info
+ local guildOffset = FauxScrollFrame_GetOffset(GuildListScrollFrame);
+
+ for i=1, GUILDMEMBERS_TO_DISPLAY, 1 do
+ guildIndex = guildOffset + i;
+ button = getglobal("GuildFrameButton"..i);
+ button.guildIndex = guildIndex;
+
+ fullName, rank, rankIndex, level, class, zone, note, officernote, online = GetGuildRosterInfo(guildIndex);
+ if (fullName and (showOffline or online)) then
+ local displayedName = Ambiguate(fullName, "guild");
+ getglobal("GuildFrameButton"..i.."Name"):SetText(displayedName);
+ getglobal("GuildFrameButton"..i.."Zone"):SetText(zone);
+ getglobal("GuildFrameButton"..i.."Level"):SetText(level);
+ getglobal("GuildFrameButton"..i.."Class"):SetText(class);
+ if ( not online ) then
+ getglobal("GuildFrameButton"..i.."Name"):SetTextColor(0.5, 0.5, 0.5);
+ getglobal("GuildFrameButton"..i.."Zone"):SetTextColor(0.5, 0.5, 0.5);
+ getglobal("GuildFrameButton"..i.."Level"):SetTextColor(0.5, 0.5, 0.5);
+ getglobal("GuildFrameButton"..i.."Class"):SetTextColor(0.5, 0.5, 0.5);
+ else
+ getglobal("GuildFrameButton"..i.."Name"):SetTextColor(1.0, 0.82, 0.0);
+ getglobal("GuildFrameButton"..i.."Zone"):SetTextColor(1.0, 1.0, 1.0);
+ getglobal("GuildFrameButton"..i.."Level"):SetTextColor(1.0, 1.0, 1.0);
+ getglobal("GuildFrameButton"..i.."Class"):SetTextColor(1.0, 1.0, 1.0);
+ end
+ else
+ getglobal("GuildFrameButton"..i.."Name"):SetText(nil);
+ getglobal("GuildFrameButton"..i.."Zone"):SetText(nil);
+ getglobal("GuildFrameButton"..i.."Level"):SetText(nil);
+ getglobal("GuildFrameButton"..i.."Class"):SetText(nil);
+ end
+
+ -- If need scrollbar resize columns
+ if ( showScrollBar ) then
+ getglobal("GuildFrameButton"..i.."Zone"):SetWidth(95);
+ getglobal("GuildFrameButton"..i.."Class"):SetWidth(80);
+ else
+ getglobal("GuildFrameButton"..i.."Zone"):SetWidth(110);
+ end
+
+ -- Highlight the correct who
+ if ( GetGuildRosterSelection() == guildIndex ) then
+ button:LockHighlight();
+ else
+ button:UnlockHighlight();
+ end
+
+ if ( guildIndex > numGuildMembers ) then
+ button:Hide();
+ else
+ button:Show();
+ end
+ end
+
+ -- GuildFrameGuildListToggleButton:SetText(PLAYER_STATUS);
+ -- If need scrollbar resize column headers
+ if ( showScrollBar ) then
+ WhoFrameColumn_SetWidth(GuildFrameColumnHeader2, 105);
+ GuildFrameGuildListToggleButton:SetPoint("LEFT", "GuildFrame", "LEFT", 272, -98);
+ else
+ WhoFrameColumn_SetWidth(GuildFrameColumnHeader2, 120);
+ GuildFrameGuildListToggleButton:SetPoint("LEFT", "GuildFrame", "LEFT", 295, -98);
+ end
+ -- ScrollFrame update
+ FauxScrollFrame_Update(GuildListScrollFrame, numGuildMembers, GUILDMEMBERS_TO_DISPLAY, FRIENDS_FRAME_GUILD_HEIGHT );
+
+ GuildPlayerStatusFrame:Show();
+ GuildStatusFrame:Hide();
+ else
+ -- Guild specific info
+ local year, month, day, hour;
+ local yearlabel, monthlabel, daylabel, hourlabel;
+ local guildOffset = FauxScrollFrame_GetOffset(GuildListScrollFrame);
+
+ for i=1, GUILDMEMBERS_TO_DISPLAY, 1 do
+ guildIndex = guildOffset + i;
+ button = getglobal("GuildFrameGuildStatusButton"..i);
+ button.guildIndex = guildIndex;
+
+ fullName, rank, rankIndex, level, class, zone, note, officernote, online, isAway = GetGuildRosterInfo(guildIndex);
+ if (fullName and (showOffline or online)) then
+ local displayedName = Ambiguate(fullName, "guild");
+ getglobal("GuildFrameGuildStatusButton"..i.."Name"):SetText(displayedName);
+ getglobal("GuildFrameGuildStatusButton"..i.."Rank"):SetText(rank);
+ getglobal("GuildFrameGuildStatusButton"..i.."Note"):SetText(note);
+
+ if ( online ) then
+ if ( isAway == 2 ) then
+ getglobal("GuildFrameGuildStatusButton"..i.."Online"):SetText(CHAT_FLAG_DND);
+ elseif ( isAway == 1 ) then
+ getglobal("GuildFrameGuildStatusButton"..i.."Online"):SetText(CHAT_FLAG_AFK);
+ else
+ getglobal("GuildFrameGuildStatusButton"..i.."Online"):SetText(GUILD_ONLINE_LABEL);
+ end
+
+ getglobal("GuildFrameGuildStatusButton"..i.."Name"):SetTextColor(1.0, 0.82, 0.0);
+ getglobal("GuildFrameGuildStatusButton"..i.."Rank"):SetTextColor(1.0, 1.0, 1.0);
+ getglobal("GuildFrameGuildStatusButton"..i.."Note"):SetTextColor(1.0, 1.0, 1.0);
+ getglobal("GuildFrameGuildStatusButton"..i.."Online"):SetTextColor(1.0, 1.0, 1.0);
+ else
+ getglobal("GuildFrameGuildStatusButton"..i.."Online"):SetText(GuildFrame_GetLastOnline(guildIndex));
+ getglobal("GuildFrameGuildStatusButton"..i.."Name"):SetTextColor(0.5, 0.5, 0.5);
+ getglobal("GuildFrameGuildStatusButton"..i.."Rank"):SetTextColor(0.5, 0.5, 0.5);
+ getglobal("GuildFrameGuildStatusButton"..i.."Note"):SetTextColor(0.5, 0.5, 0.5);
+ getglobal("GuildFrameGuildStatusButton"..i.."Online"):SetTextColor(0.5, 0.5, 0.5);
+ end
+ else
+ getglobal("GuildFrameGuildStatusButton"..i.."Name"):SetText(nil);
+ getglobal("GuildFrameGuildStatusButton"..i.."Rank"):SetText(nil);
+ getglobal("GuildFrameGuildStatusButton"..i.."Note"):SetText(nil);
+ getglobal("GuildFrameGuildStatusButton"..i.."Online"):SetText(nil);
+ end
+
+ -- If need scrollbar resize columns
+ if ( showScrollBar ) then
+ getglobal("GuildFrameGuildStatusButton"..i.."Note"):SetWidth(70);
+ else
+ getglobal("GuildFrameGuildStatusButton"..i.."Note"):SetWidth(85);
+ end
+
+ -- Highlight the correct who
+ if ( GetGuildRosterSelection() == guildIndex ) then
+ button:LockHighlight();
+ else
+ button:UnlockHighlight();
+ end
+
+ if ( guildIndex > numGuildMembers ) then
+ button:Hide();
+ else
+ button:Show();
+ end
+ end
+
+ -- GuildFrameGuildListToggleButton:SetText(GUILD_STATUS);
+ -- If need scrollbar resize columns
+ if ( showScrollBar ) then
+ WhoFrameColumn_SetWidth(GuildFrameGuildStatusColumnHeader3, 75);
+ GuildFrameGuildListToggleButton:SetPoint("LEFT", "GuildFrame", "LEFT", 272, -98);
+ else
+ WhoFrameColumn_SetWidth(GuildFrameGuildStatusColumnHeader3, 90);
+ GuildFrameGuildListToggleButton:SetPoint("LEFT", "GuildFrame", "LEFT", 295, -98);
+ end
+
+ -- ScrollFrame update
+ FauxScrollFrame_Update(GuildListScrollFrame, numGuildMembers, GUILDMEMBERS_TO_DISPLAY, FRIENDS_FRAME_GUILD_HEIGHT );
+
+ GuildPlayerStatusFrame:Hide();
+ GuildStatusFrame:Show();
+ end
+end
+
function GuildFramePopup_Show(frame)
local name = frame:GetName();
for index, value in ipairs(GUILDFRAME_POPUPS) do
@@ -2331,64 +3294,34 @@ function ToggleGuildInfoFrame()
end
end
-function BlizzardGroups_UpdateNotifications()
- if ((CommunitiesFrame and CommunitiesFrame:IsShown()) or
- not CommunitiesFrame_IsEnabled() or
- (not HasUnseenCommunityInvitations() and not CommunitiesUtil.DoesAnyCommunityHaveUnreadMessages())) then
- _G["FriendsFrameTab"..FRIEND_TAB_BLIZZARDGROUPS].NotificationOverlay:SetShown(false);
- return;
- end
-
- -- If we got this far, show the Community tab notification.
- _G["FriendsFrameTab"..FRIEND_TAB_BLIZZARDGROUPS].NotificationOverlay:SetShown(true);
-end
-
function FriendsFrame_UpdateVisibleTabs()
- FRIEND_OPTIONAL_TAB_COUNT = 0;
- BlizzardGroups_UpdateShowTab();
- FriendsFrame_UpdateGuildTabVisibility();
-end
-
-function BlizzardGroups_UpdateShowTab()
- local blizzardGroupsTab = _G["FriendsFrameTab"..FRIEND_TAB_BLIZZARDGROUPS];
- if (not blizzardGroupsTab:IsShown() and BlizzardGroups_ShouldShowTab()) then
- FRIEND_OPTIONAL_TAB_COUNT = FRIEND_OPTIONAL_TAB_COUNT + 1;
- PanelTemplates_SetNumTabs(FriendsFrame, FRIEND_TAB_COUNT + FRIEND_OPTIONAL_TAB_COUNT);
- PanelTemplates_UpdateTabs(FriendsFrame);
- _G["FriendsFrameTab"..FRIEND_TAB_BLIZZARDGROUPS]:Show();
- else
- _G["FriendsFrameTab"..FRIEND_TAB_BLIZZARDGROUPS]:Hide();
+ local numTabs = FRIEND_TAB_BASE_COUNT;
+ if (FriendsFrame_UpdateGuildTabVisibility()) then
+ numTabs = numTabs + 1;
end
end
function FriendsFrame_UpdateGuildTabVisibility()
- local blizzardGroupsTab = _G["FriendsFrameTab"..FRIEND_TAB_GUILD];
- if (not blizzardGroupsTab:IsShown() and FriendsFrame_ShouldShowGuildTab()) then
- FRIEND_OPTIONAL_TAB_COUNT = FRIEND_OPTIONAL_TAB_COUNT + 1;
- PanelTemplates_SetNumTabs(FriendsFrame, FRIEND_TAB_COUNT + FRIEND_OPTIONAL_TAB_COUNT);
- PanelTemplates_UpdateTabs(FriendsFrame);
- _G["FriendsFrameTab"..FRIEND_TAB_GUILD]:Show();
+ local guildsTab = _G["FriendsFrameTab"..FRIEND_TAB_GUILD];
+ local whoTab = _G["FriendsFrameTab"..FRIEND_TAB_WHO]; -- Next tab to the left.
+ local raidTab = _G["FriendsFrameTab"..FRIEND_TAB_RAID]; -- Next tab to the right.
+ if (FriendsFrame_ShouldShowGuildTab()) then
+ guildsTab:Show();
+ raidTab:SetPoint("LEFT", guildsTab, "RIGHT", -14, 0);
else
- _G["FriendsFrameTab"..FRIEND_TAB_GUILD]:Hide();
+ guildsTab:Hide();
+ raidTab:SetPoint("LEFT", whoTab, "RIGHT", -14, 0);
+ if (PanelTemplates_GetSelectedTab(FriendsFrame) == FRIEND_TAB_GUILD) then
+ PanelTemplates_SetTab(FriendsFrame, FRIEND_TAB_FRIENDS);
+ end
end
-end
-
-function BlizzardGroups_ShouldShowTab()
- -- This is now in the separate Communities UI
- return false;
+ return guildsTab:IsShown();
end
function FriendsFrame_ShouldShowGuildTab()
- -- This is now in the separate Communities UI
- return false;
+ return C_CVar.GetCVarBool("useClassicGuildUI");
end
-function FriendsFrame_ToggleToCommunities(selectedTab)
- FRIENDS_COMMUNITY_SWAP_IN_PROGRESS = true;
- ToggleFriendsFrame(selectedTab);
- ToggleCommunitiesFrame();
- FRIENDS_COMMUNITY_SWAP_IN_PROGRESS = false;
-end
function GuildFrame_CheckName()
if ( GuildFrame.hasForcedNameChange ) then
local clickableHelp = false
@@ -2438,4 +3371,4 @@ function GuildFrame_CheckName()
GuildNameChangeAlertFrame:Hide();
GuildNameChangeFrame:Hide();
end
-end
\ No newline at end of file
+end
diff --git a/Interface/AddOns/Blizzard_UIPanels_Game/Wrath/FriendsFrame.xml b/Interface/AddOns/Blizzard_UIPanels_Game/Classic/FriendsFrame.xml
similarity index 97%
rename from Interface/AddOns/Blizzard_UIPanels_Game/Wrath/FriendsFrame.xml
rename to Interface/AddOns/Blizzard_UIPanels_Game/Classic/FriendsFrame.xml
index 9439b3fddd..d8e2d73390 100644
--- a/Interface/AddOns/Blizzard_UIPanels_Game/Wrath/FriendsFrame.xml
+++ b/Interface/AddOns/Blizzard_UIPanels_Game/Classic/FriendsFrame.xml
@@ -64,7 +64,7 @@ TRAVEL PASS
-
+
@@ -79,7 +79,7 @@ TRAVEL PASS
-
+
@@ -100,6 +100,9 @@ TRAVEL PASS
+
+
+
@@ -644,6 +647,7 @@ TRAVEL PASS
+ GuildControlPopupFrame.numSkipUpdates = GuildControlPopupFrame.numSkipUpdates + 1;
if ( self:GetChecked() ) then
PlaySound(SOUNDKIT.IG_MAINMENU_OPTION_CHECKBOX_OFF);
else
@@ -1169,42 +1173,6 @@ TRAVEL PASS
-
@@ -2740,9 +2708,6 @@ TRAVEL PASS
-
-
-
@@ -2754,7 +2719,7 @@ TRAVEL PASS
-
+
@@ -3691,7 +3656,8 @@ TRAVEL PASS
- StaticPopup_Show("REMOVE_GUILDMEMBER");
+ local data = { name = GuildFrame.selectedName };
+ StaticPopup_Show("REMOVE_GUILDMEMBER", nil, nil, data);
GameTooltip_AddNewbieTip(self, REMOVE, 1.0, 1.0, 1.0, NEWBIE_TOOLTIP_GUILDREMOVE, 1);
@@ -3749,7 +3715,7 @@ TRAVEL PASS
GuildFramePromoteButton:Disable();
- GameTooltip_AddNewbieTip(self, PROMOTE, 1.0, 1.0, 1.0, NEWBIE_TOOLTIP_PROMOTE, 1);
+ GameTooltip_AddNewbieTip(self, GUILDCONTROL_OPTION5, 1.0, 1.0, 1.0, NEWBIE_TOOLTIP_PROMOTE, 1);
GameTooltip:Hide();
@@ -3781,7 +3747,7 @@ TRAVEL PASS
GuildFrameDemoteButton:Disable();
- GameTooltip_AddNewbieTip(self, DEMOTE, 1.0, 1.0, 1.0, NEWBIE_TOOLTIP_DEMOTE, 1);
+ GameTooltip_AddNewbieTip(self, GUILDCONTROL_OPTION6, 1.0, 1.0, 1.0, NEWBIE_TOOLTIP_DEMOTE, 1);
GameTooltip:Hide();
@@ -3981,7 +3947,7 @@ TRAVEL PASS
-
+
@@ -4009,25 +3975,10 @@ TRAVEL PASS
-
+
-
-
- self:SetWidth(0);
- PanelTemplates_TabResize(self, 0, nil);
-
-
- GameTooltip_AddNewbieTip(self, MicroButtonTooltipText(RAID, "TOGGLERAIDTAB"), 1.0, 1.0, 1.0, NEWBIE_TOOLTIP_RAIDTAB, 1);
-
-
-
-
-
-
-
-
self.selectedTextY = 4;
@@ -4043,9 +3994,9 @@ TRAVEL PASS
-
+
-
+
@@ -4053,24 +4004,10 @@ TRAVEL PASS
PanelTemplates_TabResize(self, 0, nil);
- GameTooltip_AddNewbieTip(self, MicroButtonTooltipText(BLIZZARD_GROUPS_SHORT, "TOGGLEBATTLENETGROUPS"), 1.0, 1.0, 1.0, NEWBIE_TOOLTIP_BLIZZARDGROUPSTAB, 1);
+ GameTooltip_AddNewbieTip(self, MicroButtonTooltipText(RAID, "TOGGLERAIDTAB"), 1.0, 1.0, 1.0, NEWBIE_TOOLTIP_RAIDTAB, 1);
-
-
-
-
-
-
-
-
-
-
-
-
-
-
@@ -4611,12 +4548,7 @@ TRAVEL PASS
-
-
-
-
-
-
+
@@ -4633,9 +4565,10 @@ TRAVEL PASS
+
-
+
diff --git a/Interface/AddOns/Blizzard_UIPanels_Game/Classic/GuildRegistrarFrame.lua b/Interface/AddOns/Blizzard_UIPanels_Game/Classic/GuildRegistrarFrame.lua
index bdc52a291e..07c89e04d5 100644
--- a/Interface/AddOns/Blizzard_UIPanels_Game/Classic/GuildRegistrarFrame.lua
+++ b/Interface/AddOns/Blizzard_UIPanels_Game/Classic/GuildRegistrarFrame.lua
@@ -1,32 +1,8 @@
-
-function GuildRegistrar_OnLoad(self)
- self:RegisterEvent("GUILD_REGISTRAR_SHOW");
- self:RegisterEvent("GUILD_REGISTRAR_CLOSED");
-end
-
-function GuildRegistrar_OnEvent(self, event)
- if ( event == "GUILD_REGISTRAR_SHOW" ) then
- ShowUIPanel(GuildRegistrarFrame);
- if ( not GuildRegistrarFrame:IsShown() ) then
- ClosePetitionRegistrar();
- end
- elseif ( event == "GUILD_REGISTRAR_CLOSED" ) then
- HideUIPanel(GuildRegistrarFrame);
- end
-end
-
-function GuildRegistrar_OnShow(self)
+function GuildRegistrar_OnShow()
GuildRegistrarGreetingFrame:Show();
GuildRegistrarPurchaseFrame:Hide();
SetPortraitTexture(GuildRegistrarFramePortrait, "NPC");
GuildRegistrarFrameNpcNameText:SetText(UnitName("NPC"));
- PlaySound(SOUNDKIT.IG_QUEST_LIST_OPEN);
-end
-
-function GuildRegistrar_OnHide(self)
- PlaySound(SOUNDKIT.IG_QUEST_LIST_CLOSE);
- StaticPopup_Hide("CONFIRM_GUILD_CHARTER_PURCHASE");
- ClosePetitionRegistrar();
end
function GuildRegistrar_ShowPurchaseFrame()
@@ -39,4 +15,5 @@ function GuildRegistrar_PurchaseCharter(hasConfirmed)
BuyGuildCharter(GuildRegistrarFrameEditBox:GetText());
HideUIPanel(GuildRegistrarFrame);
ChatEdit_FocusActiveWindow();
+ GuildRegistrarFrameEditBox:SetText("");
end
\ No newline at end of file
diff --git a/Interface/AddOns/Blizzard_UIPanels_Game/Classic/GuildRegistrarFrame.xml b/Interface/AddOns/Blizzard_UIPanels_Game/Classic/GuildRegistrarFrame.xml
index 0fc01203f7..c4cbe3b26c 100644
--- a/Interface/AddOns/Blizzard_UIPanels_Game/Classic/GuildRegistrarFrame.xml
+++ b/Interface/AddOns/Blizzard_UIPanels_Game/Classic/GuildRegistrarFrame.xml
@@ -234,10 +234,15 @@
-
-
-
-
+
+ GuildRegistrar_OnShow();
+ PlaySound(SOUNDKIT.IG_QUEST_LIST_OPEN);
+
+
+ PlaySound(SOUNDKIT.IG_QUEST_LIST_CLOSE);
+ StaticPopup_Hide("CONFIRM_GUILD_CHARTER_PURCHASE");
+ ClosePetitionRegistrar();
+
diff --git a/Interface/AddOns/Blizzard_UIPanels_Game/TBC/BankFrame.lua b/Interface/AddOns/Blizzard_UIPanels_Game/TBC/BankFrame.lua
index 9d96e9e3bb..4ae296d7be 100644
--- a/Interface/AddOns/Blizzard_UIPanels_Game/TBC/BankFrame.lua
+++ b/Interface/AddOns/Blizzard_UIPanels_Game/TBC/BankFrame.lua
@@ -89,12 +89,12 @@ function BankFrameItemButton_Update (button)
id, slotTextureName = GetInventorySlotInfo("Bag"..buttonID);
else
--[[
- local isQuestItem, questId, isActive = GetContainerItemQuestInfo(container, buttonID);
+ local isQuestItem, questID, isActive = GetContainerItemQuestInfo(container, buttonID);
local questTexture = button["IconQuestTexture"];
- if ( questId and not isActive ) then
+ if ( questID and not isActive ) then
questTexture:SetTexture(TEXTURE_ITEM_QUEST_BANG);
questTexture:Show();
- elseif ( questId or isQuestItem ) then
+ elseif ( questID or isQuestItem ) then
questTexture:SetTexture(TEXTURE_ITEM_QUEST_BORDER);
questTexture:Show();
else
@@ -431,4 +431,14 @@ function BankFrame_ShowPanel(sidePanelName, selection)
panel:Hide();
end
end
+end
+
+BankFrameMixin = {};
+
+function BankFrameMixin:GetActiveBankType()
+ if not self:IsShown() then
+ return nil;
+ end
+
+ return Enum.BankType.Character;
end
\ No newline at end of file
diff --git a/Interface/AddOns/Blizzard_UIPanels_Game/TBC/BankFrame.xml b/Interface/AddOns/Blizzard_UIPanels_Game/TBC/BankFrame.xml
index c17b477535..5a6906a6da 100644
--- a/Interface/AddOns/Blizzard_UIPanels_Game/TBC/BankFrame.xml
+++ b/Interface/AddOns/Blizzard_UIPanels_Game/TBC/BankFrame.xml
@@ -80,7 +80,7 @@
-
+
diff --git a/Interface/AddOns/Blizzard_UIPanels_Game/TBC/FriendsFrame.xml b/Interface/AddOns/Blizzard_UIPanels_Game/TBC/FriendsFrame.xml
deleted file mode 100644
index 53d2955002..0000000000
--- a/Interface/AddOns/Blizzard_UIPanels_Game/TBC/FriendsFrame.xml
+++ /dev/null
@@ -1,4699 +0,0 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- self:SetWidth(self.Text:GetStringWidth() + 40);
- self.Text:SetPoint("CENTER", 0, 0);
-
-
- FriendsList_ClosePendingInviteDialogs();
- BNAcceptFriendInvite(self:GetParent().inviteID);
- PlaySound(SOUNDKIT.IG_MAINMENU_OPTION_CHECKBOX_ON);
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- GameTooltip:Hide();
-
-
- FriendsFrame_BattlenetInvite(self:GetParent());
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- local normalTexture = _G[self:GetName().."NormalTexture"];
- normalTexture:ClearAllPoints();
- normalTexture:SetPoint("CENTER");
- normalTexture:SetSize(self:GetSize());
- normalTexture:SetAtlas("socialqueuing-friendlist-summonbutton-up");
-
- local pushedTexture = self:GetPushedTexture();
- pushedTexture:ClearAllPoints();
- pushedTexture:SetPoint("CENTER");
- pushedTexture:SetSize(self:GetSize());
- pushedTexture:SetAtlas("socialqueuing-friendlist-summonbutton-down");
-
- self.cooldown:SetSize(self:GetSize());
- self.cooldown:SetHideCountdownNumbers(true);
- self.cooldown:SetSwipeColor(0, 0, 0);
-
-
- FriendsFrame_SummonButton_OnShow(self);
-
-
- FriendsFrame_ClickSummonButton(self, button, down);
-
-
- GameTooltip:SetOwner(self, "ANCHOR_RIGHT");
- GameTooltip:AddLine(RAF_SUMMON_LINKED, 1, 1, 1, true);
- if ( self.duration ) then
- GameTooltip:AddLine(COOLDOWN_REMAINING .. " " .. SecondsToTime(self.duration - (GetTime() - self.start)), 1, 1, 1, true);
- end
- if ( GetCVar("showNewbieTips") == "1" ) then
- GameTooltip:AddLine(NEWBIE_TOOLTIP_RAF_SUMMON_LINKED, NORMAL_FONT_COLOR.r, NORMAL_FONT_COLOR.g, NORMAL_FONT_COLOR.b, true)
- end
- GameTooltip:Show();
-
-
- GameTooltip:Hide();
-
-
-
-
-
-
- self.highlight:SetVertexColor(0.243, 0.570, 1);
- self:RegisterForClicks("LeftButtonUp", "RightButtonUp");
-
-
-
- FriendsTooltip.button = nil;
- FriendsTooltip:Hide();
-
-
- FriendsFrameFriendButton_OnClick(self, button);
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- FriendsFrameIgnoreButton_OnClick(self);
- PlaySound(SOUNDKIT.IG_MAINMENU_OPTION_CHECKBOX_ON);
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- self:RegisterForClicks("LeftButtonUp", "RightButtonUp");
-
-
- FriendsFrameWhoButton_OnClick(self, button);
- PlaySound(SOUNDKIT.IG_MAINMENU_OPTION_CHECKBOX_ON);
-
-
- if (self.tooltip1 and self.tooltip2) then
- GameTooltip:SetOwner(self, "ANCHOR_LEFT");
- GameTooltip:SetText(self.tooltip1);
- GameTooltip:AddLine(self.tooltip2, 1, 1, 1);
- GameTooltip:Show();
- end
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- if ( self.sortType ) then
- C_FriendList.SortWho(self.sortType);
- end
- PlaySound(SOUNDKIT.IG_MAINMENU_OPTION_CHECKBOX_ON);
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- self:RegisterForClicks("LeftButtonUp", "RightButtonUp");
-
-
-
- GameTooltip_AddNewbieTip(self, GUILD_MEMBER_OPTIONS, 1.0, 1.0, 1.0, NEWBIE_TOOLTIP_GUILD_MEMBER_OPTIONS, 1);
-
-
- GameTooltip:Hide();
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- self:RegisterForClicks("LeftButtonUp", "RightButtonUp");
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- if ( self.sortType ) then
- SortGuildRoster(self.sortType);
- GuildStatus_Update();
- end
- PlaySound(SOUNDKIT.IG_MAINMENU_OPTION_CHECKBOX_ON);
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- if ( self:GetChecked() ) then
- PlaySound(SOUNDKIT.IG_MAINMENU_OPTION_CHECKBOX_OFF);
- else
- PlaySound(SOUNDKIT.IG_MAINMENU_OPTION_CHECKBOX_ON);
- end
- GuildControlSetRankFlag(self:GetID(), self:GetChecked());
- GuildControlPopupAcceptButton:Enable();
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- GuildBankTabPermissionsTab_OnClick(self:GetID());
-
-
- if(self.tooltip) then
- GameTooltip:SetOwner(self, "ANCHOR_RIGHT");
- GameTooltip:SetText(self.tooltip);
- end
-
-
- GameTooltip:Hide();
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- PanelTemplates_Tab_OnClick(self, FriendsFrame);
- FriendsFrame_OnShow();
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- FriendsFrameBattlenetFrame_HideSubFrames();
-
-
-
-
-
-
-
-
-
-
- PlaySound(SOUNDKIT.IG_CHAT_EMOTE_BUTTON);
- if ( self:GetParent().BroadcastFrame:IsShown() ) then
- FriendsFrameBattlenetFrame_HideBroadcastFrame();
- else
- FriendsFrameBattlenetFrame_ShowBroadcastFrame();
- end
-
-
- GameTooltip_AddNewbieTip(self, CHAT_LABEL, 1.0, 1.0, 1.0, NEWBIE_TOOLTIP_CHATMENU, 1);
-
-
-
-
-
-
-
-
-
-
-
-
-
- local infoFrame = self:GetParent().UnavailableInfoFrame;
- if ( infoFrame:IsShown() ) then
- infoFrame:Hide();
- else
- infoFrame:SetHeight(86 + infoFrame.Text:GetHeight());
- infoFrame:Show();
- end
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- FriendsFrameBattlenetFrame_UpdateBroadcast();
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- FriendsFrameBattlenetFrame_SetBroadcast();
-
-
-
-
-
-
-
-
-
-
- FriendsFrameBattlenetFrame_UpdateBroadcast();
- FriendsFrameBattlenetFrame_HideBroadcastFrame();
-
-
-
-
-
-
- self.scrollBarHideable = 1;
- self.ScrollBar:Hide();
-
- self.minHeight = 113 + self.EditBox.PromptText:GetHeight() * 2
- self:GetParent():SetHeight(self.minHeight);
- self.EditBox:SetPoint("TOPLEFT", 4, -4);
-
-
- self.EditBox:SetFocus();
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- if ( self:GetText() ~= "" ) then
- self.PromptText:Hide();
- else
- self.PromptText:Show();
- end
- local scrollFrame = self:GetParent();
- scrollFrame:GetParent():SetHeight(max(scrollFrame.minHeight, 111 + self:GetHeight()));
-
-
-
- self:ClearFocus();
-
-
- FriendsFrameBattlenetFrame_SetBroadcast();
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- self.icon:SetAlpha(0.35);
-
-
-
-
-
-
- self.icon:SetAlpha(1);
- self.clear:Hide();
- self:SetTextInsets(0, 10, 0, 0);
-
-
- FriendsFrameBroadcastInputTooltipButton:Show();
-
-
- if ( self:GetText() ~= "" ) then
- FriendsFrameBroadcastInputFill:Hide();
- else
- FriendsFrameBroadcastInputFill:Show();
- end
-
-
-
-
-
-
-
- local editBox = FriendsFrameBroadcastInput;
- editBox:SetFocus();
- editBox:SetCursorPosition(strlen(editBox:GetText()));
- editBox:HighlightText(0, -1); -- highlight all
- self:Hide();
-
-
- GameTooltip:SetOwner(FriendsFrameBroadcastInput, "ANCHOR_RIGHT");
- GameTooltip:SetText(BN_BROADCAST_TOOLTIP, nil, nil, nil, nil, true);
-
-
- GameTooltip:Hide();
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- self.icon:SetAlpha(1.0);
- self:SetPoint("RIGHT", -2, 0);
- self.icon:SetAlpha(0.60);
- self:SetPoint("RIGHT", -1, -1);
- self:SetPoint("RIGHT", -2, 0);
-
-
-
-
-
-
- local frameLevel = self:GetFrameLevel();
- FriendsFrameBroadcastInputTooltipButton:SetFrameLevel(frameLevel + 1);
- FriendsFrameBroadcastInputClearButton:SetFrameLevel(frameLevel + 2);
-
-
-
-
-
-
-
-
-
-
-
-
- PanelTemplates_TabResize(self, 0);
- _G[self:GetName().."HighlightTexture"]:SetWidth(self:GetTextWidth() + 31);
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- GameTooltip_AddNewbieTip(self, ADD_FRIEND, 1.0, 1.0, 1.0, NEWBIE_TOOLTIP_ADDFRIEND, 1);
-
-
-
-
-
-
-
-
-
-
-
-
- GameTooltip_AddNewbieTip(self, SEND_MESSAGE, 1.0, 1.0, 1.0, NEWBIE_TOOLTIP_SENDMESSAGE, 1);
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- SetCVar("pendingInviteInfoShown", 1);
- FriendsList_Update();
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- self.DownArrow:SetPoint("LEFT", 10, -5);
- self.RightArrow:SetPoint("LEFT", 13, -4);
-
-
- self.DownArrow:SetPoint("LEFT", 8, -3);
- self.RightArrow:SetPoint("LEFT", 11, -2);
-
-
- PlaySound(SOUNDKIT.IG_MAINMENU_OPTION_CHECKBOX_ON);
- FriendsListFrame_ToggleInvites();
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- self:SetFrameLevel( self:GetFrameLevel() + 3 );
-
-
- if ( UnitCanCooperate("player", "target") and UnitIsPlayer("target") ) then
- local name, server = UnitName("target");
- local fullname = name;
- if ( server and UnitRealmRelationship("target") ~= LE_REALM_RELATION_SAME ) then
- fullname = name.."-"..server;
- end
- C_FriendList.AddIgnore(fullname);
- PlaySound(SOUNDKIT.U_CHAT_SCROLL_BUTTON);
- else
- StaticPopup_Show("ADD_IGNORE");
- end
-
-
- GameTooltip_AddNewbieTip(self, IGNORE_PLAYER, 1.0, 1.0, 1.0, NEWBIE_TOOLTIP_IGNOREPLAYER, 1);
-
-
-
-
-
-
-
-
-
-
-
- self:SetFrameLevel( self:GetFrameLevel() + 3 );
-
-
-
- GameTooltip_AddNewbieTip(self, REMOVE_PLAYER, 1.0, 1.0, 1.0, NEWBIE_TOOLTIP_REMOVEPLAYER, 1);
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- FauxScrollFrame_OnVerticalScroll(self, offset, FRIENDS_FRAME_IGNORE_HEIGHT, IgnoreList_Update);
-
-
-
-
-
-
- FriendsFrameIgnoredHeaderTitle:SetText(IGNORED);
- FriendsFrameBlockedInviteHeaderTitle:SetText(BLOCKED_INVITES);
- FriendsFrameMutedHeaderTitle:SetText(MUTED);
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- WhoFrameColumn_SetWidth(self, 83);
- self.sortType = "name";
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- WhoFrameColumn_SetWidth(self, 105);
-
-
-
-
-
-
-
-
-
- WhoFrameColumn_SetWidth(self, 32);
- self.sortType = "level";
-
-
-
-
-
-
-
-
-
- WhoFrameColumn_SetWidth(self, 92);
- self.sortType = "class";
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- InviteToGroup(WhoFrame.selectedName);
-
-
-
-
-
-
-
-
-
-
- C_FriendList.AddFriend(WhoFrame.selectedName);
-
-
-
-
-
-
-
-
-
-
- WhoFrameEditBox_OnEnterPressed(WhoFrameEditBox);
- WhoFrame.selectedWho = nil;
- PlaySound(SOUNDKIT.IG_MAINMENU_OPTION_CHECKBOX_ON);
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- FauxScrollFrame_OnVerticalScroll(self, offset, FRIENDS_FRAME_WHO_HEIGHT, WhoList_Update);
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- C_FriendList.SetWhoToUi(false);
-
-
- C_FriendList.SetWhoToUi(true);
-
-
- C_FriendList.SetWhoToUi(false);
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- self:SetChecked(GetGuildRosterShowOffline());
-
-
- SetGuildRosterSelection(0);
- if ( self:GetChecked() ) then
- PlaySound(SOUNDKIT.IG_MAINMENU_OPTION_CHECKBOX_OFF);
- else
- PlaySound(SOUNDKIT.IG_MAINMENU_OPTION_CHECKBOX_ON);
- end
- SetGuildRosterShowOffline(self:GetChecked());
- GuildStatus_Update();
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- WhoFrameColumn_SetWidth(self, 83);
- self.sortType = "name";
-
-
-
-
-
-
-
-
-
-
-
-
-
- WhoFrameColumn_SetWidth(self, 105);
- self.sortType = "zone";
-
-
-
-
-
-
-
-
-
-
-
-
-
- WhoFrameColumn_SetWidth(self, 32);
- self.sortType = "level";
-
-
-
-
-
-
-
-
-
-
-
-
-
- WhoFrameColumn_SetWidth(self, 92);
- self.sortType = "class";
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- WhoFrameColumn_SetWidth(self, 83);
- self.sortType = "name";
-
-
-
-
-
-
-
-
-
-
-
-
-
- WhoFrameColumn_SetWidth(self, 75);
- self.sortType = "rank";
-
-
-
-
-
-
-
-
-
-
-
-
-
- WhoFrameColumn_SetWidth(self, 75);
- self.sortType = "note";
-
-
-
-
-
-
-
-
-
-
-
-
-
- WhoFrameColumn_SetWidth(self, 75);
- self.sortType = "online";
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- self:HighlightText();
-
-
-
-
-
-
-
-
-
-
- if IsGuildLeader() then
- SubmitRequiredGuildRename(self:GetParent().editBox:GetText());
- else
- GuildNameChangeAlertFrame.topAnchored = true;
- GuildFrame_CheckName()
- end
-
-
-
-
-
-
- self:SetFrameLevel(GuildNameChangeAlertFrame:GetFrameLevel()-1);
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- self.topAnchored = true;
-
-
- self.topAnchored = false;
- GuildFrame_CheckName()
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- FauxScrollFrame_OnVerticalScroll(self, offset, FRIENDS_FRAME_GUILD_HEIGHT, GuildStatus_Update);
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- GuildFrameGuildListToggleButton_OnClick();
- PlaySound(SOUNDKIT.IG_MAINMENU_OPTION_CHECKBOX_ON);
- if (FriendsFrame.playerStatusFrame) then
- GameTooltip:SetText(PLAYER_STATUS, 1.0,1.0,1.0 );
- else
- GameTooltip:SetText(GUILD_STATUS, 1.0,1.0,1.0 );
- end
-
-
- if (FriendsFrame.playerStatusFrame) then
- GameTooltip:SetOwner(self, "ANCHOR_RIGHT");
- GameTooltip:SetText(PLAYER_STATUS, 1.0,1.0,1.0 );
- else
- GameTooltip:SetOwner(self, "ANCHOR_RIGHT");
- GameTooltip:SetText(GUILD_STATUS, 1.0,1.0,1.0 );
- end
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- local markup = CreateTextureMarkup("Interface\\DialogFrame\\UI-Dialog-Icon-AlertNew", 64, 64, 16, 16, 0, 1, 0, 1);
- local buttonString = ("%s %s|r"):format(markup, GUILD_IMPEACH_POPUP_CONFIRM);
- self:SetText(buttonString);
-
-
- StaticPopup_Show("GUILD_IMPEACH");
-
-
- GameTooltip_AddNewbieTip(self, GUILD_IMPEACH_POPUP_CONFIRM, 1.0, 1.0, 1.0, GUILD_IMPEACH_BUTTON_TEXT, 1);
-
-
- GameTooltip:Hide();
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- GuildFrameControlButton_OnUpdate();
-
-
- if ( GuildControlPopupFrame:IsVisible() ) then
- GuildControlPopupFrame:Hide();
- else
- GuildFramePopup_Show(GuildControlPopupFrame);
- end
-
-
- GameTooltip_AddNewbieTip(self, GUILDCONTROL, 1.0, 1.0, 1.0, NEWBIE_TOOLTIP_GUILDCONTROL, 1);
-
-
- GameTooltip:Hide();
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- StaticPopup_Show("ADD_GUILDMEMBER");
-
-
- GameTooltip_AddNewbieTip(self, ADDMEMBER, 1.0, 1.0, 1.0, NEWBIE_TOOLTIP_ADDMEMBER, 1);
-
-
- GameTooltip:Hide();
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- ToggleGuildInfoFrame();
-
-
- GameTooltip_AddNewbieTip(self, GUILD_INFORMATION, 1.0, 1.0, 1.0, NEWBIE_TOOLTIP_GUILD_INFORMATION, 1);
-
-
- GameTooltip:Hide();
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- StaticPopup_Show("SET_GUILDMOTD");
-
-
-
-
-
-
- C_GuildInfo.GuildRoster();
-
-
- GuildControlPopupFrame:Hide();
- GuildMemberDetailFrame:Hide();
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- GuildControlPopupFrameAddRankButton_OnUpdate();
-
-
- StaticPopup_Show("ADD_GUILDRANK");
-
-
- GameTooltip:SetOwner(self, "ANCHOR_RIGHT");
- GameTooltip:SetText(GUILDADDRANK_BUTTON_TOOLTIP);
-
-
- GameTooltip:Hide();
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- GuildControlPopupFrameRemoveRankButton_OnClick();
-
-
- GameTooltip:SetOwner(self, "ANCHOR_RIGHT");
- GameTooltip:SetText(GUILDREMOVERANK_BUTTON_TOOLTIP);
-
-
- GameTooltip:Hide();
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- if ( self:GetText() ~= UNLIMITED ) then
- GuildControlPopupAcceptButton:Enable();
- GuildControlPopupFrame.goldChanged = 1;
- end
-
-
- GuildControlPopupAcceptButton:Enable();
-
-
- self:ClearFocus();
- GuildControlPopupAcceptButton:Enable();
-
-
- self:ClearFocus();
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- if ( self:GetChecked() ) then
- PlaySound(SOUNDKIT.IG_MAINMENU_OPTION_CHECKBOX_OFF);
- else
- PlaySound(SOUNDKIT.IG_MAINMENU_OPTION_CHECKBOX_ON);
- end
- GuildControlSetRankFlag(self:GetID(), self:GetChecked());
- GuildControlPopupAcceptButton:Enable();
- WithdrawGoldEditBox_Update();
-
-
- GameTooltip:SetOwner(self, "ANCHOR_RIGHT");
- GameTooltip:SetText(GUILDCONTROL_OPTION16_TOOLTIP, nil, NORMAL_FONT_COLOR.r, NORMAL_FONT_COLOR.g, NORMAL_FONT_COLOR.b, 1);
-
-
- GameTooltip:Hide();
-
-
-
-
-
-
-
-
-
-
-
- if ( self:GetChecked() ) then
- PlaySound(SOUNDKIT.IG_MAINMENU_OPTION_CHECKBOX_OFF);
- else
- PlaySound(SOUNDKIT.IG_MAINMENU_OPTION_CHECKBOX_ON);
- end
- GuildControlSetRankFlag(self:GetID(), self:GetChecked());
- GuildControlPopupAcceptButton:Enable();
- WithdrawGoldEditBox_Update();
-
-
- GameTooltip:SetOwner(self, "ANCHOR_RIGHT");
- GameTooltip:SetText(GUILDCONTROL_OPTION15_TOOLTIP, nil, NORMAL_FONT_COLOR.r, NORMAL_FONT_COLOR.g, NORMAL_FONT_COLOR.b, 1);
-
-
- GameTooltip:Hide();
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- self:GetParent():Hide();
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- GuildControlPopupAcceptButton_OnClick();
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- self:SetText(GuildControlGetRankName(1));
- self:ClearFocus();
-
-
- GuildControlPopupAcceptButton:Enable();
-
-
- self:ClearFocus();
- GuildControlPopupAcceptButton:Enable();
-
-
- self:ClearFocus();
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- SetPendingGuildBankTabPermissions(GuildControlPopupFrameTabPermissions.selectedTab, self:GetID(), self:GetChecked());
- GuildControlPopupAcceptButton:Enable();
- GuildControlPopup_UpdateDepositCheckbox();
-
-
-
-
-
-
-
-
-
-
-
- SetPendingGuildBankTabPermissions(GuildControlPopupFrameTabPermissions.selectedTab, self:GetID(), self:GetChecked());
- GuildControlPopupAcceptButton:Enable();
-
-
-
-
-
-
-
-
-
-
-
- SetPendingGuildBankTabPermissions(GuildControlPopupFrameTabPermissions.selectedTab, self:GetID(), self:GetChecked());
- GuildControlPopupAcceptButton:Enable();
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- GuildControlPopupAcceptButton:Enable();
-
-
- local amount = self:GetText();
- if(amount and amount ~= "" and amount ~= UNLIMITED) then
- SetPendingGuildBankTabWithdraw(GuildControlPopupFrameTabPermissions.selectedTab, amount);
- end
-
-
- self:ClearFocus();
- GuildControlPopupAcceptButton:Enable();
-
-
- self:ClearFocus();
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- GuildControlPopupFrame_OnLoad();
-
-
- GuildControlPopupFrame_OnShow();
-
-
- GuildControlPopupFrame_OnHide();
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- if ( CanEditGuildInfo() ) then
- GuildInfoEditBox:SetFocus();
- else
- GuildInfoEditBox:ClearFocus();
- end
-
-
- if ( CanEditGuildInfo() ) then
- GuildInfoEditBox:SetFocus();
- else
- GuildInfoEditBox:ClearFocus();
- end
-
-
-
-
-
-
-
-
-
- self:ClearFocus();
-
-
- local scrollBar = getglobal(self:GetParent():GetName().."ScrollBar")
- self:GetParent():UpdateScrollChildRect();
- local min;
- local max;
- min, max = scrollBar:GetMinMaxValues();
- if ( max > 0 and (self.max ~= max) ) then
- self.max = max;
- scrollBar:SetValue(max);
- end
-
-
-
-
-
-
-
-
-
- local guildInfoText = GetGuildInfoText();
- if ( not guildInfoText ) then
- guildInfoText = "";
- end
- if ( CanEditGuildInfo() ) then
- if ( guildInfoText ~= "" ) then
- GuildInfoEditBox:SetText(guildInfoText);
- else
- GuildInfoEditBox:SetText(GUILD_INFO_EDITLABEL);
- end
- GuildInfoEditBox:SetTextColor(1, 1, 1);
- GuildInfoEditBox:EnableMouse(1);
- GuildInfoSaveButton:Enable();
- else
- GuildInfoEditBox:SetText(guildInfoText);
- GuildInfoEditBox:SetTextColor(0.65, 0.65, 0.65);
- GuildInfoEditBox:EnableMouse();
- GuildInfoSaveButton:Disable();
- end
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- SetGuildInfoText(GuildInfoEditBox:GetText());
- GuildInfoFrame:Hide();
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- GuildInfoFrame:Hide();
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- StaticPopup_Show("REMOVE_GUILDMEMBER");
-
-
- GameTooltip_AddNewbieTip(self, REMOVE, 1.0, 1.0, 1.0, NEWBIE_TOOLTIP_GUILDREMOVE, 1);
-
-
- GameTooltip:Hide();
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- InviteToGroup(GuildFrame.selectedName);
-
-
- GameTooltip_AddNewbieTip(self, GROUP_INVITE, 1.0, 1.0, 1.0, NEWBIE_TOOLTIP_GROUPINVITE, 1);
-
-
- GameTooltip:Hide();
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- C_GuildInfo.Promote(GuildFrame.selectedName);
- PlaySound(SOUNDKIT.U_CHAT_SCROLL_BUTTON);
- GuildFramePromoteButton:Disable();
-
-
- GameTooltip_AddNewbieTip(self, PROMOTE, 1.0, 1.0, 1.0, NEWBIE_TOOLTIP_PROMOTE, 1);
-
-
- GameTooltip:Hide();
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- C_GuildInfo.Demote(GuildFrame.selectedName);
- PlaySound(SOUNDKIT.U_CHAT_SCROLL_BUTTON);
- GuildFrameDemoteButton:Disable();
-
-
- GameTooltip_AddNewbieTip(self, DEMOTE, 1.0, 1.0, 1.0, NEWBIE_TOOLTIP_DEMOTE, 1);
-
-
- GameTooltip:Hide();
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- StaticPopup_Show("SET_GUILDPLAYERNOTE");
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- StaticPopup_Show("SET_GUILDOFFICERNOTE");
-
-
-
-
-
-
-
-
-
-
-
- self:SetWidth(0);
- PanelTemplates_TabResize(self, 0, nil);
-
-
- GameTooltip_AddNewbieTip(self, MicroButtonTooltipText(FRIENDS, "TOGGLEFRIENDSTAB"), 1.0, 1.0, 1.0, NEWBIE_TOOLTIP_FRIENDSTAB, 1);
-
-
-
-
-
-
-
-
-
-
- self:SetWidth(0);
- PanelTemplates_TabResize(self, 0, nil);
-
-
- GameTooltip_AddNewbieTip(self, MicroButtonTooltipText(WHO, "TOGGLEWHOTAB"), 1.0, 1.0, 1.0, NEWBIE_TOOLTIP_WHOTAB, 1);
-
-
-
-
-
-
-
-
-
-
- self:SetWidth(0);
- PanelTemplates_TabResize(self, 0, nil);
-
-
- GameTooltip_AddNewbieTip(self, MicroButtonTooltipText(RAID, "TOGGLERAIDTAB"), 1.0, 1.0, 1.0, NEWBIE_TOOLTIP_RAIDTAB, 1);
-
-
-
-
-
-
-
-
-
-
- self.selectedTextY = 4;
- InGuildCheck();
-
-
- self:SetWidth(0);
- PanelTemplates_TabResize(self, 0, nil);
-
-
- GameTooltip_AddNewbieTip(self, MicroButtonTooltipText(GUILD, "TOGGLEGUILDTAB"), 1.0, 1.0, 1.0, NEWBIE_TOOLTIP_GUILDTAB, 1);
-
-
-
-
-
-
-
-
-
-
- self:SetWidth(0);
- PanelTemplates_TabResize(self, 0, nil);
-
-
- GameTooltip_AddNewbieTip(self, MicroButtonTooltipText(BLIZZARD_GROUPS_SHORT, "TOGGLEBATTLENETGROUPS"), 1.0, 1.0, 1.0, NEWBIE_TOOLTIP_BLIZZARDGROUPSTAB, 1);
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- -- need to update in case of alternate alphabet
- if ( self.hasBroadcast ) then
- FriendsFrameTooltip_Show(self.button);
- end
-
-
-
-
-
-
-
-
-
- FriendsFrame_OnEvent(self, event, ...);
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- SetCVar("addFriendInfoShown", 1);
- AddFriendFrame_ShowEntry();
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- if ( AddFriendNameEditBox:HasFocus() ) then
- AddFriendFrame.editFocus = AddFriendNameEditBox;
- elseif ( AddFriendNoteEditBox:HasFocus() ) then
- AddFriendFrame.editFocus = AddFriendNoteEditBox;
- else
- AddFriendFrame.editFocus = nil;
- end
- AddFriendFrame_ShowInfo();
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- AutoCompleteEditBox_SetAutoCompleteSource(self, GetAutoCompleteResults, AUTOCOMPLETE_LIST.ADDFRIEND.include, AUTOCOMPLETE_LIST.ADDFRIEND.exclude);
- self.addHighlightedText = true;
-
-
- if ( not AutoCompleteEditBox_OnEnterPressed(self) and AddFriendEntryFrameAcceptButton:IsEnabled() ) then
- AddFriendFrame_Accept();
- end
-
-
- if ( AddFriendNoteEditBox:IsShown() and not AutoCompleteEditBox_OnTabPressed(self) ) then
- AddFriendNoteEditBox:SetFocus();
- end
-
-
- self:ClearFocus();
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- local scrollBar = _G[self:GetName().."ScrollBar"];
- scrollBar:ClearAllPoints();
- scrollBar:SetPoint("TOPLEFT", self, "TOPRIGHT", -18, -10);
- scrollBar:SetPoint("BOTTOMLEFT", self, "BOTTOMRIGHT", -18, 8);
- -- reposition the up and down buttons
- _G[self:GetName().."ScrollBarScrollDownButton"]:SetPoint("TOP", scrollBar, "BOTTOM", 0, 4);
- _G[self:GetName().."ScrollBarScrollUpButton"]:SetPoint("BOTTOM", scrollBar, "TOP", 0, -4);
- -- make the scroll bar hideable and force it to start off hidden so positioning calculations can be done
- -- as soon as it needs to be shown
- self.scrollBarHideable = 1;
- scrollBar:Hide();
-
-
- AddFriendNoteEditBox:SetFocus();
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- AddFriendNameEditBox:SetFocus();
-
-
- ScrollingEdit_OnTextChanged(self, self:GetParent());
- if ( self:GetText() ~= "" ) then
- AddFriendNoteEditBoxFill:Hide();
- else
- AddFriendNoteEditBoxFill:Show();
- end
-
-
-
- ScrollingEdit_OnUpdate(self, elapsed, self:GetParent());
-
-
- self:ClearFocus();
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- StaticPopupSpecial_Hide(AddFriendFrame);
-
-
-
-
-
-
-
-
-
- AddFriendFrame.editFocus = nil;
- PlaySound(SOUNDKIT.IG_MAINMENU_CLOSE);
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- FauxScrollFrame_OnVerticalScroll(self, offset, FRIENDS_FRAME_IGNORE_HEIGHT, FriendsFriendsList_Update);
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- if ( UIFrameIsFlashing(self) ) then
- UIFrameFlashStop(self);
- end
- UIFrameFlash(self, 1, 0.5, 60, true, 1)
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- PlaySound(SOUNDKIT.IG_MAINMENU_OPTION_CHECKBOX_ON);
- BNSendVerifiedBattleTagInvite(); -- unit should have been set with BNCheckBattleTagInviteToUnit or BNCheckBattleTagInviteToGuildMember
- StaticPopupSpecial_Hide(self:GetParent());
-
-
-
-
-
-
-
-
-
-
- PlaySound(SOUNDKIT.IG_MAINMENU_OPTION_CHECKBOX_ON);
- StaticPopupSpecial_Hide(self:GetParent());
-
-
-
-
-
-
diff --git a/Interface/AddOns/Blizzard_UIPanels_Game/TBC/FriendsFrame_TBC.lua b/Interface/AddOns/Blizzard_UIPanels_Game/TBC/FriendsFrame_TBC.lua
deleted file mode 100644
index 5e24e4703a..0000000000
--- a/Interface/AddOns/Blizzard_UIPanels_Game/TBC/FriendsFrame_TBC.lua
+++ /dev/null
@@ -1,907 +0,0 @@
--- See FriendsFrame_Shared.lua for functions shared across Classic expansions
-
-PENDING_GUILDBANK_PERMISSIONS = {};
-
-function FriendsFrame_OnLoad(self)
- PanelTemplates_SetNumTabs(self, FRIEND_TAB_COUNT);
- self.selectedTab = FRIEND_TAB_FRIENDS;
- PanelTemplates_UpdateTabs(self);
- self:RegisterEvent("FRIENDLIST_UPDATE");
- self:RegisterEvent("IGNORELIST_UPDATE");
- self:RegisterEvent("WHO_LIST_UPDATE");
- self:RegisterEvent("GROUP_ROSTER_UPDATE");
- self:RegisterEvent("PLAYER_GUILD_UPDATE");
- self:RegisterEvent("GUILD_MOTD");
- self:RegisterEvent("PLAYER_FLAGS_CHANGED");
- self:RegisterEvent("BN_FRIEND_LIST_SIZE_CHANGED");
- self:RegisterEvent("BN_FRIEND_INFO_CHANGED");
- self:RegisterEvent("BN_FRIEND_INVITE_LIST_INITIALIZED");
- self:RegisterEvent("BN_FRIEND_INVITE_ADDED");
- self:RegisterEvent("BN_FRIEND_INVITE_REMOVED");
- self:RegisterEvent("BN_CUSTOM_MESSAGE_CHANGED");
- self:RegisterEvent("BN_CUSTOM_MESSAGE_LOADED");
- self:RegisterEvent("BN_BLOCK_LIST_UPDATED");
- self:RegisterEvent("PLAYER_ENTERING_WORLD");
- self:RegisterEvent("BN_CONNECTED");
- self:RegisterEvent("BN_DISCONNECTED");
- self:RegisterEvent("BN_INFO_CHANGED");
- self:RegisterEvent("SPELL_UPDATE_COOLDOWN");
- self:RegisterEvent("BATTLETAG_INVITE_SHOW");
- self:RegisterEvent("GUILD_ROSTER_UPDATE");
- self:RegisterEvent("GROUP_JOINED");
- self:RegisterEvent("GROUP_LEFT");
- self:RegisterEvent("STREAM_VIEW_MARKER_UPDATED");
- self:RegisterEvent("CLUB_INVITATION_ADDED_FOR_SELF");
- self:RegisterEvent("CLUB_INVITATION_REMOVED_FOR_SELF");
- self:RegisterEvent("GUILD_RENAME_REQUIRED");
- self:RegisterEvent("REQUIRED_GUILD_RENAME_RESULT");
- self.playerStatusFrame = 1;
- self.selectedFriend = 1;
- self.selectedIgnore = 1;
- -- guild
- self.guildStatus = 0;
- GuildFrame.notesToggle = 1;
- GuildFrame.selectedGuildMember = 0;
- GuildFrame.hasForcedNameChange = GetGuildRenameRequired();
- SetGuildRosterSelection(0);
- local currentGuildMOTD = GetGuildRosterMOTD();
- GuildFrameNotesText:SetText(currentGuildMOTD);
- GuildMemberDetailRankText:SetPoint("RIGHT", GuildFramePromoteButton, "LEFT");
- -- friends list
- local scrollFrame = FriendsFrameFriendsScrollFrame;
- scrollFrame.update = FriendsFrame_UpdateFriends;
- scrollFrame.dynamic = FriendsList_GetScrollFrameTopButton;
- scrollFrame.dividerPool = CreateFramePool("FRAME", self, "FriendsFrameFriendDividerTemplate");
- scrollFrame.invitePool = CreateFramePool("FRAME", self, "FriendsFrameFriendInviteTemplate");
- -- can't do this in XML because we're inheriting from a template
- scrollFrame.PendingInvitesHeaderButton:SetParent(scrollFrame.ScrollChild);
- FriendsFrameFriendsScrollFrameScrollBarTrack:Hide();
- FriendsFrameFriendsScrollFrameScrollBar.doNotHide = true;
- HybridScrollFrame_CreateButtons(scrollFrame, "FriendsFrameButtonTemplate");
- FriendsFrameIcon:SetTexture("Interface\\FriendsFrame\\FriendsFrameScrollIcon");
-
- FriendsFrameBroadcastInputClearButton.icon:SetVertexColor(FRIENDS_BNET_NAME_COLOR.r, FRIENDS_BNET_NAME_COLOR.g, FRIENDS_BNET_NAME_COLOR.b);
- if ( not BNFeaturesEnabled() ) then
- FriendsFrameBattlenetFrame:Hide();
- FriendsFrameBroadcastInput:Hide();
- end
-
- --Create lists of buttons for various subframes
- for i = 2, 19 do
- local button = CreateFrame("Button", "FriendsFrameIgnoreButton"..i, IgnoreListFrame, "FriendsFrameIgnoreButtonTemplate");
- button:SetPoint("TOP", _G["FriendsFrameIgnoreButton"..(i-1)], "BOTTOM");
- end
- for i = 2, 17 do
- local button = CreateFrame("Button", "WhoFrameButton"..i, WhoFrame, "FriendsFrameWhoButtonTemplate");
- button:SetID(i);
- button:SetPoint("TOP", _G["WhoFrameButton"..(i-1)], "BOTTOM");
- end
-end
-
-function FriendsFrame_OnEvent(self, event, ...)
- if ( event == "SPELL_UPDATE_COOLDOWN" ) then
- if ( self:IsShown() ) then
- local buttons = FriendsFrameFriendsScrollFrame.buttons;
- for _, button in pairs(buttons) do
- if ( button.summonButton:IsShown() ) then
- FriendsFrame_SummonButton_Update(button.summonButton);
- end
- end
- end
- elseif ( event == "FRIENDLIST_UPDATE" or event == "GROUP_ROSTER_UPDATE" ) then
- FriendsList_Update();
- elseif ( event == "BN_FRIEND_LIST_SIZE_CHANGED" or event == "BN_FRIEND_INFO_CHANGED" ) then
- FriendsList_Update();
- -- update Friends of Friends
- local bnetIDAccount = ...;
- if ( event == "BN_FRIEND_LIST_SIZE_CHANGED" and bnetIDAccount ) then
- FriendsFriendsFrame.requested[bnetIDAccount] = nil;
- if ( FriendsFriendsFrame:IsShown() ) then
- FriendsFriendsList_Update();
- end
- end
- elseif ( event == "BN_CUSTOM_MESSAGE_CHANGED" ) then
- local arg1 = ...;
- if ( arg1 ) then --There is no bnetIDAccount given if this is ourself.
- FriendsList_Update();
- else
- FriendsFrameBattlenetFrame_UpdateBroadcast();
- end
- elseif ( event == "BN_CUSTOM_MESSAGE_LOADED" ) then
- FriendsFrameBattlenetFrame_UpdateBroadcast();
- elseif ( event == "BN_FRIEND_INVITE_ADDED" ) then
- -- flash the invites header if collapsed
- local collapsed = GetCVarBool("friendInvitesCollapsed");
- if ( collapsed ) then
- FriendsFrameFriendsScrollFrame.PendingInvitesHeaderButton.Flash.Anim:Play();
- end
- FriendsList_Update();
- elseif ( event == "BN_FRIEND_INVITE_LIST_INITIALIZED" ) then
- FriendsList_Update();
- elseif ( event == "BN_FRIEND_INVITE_REMOVED" ) then
- FriendsList_Update();
- elseif ( event == "IGNORELIST_UPDATE" or event == "BN_BLOCK_LIST_UPDATED" ) then
- IgnoreList_Update();
- elseif ( event == "WHO_LIST_UPDATE" ) then
- WhoFrame.selectedWho = nil;
- WhoList_Update();
- FriendsFrame_Update();
- elseif ( event == "PLAYER_FLAGS_CHANGED" or event == "BN_INFO_CHANGED") then
- FriendsFrameStatusDropdown:GenerateMenu();
- FriendsFrame_CheckBattlenetStatus();
- elseif ( event == "PLAYER_ENTERING_WORLD" or event == "BN_CONNECTED" or event == "BN_DISCONNECTED") then
- FriendsFrame_CheckBattlenetStatus();
- -- We want to remove any friends from the frame so they don't linger when it's first re-opened.
- if (event == "BN_DISCONNECTED") then
- FriendsList_Update(true);
- end
- elseif ( event == "BATTLETAG_INVITE_SHOW" ) then
- BattleTagInviteFrame_Show(...);
- elseif ( event == "SOCIAL_QUEUE_UPDATE" or event == "GROUP_LEFT" or event == "GROUP_JOINED" ) then
- if ( self:IsVisible() ) then
- FriendsFrame_Update(); --TODO - Only update the buttons that need updating
- end
- elseif ( event == "GUILD_ROSTER_UPDATE" ) then
- FriendsFrame_CheckDethroneStatus();
-
- GuildInfoFrame.cachedText = nil;
- if ( GuildFrame:IsShown() ) then
- local arg1 = ...;
- if ( arg1 ) then
- C_GuildInfo.GuildRoster();
- end
- GuildStatus_Update();
- FriendsFrame_Update();
- GuildControlPopupFrame_Initialize();
- end
- elseif ( event == "PLAYER_GUILD_UPDATE" ) then
- if ( FriendsFrame:IsVisible() ) then
- InGuildCheck();
- end
- if ( not IsInGuild() ) then
- GuildControlPopupFrame.initialized = false;
- end
- elseif ( event == "GUILD_MOTD") then
- local currentGuildMOTD = ...;
- GuildFrameNotesText:SetText(currentGuildMOTD);
- elseif ( event == "STREAM_VIEW_MARKER_UPDATED" ) then
- BlizzardGroups_UpdateNotifications();
- elseif ( event == "CLUB_INVITATION_ADDED_FOR_SELF" or event == "CLUB_INVITATION_REMOVED_FOR_SELF" ) then
- BlizzardGroups_UpdateShowTab();
- BlizzardGroups_UpdateNotifications();
- elseif ( event == "GUILD_RENAME_REQUIRED" ) then
- GuildFrame.hasForcedNameChange = ...;
- GuildFrame_CheckName();
- elseif ( event == "REQUIRED_GUILD_RENAME_RESULT" ) then
- local success = ...
- if ( success ) then
- GuildFrame.hasForcedNameChange = GetGuildRenameRequired();
- GuildFrame_CheckName();
- else
- UIErrorsFrame:AddMessage(ERR_GUILD_NAME_INVALID, 1.0, 0.1, 0.1, 1.0);
- end
- end
-end
-
-function FriendsFrame_InviteOrRequestToJoin(guid, gameAccountID)
- local inviteType = GetDisplayedInviteType(guid);
- if ( inviteType == "INVITE" or inviteType == "SUGGEST_INVITE" ) then
- if inviteType == "SUGGEST_INVITE" and C_PartyInfo.IsPartyFull() then
- ChatFrame_DisplaySystemMessageInPrimary(ERR_GROUP_FULL);
- return;
- end
-
- BNInviteFriend(gameAccountID);
- elseif ( inviteType == "REQUEST_INVITE" ) then
- BNRequestInviteFriend(gameAccountID);
- end
-end
-
--- ============================================ GUILD ===============================================================================
-function GuildControlPopupFrame_OnLoad()
- local buttonText;
- for i=1, 17 do
- buttonText = _G["GuildControlPopupFrameCheckbox"..i.."Text"];
- if ( buttonText ) then
- buttonText:SetText(_G["GUILDCONTROL_OPTION"..i]);
- end
- end
- GuildControlTabPermissionsViewTabText:SetText(GUILDCONTROL_VIEW_TAB);
- GuildControlTabPermissionsDepositItemsText:SetText(GUILDCONTROL_DEPOSIT_ITEMS);
- GuildControlTabPermissionsUpdateTextText:SetText(GUILDCONTROL_OPTION19); --option # is a lie, we're simply repurposing this globalstring from mainline
- ClearPendingGuildBankPermissions();
-end
-
---Need to call this function on an event since the guildroster is not available during OnLoad()
-function GuildControlPopupFrame_Initialize()
- if ( GuildControlPopupFrame.initialized ) then
- return;
- end
-
- GuildControlSetRank(1);
-
- local function IsSelected(i)
- return GuildControlGetRank() == i;
- end
-
- local function SetSelected(i)
- GuildControlSetRank(i);
- GuildControlCheckboxUpdate(C_GuildInfo.GuildControlGetRankFlags(i));
- GuildControlPopupFrameEditBox:SetText(text);
- GuildControlPopupFrameAddRankButton_OnUpdate();
- GuildControlPopupFrameRemoveRankButton_OnUpdate();
- GuildControlPopupAcceptButton:Disable();
- end
-
- self:SetupMenu(function(dropdown, rootDescription)
- rootDescription:SetTag("MENU_FRIENDS_GUILD_CONTROL");
-
- for i=1, GuildControlGetNumRanks() do
- local text = GuildControlGetRankName(i);
- rootDescription:CreateRadio(text, IsSelected, SetSelected, i);
- end
- end);
-
- -- Select tab 1
- GuildBankTabPermissionsTab_OnClick(1);
- GuildControlPopupFrameDropdownButton_ClickedRank(1);
-
- GuildControlPopupFrame:SetScript("OnEvent", GuildControlPopupFrame_OnEvent);
- GuildControlPopupFrame.initialized = 1;
- GuildControlPopupFrame.rank = GuildControlGetRankName(1);
-end
-
-function GuildControlPopupFrame_OnShow()
- FriendsFrame:SetAttribute("UIPanelLayout-defined", nil);
- FriendsFrame.guildControlShow = 1;
- GuildControlPopupAcceptButton:Disable();
- -- Update popup
- GuildControlPopupFrame_Initialize();
- GuildControlPopupframe_Update();
-
- UIPanelWindows["FriendsFrame"].width = FriendsFrame:GetWidth() + GuildControlPopupFrame:GetWidth();
- UpdateUIPanelPositions(FriendsFrame);
- --GuildControlPopupFrame:RegisterEvent("GUILD_ROSTER_UPDATE"); --It was decided that having a risk of conflict when two people are editing the guild permissions at once is better than resetting whenever someone joins the guild or changes ranks.
- GuildControlPopupFrame:RegisterEvent("GUILD_RANKS_UPDATE");
-end
-
-function GuildControlPopupFrame_OnEvent (self, event, ...)
- if ( not IsGuildLeader(UnitName("player")) ) then
- GuildControlPopupFrame:Hide();
- return;
- end
-
- for i=1, GuildControlGetNumRanks() do
- if GuildControlGetRank() == i then
- GuildControlPopupFrameDropdown:GenerateMenu();
- break;
- end
- end
-
- GuildControlPopupframe_Update()
-end
-
-function GuildControlPopupFrame_OnHide()
- FriendsFrame:SetAttribute("UIPanelLayout-defined", nil);
- FriendsFrame.guildControlShow = 0;
-
- UIPanelWindows["FriendsFrame"].width = FriendsFrame:GetWidth();
- UpdateUIPanelPositions();
-
- GuildControlPopupFrame.goldChanged = nil;
- GuildControlPopupFrame:UnregisterEvent("GUILD_ROSTER_UPDATE");
-end
-
-function GuildControlPopupframe_Update(loadPendingTabPermissions, skipCheckboxUpdate)
- -- Skip non-tab specific updates to fix Bug ID: 110210
- if ( not skipCheckboxUpdate ) then
- -- Update permission flags
- GuildControlCheckboxUpdate(GuildControlGetRankFlags());
- end
-
- local rankID = GuildControlGetRank();
- GuildControlPopupFrameEditBox:SetText(GuildControlGetRankName(rankID));
- if ( GuildControlPopupFrame.previousSelectedRank and GuildControlPopupFrame.previousSelectedRank ~= rankID ) then
- ClearPendingGuildBankPermissions();
- end
- GuildControlPopupFrame.previousSelectedRank = rankID;
-
- --If rank to modify is guild master then gray everything out
- if ( IsGuildLeader() and rankID == 1 ) then
- GuildBankTabLabel:SetVertexColor(GRAY_FONT_COLOR.r, GRAY_FONT_COLOR.g, GRAY_FONT_COLOR.b);
- GuildControlTabPermissionsDepositItems:SetChecked(1);
- GuildControlTabPermissionsViewTab:SetChecked(1);
- GuildControlTabPermissionsUpdateText:SetChecked(1);
- GuildControlTabPermissionsDepositItems:Disable();
- GuildControlTabPermissionsViewTab:Disable();
- GuildControlTabPermissionsUpdateText:Disable();
- GuildControlTabPermissionsWithdrawItemsText:SetVertexColor(GRAY_FONT_COLOR.r, GRAY_FONT_COLOR.g, GRAY_FONT_COLOR.b);
- GuildControlWithdrawItemsEditBox:SetNumeric(nil);
- GuildControlWithdrawItemsEditBox:SetTextColor(GRAY_FONT_COLOR.r, GRAY_FONT_COLOR.g, GRAY_FONT_COLOR.b);
- GuildControlWithdrawItemsEditBox:SetText(UNLIMITED);
- GuildControlWithdrawItemsEditBox:ClearFocus();
- GuildControlWithdrawItemsEditBoxMask:Show();
- GuildControlWithdrawGoldText:SetVertexColor(GRAY_FONT_COLOR.r, GRAY_FONT_COLOR.g, GRAY_FONT_COLOR.b);
- GuildControlWithdrawGoldAmountText:SetVertexColor(GRAY_FONT_COLOR.r, GRAY_FONT_COLOR.g, GRAY_FONT_COLOR.b);
- GuildControlWithdrawGoldEditBox:SetNumeric(nil);
- GuildControlWithdrawGoldEditBox:SetMaxLetters(0);
- GuildControlWithdrawGoldEditBox:SetTextColor(GRAY_FONT_COLOR.r, GRAY_FONT_COLOR.g, GRAY_FONT_COLOR.b);
- GuildControlWithdrawGoldEditBox:SetText(UNLIMITED);
- GuildControlWithdrawGoldEditBox:ClearFocus();
- GuildControlWithdrawGoldEditBoxMask:Show();
- GuildControlPopupFrameCheckbox15:Disable();
- GuildControlPopupFrameCheckbox16:Disable();
- else
- if ( GetNumGuildBankTabs() == 0 ) then
- -- No tabs, no permissions! Disable the tab related doohickies
- GuildBankTabLabel:SetVertexColor(GRAY_FONT_COLOR.r, GRAY_FONT_COLOR.g, GRAY_FONT_COLOR.b);
- GuildControlTabPermissionsViewTab:Disable();
- GuildControlTabPermissionsDepositItems:Disable();
- GuildControlTabPermissionsUpdateText:Disable();
- GuildControlTabPermissionsWithdrawItemsText:SetVertexColor(GRAY_FONT_COLOR.r, GRAY_FONT_COLOR.g, GRAY_FONT_COLOR.b);
- GuildControlWithdrawItemsEditBox:SetText(UNLIMITED);
- GuildControlWithdrawItemsEditBox:ClearFocus();
- GuildControlWithdrawItemsEditBoxMask:Show();
- else
- GuildBankTabLabel:SetVertexColor(NORMAL_FONT_COLOR.r, NORMAL_FONT_COLOR.g, NORMAL_FONT_COLOR.b);
- GuildControlTabPermissionsViewTab:Enable();
- GuildControlTabPermissionsWithdrawItemsText:SetVertexColor(NORMAL_FONT_COLOR.r, NORMAL_FONT_COLOR.g, NORMAL_FONT_COLOR.b);
- GuildControlWithdrawItemsEditBox:SetNumeric(1);
- GuildControlWithdrawItemsEditBox:SetTextColor(HIGHLIGHT_FONT_COLOR.r, HIGHLIGHT_FONT_COLOR.g, HIGHLIGHT_FONT_COLOR.b);
- GuildControlWithdrawItemsEditBoxMask:Hide();
- end
-
- GuildControlWithdrawGoldText:SetVertexColor(NORMAL_FONT_COLOR.r, NORMAL_FONT_COLOR.g, NORMAL_FONT_COLOR.b);
- GuildControlWithdrawGoldAmountText:SetVertexColor(NORMAL_FONT_COLOR.r, NORMAL_FONT_COLOR.g, NORMAL_FONT_COLOR.b);
- GuildControlWithdrawGoldEditBox:SetNumeric(1);
- GuildControlWithdrawGoldEditBox:SetMaxLetters(MAX_GOLD_WITHDRAW_DIGITS);
- GuildControlWithdrawGoldEditBox:SetTextColor(HIGHLIGHT_FONT_COLOR.r, HIGHLIGHT_FONT_COLOR.g, HIGHLIGHT_FONT_COLOR.b);
- GuildControlWithdrawGoldEditBoxMask:Hide();
- GuildControlPopupFrameCheckbox15:Enable();
- GuildControlPopupFrameCheckbox16:Enable();
-
- -- Update tab specific info
- local viewTab, canDeposit, canUpdateText, numWithdrawals = GetGuildBankTabPermissions(GuildControlPopupFrameTabPermissions.selectedTab);
- if ( rankID == 1 ) then
- --If is guildmaster then force checkboxes to be selected
- viewTab = 1;
- canDeposit = 1;
- canUpdateText = 1;
- elseif ( loadPendingTabPermissions ) then
- local permissions = PENDING_GUILDBANK_PERMISSIONS[GuildControlPopupFrameTabPermissions.selectedTab];
- local value;
- value = permissions[GuildControlTabPermissionsViewTab:GetID()];
- if ( value ) then
- viewTab = value;
- end
- value = permissions[GuildControlTabPermissionsDepositItems:GetID()];
- if ( value ) then
- canDeposit = value;
- end
- value = permissions[GuildControlTabPermissionsUpdateText:GetID()];
- if ( value ) then
- canUpdateText = value;
- end
- value = permissions["withdraw"];
- if ( value ) then
- numWithdrawals = value;
- end
- end
- GuildControlTabPermissionsViewTab:SetChecked(viewTab);
- GuildControlTabPermissionsDepositItems:SetChecked(canDeposit);
- GuildControlTabPermissionsUpdateText:SetChecked(canUpdateText);
- GuildControlWithdrawItemsEditBox:SetText(numWithdrawals);
- local goldWithdrawLimit = GetGuildBankWithdrawGoldLimit();
- -- Only write to the editbox if the value hasn't been changed by the player
- if ( not GuildControlPopupFrame.goldChanged ) then
- if ( goldWithdrawLimit >= 0 ) then
- GuildControlWithdrawGoldEditBox:SetText(goldWithdrawLimit);
- else
- -- This is for the guild leader who defaults to -1
- GuildControlWithdrawGoldEditBox:SetText(MAX_GOLD_WITHDRAW);
- end
- end
- GuildControlPopup_UpdateDepositCheckbox();
- end
-
- --Only show available tabs
- local tab;
- local numTabs = GetNumGuildBankTabs();
- local name, permissionsTabBackground, permissionsText;
- for i=1, MAX_GUILDBANK_TABS do
- name = GetGuildBankTabInfo(i);
- tab = _G["GuildBankTabPermissionsTab"..i];
-
- if ( i <= numTabs ) then
- tab:Show();
- tab.tooltip = name;
- permissionsTabBackground = _G["GuildBankTabPermissionsTab"..i.."Background"];
- permissionsText = _G["GuildBankTabPermissionsTab"..i.."Text"];
- if ( GuildControlPopupFrameTabPermissions.selectedTab == i ) then
- tab:LockHighlight();
- permissionsTabBackground:SetTexCoord(0, 1.0, 0, 1.0);
- permissionsTabBackground:SetHeight(32);
- permissionsText:SetPoint("CENTER", permissionsTabBackground, "CENTER", 0, -3);
- else
- tab:UnlockHighlight();
- permissionsTabBackground:SetTexCoord(0, 1.0, 0, 0.875);
- permissionsTabBackground:SetHeight(28);
- permissionsText:SetPoint("CENTER", permissionsTabBackground, "CENTER", 0, -5);
- end
- if ( IsGuildLeader() and rankID == 1 ) then
- tab:Disable();
- else
- tab:Enable();
- end
- else
- tab:Hide();
- end
- end
-end
-
-function WithdrawGoldEditBox_Update()
- if ( not GuildControlPopupFrameCheckbox15:GetChecked() and not GuildControlPopupFrameCheckbox16:GetChecked() ) then
- GuildControlWithdrawGoldAmountText:SetVertexColor(GRAY_FONT_COLOR.r, GRAY_FONT_COLOR.g, GRAY_FONT_COLOR.b);
- GuildControlWithdrawGoldEditBox:SetTextColor(GRAY_FONT_COLOR.r, GRAY_FONT_COLOR.g, GRAY_FONT_COLOR.b);
- GuildControlWithdrawGoldEditBox:ClearFocus();
- GuildControlWithdrawGoldEditBoxMask:Show();
- else
- GuildControlWithdrawGoldAmountText:SetVertexColor(NORMAL_FONT_COLOR.r, NORMAL_FONT_COLOR.g, NORMAL_FONT_COLOR.b);
- GuildControlWithdrawGoldEditBox:SetTextColor(HIGHLIGHT_FONT_COLOR.r, HIGHLIGHT_FONT_COLOR.g, HIGHLIGHT_FONT_COLOR.b);
- GuildControlWithdrawGoldEditBoxMask:Hide();
- end
-end
-
-function GuildControlPopupAcceptButton_OnClick()
- local amount = GuildControlWithdrawGoldEditBox:GetText();
- if(amount and amount ~= "" and amount ~= UNLIMITED and tonumber(amount) and tonumber(amount) > 0) then
- SetGuildBankWithdrawGoldLimit(amount);
- else
- SetGuildBankWithdrawGoldLimit(0);
- end
- SavePendingGuildBankTabPermissions()
- GuildControlSaveRank(GuildControlPopupFrameEditBox:GetText());
- GuildStatus_Update();
- GuildControlPopupAcceptButton:Disable();
- GuildControlPopupFrameDropdown:GenerateMenu();
- GuildControlPopupFrame:Hide();
- ClearPendingGuildBankPermissions();
-end
-
-function GuildControlPopupFrameDropdown_OnLoad(self)
- WowStyle1DropdownMixin.OnLoad(self);
-
- self:SetWidth(110);
-end
-
-function GuildControlPopupFrameDropdownButton_ClickedRank(rank)
- GuildControlSetRank(rank);
- GuildControlPopupFrame.rank = GuildControlGetRankName(rank);
- GuildControlPopupFrame.goldChanged = nil;
- GuildControlPopupframe_Update();
- GuildControlPopupFrameAddRankButton_OnUpdate(GuildControlPopupFrameAddRankButton);
- GuildControlPopupFrameRemoveRankButton_OnUpdate(GuildControlPopupFrameRemoveRankButton);
- GuildControlPopupAcceptButton:Disable();
- GuildControlPopupFrameDropdown:GenerateMenu();
-end
-
-function GuildControlCheckboxUpdate(...)
- local checkbox;
- for i=1, select("#", ...), 1 do
- checkbox = _G["GuildControlPopupFrameCheckbox"..i]
- if ( checkbox ) then
- checkbox:SetChecked(select(i, ...));
- else
- --We need to skip checkbox 14 since it's a deprecated flag
- --message("GuildControlPopupFrameCheckbox"..i.." does not exist!");
- end
- end
-end
-
-function GuildControlPopupFrameRemoveRankButton_OnClick()
- GuildControlDelRank(GuildControlGetRank());
- GuildControlPopupFrame.rank = GuildControlGetRankName(1);
- GuildControlSetRank(1);
- GuildStatus_Update();
- GuildControlPopupFrameEditBox:SetText(GuildControlGetRankName(1));
- GuildControlCheckboxUpdate(GuildControlGetRankFlags());
- GuildControlPopupFrameDropdownButton_ClickedRank(1);
-
- -- Set this to call guildroster in the next frame
- --C_GuildInfo.GuildRoster();
- --GuildControlPopupFrame.update = 1;
-end
-
-function GuildControlPopupFrameRemoveRankButton_OnUpdate(self)
- local numRanks = GuildControlGetNumRanks()
- if ( (GuildControlGetRank() == numRanks) and (numRanks > 5) ) then
- self:Show();
- if ( FriendsFrame.playersInBotRank > 0 ) then
- self:Disable();
- else
- self:Enable();
- end
- else
- self:Hide();
- end
-end
-
-function GuildControlPopup_UpdateDepositCheckbox()
- if(GuildControlTabPermissionsViewTab:GetChecked()) then
- GuildControlTabPermissionsDepositItems:Enable();
- GuildControlTabPermissionsUpdateText:Enable();
- else
- GuildControlTabPermissionsDepositItems:Disable();
- GuildControlTabPermissionsUpdateText:Disable();
- end
-end
-
-function GuildBankTabPermissionsTab_OnClick(tab)
- GuildControlPopupFrameTabPermissions.selectedTab = tab;
- GuildControlPopupframe_Update(true, true);
-end
-
--- Functions to allow canceling
-function ClearPendingGuildBankPermissions()
- for i=1, MAX_GUILDBANK_TABS do
- PENDING_GUILDBANK_PERMISSIONS[i] = {};
- end
-end
-
-function SetPendingGuildBankTabPermissions(tab, id, checked)
- if ( not checked ) then
- checked = 0;
- end
- PENDING_GUILDBANK_PERMISSIONS[tab][id] = checked;
-end
-
-function SetPendingGuildBankTabWithdraw(tab, amount)
- PENDING_GUILDBANK_PERMISSIONS[tab]["withdraw"] = amount;
-end
-
-function SavePendingGuildBankTabPermissions()
- for index, value in pairs(PENDING_GUILDBANK_PERMISSIONS) do
- for i=1, 3 do
- if ( value[i] ) then
- -- treat 0 as false
- local boolValue = value[i];
- if ( type(boolValue) == "number" ) then
- boolValue = boolValue ~= 0;
- end
- SetGuildBankTabPermissions(index, i, boolValue);
- end
- end
- if ( value["withdraw"] ) then
- SetGuildBankTabItemWithdraw(index, value["withdraw"]);
- end
- end
-end
-
-function FriendsFrameGuildStatusButton_OnClick(self, button)
- if ( button == "LeftButton" ) then
- GuildFrame.previousSelectedGuildMember = GuildFrame.selectedGuildMember;
- GuildFrame.selectedGuildMember = self.guildIndex;
- GuildFrame.selectedName = getglobal(self:GetName().."Name"):GetText();
- SetGuildRosterSelection(GuildFrame.selectedGuildMember);
- -- Toggle guild details frame
- if ( GuildMemberDetailFrame:IsVisible() and (GuildFrame.previousSelectedGuildMember and (GuildFrame.previousSelectedGuildMember == GuildFrame.selectedGuildMember)) ) then
- GuildMemberDetailFrame:Hide();
- GuildFrame.selectedGuildMember = 0;
- SetGuildRosterSelection(0);
- else
- GuildFramePopup_Show(GuildMemberDetailFrame);
- end
- GuildStatus_Update();
- else
- local guildIndex = self.guildIndex;
- local name, rank, rankIndex, level, class, zone, note, officernote, online = GetGuildRosterInfo(guildIndex);
- FriendsFrame_ShowDropdown(name, online);
- end
-end
-
-function GuildStatus_Update()
- -- Set the tab
- PanelTemplates_SetTab(FriendsFrame, 3);
- -- Show the frame
- ShowUIPanel(FriendsFrame);
- -- Number of players in the lowest rank
- FriendsFrame.playersInBotRank = 0
-
- local totalMembers, onlineMembers, onlineAndMobileMembers = GetNumGuildMembers();
- local numGuildMembers = 0;
- local showOffline = GetGuildRosterShowOffline();
- if (showOffline) then
- numGuildMembers = totalMembers;
- else
- numGuildMembers = onlineMembers;
- end
- local fullName, name, rank, rankIndex, level, class, zone, note, officernote, online, isAway;
- local guildName, guildRankName, guildRankIndex = GetGuildInfo("player");
- local maxRankIndex = GuildControlGetNumRanks() - 1;
- local button;
- local onlinecount = 0;
- local guildIndex;
-
- -- Get selected guild member info
- fullName, rank, rankIndex, level, class, zone, note, officernote, online = GetGuildRosterInfo(GetGuildRosterSelection());
- GuildFrame.selectedName = fullName;
- -- If there's a selected guildmember
- if ( GetGuildRosterSelection() > 0 ) then
- local displayedName = Ambiguate(fullName, "guild");
- -- Update the guild member details frame
- GuildMemberDetailName:SetText(displayedName);
- GuildMemberDetailLevel:SetText(format(FRIENDS_LEVEL_TEMPLATE, level, class));
- GuildMemberDetailZoneText:SetText(zone);
- GuildMemberDetailRankText:SetText(rank);
- if ( online ) then
- GuildMemberDetailOnlineText:SetText(GUILD_ONLINE_LABEL);
- else
- GuildMemberDetailOnlineText:SetText(GuildFrame_GetLastOnline(GetGuildRosterSelection()));
- end
- -- Update public note
- if ( CanEditPublicNote() ) then
- PersonalNoteText:SetTextColor(1.0, 1.0, 1.0);
- if ( (not note) or (note == "") ) then
- note = GUILD_NOTE_EDITLABEL;
- end
- else
- PersonalNoteText:SetTextColor(0.65, 0.65, 0.65);
- end
- GuildMemberNoteBackground:EnableMouse(CanEditPublicNote());
- PersonalNoteText:SetText(note);
- -- Update officer note
- if ( C_GuildInfo.CanViewOfficerNote() ) then
- if ( C_GuildInfo.CanEditOfficerNote() ) then
- if ( (not officernote) or (officernote == "") ) then
- officernote = GUILD_OFFICERNOTE_EDITLABEL;
- end
- OfficerNoteText:SetTextColor(1.0, 1.0, 1.0);
- else
- OfficerNoteText:SetTextColor(0.65, 0.65, 0.65);
- end
- GuildMemberOfficerNoteBackground:EnableMouse(C_GuildInfo.CanEditOfficerNote());
- OfficerNoteText:SetText(officernote);
-
- -- Resize detail frame
- GuildMemberDetailOfficerNoteLabel:Show();
- GuildMemberOfficerNoteBackground:Show();
- GuildMemberDetailFrame:SetHeight(GUILD_DETAIL_OFFICER_HEIGHT);
- else
- GuildMemberDetailOfficerNoteLabel:Hide();
- GuildMemberOfficerNoteBackground:Hide();
- GuildMemberDetailFrame:SetHeight(GUILD_DETAIL_NORM_HEIGHT);
- end
-
- -- Manage guild member related buttons
- if ( CanGuildPromote() and ( rankIndex > 1 ) and ( rankIndex > (guildRankIndex + 1) ) ) then
- GuildFramePromoteButton:Enable();
- else
- GuildFramePromoteButton:Disable();
- end
- if ( CanGuildDemote() and ( rankIndex >= 1 ) and ( rankIndex > guildRankIndex ) and ( rankIndex ~= maxRankIndex ) ) then
- GuildFrameDemoteButton:Enable();
- else
- GuildFrameDemoteButton:Disable();
- end
- -- Hide promote/demote buttons if both disabled
- if ( not GuildFrameDemoteButton:IsEnabled() and not GuildFramePromoteButton:IsEnabled() ) then
- GuildFramePromoteButton:Hide();
- GuildFrameDemoteButton:Hide();
- GuildMemberDetailRankText:SetPoint("RIGHT", "GuildMemberDetailFrame", "RIGHT", -10, 0);
- else
- GuildFramePromoteButton:Show();
- GuildFrameDemoteButton:Show();
- GuildMemberDetailRankText:SetPoint("RIGHT", "GuildFramePromoteButton", "LEFT", 3, 0);
- end
- if ( CanGuildRemove() and ( rankIndex >= 1 ) and ( rankIndex > guildRankIndex ) ) then
- GuildMemberRemoveButton:Enable();
- else
- GuildMemberRemoveButton:Disable();
- end
- if ( (UnitName("player") == displayedName) or (not online) ) then
- GuildMemberGroupInviteButton:Disable();
- else
- GuildMemberGroupInviteButton:Enable();
- end
-
- GuildFrame.selectedName = GetGuildRosterInfo(GetGuildRosterSelection());
- end
-
- -- Message of the day stuff
- local guildMOTD = GetGuildRosterMOTD();
- if ( CanEditMOTD() ) then
- if ( (not guildMOTD) or (guildMOTD == "") ) then
- --guildMOTD = GUILD_MOTD_EDITLABEL; -- A bug in the 1.12 lua code caused this to never actually appear.
- end
- GuildFrameNotesText:SetTextColor(1.0, 1.0, 1.0);
- GuildMOTDEditButton:Enable();
- else
- GuildFrameNotesText:SetTextColor(0.65, 0.65, 0.65);
- GuildMOTDEditButton:Disable();
- end
- GuildFrameNotesText:SetText(guildMOTD);
-
- -- Scrollbar stuff
- local showScrollBar = nil;
- if ( numGuildMembers > GUILDMEMBERS_TO_DISPLAY ) then
- showScrollBar = 1;
- end
-
- -- Get number of online members
- for i=1, numGuildMembers, 1 do
- name, rank, rankIndex, level, class, zone, note, officernote, online = GetGuildRosterInfo(i);
- if ( online ) then
- onlinecount = onlinecount + 1;
- end
- if ( rankIndex == maxRankIndex ) then
- FriendsFrame.playersInBotRank = FriendsFrame.playersInBotRank + 1;
- end
- end
- GuildFrameTotals:SetText(format(GetText("GUILD_TOTAL", nil, numGuildMembers), numGuildMembers));
- GuildFrameOnlineTotals:SetText(format(GUILD_TOTALONLINE, onlineMembers));
-
- -- Update global guild frame buttons
- if ( IsGuildLeader() ) then
- GuildFrameControlButton:Enable();
- else
- GuildFrameControlButton:Disable();
- end
- if ( CanGuildInvite() ) then
- GuildFrameAddMemberButton:Enable();
- else
- GuildFrameAddMemberButton:Disable();
- end
-
-
- if ( FriendsFrame.playerStatusFrame ) then
- -- Player specific info
- local guildOffset = FauxScrollFrame_GetOffset(GuildListScrollFrame);
-
- for i=1, GUILDMEMBERS_TO_DISPLAY, 1 do
- guildIndex = guildOffset + i;
- button = getglobal("GuildFrameButton"..i);
- button.guildIndex = guildIndex;
-
- fullName, rank, rankIndex, level, class, zone, note, officernote, online = GetGuildRosterInfo(guildIndex);
- if (fullName and (showOffline or online)) then
- local displayedName = Ambiguate(fullName, "guild");
- getglobal("GuildFrameButton"..i.."Name"):SetText(displayedName);
- getglobal("GuildFrameButton"..i.."Zone"):SetText(zone);
- getglobal("GuildFrameButton"..i.."Level"):SetText(level);
- getglobal("GuildFrameButton"..i.."Class"):SetText(class);
- if ( not online ) then
- getglobal("GuildFrameButton"..i.."Name"):SetTextColor(0.5, 0.5, 0.5);
- getglobal("GuildFrameButton"..i.."Zone"):SetTextColor(0.5, 0.5, 0.5);
- getglobal("GuildFrameButton"..i.."Level"):SetTextColor(0.5, 0.5, 0.5);
- getglobal("GuildFrameButton"..i.."Class"):SetTextColor(0.5, 0.5, 0.5);
- else
- getglobal("GuildFrameButton"..i.."Name"):SetTextColor(1.0, 0.82, 0.0);
- getglobal("GuildFrameButton"..i.."Zone"):SetTextColor(1.0, 1.0, 1.0);
- getglobal("GuildFrameButton"..i.."Level"):SetTextColor(1.0, 1.0, 1.0);
- getglobal("GuildFrameButton"..i.."Class"):SetTextColor(1.0, 1.0, 1.0);
- end
- else
- getglobal("GuildFrameButton"..i.."Name"):SetText(nil);
- getglobal("GuildFrameButton"..i.."Zone"):SetText(nil);
- getglobal("GuildFrameButton"..i.."Level"):SetText(nil);
- getglobal("GuildFrameButton"..i.."Class"):SetText(nil);
- end
-
- -- If need scrollbar resize columns
- if ( showScrollBar ) then
- getglobal("GuildFrameButton"..i.."Zone"):SetWidth(95);
- else
- getglobal("GuildFrameButton"..i.."Zone"):SetWidth(110);
- end
-
- -- Highlight the correct who
- if ( GetGuildRosterSelection() == guildIndex ) then
- button:LockHighlight();
- else
- button:UnlockHighlight();
- end
-
- if ( guildIndex > numGuildMembers ) then
- button:Hide();
- else
- button:Show();
- end
- end
-
- -- GuildFrameGuildListToggleButton:SetText(PLAYER_STATUS);
- -- If need scrollbar resize column headers
- if ( showScrollBar ) then
- WhoFrameColumn_SetWidth(GuildFrameColumnHeader2, 105);
- GuildFrameGuildListToggleButton:SetPoint("LEFT", "GuildFrame", "LEFT", 272, -98);
- else
- WhoFrameColumn_SetWidth(GuildFrameColumnHeader2, 120);
- GuildFrameGuildListToggleButton:SetPoint("LEFT", "GuildFrame", "LEFT", 295, -98);
- end
- -- ScrollFrame update
- FauxScrollFrame_Update(GuildListScrollFrame, numGuildMembers, GUILDMEMBERS_TO_DISPLAY, FRIENDS_FRAME_GUILD_HEIGHT );
-
- GuildPlayerStatusFrame:Show();
- GuildStatusFrame:Hide();
- else
- -- Guild specific info
- local year, month, day, hour;
- local yearlabel, monthlabel, daylabel, hourlabel;
- local guildOffset = FauxScrollFrame_GetOffset(GuildListScrollFrame);
-
- for i=1, GUILDMEMBERS_TO_DISPLAY, 1 do
- guildIndex = guildOffset + i;
- button = getglobal("GuildFrameGuildStatusButton"..i);
- button.guildIndex = guildIndex;
-
- fullName, rank, rankIndex, level, class, zone, note, officernote, online, isAway = GetGuildRosterInfo(guildIndex);
- if (fullName and (showOffline or online)) then
- local displayedName = Ambiguate(fullName, "guild");
- getglobal("GuildFrameGuildStatusButton"..i.."Name"):SetText(displayedName);
- getglobal("GuildFrameGuildStatusButton"..i.."Rank"):SetText(rank);
- getglobal("GuildFrameGuildStatusButton"..i.."Note"):SetText(note);
-
- if ( online ) then
- if ( isAway == 2 ) then
- getglobal("GuildFrameGuildStatusButton"..i.."Online"):SetText(CHAT_FLAG_DND);
- elseif ( isAway == 1 ) then
- getglobal("GuildFrameGuildStatusButton"..i.."Online"):SetText(CHAT_FLAG_AFK);
- else
- getglobal("GuildFrameGuildStatusButton"..i.."Online"):SetText(GUILD_ONLINE_LABEL);
- end
-
- getglobal("GuildFrameGuildStatusButton"..i.."Name"):SetTextColor(1.0, 0.82, 0.0);
- getglobal("GuildFrameGuildStatusButton"..i.."Rank"):SetTextColor(1.0, 1.0, 1.0);
- getglobal("GuildFrameGuildStatusButton"..i.."Note"):SetTextColor(1.0, 1.0, 1.0);
- getglobal("GuildFrameGuildStatusButton"..i.."Online"):SetTextColor(1.0, 1.0, 1.0);
- else
- getglobal("GuildFrameGuildStatusButton"..i.."Online"):SetText(GuildFrame_GetLastOnline(guildIndex));
- getglobal("GuildFrameGuildStatusButton"..i.."Name"):SetTextColor(0.5, 0.5, 0.5);
- getglobal("GuildFrameGuildStatusButton"..i.."Rank"):SetTextColor(0.5, 0.5, 0.5);
- getglobal("GuildFrameGuildStatusButton"..i.."Note"):SetTextColor(0.5, 0.5, 0.5);
- getglobal("GuildFrameGuildStatusButton"..i.."Online"):SetTextColor(0.5, 0.5, 0.5);
- end
- else
- getglobal("GuildFrameGuildStatusButton"..i.."Name"):SetText(nil);
- getglobal("GuildFrameGuildStatusButton"..i.."Rank"):SetText(nil);
- getglobal("GuildFrameGuildStatusButton"..i.."Note"):SetText(nil);
- getglobal("GuildFrameGuildStatusButton"..i.."Online"):SetText(nil);
- end
-
- -- If need scrollbar resize columns
- if ( showScrollBar ) then
- getglobal("GuildFrameGuildStatusButton"..i.."Note"):SetWidth(70);
- else
- getglobal("GuildFrameGuildStatusButton"..i.."Note"):SetWidth(85);
- end
-
- -- Highlight the correct who
- if ( GetGuildRosterSelection() == guildIndex ) then
- button:LockHighlight();
- else
- button:UnlockHighlight();
- end
-
- if ( guildIndex > numGuildMembers ) then
- button:Hide();
- else
- button:Show();
- end
- end
-
- -- GuildFrameGuildListToggleButton:SetText(GUILD_STATUS);
- -- If need scrollbar resize columns
- if ( showScrollBar ) then
- WhoFrameColumn_SetWidth(GuildFrameGuildStatusColumnHeader3, 75);
- GuildFrameGuildListToggleButton:SetPoint("LEFT", "GuildFrame", "LEFT", 272, -98);
- else
- WhoFrameColumn_SetWidth(GuildFrameGuildStatusColumnHeader3, 90);
- GuildFrameGuildListToggleButton:SetPoint("LEFT", "GuildFrame", "LEFT", 295, -98);
- end
-
- -- ScrollFrame update
- FauxScrollFrame_Update(GuildListScrollFrame, numGuildMembers, GUILDMEMBERS_TO_DISPLAY, FRIENDS_FRAME_GUILD_HEIGHT );
-
- GuildPlayerStatusFrame:Hide();
- GuildStatusFrame:Show();
- end
-end
\ No newline at end of file
diff --git a/Interface/AddOns/Blizzard_UIPanels_Game/Vanilla/BankFrame.lua b/Interface/AddOns/Blizzard_UIPanels_Game/Vanilla/BankFrame.lua
index bf95f49003..3bbff268e1 100644
--- a/Interface/AddOns/Blizzard_UIPanels_Game/Vanilla/BankFrame.lua
+++ b/Interface/AddOns/Blizzard_UIPanels_Game/Vanilla/BankFrame.lua
@@ -89,12 +89,12 @@ function BankFrameItemButton_Update (button)
id, slotTextureName = GetInventorySlotInfo("Bag"..buttonID);
else
--[[
- local isQuestItem, questId, isActive = GetContainerItemQuestInfo(container, buttonID);
+ local isQuestItem, questID, isActive = GetContainerItemQuestInfo(container, buttonID);
local questTexture = button["IconQuestTexture"];
- if ( questId and not isActive ) then
+ if ( questID and not isActive ) then
questTexture:SetTexture(TEXTURE_ITEM_QUEST_BANG);
questTexture:Show();
- elseif ( questId or isQuestItem ) then
+ elseif ( questID or isQuestItem ) then
questTexture:SetTexture(TEXTURE_ITEM_QUEST_BORDER);
questTexture:Show();
else
@@ -431,4 +431,14 @@ function BankFrame_ShowPanel(sidePanelName, selection)
panel:Hide();
end
end
+end
+
+BankFrameMixin = {};
+
+function BankFrameMixin:GetActiveBankType()
+ if not self:IsShown() then
+ return nil;
+ end
+
+ return Enum.BankType.Character;
end
\ No newline at end of file
diff --git a/Interface/AddOns/Blizzard_UIPanels_Game/Vanilla/BankFrame.xml b/Interface/AddOns/Blizzard_UIPanels_Game/Vanilla/BankFrame.xml
index c3970b3a61..c6de6b1246 100644
--- a/Interface/AddOns/Blizzard_UIPanels_Game/Vanilla/BankFrame.xml
+++ b/Interface/AddOns/Blizzard_UIPanels_Game/Vanilla/BankFrame.xml
@@ -80,7 +80,7 @@
-
+
diff --git a/Interface/AddOns/Blizzard_UIPanels_Game/Vanilla/FriendsFrame.lua b/Interface/AddOns/Blizzard_UIPanels_Game/Vanilla/FriendsFrame.lua
deleted file mode 100644
index 0d474a6479..0000000000
--- a/Interface/AddOns/Blizzard_UIPanels_Game/Vanilla/FriendsFrame.lua
+++ /dev/null
@@ -1,597 +0,0 @@
--- See FriendsFrame_Shared.lua for functions shared across Classic expansions
-
-function FriendsFrame_OnLoad(self)
- PanelTemplates_SetNumTabs(self, FRIEND_TAB_COUNT);
- self.selectedTab = FRIEND_TAB_FRIENDS;
- PanelTemplates_UpdateTabs(self);
- self:RegisterEvent("FRIENDLIST_UPDATE");
- self:RegisterEvent("IGNORELIST_UPDATE");
- self:RegisterEvent("WHO_LIST_UPDATE");
- self:RegisterEvent("GROUP_ROSTER_UPDATE");
- self:RegisterEvent("PLAYER_FLAGS_CHANGED");
- self:RegisterEvent("BN_FRIEND_LIST_SIZE_CHANGED");
- self:RegisterEvent("BN_FRIEND_INFO_CHANGED");
- self:RegisterEvent("BN_FRIEND_INVITE_LIST_INITIALIZED");
- self:RegisterEvent("BN_FRIEND_INVITE_ADDED");
- self:RegisterEvent("BN_FRIEND_INVITE_REMOVED");
- self:RegisterEvent("BN_CUSTOM_MESSAGE_CHANGED");
- self:RegisterEvent("BN_CUSTOM_MESSAGE_LOADED");
- self:RegisterEvent("BN_BLOCK_LIST_UPDATED");
- self:RegisterEvent("PLAYER_ENTERING_WORLD");
- self:RegisterEvent("BN_CONNECTED");
- self:RegisterEvent("BN_DISCONNECTED");
- self:RegisterEvent("BN_INFO_CHANGED");
- self:RegisterEvent("SPELL_UPDATE_COOLDOWN");
- self:RegisterEvent("BATTLETAG_INVITE_SHOW");
- self:RegisterEvent("GUILD_ROSTER_UPDATE");
- self:RegisterEvent("GROUP_JOINED");
- self:RegisterEvent("GROUP_LEFT");
- self:RegisterEvent("STREAM_VIEW_MARKER_UPDATED");
- self:RegisterEvent("CLUB_INVITATION_ADDED_FOR_SELF");
- self:RegisterEvent("CLUB_INVITATION_REMOVED_FOR_SELF");
- self:RegisterEvent("GUILD_RENAME_REQUIRED");
- self:RegisterEvent("REQUIRED_GUILD_RENAME_RESULT");
- self.playerStatusFrame = 1;
- self.selectedFriend = 1;
- self.selectedIgnore = 1;
- GuildFrame.hasForcedNameChange = GetGuildRenameRequired();
- -- friends list
- local scrollFrame = FriendsFrameFriendsScrollFrame;
- scrollFrame.update = FriendsFrame_UpdateFriends;
- scrollFrame.dynamic = FriendsList_GetScrollFrameTopButton;
- scrollFrame.dividerPool = CreateFramePool("FRAME", self, "FriendsFrameFriendDividerTemplate");
- scrollFrame.invitePool = CreateFramePool("FRAME", self, "FriendsFrameFriendInviteTemplate");
- -- can't do this in XML because we're inheriting from a template
- scrollFrame.PendingInvitesHeaderButton:SetParent(scrollFrame.ScrollChild);
- FriendsFrameFriendsScrollFrameScrollBarTrack:Hide();
- FriendsFrameFriendsScrollFrameScrollBar.doNotHide = true;
- HybridScrollFrame_CreateButtons(scrollFrame, "FriendsFrameButtonTemplate");
- FriendsFrameIcon:SetTexture("Interface\\FriendsFrame\\FriendsFrameScrollIcon");
-
- FriendsFrameBroadcastInputClearButton.icon:SetVertexColor(FRIENDS_BNET_NAME_COLOR.r, FRIENDS_BNET_NAME_COLOR.g, FRIENDS_BNET_NAME_COLOR.b);
- if ( not BNFeaturesEnabled() ) then
- FriendsFrameBattlenetFrame:Hide();
- FriendsFrameBroadcastInput:Hide();
- end
-
- --Create lists of buttons for various subframes
- for i = 2, 19 do
- local button = CreateFrame("Button", "FriendsFrameIgnoreButton"..i, IgnoreListFrame, "FriendsFrameIgnoreButtonTemplate");
- button:SetPoint("TOP", _G["FriendsFrameIgnoreButton"..(i-1)], "BOTTOM");
- end
- for i = 2, 17 do
- local button = CreateFrame("Button", "WhoFrameButton"..i, WhoFrame, "FriendsFrameWhoButtonTemplate");
- button:SetID(i);
- button:SetPoint("TOP", _G["WhoFrameButton"..(i-1)], "BOTTOM");
- end
-end
-
-function FriendsFrame_OnEvent(self, event, ...)
- if ( event == "SPELL_UPDATE_COOLDOWN" ) then
- if ( self:IsShown() ) then
- local buttons = FriendsFrameFriendsScrollFrame.buttons;
- for _, button in pairs(buttons) do
- if ( button.summonButton:IsShown() ) then
- FriendsFrame_SummonButton_Update(button.summonButton);
- end
- end
- end
- elseif ( event == "FRIENDLIST_UPDATE" or event == "GROUP_ROSTER_UPDATE" ) then
- FriendsList_Update();
- elseif ( event == "BN_FRIEND_LIST_SIZE_CHANGED" or event == "BN_FRIEND_INFO_CHANGED" ) then
- FriendsList_Update();
- -- update Friends of Friends
- local bnetIDAccount = ...;
- if ( event == "BN_FRIEND_LIST_SIZE_CHANGED" and bnetIDAccount ) then
- FriendsFriendsFrame.requested[bnetIDAccount] = nil;
- if ( FriendsFriendsFrame:IsShown() ) then
- FriendsFriendsList_Update();
- end
- end
- elseif ( event == "BN_CUSTOM_MESSAGE_CHANGED" ) then
- local arg1 = ...;
- if ( arg1 ) then --There is no bnetIDAccount given if this is ourself.
- FriendsList_Update();
- else
- FriendsFrameBattlenetFrame_UpdateBroadcast();
- end
- elseif ( event == "BN_CUSTOM_MESSAGE_LOADED" ) then
- FriendsFrameBattlenetFrame_UpdateBroadcast();
- elseif ( event == "BN_FRIEND_INVITE_ADDED" ) then
- -- flash the invites header if collapsed
- local collapsed = GetCVarBool("friendInvitesCollapsed");
- if ( collapsed ) then
- FriendsFrameFriendsScrollFrame.PendingInvitesHeaderButton.Flash.Anim:Play();
- end
- FriendsList_Update();
- elseif ( event == "BN_FRIEND_INVITE_LIST_INITIALIZED" ) then
- FriendsList_Update();
- elseif ( event == "BN_FRIEND_INVITE_REMOVED" ) then
- FriendsList_Update();
- elseif ( event == "IGNORELIST_UPDATE" or event == "BN_BLOCK_LIST_UPDATED" ) then
- IgnoreList_Update();
- elseif ( event == "WHO_LIST_UPDATE" ) then
- WhoFrame.selectedWho = nil;
- WhoList_Update();
- FriendsFrame_Update();
- elseif ( event == "PLAYER_FLAGS_CHANGED" or event == "BN_INFO_CHANGED") then
- FriendsFrameStatusDropdown:GenerateMenu();
- FriendsFrame_CheckBattlenetStatus();
- elseif ( event == "PLAYER_ENTERING_WORLD" or event == "BN_CONNECTED" or event == "BN_DISCONNECTED") then
- FriendsFrame_CheckBattlenetStatus();
- -- We want to remove any friends from the frame so they don't linger when it's first re-opened.
- if (event == "BN_DISCONNECTED") then
- FriendsList_Update(true);
- end
- elseif ( event == "BATTLETAG_INVITE_SHOW" ) then
- BattleTagInviteFrame_Show(...);
- elseif ( event == "SOCIAL_QUEUE_UPDATE" or event == "GROUP_LEFT" or event == "GROUP_JOINED" ) then
- if ( self:IsVisible() ) then
- FriendsFrame_Update(); --TODO - Only update the buttons that need updating
- end
- elseif ( event == "GUILD_ROSTER_UPDATE" ) then
- FriendsFrame_CheckDethroneStatus();
-
- if ( GuildFrame:IsVisible() ) then
- local canRequestGuildRoster = ...;
- if ( canRequestGuildRoster ) then
- C_GuildInfo.GuildRoster();
- end
- GuildStatus_Update();
- FriendsFrame_Update();
- end
- elseif ( event == "STREAM_VIEW_MARKER_UPDATED" ) then
- BlizzardGroups_UpdateNotifications();
- elseif ( event == "CLUB_INVITATION_ADDED_FOR_SELF" or event == "CLUB_INVITATION_REMOVED_FOR_SELF" ) then
- BlizzardGroups_UpdateShowTab();
- BlizzardGroups_UpdateNotifications();
- elseif ( event == "GUILD_RENAME_REQUIRED" ) then
- GuildFrame.hasForcedNameChange = ...;
- GuildFrame_CheckName();
- elseif ( event == "REQUIRED_GUILD_RENAME_RESULT" ) then
- local success = ...
- if ( success ) then
- GuildFrame.hasForcedNameChange = GetGuildRenameRequired();
- GuildFrame_CheckName();
- else
- UIErrorsFrame:AddMessage(ERR_GUILD_NAME_INVALID, 1.0, 0.1, 0.1, 1.0);
- end
- end
-end
-
-function FriendsFrame_InviteOrRequestToJoin(guid, gameAccountID)
- local inviteType = GetDisplayedInviteType(guid);
- if ( inviteType == "INVITE" or inviteType == "SUGGEST_INVITE" ) then
- BNInviteFriend(gameAccountID);
- elseif ( inviteType == "REQUEST_INVITE" ) then
- BNRequestInviteFriend(gameAccountID);
- end
-end
-
--- ============================================ GUILD ===============================================================================
-function GuildControlPopupFrameDropdown_OnLoad(self)
- WowStyle1DropdownMixin.OnLoad(self);
-
- self:SetWidth(110);
-
- local function IsSelected(i)
- return GuildControlGetRank() == i;
- end
-
- local function SetSelected(i)
- GuildControlSetRank(i);
- GuildControlCheckboxUpdate(C_GuildInfo.GuildControlGetRankFlags(i));
- GuildControlPopupFrameEditBox:SetText(text);
- GuildControlPopupFrameAddRankButton_OnUpdate();
- GuildControlPopupFrameRemoveRankButton_OnUpdate();
- GuildControlPopupAcceptButton:Disable();
- end
-
- self:SetupMenu(function(dropdown, rootDescription)
- rootDescription:SetTag("MENU_FRIENDS_GUILD_CONTROL");
-
- for i=1, GuildControlGetNumRanks() do
- local text = GuildControlGetRankName(i);
- rootDescription:CreateRadio(text, IsSelected, SetSelected, i);
- end
- end);
-end
-
-function GuildControlPopupFrame_OnLoad()
- GuildControlCheckboxUpdate(C_GuildInfo.GuildControlGetRankFlags(1));
-
- GuildControlPopupFrameCheckbox1Label:SetText(GUILDCONTROL_OPTION1);
- GuildControlPopupFrameCheckbox2Label:SetText(GUILDCONTROL_OPTION2);
- GuildControlPopupFrameCheckbox3Label:SetText(GUILDCONTROL_OPTION3);
- GuildControlPopupFrameCheckbox4Label:SetText(GUILDCONTROL_OPTION4);
- GuildControlPopupFrameCheckbox5Label:SetText(GUILDCONTROL_OPTION5);
- GuildControlPopupFrameCheckbox6Label:SetText(GUILDCONTROL_OPTION6);
- GuildControlPopupFrameCheckbox7Label:SetText(GUILDCONTROL_OPTION7);
- GuildControlPopupFrameCheckbox8Label:SetText(GUILDCONTROL_OPTION8);
- GuildControlPopupFrameCheckbox9Label:SetText(GUILDCONTROL_OPTION9);
- GuildControlPopupFrameCheckbox10Label:SetText(GUILDCONTROL_OPTION10);
- GuildControlPopupFrameCheckbox11Label:SetText(GUILDCONTROL_OPTION11);
- GuildControlPopupFrameCheckbox12Label:SetText(GUILDCONTROL_OPTION12);
- GuildControlPopupFrameCheckbox13Label:SetText(GUILDCONTROL_OPTION13);
-end
-
-function GuildControlCheckboxUpdate(flags)
- for i=1, GUILD_NUM_RANK_FLAGS do
- local checkbox = _G["GuildControlPopupFrameCheckbox"..i];
- if ( checkbox ) then
- checkbox:SetChecked(flags[i]);
- else
- message("GuildControlPopupFrameCheckbox"..i.." does not exist!");
- end
- end
-end
-
-function GuildControlPopupFrame_OnShow()
- FriendsFrame.guildControlShow = 1;
- GuildControlSetRank(1);
- GuildControlPopupFrameDropdown:GenerateMenu();
- GuildControlCheckboxUpdate(C_GuildInfo.GuildControlGetRankFlags(1));
- GuildControlPopupAcceptButton:Disable();
- -- Hide center frame if there is one
- if ( GetUIPanel("center") ) then
- HideUIPanel(GetUIPanel("center"), true);
- end
- -- Hide guild member detail frame if its open
- GuildMemberDetailFrame:Hide();
- GuildInfoFrame:Hide();
- GuildControlPopupFrameRemoveRankButton_OnUpdate();
-end
-
-function GuildControlPopupFrame_OnHide()
- FriendsFrame.guildControlShow = 0;
-end
-
-function GuildControlPopupAcceptButton_OnClick()
- GuildControlSaveRank(GuildControlPopupFrameEditBox:GetText());
- GuildStatus_Update();
- GuildControlPopupAcceptButton:Disable();
- GuildControlPopupFrameDropdown:GenerateMenu();
- GuildControlPopupFrame:Hide();
-end
-
-function GuildControlPopupFrameRemoveRankButton_OnClick()
- GuildControlDelRank(1);
- GuildControlSetRank(1);
- GuildStatus_Update();
- GuildControlPopupFrameEditBox:SetText(GuildControlGetRankName(1));
- GuildControlCheckboxUpdate(C_GuildInfo.GuildControlGetRankFlags(1));
- GuildControlPopupFrameRemoveRankButton_OnUpdate();
-end
-
-function GuildControlPopupFrameRemoveRankButton_OnUpdate()
- local rank = GuildControlSetRank();
- if ( (rank == GuildControlGetNumRanks()) and (GuildControlGetNumRanks() > 5) ) then
- GuildControlPopupFrameRemoveRankButton:Show();
- if ( GetNumMembersInRank(rank) > 0 ) then
- GuildControlPopupFrameRemoveRankButton:Disable();
- else
- GuildControlPopupFrameRemoveRankButton:Enable();
- end
- else
- GuildControlPopupFrameRemoveRankButton:Hide();
- end
-end
-
-function FriendsFrameGuildStatusButton_OnClick(self, button)
- if ( button == "LeftButton" ) then
- GuildFrame.previousSelectedGuildMember = GuildFrame.selectedGuildMember;
- GuildFrame.selectedGuildMember = self.guildIndex;
- GuildFrame.selectedName = getglobal(self:GetName().."Name"):GetText();
- SetGuildRosterSelection(GuildFrame.selectedGuildMember);
- -- Toggle guild details frame
- if ( GuildMemberDetailFrame:IsVisible() and (GuildFrame.previousSelectedGuildMember and (GuildFrame.previousSelectedGuildMember == GuildFrame.selectedGuildMember)) ) then
- GuildMemberDetailFrame:Hide();
- GuildFrame.selectedGuildMember = 0;
- SetGuildRosterSelection(0);
- else
- GuildMemberDetailFrame:Show();
- GuildControlPopupFrame:Hide();
- GuildInfoFrame:Hide();
- end
- GuildStatus_Update();
- else
- local guildIndex = self.guildIndex;
- local name, rank, rankIndex, level, class, zone, note, officernote, online = GetGuildRosterInfo(guildIndex);
- FriendsFrame_ShowDropdown(name, online);
- end
-end
-
-function GuildStatus_Update()
- -- Set the tab
- PanelTemplates_SetTab(FriendsFrame, 3);
- -- Show the frame
- ShowUIPanel(FriendsFrame);
-
- local totalMembers, onlineMembers, onlineAndMobileMembers = GetNumGuildMembers();
- local numGuildMembers = 0;
- local showOffline = GetGuildRosterShowOffline();
- if (showOffline) then
- numGuildMembers = totalMembers;
- else
- numGuildMembers = onlineMembers;
- end
- local fullName, rank, rankIndex, level, class, zone, note, officernote, online, isAway;
- local guildName, guildRankName, guildRankIndex = GetGuildInfo("player");
- local maxRankIndex = GuildControlGetNumRanks() - 1;
- local button;
- local onlinecount = 0;
- local guildIndex;
-
- -- Get selected guild member info
- fullName, rank, rankIndex, level, class, zone, note, officernote, online = GetGuildRosterInfo(GetGuildRosterSelection());
- GuildFrame.selectedName = fullName;
- -- If there's a selected guildmember
- if ( GetGuildRosterSelection() > 0 ) then
- local displayedName = Ambiguate(fullName, "guild");
- -- Update the guild member details frame
- GuildMemberDetailName:SetText(displayedName);
- GuildMemberDetailLevel:SetText(format(FRIENDS_LEVEL_TEMPLATE, level, class));
- GuildMemberDetailZoneText:SetText(zone);
- GuildMemberDetailRankText:SetText(rank);
- if ( online ) then
- GuildMemberDetailOnlineText:SetText(GUILD_ONLINE_LABEL);
- else
- GuildMemberDetailOnlineText:SetText(GuildFrame_GetLastOnline(GetGuildRosterSelection()));
- end
- -- Update public note
- if ( CanEditPublicNote() ) then
- PersonalNoteText:SetTextColor(1.0, 1.0, 1.0);
- if ( (not note) or (note == "") ) then
- note = GUILD_NOTE_EDITLABEL;
- end
- else
- PersonalNoteText:SetTextColor(0.65, 0.65, 0.65);
- end
- GuildMemberNoteBackground:EnableMouse(CanEditPublicNote());
- PersonalNoteText:SetText(note);
- -- Update officer note
- if ( C_GuildInfo.CanViewOfficerNote() ) then
- if ( C_GuildInfo.CanEditOfficerNote() ) then
- if ( (not officernote) or (officernote == "") ) then
- officernote = GUILD_OFFICERNOTE_EDITLABEL;
- end
- OfficerNoteText:SetTextColor(1.0, 1.0, 1.0);
- else
- OfficerNoteText:SetTextColor(0.65, 0.65, 0.65);
- end
- GuildMemberOfficerNoteBackground:EnableMouse(C_GuildInfo.CanEditOfficerNote());
- OfficerNoteText:SetText(officernote);
-
- -- Resize detail frame
- GuildMemberDetailOfficerNoteLabel:Show();
- GuildMemberOfficerNoteBackground:Show();
- GuildMemberDetailFrame:SetHeight(GUILD_DETAIL_OFFICER_HEIGHT);
- else
- GuildMemberDetailOfficerNoteLabel:Hide();
- GuildMemberOfficerNoteBackground:Hide();
- GuildMemberDetailFrame:SetHeight(GUILD_DETAIL_NORM_HEIGHT);
- end
-
- -- Manage guild member related buttons
- if ( CanGuildPromote() and ( rankIndex > 1 ) and ( rankIndex > (guildRankIndex + 1) ) ) then
- GuildFramePromoteButton:Enable();
- else
- GuildFramePromoteButton:Disable();
- end
- if ( CanGuildDemote() and ( rankIndex >= 1 ) and ( rankIndex > guildRankIndex ) and ( rankIndex ~= maxRankIndex ) ) then
- GuildFrameDemoteButton:Enable();
- else
- GuildFrameDemoteButton:Disable();
- end
- -- Hide promote/demote buttons if both disabled
- if ( not GuildFrameDemoteButton:IsEnabled() and not GuildFramePromoteButton:IsEnabled() ) then
- GuildFramePromoteButton:Hide();
- GuildFrameDemoteButton:Hide();
- GuildMemberDetailRankText:SetPoint("RIGHT", "GuildMemberDetailFrame", "RIGHT", -10, 0);
- else
- GuildFramePromoteButton:Show();
- GuildFrameDemoteButton:Show();
- GuildMemberDetailRankText:SetPoint("RIGHT", "GuildFramePromoteButton", "LEFT", 3, 0);
- end
- if ( CanGuildRemove() and ( rankIndex >= 1 ) and ( rankIndex > guildRankIndex ) ) then
- GuildMemberRemoveButton:Enable();
- else
- GuildMemberRemoveButton:Disable();
- end
- if ( (UnitName("player") == displayedName) or (not online) ) then
- GuildMemberGroupInviteButton:Disable();
- else
- GuildMemberGroupInviteButton:Enable();
- end
-
- GuildFrame.selectedName = GetGuildRosterInfo(GetGuildRosterSelection());
- end
-
- -- Message of the day stuff
- local guildMOTD = GetGuildRosterMOTD();
- if ( CanEditMOTD() ) then
- if ( (not guildMOTD) or (guildMOTD == "") ) then
- --guildMOTD = GUILD_MOTD_EDITLABEL; -- A bug in the 1.12 lua code caused this to never actually appear.
- end
- GuildFrameNotesText:SetTextColor(1.0, 1.0, 1.0);
- GuildMOTDEditButton:Enable();
- else
- GuildFrameNotesText:SetTextColor(0.65, 0.65, 0.65);
- GuildMOTDEditButton:Disable();
- end
- GuildFrameNotesText:SetText(guildMOTD);
-
- -- Scrollbar stuff
- local showScrollBar = nil;
- if ( numGuildMembers > GUILDMEMBERS_TO_DISPLAY ) then
- showScrollBar = 1;
- end
-
- GuildFrameTotals:SetText(format(GetText("GUILD_TOTAL", nil, numGuildMembers), numGuildMembers));
- GuildFrameOnlineTotals:SetText(format(GUILD_TOTALONLINE, onlineMembers));
-
- -- Update global guild frame buttons
- if ( IsGuildLeader() ) then
- GuildFrameControlButton:Enable();
- else
- GuildFrameControlButton:Disable();
- end
- if ( CanGuildInvite() ) then
- GuildFrameAddMemberButton:Enable();
- else
- GuildFrameAddMemberButton:Disable();
- end
-
-
- if ( FriendsFrame.playerStatusFrame ) then
- -- Player specific info
- local guildOffset = FauxScrollFrame_GetOffset(GuildListScrollFrame);
-
- for i=1, GUILDMEMBERS_TO_DISPLAY, 1 do
- guildIndex = guildOffset + i;
- button = getglobal("GuildFrameButton"..i);
- button.guildIndex = guildIndex;
-
- fullName, rank, rankIndex, level, class, zone, note, officernote, online = GetGuildRosterInfo(guildIndex);
- if (fullName and (showOffline or online)) then
- local displayedName = Ambiguate(fullName, "guild");
- getglobal("GuildFrameButton"..i.."Name"):SetText(displayedName);
- getglobal("GuildFrameButton"..i.."Zone"):SetText(zone);
- getglobal("GuildFrameButton"..i.."Level"):SetText(level);
- getglobal("GuildFrameButton"..i.."Class"):SetText(class);
- if ( not online ) then
- getglobal("GuildFrameButton"..i.."Name"):SetTextColor(0.5, 0.5, 0.5);
- getglobal("GuildFrameButton"..i.."Zone"):SetTextColor(0.5, 0.5, 0.5);
- getglobal("GuildFrameButton"..i.."Level"):SetTextColor(0.5, 0.5, 0.5);
- getglobal("GuildFrameButton"..i.."Class"):SetTextColor(0.5, 0.5, 0.5);
- else
- getglobal("GuildFrameButton"..i.."Name"):SetTextColor(1.0, 0.82, 0.0);
- getglobal("GuildFrameButton"..i.."Zone"):SetTextColor(1.0, 1.0, 1.0);
- getglobal("GuildFrameButton"..i.."Level"):SetTextColor(1.0, 1.0, 1.0);
- getglobal("GuildFrameButton"..i.."Class"):SetTextColor(1.0, 1.0, 1.0);
- end
- else
- getglobal("GuildFrameButton"..i.."Name"):SetText(nil);
- getglobal("GuildFrameButton"..i.."Zone"):SetText(nil);
- getglobal("GuildFrameButton"..i.."Level"):SetText(nil);
- getglobal("GuildFrameButton"..i.."Class"):SetText(nil);
- end
-
- -- If need scrollbar resize columns
- if ( showScrollBar ) then
- getglobal("GuildFrameButton"..i.."Zone"):SetWidth(95);
- else
- getglobal("GuildFrameButton"..i.."Zone"):SetWidth(110);
- end
-
- -- Highlight the correct who
- if ( GetGuildRosterSelection() == guildIndex ) then
- button:LockHighlight();
- else
- button:UnlockHighlight();
- end
-
- if ( guildIndex > numGuildMembers ) then
- button:Hide();
- else
- button:Show();
- end
- end
-
- -- GuildFrameGuildListToggleButton:SetText(PLAYER_STATUS);
- -- If need scrollbar resize column headers
- if ( showScrollBar ) then
- WhoFrameColumn_SetWidth(GuildFrameColumnHeader2, 105);
- GuildFrameGuildListToggleButton:SetPoint("LEFT", "GuildFrame", "LEFT", 272, -98);
- else
- WhoFrameColumn_SetWidth(GuildFrameColumnHeader2, 120);
- GuildFrameGuildListToggleButton:SetPoint("LEFT", "GuildFrame", "LEFT", 295, -98);
- end
- -- ScrollFrame update
- FauxScrollFrame_Update(GuildListScrollFrame, numGuildMembers, GUILDMEMBERS_TO_DISPLAY, FRIENDS_FRAME_GUILD_HEIGHT );
-
- GuildPlayerStatusFrame:Show();
- GuildStatusFrame:Hide();
- else
- -- Guild specific info
- local year, month, day, hour;
- local yearlabel, monthlabel, daylabel, hourlabel;
- local guildOffset = FauxScrollFrame_GetOffset(GuildListScrollFrame);
-
- for i=1, GUILDMEMBERS_TO_DISPLAY, 1 do
- guildIndex = guildOffset + i;
- button = getglobal("GuildFrameGuildStatusButton"..i);
- button.guildIndex = guildIndex;
-
- fullName, rank, rankIndex, level, class, zone, note, officernote, online, isAway = GetGuildRosterInfo(guildIndex);
- if (fullName and (showOffline or online)) then
- local displayedName = Ambiguate(fullName, "guild");
- getglobal("GuildFrameGuildStatusButton"..i.."Name"):SetText(displayedName);
- getglobal("GuildFrameGuildStatusButton"..i.."Rank"):SetText(rank);
- getglobal("GuildFrameGuildStatusButton"..i.."Note"):SetText(note);
-
- if ( online ) then
- if ( isAway == 2 ) then
- getglobal("GuildFrameGuildStatusButton"..i.."Online"):SetText(CHAT_FLAG_DND);
- elseif ( isAway == 1 ) then
- getglobal("GuildFrameGuildStatusButton"..i.."Online"):SetText(CHAT_FLAG_AFK);
- else
- getglobal("GuildFrameGuildStatusButton"..i.."Online"):SetText(GUILD_ONLINE_LABEL);
- end
-
- getglobal("GuildFrameGuildStatusButton"..i.."Name"):SetTextColor(1.0, 0.82, 0.0);
- getglobal("GuildFrameGuildStatusButton"..i.."Rank"):SetTextColor(1.0, 1.0, 1.0);
- getglobal("GuildFrameGuildStatusButton"..i.."Note"):SetTextColor(1.0, 1.0, 1.0);
- getglobal("GuildFrameGuildStatusButton"..i.."Online"):SetTextColor(1.0, 1.0, 1.0);
- else
- getglobal("GuildFrameGuildStatusButton"..i.."Online"):SetText(GuildFrame_GetLastOnline(guildIndex));
- getglobal("GuildFrameGuildStatusButton"..i.."Name"):SetTextColor(0.5, 0.5, 0.5);
- getglobal("GuildFrameGuildStatusButton"..i.."Rank"):SetTextColor(0.5, 0.5, 0.5);
- getglobal("GuildFrameGuildStatusButton"..i.."Note"):SetTextColor(0.5, 0.5, 0.5);
- getglobal("GuildFrameGuildStatusButton"..i.."Online"):SetTextColor(0.5, 0.5, 0.5);
- end
- else
- getglobal("GuildFrameGuildStatusButton"..i.."Name"):SetText(nil);
- getglobal("GuildFrameGuildStatusButton"..i.."Rank"):SetText(nil);
- getglobal("GuildFrameGuildStatusButton"..i.."Note"):SetText(nil);
- getglobal("GuildFrameGuildStatusButton"..i.."Online"):SetText(nil);
- end
-
- -- If need scrollbar resize columns
- if ( showScrollBar ) then
- getglobal("GuildFrameGuildStatusButton"..i.."Note"):SetWidth(70);
- else
- getglobal("GuildFrameGuildStatusButton"..i.."Note"):SetWidth(85);
- end
-
- -- Highlight the correct who
- if ( GetGuildRosterSelection() == guildIndex ) then
- button:LockHighlight();
- else
- button:UnlockHighlight();
- end
-
- if ( guildIndex > numGuildMembers ) then
- button:Hide();
- else
- button:Show();
- end
- end
-
- -- GuildFrameGuildListToggleButton:SetText(GUILD_STATUS);
- -- If need scrollbar resize columns
- if ( showScrollBar ) then
- WhoFrameColumn_SetWidth(GuildFrameGuildStatusColumnHeader3, 75);
- GuildFrameGuildListToggleButton:SetPoint("LEFT", "GuildFrame", "LEFT", 272, -98);
- else
- WhoFrameColumn_SetWidth(GuildFrameGuildStatusColumnHeader3, 90);
- GuildFrameGuildListToggleButton:SetPoint("LEFT", "GuildFrame", "LEFT", 295, -98);
- end
-
- -- ScrollFrame update
- FauxScrollFrame_Update(GuildListScrollFrame, numGuildMembers, GUILDMEMBERS_TO_DISPLAY, FRIENDS_FRAME_GUILD_HEIGHT );
-
- GuildPlayerStatusFrame:Hide();
- GuildStatusFrame:Show();
- end
-end
\ No newline at end of file
diff --git a/Interface/AddOns/Blizzard_UIPanels_Game/Vanilla/FriendsFrame.xml b/Interface/AddOns/Blizzard_UIPanels_Game/Vanilla/FriendsFrame.xml
deleted file mode 100644
index 7e113c5677..0000000000
--- a/Interface/AddOns/Blizzard_UIPanels_Game/Vanilla/FriendsFrame.xml
+++ /dev/null
@@ -1,4341 +0,0 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- self:SetWidth(self.Text:GetStringWidth() + 40);
- self.Text:SetPoint("CENTER", 0, 0);
-
-
- FriendsList_ClosePendingInviteDialogs();
- BNAcceptFriendInvite(self:GetParent().inviteID);
- PlaySound(SOUNDKIT.IG_MAINMENU_OPTION_CHECKBOX_ON);
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- GameTooltip:Hide();
-
-
- FriendsFrame_BattlenetInvite(self:GetParent());
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- local normalTexture = _G[self:GetName().."NormalTexture"];
- normalTexture:ClearAllPoints();
- normalTexture:SetPoint("CENTER");
- normalTexture:SetSize(self:GetSize());
- normalTexture:SetAtlas("socialqueuing-friendlist-summonbutton-up");
-
- local pushedTexture = self:GetPushedTexture();
- pushedTexture:ClearAllPoints();
- pushedTexture:SetPoint("CENTER");
- pushedTexture:SetSize(self:GetSize());
- pushedTexture:SetAtlas("socialqueuing-friendlist-summonbutton-down");
-
- self.cooldown:SetSize(self:GetSize());
- self.cooldown:SetHideCountdownNumbers(true);
- self.cooldown:SetSwipeColor(0, 0, 0);
-
-
- FriendsFrame_SummonButton_OnShow(self);
-
-
- FriendsFrame_ClickSummonButton(self, button, down);
-
-
- GameTooltip:SetOwner(self, "ANCHOR_RIGHT");
- GameTooltip:AddLine(RAF_SUMMON_LINKED, 1, 1, 1, true);
- if ( self.duration ) then
- GameTooltip:AddLine(COOLDOWN_REMAINING .. " " .. SecondsToTime(self.duration - (GetTime() - self.start)), 1, 1, 1, true);
- end
- if ( GetCVar("showNewbieTips") == "1" ) then
- GameTooltip:AddLine(NEWBIE_TOOLTIP_RAF_SUMMON_LINKED, NORMAL_FONT_COLOR.r, NORMAL_FONT_COLOR.g, NORMAL_FONT_COLOR.b, true)
- end
- GameTooltip:Show();
-
-
- GameTooltip:Hide();
-
-
-
-
-
-
- self.highlight:SetVertexColor(0.243, 0.570, 1);
- self:RegisterForClicks("LeftButtonUp", "RightButtonUp");
-
-
-
- FriendsTooltip.button = nil;
- FriendsTooltip:Hide();
-
-
- FriendsFrameFriendButton_OnClick(self, button);
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- FriendsFrameIgnoreButton_OnClick(self);
- PlaySound(SOUNDKIT.IG_MAINMENU_OPTION_CHECKBOX_ON);
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- self:RegisterForClicks("LeftButtonUp", "RightButtonUp");
-
-
- FriendsFrameWhoButton_OnClick(self, button);
- PlaySound(SOUNDKIT.IG_MAINMENU_OPTION_CHECKBOX_ON);
-
-
- if (self.tooltip1 and self.tooltip2) then
- GameTooltip:SetOwner(self, "ANCHOR_LEFT");
- GameTooltip:SetText(self.tooltip1);
- GameTooltip:AddLine(self.tooltip2, 1, 1, 1);
- GameTooltip:Show();
- end
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- if ( self.sortType ) then
- C_FriendList.SortWho(self.sortType);
- end
- PlaySound(SOUNDKIT.IG_MAINMENU_OPTION_CHECKBOX_ON);
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- self:RegisterForClicks("LeftButtonUp", "RightButtonUp");
-
-
-
- GameTooltip_AddNewbieTip(self, GUILD_MEMBER_OPTIONS, 1.0, 1.0, 1.0, NEWBIE_TOOLTIP_GUILD_MEMBER_OPTIONS, 1);
-
-
- GameTooltip:Hide();
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- self:RegisterForClicks("LeftButtonUp", "RightButtonUp");
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- if ( self.sortType ) then
- SortGuildRoster(self.sortType);
- GuildStatus_Update();
- end
- PlaySound(SOUNDKIT.IG_MAINMENU_OPTION_CHECKBOX_ON);
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- if ( self:GetChecked() ) then
- PlaySound(SOUNDKIT.IG_MAINMENU_OPTION_CHECKBOX_OFF);
- else
- PlaySound(SOUNDKIT.IG_MAINMENU_OPTION_CHECKBOX_ON);
- end
- GuildControlSetRankFlag(self:GetID(), self:GetChecked());
- GuildControlPopupAcceptButton:Enable();
-
-
-
-
-
-
-
-
-
-
-
- PanelTemplates_Tab_OnClick(self, FriendsFrame);
- FriendsFrame_OnShow();
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- FriendsFrameBattlenetFrame_HideSubFrames();
-
-
-
-
-
-
-
-
-
-
- PlaySound(SOUNDKIT.IG_CHAT_EMOTE_BUTTON);
- if ( self:GetParent().BroadcastFrame:IsShown() ) then
- FriendsFrameBattlenetFrame_HideBroadcastFrame();
- else
- FriendsFrameBattlenetFrame_ShowBroadcastFrame();
- end
-
-
- GameTooltip_AddNewbieTip(self, CHAT_LABEL, 1.0, 1.0, 1.0, NEWBIE_TOOLTIP_CHATMENU, 1);
-
-
-
-
-
-
-
-
-
-
-
-
-
- local infoFrame = self:GetParent().UnavailableInfoFrame;
- if ( infoFrame:IsShown() ) then
- infoFrame:Hide();
- else
- infoFrame:SetHeight(86 + infoFrame.Text:GetHeight());
- infoFrame:Show();
- end
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- FriendsFrameBattlenetFrame_UpdateBroadcast();
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- FriendsFrameBattlenetFrame_SetBroadcast();
-
-
-
-
-
-
-
-
-
-
- FriendsFrameBattlenetFrame_UpdateBroadcast();
- FriendsFrameBattlenetFrame_HideBroadcastFrame();
-
-
-
-
-
-
- self.scrollBarHideable = 1;
- self.ScrollBar:Hide();
-
- self.minHeight = 113 + self.EditBox.PromptText:GetHeight() * 2
- self:GetParent():SetHeight(self.minHeight);
- self.EditBox:SetPoint("TOPLEFT", 4, -4);
-
-
- self.EditBox:SetFocus();
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- if ( self:GetText() ~= "" ) then
- self.PromptText:Hide();
- else
- self.PromptText:Show();
- end
- local scrollFrame = self:GetParent();
- scrollFrame:GetParent():SetHeight(max(scrollFrame.minHeight, 111 + self:GetHeight()));
-
-
-
- self:ClearFocus();
-
-
- FriendsFrameBattlenetFrame_SetBroadcast();
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- self.icon:SetAlpha(0.35);
-
-
-
-
-
-
- self.icon:SetAlpha(1);
- self.clear:Hide();
- self:SetTextInsets(0, 10, 0, 0);
-
-
- FriendsFrameBroadcastInputTooltipButton:Show();
-
-
- if ( self:GetText() ~= "" ) then
- FriendsFrameBroadcastInputFill:Hide();
- else
- FriendsFrameBroadcastInputFill:Show();
- end
-
-
-
-
-
-
-
- local editBox = FriendsFrameBroadcastInput;
- editBox:SetFocus();
- editBox:SetCursorPosition(strlen(editBox:GetText()));
- editBox:HighlightText(0, -1); -- highlight all
- self:Hide();
-
-
- GameTooltip:SetOwner(FriendsFrameBroadcastInput, "ANCHOR_RIGHT");
- GameTooltip:SetText(BN_BROADCAST_TOOLTIP, nil, nil, nil, nil, true);
-
-
- GameTooltip:Hide();
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- self.icon:SetAlpha(1.0);
- self:SetPoint("RIGHT", -2, 0);
- self.icon:SetAlpha(0.60);
- self:SetPoint("RIGHT", -1, -1);
- self:SetPoint("RIGHT", -2, 0);
-
-
-
-
-
-
- local frameLevel = self:GetFrameLevel();
- FriendsFrameBroadcastInputTooltipButton:SetFrameLevel(frameLevel + 1);
- FriendsFrameBroadcastInputClearButton:SetFrameLevel(frameLevel + 2);
-
-
-
-
-
-
-
-
-
-
-
-
- PanelTemplates_TabResize(self, 0);
- _G[self:GetName().."HighlightTexture"]:SetWidth(self:GetTextWidth() + 31);
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- GameTooltip_AddNewbieTip(self, ADD_FRIEND, 1.0, 1.0, 1.0, NEWBIE_TOOLTIP_ADDFRIEND, 1);
-
-
-
-
-
-
-
-
-
-
-
-
- GameTooltip_AddNewbieTip(self, SEND_MESSAGE, 1.0, 1.0, 1.0, NEWBIE_TOOLTIP_SENDMESSAGE, 1);
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- SetCVar("pendingInviteInfoShown", 1);
- FriendsList_Update();
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- self.DownArrow:SetPoint("LEFT", 10, -5);
- self.RightArrow:SetPoint("LEFT", 13, -4);
-
-
- self.DownArrow:SetPoint("LEFT", 8, -3);
- self.RightArrow:SetPoint("LEFT", 11, -2);
-
-
- PlaySound(SOUNDKIT.IG_MAINMENU_OPTION_CHECKBOX_ON);
- FriendsListFrame_ToggleInvites();
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- self:SetFrameLevel( self:GetFrameLevel() + 3 );
-
-
- if ( UnitCanCooperate("player", "target") and UnitIsPlayer("target") ) then
- local name, server = UnitName("target");
- local fullname = name;
- if ( server and UnitRealmRelationship("target") ~= LE_REALM_RELATION_SAME ) then
- fullname = name.."-"..server;
- end
- C_FriendList.AddIgnore(fullname);
- PlaySound(SOUNDKIT.U_CHAT_SCROLL_BUTTON);
- else
- StaticPopup_Show("ADD_IGNORE");
- end
-
-
- GameTooltip_AddNewbieTip(self, IGNORE_PLAYER, 1.0, 1.0, 1.0, NEWBIE_TOOLTIP_IGNOREPLAYER, 1);
-
-
-
-
-
-
-
-
-
-
-
- self:SetFrameLevel( self:GetFrameLevel() + 3 );
-
-
-
- GameTooltip_AddNewbieTip(self, REMOVE_PLAYER, 1.0, 1.0, 1.0, NEWBIE_TOOLTIP_REMOVEPLAYER, 1);
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- FauxScrollFrame_OnVerticalScroll(self, offset, FRIENDS_FRAME_IGNORE_HEIGHT, IgnoreList_Update);
-
-
-
-
-
-
- FriendsFrameIgnoredHeaderTitle:SetText(IGNORED);
- FriendsFrameBlockedInviteHeaderTitle:SetText(BLOCKED_INVITES);
- FriendsFrameMutedHeaderTitle:SetText(MUTED);
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- WhoFrameColumn_SetWidth(self, 83);
- self.sortType = "name";
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- WhoFrameColumn_SetWidth(self, 105);
-
-
-
-
-
-
-
-
-
- WhoFrameColumn_SetWidth(self, 32);
- self.sortType = "level";
-
-
-
-
-
-
-
-
-
- WhoFrameColumn_SetWidth(self, 92);
- self.sortType = "class";
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- InviteToGroup(WhoFrame.selectedName);
-
-
-
-
-
-
-
-
-
-
- C_FriendList.AddFriend(WhoFrame.selectedName);
-
-
-
-
-
-
-
-
-
-
- WhoFrameEditBox_OnEnterPressed(WhoFrameEditBox);
- WhoFrame.selectedWho = nil;
- PlaySound(SOUNDKIT.IG_MAINMENU_OPTION_CHECKBOX_ON);
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- FauxScrollFrame_OnVerticalScroll(self, offset, FRIENDS_FRAME_WHO_HEIGHT, WhoList_Update);
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- C_FriendList.SetWhoToUi(false);
-
-
- C_FriendList.SetWhoToUi(true);
-
-
- C_FriendList.SetWhoToUi(false);
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- self:SetChecked(GetGuildRosterShowOffline());
-
-
- SetGuildRosterSelection(0);
- if ( self:GetChecked() ) then
- PlaySound(SOUNDKIT.IG_MAINMENU_OPTION_CHECKBOX_OFF);
- else
- PlaySound(SOUNDKIT.IG_MAINMENU_OPTION_CHECKBOX_ON);
- end
- SetGuildRosterShowOffline(self:GetChecked());
- GuildStatus_Update();
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- WhoFrameColumn_SetWidth(self, 83);
- self.sortType = "name";
-
-
-
-
-
-
-
-
-
-
-
-
-
- WhoFrameColumn_SetWidth(self, 105);
- self.sortType = "zone";
-
-
-
-
-
-
-
-
-
-
-
-
-
- WhoFrameColumn_SetWidth(self, 32);
- self.sortType = "level";
-
-
-
-
-
-
-
-
-
-
-
-
-
- WhoFrameColumn_SetWidth(self, 92);
- self.sortType = "class";
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- WhoFrameColumn_SetWidth(self, 83);
- self.sortType = "name";
-
-
-
-
-
-
-
-
-
-
-
-
-
- WhoFrameColumn_SetWidth(self, 75);
- self.sortType = "rank";
-
-
-
-
-
-
-
-
-
-
-
-
-
- WhoFrameColumn_SetWidth(self, 75);
- self.sortType = "note";
-
-
-
-
-
-
-
-
-
-
-
-
-
- WhoFrameColumn_SetWidth(self, 75);
- self.sortType = "online";
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- self:HighlightText();
-
-
-
-
-
-
-
-
-
-
- if IsGuildLeader() then
- SubmitRequiredGuildRename(self:GetParent().editBox:GetText());
- else
- GuildNameChangeAlertFrame.topAnchored = true;
- GuildFrame_CheckName()
- end
-
-
-
-
-
-
- self:SetFrameLevel(GuildNameChangeAlertFrame:GetFrameLevel()-1);
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- self.topAnchored = true;
-
-
- self.topAnchored = false;
- GuildFrame_CheckName()
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- FauxScrollFrame_OnVerticalScroll(self, offset, FRIENDS_FRAME_GUILD_HEIGHT, GuildStatus_Update);
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- GuildFrameGuildListToggleButton_OnClick();
- PlaySound(SOUNDKIT.IG_MAINMENU_OPTION_CHECKBOX_ON);
- if (FriendsFrame.playerStatusFrame) then
- GameTooltip:SetText(PLAYER_STATUS, 1.0,1.0,1.0 );
- else
- GameTooltip:SetText(GUILD_STATUS, 1.0,1.0,1.0 );
- end
-
-
- if (FriendsFrame.playerStatusFrame) then
- GameTooltip:SetOwner(self, "ANCHOR_RIGHT");
- GameTooltip:SetText(PLAYER_STATUS, 1.0,1.0,1.0 );
- else
- GameTooltip:SetOwner(self, "ANCHOR_RIGHT");
- GameTooltip:SetText(GUILD_STATUS, 1.0,1.0,1.0 );
- end
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- local markup = CreateTextureMarkup("Interface\\DialogFrame\\UI-Dialog-Icon-AlertNew", 64, 64, 16, 16, 0, 1, 0, 1);
- local buttonString = ("%s %s|r"):format(markup, GUILD_IMPEACH_POPUP_CONFIRM);
- self:SetText(buttonString);
-
-
- StaticPopup_Show("GUILD_IMPEACH");
-
-
- GameTooltip_AddNewbieTip(self, GUILD_IMPEACH_POPUP_CONFIRM, 1.0, 1.0, 1.0, GUILD_IMPEACH_BUTTON_TEXT, 1);
-
-
- GameTooltip:Hide();
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- GuildFrameControlButton_OnUpdate();
-
-
- if ( GuildControlPopupFrame:IsVisible() ) then
- GuildControlPopupFrame:Hide();
- else
- GuildFramePopup_Show(GuildControlPopupFrame);
- end
-
-
- GameTooltip_AddNewbieTip(self, GUILDCONTROL, 1.0, 1.0, 1.0, NEWBIE_TOOLTIP_GUILDCONTROL, 1);
-
-
- GameTooltip:Hide();
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- StaticPopup_Show("ADD_GUILDMEMBER");
-
-
- GameTooltip_AddNewbieTip(self, ADDMEMBER, 1.0, 1.0, 1.0, NEWBIE_TOOLTIP_ADDMEMBER, 1);
-
-
- GameTooltip:Hide();
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- ToggleGuildInfoFrame();
-
-
- GameTooltip_AddNewbieTip(self, GUILD_INFORMATION, 1.0, 1.0, 1.0, NEWBIE_TOOLTIP_GUILD_INFORMATION, 1);
-
-
- GameTooltip:Hide();
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- StaticPopup_Show("SET_GUILDMOTD");
-
-
-
-
-
-
- C_GuildInfo.GuildRoster();
-
-
- GuildControlPopupFrame:Hide();
- GuildMemberDetailFrame:Hide();
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- GuildControlPopupFrameAddRankButton_OnUpdate();
-
-
- StaticPopup_Show("ADD_GUILDRANK");
-
-
- GameTooltip:SetOwner(self, "ANCHOR_RIGHT");
- GameTooltip:SetText(GUILDADDRANK_BUTTON_TOOLTIP);
-
-
- GameTooltip:Hide();
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- GuildControlPopupFrameRemoveRankButton_OnClick();
-
-
- GameTooltip:SetOwner(self, "ANCHOR_RIGHT");
- GameTooltip:SetText(GUILDREMOVERANK_BUTTON_TOOLTIP);
-
-
- GameTooltip:Hide();
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- self:GetParent():Hide();
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- GuildControlPopupAcceptButton_OnClick();
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- self:SetText(GuildControlGetRankName(1));
- self:ClearFocus();
-
-
- GuildControlPopupAcceptButton:Enable();
-
-
- self:ClearFocus();
- GuildControlPopupAcceptButton:Enable();
-
-
- self:ClearFocus();
-
-
-
-
-
-
-
- GuildControlPopupFrame_OnLoad();
-
-
- GuildControlPopupFrame_OnShow();
-
-
- GuildControlPopupFrame_OnHide();
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- if ( CanEditGuildInfo() ) then
- GuildInfoEditBox:SetFocus();
- else
- GuildInfoEditBox:ClearFocus();
- end
-
-
- if ( CanEditGuildInfo() ) then
- GuildInfoEditBox:SetFocus();
- else
- GuildInfoEditBox:ClearFocus();
- end
-
-
-
-
-
-
-
-
-
- self:ClearFocus();
-
-
- local scrollBar = getglobal(self:GetParent():GetName().."ScrollBar")
- self:GetParent():UpdateScrollChildRect();
- local min;
- local max;
- min, max = scrollBar:GetMinMaxValues();
- if ( max > 0 and (self.max ~= max) ) then
- self.max = max;
- scrollBar:SetValue(max);
- end
-
-
-
-
-
-
-
-
-
- local guildInfoText = GetGuildInfoText();
- if ( not guildInfoText ) then
- guildInfoText = "";
- end
- if ( CanEditGuildInfo() ) then
- if ( guildInfoText ~= "" ) then
- GuildInfoEditBox:SetText(guildInfoText);
- else
- GuildInfoEditBox:SetText(GUILD_INFO_EDITLABEL);
- end
- GuildInfoEditBox:SetTextColor(1, 1, 1);
- GuildInfoEditBox:EnableMouse(1);
- GuildInfoSaveButton:Enable();
- else
- GuildInfoEditBox:SetText(guildInfoText);
- GuildInfoEditBox:SetTextColor(0.65, 0.65, 0.65);
- GuildInfoEditBox:EnableMouse();
- GuildInfoSaveButton:Disable();
- end
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- SetGuildInfoText(GuildInfoEditBox:GetText());
- GuildInfoFrame:Hide();
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- GuildInfoFrame:Hide();
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- StaticPopup_Show("REMOVE_GUILDMEMBER");
-
-
- GameTooltip_AddNewbieTip(self, REMOVE, 1.0, 1.0, 1.0, NEWBIE_TOOLTIP_GUILDREMOVE, 1);
-
-
- GameTooltip:Hide();
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- InviteToGroup(GuildFrame.selectedName);
-
-
- GameTooltip_AddNewbieTip(self, GROUP_INVITE, 1.0, 1.0, 1.0, NEWBIE_TOOLTIP_GROUPINVITE, 1);
-
-
- GameTooltip:Hide();
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- C_GuildInfo.Promote(GuildFrame.selectedName);
- PlaySound(SOUNDKIT.U_CHAT_SCROLL_BUTTON);
- GuildFramePromoteButton:Disable();
-
-
- GameTooltip_AddNewbieTip(self, PROMOTE, 1.0, 1.0, 1.0, NEWBIE_TOOLTIP_PROMOTE, 1);
-
-
- GameTooltip:Hide();
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- C_GuildInfo.Demote(GuildFrame.selectedName);
- PlaySound(SOUNDKIT.U_CHAT_SCROLL_BUTTON);
- GuildFrameDemoteButton:Disable();
-
-
- GameTooltip_AddNewbieTip(self, DEMOTE, 1.0, 1.0, 1.0, NEWBIE_TOOLTIP_DEMOTE, 1);
-
-
- GameTooltip:Hide();
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- StaticPopup_Show("SET_GUILDPLAYERNOTE");
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- StaticPopup_Show("SET_GUILDOFFICERNOTE");
-
-
-
-
-
-
-
-
-
-
-
- self:SetWidth(0);
- PanelTemplates_TabResize(self, 0, nil);
-
-
- GameTooltip_AddNewbieTip(self, MicroButtonTooltipText(FRIENDS, "TOGGLEFRIENDSTAB"), 1.0, 1.0, 1.0, NEWBIE_TOOLTIP_FRIENDSTAB, 1);
-
-
-
-
-
-
-
-
-
-
- self:SetWidth(0);
- PanelTemplates_TabResize(self, 0, nil);
-
-
- GameTooltip_AddNewbieTip(self, MicroButtonTooltipText(WHO, "TOGGLEWHOTAB"), 1.0, 1.0, 1.0, NEWBIE_TOOLTIP_WHOTAB, 1);
-
-
-
-
-
-
-
-
-
-
- self:SetWidth(0);
- PanelTemplates_TabResize(self, 0, nil);
-
-
- GameTooltip_AddNewbieTip(self, MicroButtonTooltipText(RAID, "TOGGLERAIDTAB"), 1.0, 1.0, 1.0, NEWBIE_TOOLTIP_RAIDTAB, 1);
-
-
-
-
-
-
-
-
-
-
- self.selectedTextY = 4;
- InGuildCheck();
-
-
- self:SetWidth(0);
- PanelTemplates_TabResize(self, 0, nil);
-
-
- GameTooltip_AddNewbieTip(self, MicroButtonTooltipText(GUILD, "TOGGLEGUILDTAB"), 1.0, 1.0, 1.0, NEWBIE_TOOLTIP_GUILDTAB, 1);
-
-
-
-
-
-
-
-
-
-
- self:SetWidth(0);
- PanelTemplates_TabResize(self, 0, nil);
-
-
- GameTooltip_AddNewbieTip(self, MicroButtonTooltipText(BLIZZARD_GROUPS_SHORT, "TOGGLEBATTLENETGROUPS"), 1.0, 1.0, 1.0, NEWBIE_TOOLTIP_BLIZZARDGROUPSTAB, 1);
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- -- need to update in case of alternate alphabet
- if ( self.hasBroadcast ) then
- FriendsFrameTooltip_Show(self.button);
- end
-
-
-
-
-
-
-
-
-
- FriendsFrame_OnEvent(self, event, ...);
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- SetCVar("addFriendInfoShown", 1);
- AddFriendFrame_ShowEntry();
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- if ( AddFriendNameEditBox:HasFocus() ) then
- AddFriendFrame.editFocus = AddFriendNameEditBox;
- elseif ( AddFriendNoteEditBox:HasFocus() ) then
- AddFriendFrame.editFocus = AddFriendNoteEditBox;
- else
- AddFriendFrame.editFocus = nil;
- end
- AddFriendFrame_ShowInfo();
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- AutoCompleteEditBox_SetAutoCompleteSource(self, GetAutoCompleteResults, AUTOCOMPLETE_LIST.ADDFRIEND.include, AUTOCOMPLETE_LIST.ADDFRIEND.exclude);
- self.addHighlightedText = true;
-
-
- if ( not AutoCompleteEditBox_OnEnterPressed(self) and AddFriendEntryFrameAcceptButton:IsEnabled() ) then
- AddFriendFrame_Accept();
- end
-
-
- if ( AddFriendNoteEditBox:IsShown() and not AutoCompleteEditBox_OnTabPressed(self) ) then
- AddFriendNoteEditBox:SetFocus();
- end
-
-
- self:ClearFocus();
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- local scrollBar = _G[self:GetName().."ScrollBar"];
- scrollBar:ClearAllPoints();
- scrollBar:SetPoint("TOPLEFT", self, "TOPRIGHT", -18, -10);
- scrollBar:SetPoint("BOTTOMLEFT", self, "BOTTOMRIGHT", -18, 8);
- -- reposition the up and down buttons
- _G[self:GetName().."ScrollBarScrollDownButton"]:SetPoint("TOP", scrollBar, "BOTTOM", 0, 4);
- _G[self:GetName().."ScrollBarScrollUpButton"]:SetPoint("BOTTOM", scrollBar, "TOP", 0, -4);
- -- make the scroll bar hideable and force it to start off hidden so positioning calculations can be done
- -- as soon as it needs to be shown
- self.scrollBarHideable = 1;
- scrollBar:Hide();
-
-
- AddFriendNoteEditBox:SetFocus();
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- AddFriendNameEditBox:SetFocus();
-
-
- ScrollingEdit_OnTextChanged(self, self:GetParent());
- if ( self:GetText() ~= "" ) then
- AddFriendNoteEditBoxFill:Hide();
- else
- AddFriendNoteEditBoxFill:Show();
- end
-
-
-
- ScrollingEdit_OnUpdate(self, elapsed, self:GetParent());
-
-
- self:ClearFocus();
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- StaticPopupSpecial_Hide(AddFriendFrame);
-
-
-
-
-
-
-
-
-
- AddFriendFrame.editFocus = nil;
- PlaySound(SOUNDKIT.IG_MAINMENU_CLOSE);
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- FauxScrollFrame_OnVerticalScroll(self, offset, FRIENDS_FRAME_IGNORE_HEIGHT, FriendsFriendsList_Update);
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- if ( UIFrameIsFlashing(self) ) then
- UIFrameFlashStop(self);
- end
- UIFrameFlash(self, 1, 0.5, 60, true, 1)
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- PlaySound(SOUNDKIT.IG_MAINMENU_OPTION_CHECKBOX_ON);
- BNSendVerifiedBattleTagInvite(); -- unit should have been set with BNCheckBattleTagInviteToUnit or BNCheckBattleTagInviteToGuildMember
- StaticPopupSpecial_Hide(self:GetParent());
-
-
-
-
-
-
-
-
-
-
- PlaySound(SOUNDKIT.IG_MAINMENU_OPTION_CHECKBOX_ON);
- StaticPopupSpecial_Hide(self:GetParent());
-
-
-
-
-
-
diff --git a/Interface/AddOns/Blizzard_UIPanels_Game/Wrath/ContainerFrame.lua b/Interface/AddOns/Blizzard_UIPanels_Game/Wrath/ContainerFrame.lua
index 4fee666215..8d4f5a9f54 100644
--- a/Interface/AddOns/Blizzard_UIPanels_Game/Wrath/ContainerFrame.lua
+++ b/Interface/AddOns/Blizzard_UIPanels_Game/Wrath/ContainerFrame.lua
@@ -19,10 +19,10 @@ function ContainerFrame_UpdateQuestItem(frame, itemIndex, itemButton)
local questTexture = _G[name.."Item"..itemIndex.."IconQuestTexture"];
- if ( questInfo.questId and not questInfo.isActive ) then
+ if ( questInfo.questID and not questInfo.isActive ) then
questTexture:SetTexture(TEXTURE_ITEM_QUEST_BANG);
questTexture:Show();
- elseif ( questInfo.questId or questInfo.isQuestItem ) then
+ elseif ( questInfo.questID or questInfo.isQuestItem ) then
questTexture:SetTexture(TEXTURE_ITEM_QUEST_BORDER);
questTexture:Show();
else
diff --git a/Interface/AddOns/Blizzard_UIPanels_Game/Wrath/FriendsFrame.lua b/Interface/AddOns/Blizzard_UIPanels_Game/Wrath/FriendsFrame.lua
deleted file mode 100644
index e35b62cf2b..0000000000
--- a/Interface/AddOns/Blizzard_UIPanels_Game/Wrath/FriendsFrame.lua
+++ /dev/null
@@ -1,972 +0,0 @@
--- See FriendsFrame_Shared.lua for functions shared across Classic expansions
-
-PENDING_GUILDBANK_PERMISSIONS = {};
-
-function FriendsFrame_OnLoad(self)
- PanelTemplates_SetNumTabs(self, FRIEND_TAB_COUNT);
- self.selectedTab = FRIEND_TAB_FRIENDS;
- PanelTemplates_UpdateTabs(self);
- self:RegisterEvent("FRIENDLIST_UPDATE");
- self:RegisterEvent("IGNORELIST_UPDATE");
- self:RegisterEvent("WHO_LIST_UPDATE");
- self:RegisterEvent("GROUP_ROSTER_UPDATE");
- self:RegisterEvent("PLAYER_GUILD_UPDATE");
- self:RegisterEvent("GUILD_MOTD");
- self:RegisterEvent("PLAYER_FLAGS_CHANGED");
- self:RegisterEvent("BN_FRIEND_LIST_SIZE_CHANGED");
- self:RegisterEvent("BN_FRIEND_INFO_CHANGED");
- self:RegisterEvent("BN_FRIEND_INVITE_LIST_INITIALIZED");
- self:RegisterEvent("BN_FRIEND_INVITE_ADDED");
- self:RegisterEvent("BN_FRIEND_INVITE_REMOVED");
- self:RegisterEvent("BN_CUSTOM_MESSAGE_CHANGED");
- self:RegisterEvent("BN_CUSTOM_MESSAGE_LOADED");
- self:RegisterEvent("BN_BLOCK_LIST_UPDATED");
- self:RegisterEvent("PLAYER_ENTERING_WORLD");
- self:RegisterEvent("BN_CONNECTED");
- self:RegisterEvent("BN_DISCONNECTED");
- self:RegisterEvent("BN_INFO_CHANGED");
- self:RegisterEvent("SPELL_UPDATE_COOLDOWN");
- self:RegisterEvent("BATTLETAG_INVITE_SHOW");
- self:RegisterEvent("GUILD_ROSTER_UPDATE");
- self:RegisterEvent("GROUP_JOINED");
- self:RegisterEvent("GROUP_LEFT");
- self:RegisterEvent("STREAM_VIEW_MARKER_UPDATED");
- self:RegisterEvent("CLUB_INVITATION_ADDED_FOR_SELF");
- self:RegisterEvent("CLUB_INVITATION_REMOVED_FOR_SELF");
- self:RegisterEvent("GUILD_RENAME_REQUIRED");
- self:RegisterEvent("REQUIRED_GUILD_RENAME_RESULT");
- self:RegisterEvent("GUILD_EVENT_LOG_UPDATE");
- self.playerStatusFrame = 1;
- self.selectedFriend = 1;
- self.selectedIgnore = 1;
- -- guild
- self.guildStatus = 0;
- GuildFrame.notesToggle = 1;
- GuildFrame.selectedGuildMember = 0;
- GuildFrame.hasForcedNameChange = GetGuildRenameRequired();
- SetGuildRosterSelection(0);
- local currentGuildMOTD = GetGuildRosterMOTD();
- GuildFrameNotesText:SetText(currentGuildMOTD);
- GuildMemberDetailRankText:SetPoint("RIGHT", GuildFramePromoteButton, "LEFT");
- -- friends list
- local scrollFrame = FriendsFrameFriendsScrollFrame;
- scrollFrame.update = FriendsFrame_UpdateFriends;
- scrollFrame.dynamic = FriendsList_GetScrollFrameTopButton;
- scrollFrame.dividerPool = CreateFramePool("FRAME", self, "FriendsFrameFriendDividerTemplate");
- scrollFrame.invitePool = CreateFramePool("FRAME", self, "FriendsFrameFriendInviteTemplate");
- -- can't do this in XML because we're inheriting from a template
- scrollFrame.PendingInvitesHeaderButton:SetParent(scrollFrame.ScrollChild);
- FriendsFrameFriendsScrollFrameScrollBarTrack:Hide();
- FriendsFrameFriendsScrollFrameScrollBar.doNotHide = true;
- HybridScrollFrame_CreateButtons(scrollFrame, "FriendsFrameButtonTemplate");
- FriendsFrameIcon:SetTexture("Interface\\FriendsFrame\\FriendsFrameScrollIcon");
-
- FriendsFrameBroadcastInputClearButton.icon:SetVertexColor(FRIENDS_BNET_NAME_COLOR.r, FRIENDS_BNET_NAME_COLOR.g, FRIENDS_BNET_NAME_COLOR.b);
- if ( not BNFeaturesEnabled() ) then
- FriendsFrameBattlenetFrame:Hide();
- FriendsFrameBroadcastInput:Hide();
- end
-
- --Create lists of buttons for various subframes
- for i = 2, 19 do
- local button = CreateFrame("Button", "FriendsFrameIgnoreButton"..i, IgnoreListFrame, "FriendsFrameIgnoreButtonTemplate");
- button:SetPoint("TOP", _G["FriendsFrameIgnoreButton"..(i-1)], "BOTTOM");
- end
- for i = 2, 17 do
- local button = CreateFrame("Button", "WhoFrameButton"..i, WhoFrame, "FriendsFrameWhoButtonTemplate");
- button:SetID(i);
- button:SetPoint("TOP", _G["WhoFrameButton"..(i-1)], "BOTTOM");
- end
-end
-
-function FriendsFrame_OnEvent(self, event, ...)
- if ( event == "SPELL_UPDATE_COOLDOWN" ) then
- if ( self:IsShown() ) then
- local buttons = FriendsFrameFriendsScrollFrame.buttons;
- for _, button in pairs(buttons) do
- if ( button.summonButton:IsShown() ) then
- FriendsFrame_SummonButton_Update(button.summonButton);
- end
- end
- end
- elseif ( event == "FRIENDLIST_UPDATE" or event == "GROUP_ROSTER_UPDATE" ) then
- FriendsList_Update();
- elseif ( event == "BN_FRIEND_LIST_SIZE_CHANGED" or event == "BN_FRIEND_INFO_CHANGED" ) then
- FriendsList_Update();
- -- update Friends of Friends
- local bnetIDAccount = ...;
- if ( event == "BN_FRIEND_LIST_SIZE_CHANGED" and bnetIDAccount ) then
- FriendsFriendsFrame.requested[bnetIDAccount] = nil;
- if ( FriendsFriendsFrame:IsShown() ) then
- FriendsFriendsList_Update();
- end
- end
- elseif ( event == "BN_CUSTOM_MESSAGE_CHANGED" ) then
- local arg1 = ...;
- if ( arg1 ) then --There is no bnetIDAccount given if this is ourself.
- FriendsList_Update();
- else
- FriendsFrameBattlenetFrame_UpdateBroadcast();
- end
- elseif ( event == "BN_CUSTOM_MESSAGE_LOADED" ) then
- FriendsFrameBattlenetFrame_UpdateBroadcast();
- elseif ( event == "BN_FRIEND_INVITE_ADDED" ) then
- -- flash the invites header if collapsed
- local collapsed = GetCVarBool("friendInvitesCollapsed");
- if ( collapsed ) then
- FriendsFrameFriendsScrollFrame.PendingInvitesHeaderButton.Flash.Anim:Play();
- end
- FriendsList_Update();
- elseif ( event == "BN_FRIEND_INVITE_LIST_INITIALIZED" ) then
- FriendsList_Update();
- elseif ( event == "BN_FRIEND_INVITE_REMOVED" ) then
- FriendsList_Update();
- elseif ( event == "IGNORELIST_UPDATE" or event == "BN_BLOCK_LIST_UPDATED" ) then
- IgnoreList_Update();
- elseif ( event == "WHO_LIST_UPDATE" ) then
- WhoFrame.selectedWho = nil;
- WhoList_Update();
- FriendsFrame_Update();
- elseif ( event == "PLAYER_FLAGS_CHANGED" or event == "BN_INFO_CHANGED") then
- FriendsFrameStatusDropdown:GenerateMenu();
- FriendsFrame_CheckBattlenetStatus();
- elseif ( event == "PLAYER_ENTERING_WORLD" or event == "BN_CONNECTED" or event == "BN_DISCONNECTED") then
- FriendsFrame_CheckBattlenetStatus();
- -- We want to remove any friends from the frame so they don't linger when it's first re-opened.
- if (event == "BN_DISCONNECTED") then
- FriendsList_Update(true);
- end
- elseif ( event == "BATTLETAG_INVITE_SHOW" ) then
- BattleTagInviteFrame_Show(...);
- elseif ( event == "SOCIAL_QUEUE_UPDATE" or event == "GROUP_LEFT" or event == "GROUP_JOINED" ) then
- if ( self:IsVisible() ) then
- FriendsFrame_Update(); --TODO - Only update the buttons that need updating
- end
- elseif ( event == "GUILD_ROSTER_UPDATE" ) then
- FriendsFrame_CheckDethroneStatus();
-
- GuildInfoFrame.cachedText = nil;
- if ( GuildFrame:IsShown() ) then
- local arg1 = ...;
- if ( arg1 ) then
- C_GuildInfo.GuildRoster();
- end
- GuildStatus_Update();
- FriendsFrame_Update();
- GuildControlPopupFrame_Initialize();
- end
- if ( GuildEventLogFrame:IsShown() ) then
- QueryGuildEventLog();
- end
- elseif ( event == "PLAYER_GUILD_UPDATE" ) then
- if ( FriendsFrame:IsVisible() ) then
- InGuildCheck();
- end
- if ( not IsInGuild() ) then
- GuildControlPopupFrame.initialized = false;
- end
- elseif ( event == "GUILD_MOTD") then
- local currentGuildMOTD = ...;
- GuildFrameNotesText:SetText(currentGuildMOTD);
- elseif ( event == "STREAM_VIEW_MARKER_UPDATED" ) then
- BlizzardGroups_UpdateNotifications();
- elseif ( event == "CLUB_INVITATION_ADDED_FOR_SELF" or event == "CLUB_INVITATION_REMOVED_FOR_SELF" ) then
- BlizzardGroups_UpdateShowTab();
- BlizzardGroups_UpdateNotifications();
- elseif ( event == "GUILD_RENAME_REQUIRED" ) then
- GuildFrame.hasForcedNameChange = ...;
- GuildFrame_CheckName();
- elseif ( event == "REQUIRED_GUILD_RENAME_RESULT" ) then
- local success = ...
- if ( success ) then
- GuildFrame.hasForcedNameChange = GetGuildRenameRequired();
- GuildFrame_CheckName();
- else
- UIErrorsFrame:AddMessage(ERR_GUILD_NAME_INVALID, 1.0, 0.1, 0.1, 1.0);
- end
- elseif ( event == "GUILD_EVENT_LOG_UPDATE" ) then
- GuildEventLog_Update();
- end
-end
-
-function FriendsFrame_InviteOrRequestToJoin(guid, gameAccountID)
- local inviteType = GetDisplayedInviteType(guid);
- if ( inviteType == "INVITE" or inviteType == "SUGGEST_INVITE" ) then
- if inviteType == "SUGGEST_INVITE" and C_PartyInfo.IsPartyFull() then
- ChatFrame_DisplaySystemMessageInPrimary(ERR_GROUP_FULL);
- return;
- end
-
- BNInviteFriend(gameAccountID);
- elseif ( inviteType == "REQUEST_INVITE" ) then
- BNRequestInviteFriend(gameAccountID);
- end
-end
-
--- ============================================ GUILD ===============================================================================
-GUILDFRAME_POPUPS = {
- "GuildEventLogFrame",
- "GuildInfoFrame",
- "GuildMemberDetailFrame",
- "GuildControlPopupFrame",
-};
-
-function GuildControlPopupFrame_OnLoad()
- local buttonText;
- for i=1, 17 do
- buttonText = _G["GuildControlPopupFrameCheckbox"..i.."Text"];
- if ( buttonText ) then
- buttonText:SetText(_G["GUILDCONTROL_OPTION"..i]);
- end
- end
- GuildControlTabPermissionsViewTabText:SetText(GUILDCONTROL_VIEW_TAB);
- GuildControlTabPermissionsDepositItemsText:SetText(GUILDCONTROL_DEPOSIT_ITEMS);
- GuildControlTabPermissionsUpdateTextText:SetText(GUILDCONTROL_OPTION19); --option # is a lie, we're simply repurposing this globalstring from mainline
- ClearPendingGuildBankPermissions();
-end
-
---Need to call this function on an event since the guildroster is not available during OnLoad()
-function GuildControlPopupFrame_Initialize()
- if ( GuildControlPopupFrame.initialized ) then
- return;
- end
-
- GuildControlSetRank(1);
-
- local function IsSelected(i)
- return GuildControlGetRank() == i;
- end
-
- local function SetSelected(i)
- GuildControlSetRank(i);
- GuildControlCheckboxUpdate(C_GuildInfo.GuildControlGetRankFlags(i));
- GuildControlPopupFrameEditBox:SetText(text);
- GuildControlPopupFrameAddRankButton_OnUpdate();
- GuildControlPopupFrameRemoveRankButton_OnUpdate();
- GuildControlPopupAcceptButton:Disable();
- end
-
- self:SetupMenu(function(dropdown, rootDescription)
- rootDescription:SetTag("MENU_FRIENDS_GUILD_CONTROL");
-
- for i=1, GuildControlGetNumRanks() do
- local text = GuildControlGetRankName(i);
- rootDescription:CreateRadio(text, IsSelected, SetSelected, i);
- end
- end);
-
- -- Select tab 1
- GuildBankTabPermissionsTab_OnClick(1);
- GuildControlPopupFrameDropdownButton_ClickedRank(1);
-
- GuildControlPopupFrame:SetScript("OnEvent", GuildControlPopupFrame_OnEvent);
- GuildControlPopupFrame.initialized = 1;
- GuildControlPopupFrame.rank = GuildControlGetRankName(1);
-end
-
-function GuildControlPopupFrame_OnShow()
- FriendsFrame:SetAttribute("UIPanelLayout-defined", nil);
- FriendsFrame.guildControlShow = 1;
- GuildControlPopupAcceptButton:Disable();
- -- Update popup
- GuildControlPopupFrame_Initialize();
- GuildControlPopupframe_Update();
-
- UIPanelWindows["FriendsFrame"].width = FriendsFrame:GetWidth() + GuildControlPopupFrame:GetWidth();
- UpdateUIPanelPositions(FriendsFrame);
- --GuildControlPopupFrame:RegisterEvent("GUILD_ROSTER_UPDATE"); --It was decided that having a risk of conflict when two people are editing the guild permissions at once is better than resetting whenever someone joins the guild or changes ranks.
- GuildControlPopupFrame:RegisterEvent("GUILD_RANKS_UPDATE");
-end
-
-function GuildControlPopupFrame_OnEvent (self, event, ...)
- if ( not IsGuildLeader(UnitName("player")) ) then
- GuildControlPopupFrame:Hide();
- return;
- end
-
- for i=1, GuildControlGetNumRanks() do
- if GuildControlGetRank() == i then
- GuildControlPopupFrameDropdown:GenerateMenu();
- break;
- end
- end
-
- GuildControlPopupframe_Update()
-end
-
-function GuildControlPopupFrame_OnHide()
- FriendsFrame:SetAttribute("UIPanelLayout-defined", nil);
- FriendsFrame.guildControlShow = 0;
-
- UIPanelWindows["FriendsFrame"].width = FriendsFrame:GetWidth();
- UpdateUIPanelPositions();
-
- GuildControlPopupFrame.goldChanged = nil;
- GuildControlPopupFrame:UnregisterEvent("GUILD_ROSTER_UPDATE");
-end
-
-function GuildControlPopupframe_Update(loadPendingTabPermissions, skipCheckboxUpdate)
- -- Skip non-tab specific updates to fix Bug ID: 110210
- if ( not skipCheckboxUpdate ) then
- -- Update permission flags
- GuildControlCheckboxUpdate(GuildControlGetRankFlags());
- end
-
- local rankID = GuildControlGetRank();
- GuildControlPopupFrameEditBox:SetText(GuildControlGetRankName(rankID));
- if ( GuildControlPopupFrame.previousSelectedRank and GuildControlPopupFrame.previousSelectedRank ~= rankID ) then
- ClearPendingGuildBankPermissions();
- end
- GuildControlPopupFrame.previousSelectedRank = rankID;
-
- --If rank to modify is guild master then gray everything out
- if ( IsGuildLeader() and rankID == 1 ) then
- GuildBankTabLabel:SetVertexColor(GRAY_FONT_COLOR.r, GRAY_FONT_COLOR.g, GRAY_FONT_COLOR.b);
- GuildControlTabPermissionsDepositItems:SetChecked(1);
- GuildControlTabPermissionsViewTab:SetChecked(1);
- GuildControlTabPermissionsUpdateText:SetChecked(1);
- GuildControlTabPermissionsDepositItems:Disable();
- GuildControlTabPermissionsViewTab:Disable();
- GuildControlTabPermissionsUpdateText:Disable();
- GuildControlTabPermissionsWithdrawItemsText:SetVertexColor(GRAY_FONT_COLOR.r, GRAY_FONT_COLOR.g, GRAY_FONT_COLOR.b);
- GuildControlWithdrawItemsEditBox:SetNumeric(nil);
- GuildControlWithdrawItemsEditBox:SetTextColor(GRAY_FONT_COLOR.r, GRAY_FONT_COLOR.g, GRAY_FONT_COLOR.b);
- GuildControlWithdrawItemsEditBox:SetText(UNLIMITED);
- GuildControlWithdrawItemsEditBox:ClearFocus();
- GuildControlWithdrawItemsEditBoxMask:Show();
- GuildControlWithdrawGoldText:SetVertexColor(GRAY_FONT_COLOR.r, GRAY_FONT_COLOR.g, GRAY_FONT_COLOR.b);
- GuildControlWithdrawGoldAmountText:SetVertexColor(GRAY_FONT_COLOR.r, GRAY_FONT_COLOR.g, GRAY_FONT_COLOR.b);
- GuildControlWithdrawGoldEditBox:SetNumeric(nil);
- GuildControlWithdrawGoldEditBox:SetMaxLetters(0);
- GuildControlWithdrawGoldEditBox:SetTextColor(GRAY_FONT_COLOR.r, GRAY_FONT_COLOR.g, GRAY_FONT_COLOR.b);
- GuildControlWithdrawGoldEditBox:SetText(UNLIMITED);
- GuildControlWithdrawGoldEditBox:ClearFocus();
- GuildControlWithdrawGoldEditBoxMask:Show();
- GuildControlPopupFrameCheckbox15:Disable();
- GuildControlPopupFrameCheckbox16:Disable();
- else
- if ( GetNumGuildBankTabs() == 0 ) then
- -- No tabs, no permissions! Disable the tab related doohickies
- GuildBankTabLabel:SetVertexColor(GRAY_FONT_COLOR.r, GRAY_FONT_COLOR.g, GRAY_FONT_COLOR.b);
- GuildControlTabPermissionsViewTab:Disable();
- GuildControlTabPermissionsDepositItems:Disable();
- GuildControlTabPermissionsUpdateText:Disable();
- GuildControlTabPermissionsWithdrawItemsText:SetVertexColor(GRAY_FONT_COLOR.r, GRAY_FONT_COLOR.g, GRAY_FONT_COLOR.b);
- GuildControlWithdrawItemsEditBox:SetText(UNLIMITED);
- GuildControlWithdrawItemsEditBox:ClearFocus();
- GuildControlWithdrawItemsEditBoxMask:Show();
- else
- GuildBankTabLabel:SetVertexColor(NORMAL_FONT_COLOR.r, NORMAL_FONT_COLOR.g, NORMAL_FONT_COLOR.b);
- GuildControlTabPermissionsViewTab:Enable();
- GuildControlTabPermissionsWithdrawItemsText:SetVertexColor(NORMAL_FONT_COLOR.r, NORMAL_FONT_COLOR.g, NORMAL_FONT_COLOR.b);
- GuildControlWithdrawItemsEditBox:SetNumeric(1);
- GuildControlWithdrawItemsEditBox:SetTextColor(HIGHLIGHT_FONT_COLOR.r, HIGHLIGHT_FONT_COLOR.g, HIGHLIGHT_FONT_COLOR.b);
- GuildControlWithdrawItemsEditBoxMask:Hide();
- end
-
- GuildControlWithdrawGoldText:SetVertexColor(NORMAL_FONT_COLOR.r, NORMAL_FONT_COLOR.g, NORMAL_FONT_COLOR.b);
- GuildControlWithdrawGoldAmountText:SetVertexColor(NORMAL_FONT_COLOR.r, NORMAL_FONT_COLOR.g, NORMAL_FONT_COLOR.b);
- GuildControlWithdrawGoldEditBox:SetNumeric(1);
- GuildControlWithdrawGoldEditBox:SetMaxLetters(MAX_GOLD_WITHDRAW_DIGITS);
- GuildControlWithdrawGoldEditBox:SetTextColor(HIGHLIGHT_FONT_COLOR.r, HIGHLIGHT_FONT_COLOR.g, HIGHLIGHT_FONT_COLOR.b);
- GuildControlWithdrawGoldEditBoxMask:Hide();
- GuildControlPopupFrameCheckbox15:Enable();
- GuildControlPopupFrameCheckbox16:Enable();
-
- -- Update tab specific info
- local viewTab, canDeposit, canUpdateText, numWithdrawals = GetGuildBankTabPermissions(GuildControlPopupFrameTabPermissions.selectedTab);
- if ( rankID == 1 ) then
- --If is guildmaster then force checkboxes to be selected
- viewTab = 1;
- canDeposit = 1;
- canUpdateText = 1;
- elseif ( loadPendingTabPermissions ) then
- local permissions = PENDING_GUILDBANK_PERMISSIONS[GuildControlPopupFrameTabPermissions.selectedTab];
- local value;
- value = permissions[GuildControlTabPermissionsViewTab:GetID()];
- if ( value ) then
- viewTab = value;
- end
- value = permissions[GuildControlTabPermissionsDepositItems:GetID()];
- if ( value ) then
- canDeposit = value;
- end
- value = permissions[GuildControlTabPermissionsUpdateText:GetID()];
- if ( value ) then
- canUpdateText = value;
- end
- value = permissions["withdraw"];
- if ( value ) then
- numWithdrawals = value;
- end
- end
- GuildControlTabPermissionsViewTab:SetChecked(viewTab);
- GuildControlTabPermissionsDepositItems:SetChecked(canDeposit);
- GuildControlTabPermissionsUpdateText:SetChecked(canUpdateText);
- GuildControlWithdrawItemsEditBox:SetText(numWithdrawals);
- local goldWithdrawLimit = GetGuildBankWithdrawGoldLimit();
- -- Only write to the editbox if the value hasn't been changed by the player
- if ( not GuildControlPopupFrame.goldChanged ) then
- if ( goldWithdrawLimit >= 0 ) then
- GuildControlWithdrawGoldEditBox:SetText(goldWithdrawLimit);
- else
- -- This is for the guild leader who defaults to -1
- GuildControlWithdrawGoldEditBox:SetText(MAX_GOLD_WITHDRAW);
- end
- end
- GuildControlPopup_UpdateDepositCheckbox();
- end
-
- --Only show available tabs
- local tab;
- local numTabs = GetNumGuildBankTabs();
- local name, permissionsTabBackground, permissionsText;
- for i=1, MAX_GUILDBANK_TABS do
- name = GetGuildBankTabInfo(i);
- tab = _G["GuildBankTabPermissionsTab"..i];
-
- if ( i <= numTabs ) then
- tab:Show();
- tab.tooltip = name;
- permissionsTabBackground = _G["GuildBankTabPermissionsTab"..i.."Background"];
- permissionsText = _G["GuildBankTabPermissionsTab"..i.."Text"];
- if ( GuildControlPopupFrameTabPermissions.selectedTab == i ) then
- tab:LockHighlight();
- permissionsTabBackground:SetTexCoord(0, 1.0, 0, 1.0);
- permissionsTabBackground:SetHeight(32);
- permissionsText:SetPoint("CENTER", permissionsTabBackground, "CENTER", 0, -3);
- else
- tab:UnlockHighlight();
- permissionsTabBackground:SetTexCoord(0, 1.0, 0, 0.875);
- permissionsTabBackground:SetHeight(28);
- permissionsText:SetPoint("CENTER", permissionsTabBackground, "CENTER", 0, -5);
- end
- if ( IsGuildLeader() and rankID == 1 ) then
- tab:Disable();
- else
- tab:Enable();
- end
- else
- tab:Hide();
- end
- end
-end
-
-function WithdrawGoldEditBox_Update()
- if ( not GuildControlPopupFrameCheckbox15:GetChecked() and not GuildControlPopupFrameCheckbox16:GetChecked() ) then
- GuildControlWithdrawGoldAmountText:SetVertexColor(GRAY_FONT_COLOR.r, GRAY_FONT_COLOR.g, GRAY_FONT_COLOR.b);
- GuildControlWithdrawGoldEditBox:SetTextColor(GRAY_FONT_COLOR.r, GRAY_FONT_COLOR.g, GRAY_FONT_COLOR.b);
- GuildControlWithdrawGoldEditBox:ClearFocus();
- GuildControlWithdrawGoldEditBoxMask:Show();
- else
- GuildControlWithdrawGoldAmountText:SetVertexColor(NORMAL_FONT_COLOR.r, NORMAL_FONT_COLOR.g, NORMAL_FONT_COLOR.b);
- GuildControlWithdrawGoldEditBox:SetTextColor(HIGHLIGHT_FONT_COLOR.r, HIGHLIGHT_FONT_COLOR.g, HIGHLIGHT_FONT_COLOR.b);
- GuildControlWithdrawGoldEditBoxMask:Hide();
- end
-end
-
-function GuildControlPopupAcceptButton_OnClick()
- local amount = GuildControlWithdrawGoldEditBox:GetText();
- if(amount and amount ~= "" and amount ~= UNLIMITED and tonumber(amount) and tonumber(amount) > 0) then
- SetGuildBankWithdrawGoldLimit(amount);
- else
- SetGuildBankWithdrawGoldLimit(0);
- end
- SavePendingGuildBankTabPermissions()
- GuildControlSaveRank(GuildControlPopupFrameEditBox:GetText());
- GuildStatus_Update();
- GuildControlPopupAcceptButton:Disable();
- GuildControlPopupFrameDropdown:GenerateMenu();
- GuildControlPopupFrame:Hide();
- ClearPendingGuildBankPermissions();
-end
-
-function GuildControlPopupFrameDropdown_OnLoad(self)
- WowStyle1DropdownMixin.OnLoad(self);
-
- self:SetWidth(110);
-end
-
-function GuildControlPopupFrameDropdownButton_ClickedRank(rank)
- GuildControlSetRank(rank);
- GuildControlPopupFrame.rank = GuildControlGetRankName(rank);
- GuildControlPopupFrame.goldChanged = nil;
- GuildControlPopupframe_Update();
- GuildControlPopupFrameAddRankButton_OnUpdate(GuildControlPopupFrameAddRankButton);
- GuildControlPopupFrameRemoveRankButton_OnUpdate(GuildControlPopupFrameRemoveRankButton);
- GuildControlPopupAcceptButton:Disable();
- GuildControlPopupFrameDropdown:GenerateMenu();
-end
-
-function GuildControlCheckboxUpdate(...)
- local checkbox;
- for i=1, select("#", ...), 1 do
- checkbox = _G["GuildControlPopupFrameCheckbox"..i]
- if ( checkbox ) then
- checkbox:SetChecked(select(i, ...));
- else
- --We need to skip checkbox 14 since it's a deprecated flag
- --message("GuildControlPopupFrameCheckbox"..i.." does not exist!");
- end
- end
-end
-
-function GuildControlPopupFrameRemoveRankButton_OnClick()
- GuildControlDelRank(GuildControlGetRank());
- GuildControlPopupFrame.rank = GuildControlGetRankName(1);
- GuildControlSetRank(1);
- GuildStatus_Update();
- GuildControlPopupFrameEditBox:SetText(GuildControlGetRankName(1));
- GuildControlCheckboxUpdate(GuildControlGetRankFlags());
- GuildControlPopupFrameDropdownButton_ClickedRank(1);
-
- -- Set this to call guildroster in the next frame
- --C_GuildInfo.GuildRoster();
- --GuildControlPopupFrame.update = 1;
-end
-
-function GuildControlPopupFrameRemoveRankButton_OnUpdate(self)
- local numRanks = GuildControlGetNumRanks()
- if ( (GuildControlGetRank() == numRanks) and (numRanks > 5) ) then
- self:Show();
- if ( FriendsFrame.playersInBotRank > 0 ) then
- self:Disable();
- else
- self:Enable();
- end
- else
- self:Hide();
- end
-end
-
-function GuildControlPopup_UpdateDepositCheckbox()
- if(GuildControlTabPermissionsViewTab:GetChecked()) then
- GuildControlTabPermissionsDepositItems:Enable();
- GuildControlTabPermissionsUpdateText:Enable();
- else
- GuildControlTabPermissionsDepositItems:Disable();
- GuildControlTabPermissionsUpdateText:Disable();
- end
-end
-
-function GuildBankTabPermissionsTab_OnClick(tab)
- GuildControlPopupFrameTabPermissions.selectedTab = tab;
- GuildControlPopupframe_Update(true, true);
-end
-
--- Functions to allow canceling
-function ClearPendingGuildBankPermissions()
- for i=1, MAX_GUILDBANK_TABS do
- PENDING_GUILDBANK_PERMISSIONS[i] = {};
- end
-end
-
-function SetPendingGuildBankTabPermissions(tab, id, checked)
- if ( not checked ) then
- checked = 0;
- end
- PENDING_GUILDBANK_PERMISSIONS[tab][id] = checked;
-end
-
-function SetPendingGuildBankTabWithdraw(tab, amount)
- PENDING_GUILDBANK_PERMISSIONS[tab]["withdraw"] = amount;
-end
-
-function SavePendingGuildBankTabPermissions()
- for index, value in pairs(PENDING_GUILDBANK_PERMISSIONS) do
- for i=1, 3 do
- if ( value[i] ) then
- -- treat 0 as false
- local boolValue = value[i];
- if ( type(boolValue) == "number" ) then
- boolValue = boolValue ~= 0;
- end
- SetGuildBankTabPermissions(index, i, boolValue);
- end
- end
- if ( value["withdraw"] ) then
- SetGuildBankTabItemWithdraw(index, value["withdraw"]);
- end
- end
-end
-
--- Guild event log functions
-function ToggleGuildEventLog()
- if ( GuildEventLogFrame:IsShown() ) then
- GuildEventLogFrame:Hide();
- else
- GuildFramePopup_Show(GuildEventLogFrame);
- end
-end
-
-function GuildEventLog_Update()
- local numEvents = GetNumGuildEvents();
- local type, player1, player2, rank, year, month, day, hour;
- local msg;
- local buffer = "";
- local max = GuildEventMessage:GetFieldSize()
- local length = 0;
- for i=numEvents, 1, -1 do
- type, player1, player2, rank, year, month, day, hour = GetGuildEventInfo(i);
- if ( not player1 ) then
- player1 = UNKNOWN;
- end
- if ( not player2 ) then
- player2 = UNKNOWN;
- end
- if ( type == "invite" ) then
- msg = format(GUILDEVENT_TYPE_INVITE, player1, player2);
- elseif ( type == "join" ) then
- msg = format(GUILDEVENT_TYPE_JOIN, player1);
- elseif ( type == "promote" ) then
- msg = format(GUILDEVENT_TYPE_PROMOTE, player1, player2, rank);
- elseif ( type == "demote" ) then
- msg = format(GUILDEVENT_TYPE_DEMOTE, player1, player2, rank);
- elseif ( type == "remove" ) then
- msg = format(GUILDEVENT_TYPE_REMOVE, player1, player2);
- elseif ( type == "quit" ) then
- msg = format(GUILDEVENT_TYPE_QUIT, player1);
- end
- if ( msg ) then
- msg = msg.."|cff009999 "..format(GUILD_BANK_LOG_TIME, RecentTimeDate(year, month, day, hour)).."|r|n";
- length = length + msg:len();
- if(length>max) then
- i=0
- else
- buffer = buffer..msg
- end
- end
- end
- GuildEventMessage:SetText(buffer);
-end
-
-function FriendsFrameGuildStatusButton_OnClick(self, button)
- if ( button == "LeftButton" ) then
- GuildFrame.previousSelectedGuildMember = GuildFrame.selectedGuildMember;
- GuildFrame.selectedGuildMember = self.guildIndex;
- GuildFrame.selectedName = getglobal(self:GetName().."Name"):GetText();
- SetGuildRosterSelection(GuildFrame.selectedGuildMember);
- -- Toggle guild details frame
- if ( GuildMemberDetailFrame:IsVisible() and (GuildFrame.previousSelectedGuildMember and (GuildFrame.previousSelectedGuildMember == GuildFrame.selectedGuildMember)) ) then
- GuildMemberDetailFrame:Hide();
- GuildFrame.selectedGuildMember = 0;
- SetGuildRosterSelection(0);
- else
- GuildFramePopup_Show(GuildMemberDetailFrame);
- end
- GuildStatus_Update();
- else
- local guildIndex = self.guildIndex;
- local name, rank, rankIndex, level, class, zone, note, officernote, online = GetGuildRosterInfo(guildIndex);
- FriendsFrame_ShowDropdown(name, online);
- end
-end
-
-function GuildStatus_Update()
- -- Set the tab
- PanelTemplates_SetTab(FriendsFrame, 3);
- -- Show the frame
- ShowUIPanel(FriendsFrame);
- -- Number of players in the lowest rank
- FriendsFrame.playersInBotRank = 0
-
- local totalMembers, onlineMembers, onlineAndMobileMembers = GetNumGuildMembers();
- local numGuildMembers = 0;
- local showOffline = GetGuildRosterShowOffline();
- if (showOffline) then
- numGuildMembers = totalMembers;
- else
- numGuildMembers = onlineMembers;
- end
- local name, isAway;
- local fullName, rank, rankIndex, level, class, zone, note, officernote, online;
- local guildName, guildRankName, guildRankIndex = GetGuildInfo("player");
- local maxRankIndex = GuildControlGetNumRanks() - 1;
- local button;
- local onlinecount = 0;
- local guildIndex;
-
- -- Get selected guild member info
- fullName, rank, rankIndex, level, class, zone, note, officernote, online = GetGuildRosterInfo(GetGuildRosterSelection());
- GuildFrame.selectedName = fullName;
- -- If there's a selected guildmember
- if ( GetGuildRosterSelection() > 0 ) then
- local displayedName = Ambiguate(fullName, "guild");
- -- Update the guild member details frame
- GuildMemberDetailName:SetText(displayedName);
- GuildMemberDetailLevel:SetText(format(FRIENDS_LEVEL_TEMPLATE, level, class));
- GuildMemberDetailZoneText:SetText(zone);
- GuildMemberDetailRankText:SetText(rank);
- if ( online ) then
- GuildMemberDetailOnlineText:SetText(GUILD_ONLINE_LABEL);
- else
- GuildMemberDetailOnlineText:SetText(GuildFrame_GetLastOnline(GetGuildRosterSelection()));
- end
- -- Update public note
- if ( CanEditPublicNote() ) then
- PersonalNoteText:SetTextColor(1.0, 1.0, 1.0);
- if ( (not note) or (note == "") ) then
- note = GUILD_NOTE_EDITLABEL;
- end
- else
- PersonalNoteText:SetTextColor(0.65, 0.65, 0.65);
- end
- GuildMemberNoteBackground:EnableMouse(CanEditPublicNote());
- PersonalNoteText:SetText(note);
- -- Update officer note
- if ( C_GuildInfo.CanViewOfficerNote() ) then
- if ( C_GuildInfo.CanEditOfficerNote() ) then
- if ( (not officernote) or (officernote == "") ) then
- officernote = GUILD_OFFICERNOTE_EDITLABEL;
- end
- OfficerNoteText:SetTextColor(1.0, 1.0, 1.0);
- else
- OfficerNoteText:SetTextColor(0.65, 0.65, 0.65);
- end
- GuildMemberOfficerNoteBackground:EnableMouse(C_GuildInfo.CanEditOfficerNote());
- OfficerNoteText:SetText(officernote);
-
- -- Resize detail frame
- GuildMemberDetailOfficerNoteLabel:Show();
- GuildMemberOfficerNoteBackground:Show();
- GuildMemberDetailFrame:SetHeight(GUILD_DETAIL_OFFICER_HEIGHT);
- else
- GuildMemberDetailOfficerNoteLabel:Hide();
- GuildMemberOfficerNoteBackground:Hide();
- GuildMemberDetailFrame:SetHeight(GUILD_DETAIL_NORM_HEIGHT);
- end
-
- -- Manage guild member related buttons
- if ( CanGuildPromote() and ( rankIndex > 1 ) and ( rankIndex > (guildRankIndex + 1) ) ) then
- GuildFramePromoteButton:Enable();
- else
- GuildFramePromoteButton:Disable();
- end
- if ( CanGuildDemote() and ( rankIndex >= 1 ) and ( rankIndex > guildRankIndex ) and ( rankIndex ~= maxRankIndex ) ) then
- GuildFrameDemoteButton:Enable();
- else
- GuildFrameDemoteButton:Disable();
- end
- -- Hide promote/demote buttons if both disabled
- if ( not GuildFrameDemoteButton:IsEnabled() and not GuildFramePromoteButton:IsEnabled() ) then
- GuildFramePromoteButton:Hide();
- GuildFrameDemoteButton:Hide();
- GuildMemberDetailRankText:SetPoint("RIGHT", "GuildMemberDetailFrame", "RIGHT", -10, 0);
- else
- GuildFramePromoteButton:Show();
- GuildFrameDemoteButton:Show();
- GuildMemberDetailRankText:SetPoint("RIGHT", "GuildFramePromoteButton", "LEFT", 3, 0);
- end
- if ( CanGuildRemove() and ( rankIndex >= 1 ) and ( rankIndex > guildRankIndex ) ) then
- GuildMemberRemoveButton:Enable();
- else
- GuildMemberRemoveButton:Disable();
- end
- if ( (UnitName("player") == displayedName) or (not online) ) then
- GuildMemberGroupInviteButton:Disable();
- else
- GuildMemberGroupInviteButton:Enable();
- end
-
- GuildFrame.selectedName = GetGuildRosterInfo(GetGuildRosterSelection());
- end
-
- -- Message of the day stuff
- local guildMOTD = GetGuildRosterMOTD();
- if ( CanEditMOTD() ) then
- if ( (not guildMOTD) or (guildMOTD == "") ) then
- --guildMOTD = GUILD_MOTD_EDITLABEL; -- A bug in the 1.12 lua code caused this to never actually appear.
- end
- GuildFrameNotesText:SetTextColor(1.0, 1.0, 1.0);
- GuildMOTDEditButton:Enable();
- else
- GuildFrameNotesText:SetTextColor(0.65, 0.65, 0.65);
- GuildMOTDEditButton:Disable();
- end
- GuildFrameNotesText:SetText(guildMOTD);
-
- -- Scrollbar stuff
- local showScrollBar = nil;
- if ( numGuildMembers > GUILDMEMBERS_TO_DISPLAY ) then
- showScrollBar = 1;
- end
-
- -- Get number of online members
- for i=1, numGuildMembers, 1 do
- name, rank, rankIndex, level, class, zone, note, officernote, online = GetGuildRosterInfo(i);
- if ( online ) then
- onlinecount = onlinecount + 1;
- end
- if ( rankIndex == maxRankIndex ) then
- FriendsFrame.playersInBotRank = FriendsFrame.playersInBotRank + 1;
- end
- end
- GuildFrameTotals:SetText(format(GetText("GUILD_TOTAL", nil, numGuildMembers), numGuildMembers));
- GuildFrameOnlineTotals:SetText(format(GUILD_TOTALONLINE, onlineMembers));
-
- -- Update global guild frame buttons
- if ( IsGuildLeader() ) then
- GuildFrameControlButton:Enable();
- else
- GuildFrameControlButton:Disable();
- end
- if ( CanGuildInvite() ) then
- GuildFrameAddMemberButton:Enable();
- else
- GuildFrameAddMemberButton:Disable();
- end
-
-
- if ( FriendsFrame.playerStatusFrame ) then
- -- Player specific info
- local guildOffset = FauxScrollFrame_GetOffset(GuildListScrollFrame);
-
- for i=1, GUILDMEMBERS_TO_DISPLAY, 1 do
- guildIndex = guildOffset + i;
- button = getglobal("GuildFrameButton"..i);
- button.guildIndex = guildIndex;
-
- fullName, rank, rankIndex, level, class, zone, note, officernote, online = GetGuildRosterInfo(guildIndex);
- if (fullName and (showOffline or online)) then
- local displayedName = Ambiguate(fullName, "guild");
- getglobal("GuildFrameButton"..i.."Name"):SetText(displayedName);
- getglobal("GuildFrameButton"..i.."Zone"):SetText(zone);
- getglobal("GuildFrameButton"..i.."Level"):SetText(level);
- getglobal("GuildFrameButton"..i.."Class"):SetText(class);
- if ( not online ) then
- getglobal("GuildFrameButton"..i.."Name"):SetTextColor(0.5, 0.5, 0.5);
- getglobal("GuildFrameButton"..i.."Zone"):SetTextColor(0.5, 0.5, 0.5);
- getglobal("GuildFrameButton"..i.."Level"):SetTextColor(0.5, 0.5, 0.5);
- getglobal("GuildFrameButton"..i.."Class"):SetTextColor(0.5, 0.5, 0.5);
- else
- getglobal("GuildFrameButton"..i.."Name"):SetTextColor(1.0, 0.82, 0.0);
- getglobal("GuildFrameButton"..i.."Zone"):SetTextColor(1.0, 1.0, 1.0);
- getglobal("GuildFrameButton"..i.."Level"):SetTextColor(1.0, 1.0, 1.0);
- getglobal("GuildFrameButton"..i.."Class"):SetTextColor(1.0, 1.0, 1.0);
- end
- else
- getglobal("GuildFrameButton"..i.."Name"):SetText(nil);
- getglobal("GuildFrameButton"..i.."Zone"):SetText(nil);
- getglobal("GuildFrameButton"..i.."Level"):SetText(nil);
- getglobal("GuildFrameButton"..i.."Class"):SetText(nil);
- end
-
- -- If need scrollbar resize columns
- if ( showScrollBar ) then
- getglobal("GuildFrameButton"..i.."Zone"):SetWidth(95);
- getglobal("GuildFrameButton"..i.."Class"):SetWidth(80);
- else
- getglobal("GuildFrameButton"..i.."Zone"):SetWidth(110);
- end
-
- -- Highlight the correct who
- if ( GetGuildRosterSelection() == guildIndex ) then
- button:LockHighlight();
- else
- button:UnlockHighlight();
- end
-
- if ( guildIndex > numGuildMembers ) then
- button:Hide();
- else
- button:Show();
- end
- end
-
- -- GuildFrameGuildListToggleButton:SetText(PLAYER_STATUS);
- -- If need scrollbar resize column headers
- if ( showScrollBar ) then
- WhoFrameColumn_SetWidth(GuildFrameColumnHeader2, 105);
- GuildFrameGuildListToggleButton:SetPoint("LEFT", "GuildFrame", "LEFT", 272, -98);
- else
- WhoFrameColumn_SetWidth(GuildFrameColumnHeader2, 120);
- GuildFrameGuildListToggleButton:SetPoint("LEFT", "GuildFrame", "LEFT", 295, -98);
- end
- -- ScrollFrame update
- FauxScrollFrame_Update(GuildListScrollFrame, numGuildMembers, GUILDMEMBERS_TO_DISPLAY, FRIENDS_FRAME_GUILD_HEIGHT );
-
- GuildPlayerStatusFrame:Show();
- GuildStatusFrame:Hide();
- else
- -- Guild specific info
- local year, month, day, hour;
- local yearlabel, monthlabel, daylabel, hourlabel;
- local guildOffset = FauxScrollFrame_GetOffset(GuildListScrollFrame);
-
- for i=1, GUILDMEMBERS_TO_DISPLAY, 1 do
- guildIndex = guildOffset + i;
- button = getglobal("GuildFrameGuildStatusButton"..i);
- button.guildIndex = guildIndex;
-
- fullName, rank, rankIndex, level, class, zone, note, officernote, online, isAway = GetGuildRosterInfo(guildIndex);
- if (fullName and (showOffline or online)) then
- local displayedName = Ambiguate(fullName, "guild");
- getglobal("GuildFrameGuildStatusButton"..i.."Name"):SetText(displayedName);
- getglobal("GuildFrameGuildStatusButton"..i.."Rank"):SetText(rank);
- getglobal("GuildFrameGuildStatusButton"..i.."Note"):SetText(note);
-
- if ( online ) then
- if ( isAway == 2 ) then
- getglobal("GuildFrameGuildStatusButton"..i.."Online"):SetText(CHAT_FLAG_DND);
- elseif ( isAway == 1 ) then
- getglobal("GuildFrameGuildStatusButton"..i.."Online"):SetText(CHAT_FLAG_AFK);
- else
- getglobal("GuildFrameGuildStatusButton"..i.."Online"):SetText(GUILD_ONLINE_LABEL);
- end
-
- getglobal("GuildFrameGuildStatusButton"..i.."Name"):SetTextColor(1.0, 0.82, 0.0);
- getglobal("GuildFrameGuildStatusButton"..i.."Rank"):SetTextColor(1.0, 1.0, 1.0);
- getglobal("GuildFrameGuildStatusButton"..i.."Note"):SetTextColor(1.0, 1.0, 1.0);
- getglobal("GuildFrameGuildStatusButton"..i.."Online"):SetTextColor(1.0, 1.0, 1.0);
- else
- getglobal("GuildFrameGuildStatusButton"..i.."Online"):SetText(GuildFrame_GetLastOnline(guildIndex));
- getglobal("GuildFrameGuildStatusButton"..i.."Name"):SetTextColor(0.5, 0.5, 0.5);
- getglobal("GuildFrameGuildStatusButton"..i.."Rank"):SetTextColor(0.5, 0.5, 0.5);
- getglobal("GuildFrameGuildStatusButton"..i.."Note"):SetTextColor(0.5, 0.5, 0.5);
- getglobal("GuildFrameGuildStatusButton"..i.."Online"):SetTextColor(0.5, 0.5, 0.5);
- end
- else
- getglobal("GuildFrameGuildStatusButton"..i.."Name"):SetText(nil);
- getglobal("GuildFrameGuildStatusButton"..i.."Rank"):SetText(nil);
- getglobal("GuildFrameGuildStatusButton"..i.."Note"):SetText(nil);
- getglobal("GuildFrameGuildStatusButton"..i.."Online"):SetText(nil);
- end
-
- -- If need scrollbar resize columns
- if ( showScrollBar ) then
- getglobal("GuildFrameGuildStatusButton"..i.."Note"):SetWidth(70);
- else
- getglobal("GuildFrameGuildStatusButton"..i.."Note"):SetWidth(85);
- end
-
- -- Highlight the correct who
- if ( GetGuildRosterSelection() == guildIndex ) then
- button:LockHighlight();
- else
- button:UnlockHighlight();
- end
-
- if ( guildIndex > numGuildMembers ) then
- button:Hide();
- else
- button:Show();
- end
- end
-
- -- GuildFrameGuildListToggleButton:SetText(GUILD_STATUS);
- -- If need scrollbar resize columns
- if ( showScrollBar ) then
- WhoFrameColumn_SetWidth(GuildFrameGuildStatusColumnHeader3, 75);
- GuildFrameGuildListToggleButton:SetPoint("LEFT", "GuildFrame", "LEFT", 272, -98);
- else
- WhoFrameColumn_SetWidth(GuildFrameGuildStatusColumnHeader3, 90);
- GuildFrameGuildListToggleButton:SetPoint("LEFT", "GuildFrame", "LEFT", 295, -98);
- end
-
- -- ScrollFrame update
- FauxScrollFrame_Update(GuildListScrollFrame, numGuildMembers, GUILDMEMBERS_TO_DISPLAY, FRIENDS_FRAME_GUILD_HEIGHT );
-
- GuildPlayerStatusFrame:Hide();
- GuildStatusFrame:Show();
- end
-end
\ No newline at end of file
diff --git a/Interface/AddOns/Blizzard_UIPanels_Game/Wrath/QuestMapFrame.lua b/Interface/AddOns/Blizzard_UIPanels_Game/Wrath/QuestMapFrame.lua
index 5077fb2d33..f8553025c0 100644
--- a/Interface/AddOns/Blizzard_UIPanels_Game/Wrath/QuestMapFrame.lua
+++ b/Interface/AddOns/Blizzard_UIPanels_Game/Wrath/QuestMapFrame.lua
@@ -450,8 +450,8 @@ function QuestMapFrame_CloseQuestDetails(optPortraitOwnerCheckFrame)
StaticPopup_Hide("ABANDON_QUEST_WITH_ITEMS");
end
-function QuestMapFrame_PingQuestID(questId)
- QuestMapFrame:GetParent():PingQuestID(questId);
+function QuestMapFrame_PingQuestID(questID)
+ QuestMapFrame:GetParent():PingQuestID(questID);
end
function QuestMapFrame_OpenToQuestDetails(questID)
diff --git a/Interface/AddOns/Blizzard_UIPanels_Game/Wrath/WatchFrame.lua b/Interface/AddOns/Blizzard_UIPanels_Game/Wrath/WatchFrame.lua
index 44df2a97e4..a7aa29b10a 100644
--- a/Interface/AddOns/Blizzard_UIPanels_Game/Wrath/WatchFrame.lua
+++ b/Interface/AddOns/Blizzard_UIPanels_Game/Wrath/WatchFrame.lua
@@ -83,30 +83,31 @@ local function WatchFrame_ReleaseUnusedLinkButtons ()
end
end
-function WatchFrameLinkButtonTemplate_ShowContextMenu()
+function WatchFrameLinkButtonTemplate_ShowContextMenu(self, button)
MenuUtil.CreateContextMenu(self, function(owner, rootDescription)
rootDescription:SetTag("MENU_WATCH_FRAME_LINK");
if ( self.type == "QUEST" ) then
local questLogIndex = GetQuestIndexForWatch(self.index);
- rootDescription:CreateTitle(GetQuestLogTitle(questLogIndex));
+ local questTitle = GetQuestLogTitle(questLogIndex);
+ rootDescription:CreateTitle(questTitle);
rootDescription:CreateButton(OBJECTIVES_VIEW_IN_QUESTLOG, function()
- WatchFrame_OpenQuestLog(self.index, true);
+ WatchFrame_OpenQuestLog(button, self.index, true);
end);
rootDescription:CreateButton(OBJECTIVES_STOP_TRACKING, function()
- WatchFrame_StopTrackingQuest(self.index);
+ WatchFrame_StopTrackingQuest(button, self.index);
end);
if ( GetQuestLogPushable(GetQuestIndexForWatch(self.index)) and ( GetNumGroupMembers() > 0 ) ) then
rootDescription:CreateButton(SHARE_QUEST, function()
- WatchFrame_ShareQuest(self.index);
+ WatchFrame_ShareQuest(button, self.index);
end);
end
if ( WatchFrame.showObjectives ) then
rootDescription:CreateButton(OBJECTIVES_SHOW_QUEST_MAP, function()
- WatchFrame_OpenMapToQuest(self.index);
+ WatchFrame_OpenMapToQuest(button, self.index);
end);
end
local numVisibleWatches = #VISIBLE_WATCHES;
@@ -114,20 +115,20 @@ function WatchFrameLinkButtonTemplate_ShowContextMenu()
local visibleIndex = WatchFrame_GetVisibleIndex(questLogIndex);
if ( visibleIndex > 1 ) then
rootDescription:CreateButton(TRACKER_SORT_MANUAL_UP, function()
- WatchFrame_MoveQuest(questLogIndex, -1);
+ WatchFrame_MoveQuest(button, questLogIndex, -1);
end);
rootDescription:CreateButton(TRACKER_SORT_MANUAL_TOP, function()
- WatchFrame_MoveQuest(questLogIndex, -100);
+ WatchFrame_MoveQuest(button, questLogIndex, -100);
end);
end
if ( visibleIndex < numVisibleWatches ) then
rootDescription:CreateButton(TRACKER_SORT_MANUAL_DOWN, function()
- WatchFrame_MoveQuest(questLogIndex, 1);
+ WatchFrame_MoveQuest(button, questLogIndex, 1);
end);
rootDescription:CreateButton(TRACKER_SORT_MANUAL_BOTTOM, function()
- WatchFrame_MoveQuest(questLogIndex, 100);
+ WatchFrame_MoveQuest(button, questLogIndex, 100);
end);
end
end
@@ -137,11 +138,11 @@ function WatchFrameLinkButtonTemplate_ShowContextMenu()
rootDescription:CreateTitle(achievementName);
rootDescription:CreateButton(OBJECTIVES_VIEW_ACHIEVEMENT, function()
- WatchFrame_OpenAchievementFrame(self.index);
+ WatchFrame_OpenAchievementFrame(button, self.index);
end);
rootDescription:CreateButton(OBJECTIVES_STOP_TRACKING, function()
- WatchFrame_StopTrackingAchievement(self.index);
+ WatchFrame_StopTrackingAchievement(button, self.index);
end);
end
end);
@@ -164,7 +165,7 @@ function WatchFrameLinkButtonTemplate_OnClick (self, button, pushed)
elseif ( button ~= "RightButton" ) then
WatchFrameLinkButtonTemplate_OnLeftClick(self, button);
else
- WatchFrameLinkButtonTemplate_ShowContextMenu(self);
+ WatchFrameLinkButtonTemplate_ShowContextMenu(self, button);
end
end
@@ -349,8 +350,8 @@ function WatchFrame_OnEvent (self, event, ...)
-- WATCHFRAME_FILTER_TYPE = 4;
-- WATCHFRAME_SORT_TYPE = 0;
elseif ( event == "QUEST_AUTOCOMPLETE" ) then
- local questId = ...;
- if (WatchFrameAutoQuest_AddPopUp(questId, "COMPLETE")) then
+ local questID = ...;
+ if (WatchFrameAutoQuest_AddPopUp(questID, "COMPLETE")) then
PlaySound(SOUNDKIT.UI_AUTO_QUEST_COMPLETE);
end
end
@@ -1305,18 +1306,18 @@ function WatchFrame_GetCurrentMapQuests()
local numQuests = QuestMapUpdateAllQuests();
table.wipe(CURRENT_MAP_QUESTS);
for i = 1, numQuests do
- local questId = QuestPOIGetQuestIDByVisibleIndex(i);
- CURRENT_MAP_QUESTS[questId] = i;
+ local questID = QuestPOIGetQuestIDByVisibleIndex(i);
+ CURRENT_MAP_QUESTS[questID] = i;
end
end
function WatchFrameQuestPOI_OnClick(self, button)
- QuestPOI_SelectButtonByQuestId(WatchFrameLines, self.questId);
+ QuestPOI_SelectButtonByQuestId(WatchFrameLines, self.questID);
if ( WorldMapFrame:IsShown() ) then
- WorldMapFrame_SelectQuestById(self.questId);
- QuestPOI_SelectButtonByQuestID(WorldMapFrame, questID)
+ WorldMapFrame_SelectQuestById(self.questID);
+ QuestPOI_SelectButtonByQuestID(WorldMapFrame, self.questID)
end
- --SetSuperTrackedQuestID(self.questId);
+ --SetSuperTrackedQuestID(self.questID);
PlaySound("igMainMenuOptionCheckBoxOn");
end
@@ -1463,7 +1464,7 @@ function WatchFrameAutoQuest_DisplayAutoQuestPopUps(lineFrame, nextAnchor, maxHe
frame:ClearAllPoints();
frame:SetParent(lineFrame);
- if (not frame.questId) then
+ if (not frame.questID) then
-- Only show the animation for new notifications
frame.ScrollChild.Flash:Hide();
WatchFrameAutoQuest_SlideIn(frame, 0.4);
@@ -1476,7 +1477,7 @@ function WatchFrameAutoQuest_DisplayAutoQuestPopUps(lineFrame, nextAnchor, maxHe
frame.ScrollChild.BottomText:Hide();
frame.ScrollChild.TopText:SetPoint("TOP", 0, -12);
frame.ScrollChild.QuestName:SetPoint("TOP", 0, -32);
- if (frame.questId and frame.type=="OFFER") then
+ if (frame.questID and frame.type=="OFFER") then
frame.ScrollChild.Flash:Show();
end
frame.type="COMPLETED";
@@ -1507,7 +1508,7 @@ function WatchFrameAutoQuest_DisplayAutoQuestPopUps(lineFrame, nextAnchor, maxHe
frame:SetPoint("LEFT", lineFrame, "LEFT", -30, 0);
frame.ScrollChild.QuestName:SetText(questTitle);
- frame.questId = questID;
+ frame.questID = questID;
maxWidth = max(maxWidth, frame:GetWidth());
nextAnchor = frame;
@@ -1516,7 +1517,7 @@ function WatchFrameAutoQuest_DisplayAutoQuestPopUps(lineFrame, nextAnchor, maxHe
end
for i=numPopUps+1, numPopUpFrames do
- _G["WatchFrameAutoQuestPopUp"..i].questId = nil;
+ _G["WatchFrameAutoQuestPopUp"..i].questID = nil;
_G["WatchFrameAutoQuestPopUp"..i]:Hide();
end
@@ -1579,8 +1580,8 @@ function WatchFrameAutoQuest_SlideIn(frame, slideInTime)
frame:SetScript("OnUpdate", WatchFrameAutoQuest_OnUpdate);
end
-function WatchFrameAutoQuest_AddPopUp(questId, type)
- if (AddAutoQuestPopUp(questId, type)) then
+function WatchFrameAutoQuest_AddPopUp(questID, type)
+ if (AddAutoQuestPopUp(questID, type)) then
WatchFrame_Update(WatchFrame);
WatchFrame_Expand(WatchFrame);
return true;
@@ -1588,12 +1589,12 @@ function WatchFrameAutoQuest_AddPopUp(questId, type)
return false;
end
-function WatchFrameAutoQuest_ClearPopUp(questId)
- RemoveAutoQuestPopUp(questId);
+function WatchFrameAutoQuest_ClearPopUp(questID)
+ RemoveAutoQuestPopUp(questID);
WatchFrame_Update(WatchFrame);
end
function WatchFrameAutoQuest_ClearPopUpByLogIndex(questIndex)
- local questId = select(9, GetQuestLogTitle(questIndex));
- WatchFrameAutoQuest_ClearPopUp(questId);
+ local questID = select(9, GetQuestLogTitle(questIndex));
+ WatchFrameAutoQuest_ClearPopUp(questID);
end
\ No newline at end of file
diff --git a/Interface/AddOns/Blizzard_UIPanels_Game/Wrath/WatchFrame.xml b/Interface/AddOns/Blizzard_UIPanels_Game/Wrath/WatchFrame.xml
index 6d92855dca..e26d8220ae 100644
--- a/Interface/AddOns/Blizzard_UIPanels_Game/Wrath/WatchFrame.xml
+++ b/Interface/AddOns/Blizzard_UIPanels_Game/Wrath/WatchFrame.xml
@@ -286,11 +286,11 @@
if (self.type == "OFFER") then
- ShowQuestOffer(GetQuestLogIndexByID(self.questId));
+ ShowQuestOffer(GetQuestLogIndexByID(self.questID));
else
- ShowQuestComplete(GetQuestLogIndexByID(self.questId));
+ ShowQuestComplete(GetQuestLogIndexByID(self.questID));
end
- WatchFrameAutoQuest_ClearPopUp(self.questId);
+ WatchFrameAutoQuest_ClearPopUp(self.questID);
self:SetHorizontalScroll(-28.5);
diff --git a/Interface/AddOns/Blizzard_UIParent/Cata/UIParent.lua b/Interface/AddOns/Blizzard_UIParent/Cata/UIParent.lua
index ed29297538..009c21fff3 100644
--- a/Interface/AddOns/Blizzard_UIParent/Cata/UIParent.lua
+++ b/Interface/AddOns/Blizzard_UIParent/Cata/UIParent.lua
@@ -34,12 +34,7 @@ WORLD_QUEST_QUALITY_COLORS = {
[LE_WORLD_QUEST_QUALITY_EPIC] = ITEM_QUALITY_COLORS[LE_ITEM_QUALITY_EPIC];
};
--- Protecting from addons since we use this in GetScaledCursorDelta which is used in secure code.
-local _UIParentGetEffectiveScale;
-local _UIParentRef;
function UIParent_OnLoad(self)
- _UIParentGetEffectiveScale = self.GetEffectiveScale;
- _UIParentRef = self;
self:RegisterEvent("PLAYER_LOGIN");
self:RegisterEvent("PLAYER_DEAD");
self:RegisterEvent("SELF_RES_SPELL_CHANGED");
@@ -493,6 +488,11 @@ function ToggleGuildFrame()
return;
end
+ if(C_CVar.GetCVarBool("useClassicGuildUI")) then
+ ToggleFriendsFrame(FRIEND_TAB_GUILD);
+ return;
+ end
+
local factionGroup = UnitFactionGroup("player");
if (factionGroup == "Neutral") then
return;
@@ -1766,7 +1766,7 @@ function GetScaledCursorPosition()
end
function GetScaledCursorDelta()
- local uiScale = _UIParentGetEffectiveScale(_UIParentRef);
+ local uiScale = GetAppropriateTopLevelParent():GetEffectiveScale();
local x, y = GetCursorDelta();
return x / uiScale, y / uiScale;
end
diff --git a/Interface/AddOns/Blizzard_UIParent/Shared/UIParent.lua b/Interface/AddOns/Blizzard_UIParent/Shared/UIParent.lua
index a9fa9ab59d..b97860bb85 100644
--- a/Interface/AddOns/Blizzard_UIParent/Shared/UIParent.lua
+++ b/Interface/AddOns/Blizzard_UIParent/Shared/UIParent.lua
@@ -7,4 +7,16 @@ function OpenAchievementFrameToAchievement(achievementID)
end
AchievementFrame_SelectAchievement(achievementID);
+end
+
+function ToggleLFGFrame()
+ if (C_LFGList.GetPremadeGroupFinderStyle() == Enum.PremadeGroupFinderStyle.Vanilla) then
+ if (not C_AddOns.IsAddOnLoaded("Blizzard_GroupFinder_VanillaStyle")) then
+ return;
+ end
+
+ ToggleLFGParentFrame();
+ else
+ PVEFrame_ToggleFrame();
+ end
end
\ No newline at end of file
diff --git a/Interface/AddOns/Blizzard_UIParent/TBC/UIParent.lua b/Interface/AddOns/Blizzard_UIParent/TBC/UIParent.lua
index f2c401319f..f2a6f20e31 100644
--- a/Interface/AddOns/Blizzard_UIParent/TBC/UIParent.lua
+++ b/Interface/AddOns/Blizzard_UIParent/TBC/UIParent.lua
@@ -59,12 +59,7 @@ WORLD_QUEST_QUALITY_COLORS = {
[LE_WORLD_QUEST_QUALITY_EPIC] = ITEM_QUALITY_COLORS[LE_ITEM_QUALITY_EPIC];
};
--- Protecting from addons since we use this in GetScaledCursorDelta which is used in secure code.
-local _UIParentGetEffectiveScale;
-local _UIParentRef;
function UIParent_OnLoad(self)
- _UIParentGetEffectiveScale = self.GetEffectiveScale;
- _UIParentRef = self;
self:RegisterEvent("PLAYER_LOGIN");
self:RegisterEvent("PLAYER_DEAD");
self:RegisterEvent("SELF_RES_SPELL_CHANGED");
@@ -429,6 +424,11 @@ function ToggleGuildFrame()
return;
end
+ if(C_CVar.GetCVarBool("useClassicGuildUI")) then
+ ToggleFriendsFrame(FRIEND_TAB_GUILD);
+ return;
+ end
+
local factionGroup = UnitFactionGroup("player");
if (factionGroup == "Neutral") then
return;
@@ -1603,7 +1603,7 @@ function GetScaledCursorPosition()
end
function GetScaledCursorDelta()
- local uiScale = _UIParentGetEffectiveScale(_UIParentRef);
+ local uiScale = GetAppropriateTopLevelParent():GetEffectiveScale();
local x, y = GetCursorDelta();
return x / uiScale, y / uiScale;
end
@@ -2713,14 +2713,8 @@ function DisplayInterfaceActionBlockedMessage()
end
-- Set the overall UI state to show or not show the LFG UI.
function SetLookingForGroupUIAvailable(available)
- if (available) then
- WorldMapMicroButton:Hide();
- LFGMicroButton:Show();
- MiniMapWorldMapButton:Show();
- else
- WorldMapMicroButton:Show();
- LFGMicroButton:Hide();
- MiniMapWorldMapButton:Hide();
+ if (available and C_LFGList.GetPremadeGroupFinderStyle() == Enum.PremadeGroupFinderStyle.Vanilla) then
+ UIParentLoadAddOn("Blizzard_GroupFinder_VanillaStyle");
end
end
diff --git a/Interface/AddOns/Blizzard_UIParent/Vanilla/UIParent.lua b/Interface/AddOns/Blizzard_UIParent/Vanilla/UIParent.lua
index 4e3f43cc70..b1399fef89 100644
--- a/Interface/AddOns/Blizzard_UIParent/Vanilla/UIParent.lua
+++ b/Interface/AddOns/Blizzard_UIParent/Vanilla/UIParent.lua
@@ -34,12 +34,7 @@ WORLD_QUEST_QUALITY_COLORS = {
[LE_WORLD_QUEST_QUALITY_EPIC] = ITEM_QUALITY_COLORS[LE_ITEM_QUALITY_EPIC];
};
--- Protecting from addons since we use this in GetScaledCursorDelta which is used in secure code.
-local _UIParentGetEffectiveScale;
-local _UIParentRef;
function UIParent_OnLoad(self)
- _UIParentGetEffectiveScale = self.GetEffectiveScale;
- _UIParentRef = self;
self:RegisterEvent("PLAYER_LOGIN");
self:RegisterEvent("PLAYER_DEAD");
self:RegisterEvent("SELF_RES_SPELL_CHANGED");
@@ -388,6 +383,11 @@ function ToggleGuildFrame()
return;
end
+ if(C_CVar.GetCVarBool("useClassicGuildUI")) then
+ ToggleFriendsFrame(FRIEND_TAB_GUILD);
+ return;
+ end
+
local factionGroup = UnitFactionGroup("player");
if (factionGroup == "Neutral") then
return;
@@ -1580,7 +1580,7 @@ function GetScaledCursorPosition()
end
function GetScaledCursorDelta()
- local uiScale = _UIParentGetEffectiveScale(_UIParentRef);
+ local uiScale = GetAppropriateTopLevelParent():GetEffectiveScale();
local x, y = GetCursorDelta();
return x / uiScale, y / uiScale;
end
@@ -2692,16 +2692,8 @@ end
-- Set the overall UI state to show or not show the LFG UI.
function SetLookingForGroupUIAvailable(available)
- if (available) then
- WorldMapMicroButton:Hide()
- LFGMicroButton:Show();
- MiniMapWorldMapButton:Show();
- MiniMapTracking:SetPoint("TOPLEFT", -24, -24);
- else
- WorldMapMicroButton:Show()
- LFGMicroButton:Hide();
- MiniMapWorldMapButton:Hide();
- MiniMapTracking:SetPoint("TOPLEFT", -15, 0);
+ if (available and C_LFGList.GetPremadeGroupFinderStyle() == Enum.PremadeGroupFinderStyle.Vanilla) then
+ UIParentLoadAddOn("Blizzard_GroupFinder_VanillaStyle");
end
end
diff --git a/Interface/AddOns/Blizzard_UIParent/Wrath/UIParent.lua b/Interface/AddOns/Blizzard_UIParent/Wrath/UIParent.lua
index cfecbb7305..46b0686447 100644
--- a/Interface/AddOns/Blizzard_UIParent/Wrath/UIParent.lua
+++ b/Interface/AddOns/Blizzard_UIParent/Wrath/UIParent.lua
@@ -34,12 +34,7 @@ WORLD_QUEST_QUALITY_COLORS = {
[LE_WORLD_QUEST_QUALITY_EPIC] = ITEM_QUALITY_COLORS[LE_ITEM_QUALITY_EPIC];
};
--- Protecting from addons since we use this in GetScaledCursorDelta which is used in secure code.
-local _UIParentGetEffectiveScale;
-local _UIParentRef;
function UIParent_OnLoad(self)
- _UIParentGetEffectiveScale = self.GetEffectiveScale;
- _UIParentRef = self;
self:RegisterEvent("PLAYER_LOGIN");
self:RegisterEvent("PLAYER_DEAD");
self:RegisterEvent("SELF_RES_SPELL_CHANGED");
@@ -475,6 +470,11 @@ function ToggleGuildFrame()
return;
end
+ if(C_CVar.GetCVarBool("useClassicGuildUI")) then
+ ToggleFriendsFrame(FRIEND_TAB_GUILD);
+ return;
+ end
+
local factionGroup = UnitFactionGroup("player");
if (factionGroup == "Neutral") then
return;
@@ -1704,7 +1704,7 @@ function GetScaledCursorPosition()
end
function GetScaledCursorDelta()
- local uiScale = _UIParentGetEffectiveScale(_UIParentRef);
+ local uiScale = GetAppropriateTopLevelParent():GetEffectiveScale();
local x, y = GetCursorDelta();
return x / uiScale, y / uiScale;
end
diff --git a/Interface/AddOns/Blizzard_UIParentPanelManager/Classic/UIParentPanelManager_Shared.lua b/Interface/AddOns/Blizzard_UIParentPanelManager/Classic/UIParentPanelManager_Shared.lua
index 2c657712ca..dab7ebb78f 100644
--- a/Interface/AddOns/Blizzard_UIParentPanelManager/Classic/UIParentPanelManager_Shared.lua
+++ b/Interface/AddOns/Blizzard_UIParentPanelManager/Classic/UIParentPanelManager_Shared.lua
@@ -928,7 +928,7 @@ function FramePositionDelegate:UIParentManageFramePositions()
end
else
if (SlidingActionBarTexture0 and SlidingActionBarTexture1) then
- if (PetActionBarFrame_IsAboveStance and PetActionBarFrame_IsAboveStance()) then
+ if ((MultiBarBottomRight and MultiBarBottomRight:IsShown()) or (PetActionBarFrame_IsAboveStance and PetActionBarFrame_IsAboveStance())) then
SlidingActionBarTexture0:Hide();
SlidingActionBarTexture1:Hide();
else
diff --git a/Interface/AddOns/Blizzard_UIWidgets/Classic/Blizzard_UIWidgetTemplateIconAndText.lua b/Interface/AddOns/Blizzard_UIWidgets/Classic/Blizzard_UIWidgetTemplateIconAndText.lua
index 50223545df..f1adfad1ce 100644
--- a/Interface/AddOns/Blizzard_UIWidgets/Classic/Blizzard_UIWidgetTemplateIconAndText.lua
+++ b/Interface/AddOns/Blizzard_UIWidgets/Classic/Blizzard_UIWidgetTemplateIconAndText.lua
@@ -16,23 +16,27 @@ local textureKitRegions = {
}
function UIWidgetTemplateIconAndTextMixin:OnAcquired(widgetInfo)
- self.Text:ClearAllPoints();
-
-- Because the icon does not span the entirety of its atlas tile, use magic numbers to offset the UI element.
local iconEmptySpaceWidthOffset = -12;
local iconEmptySpaceHeightOffset = -6;
+ local shiftText = (widgetInfo.shiftTextType == Enum.IconAndTextShiftTextType.ShiftText);
+
+ local widgetWidth = self.Text:GetStringWidth();
- if self.Icon:IsShown() then
+ if self.Icon:IsShown() or shiftText then
-- The icon offsets the text position.
+ widgetWidth = widgetWidth + self.Icon:GetWidth() + iconEmptySpaceWidthOffset;
self.Text:SetPoint("TOPLEFT", self.Icon, "TOPRIGHT", iconEmptySpaceWidthOffset, iconEmptySpaceHeightOffset);
- self.alignWidth = self.Icon:GetWidth() + iconEmptySpaceWidthOffset + self.Text:GetStringWidth();
else
-- The icon does not offset the text position.
self.Text:SetPoint("TOPLEFT", self.Icon, "TOPLEFT", 0, iconEmptySpaceHeightOffset);
- self.alignWidth = self.Text:GetStringWidth();
end
- self:SetWidth(self.alignWidth);
+ if(widgetInfo.widgetSizeSetting > 0) then
+ self:SetWidth(widgetInfo.widgetSizeSetting);
+ else
+ self:SetWidth(widgetWidth);
+ end
end
function UIWidgetTemplateIconAndTextMixin:Setup(widgetInfo)
diff --git a/Interface/AddOns/Blizzard_UIWidgets/Classic/Blizzard_UIWidgetTopCenterFrame.lua b/Interface/AddOns/Blizzard_UIWidgets/Classic/Blizzard_UIWidgetTopCenterFrame.lua
index 72659fab17..4af357670a 100644
--- a/Interface/AddOns/Blizzard_UIWidgets/Classic/Blizzard_UIWidgetTopCenterFrame.lua
+++ b/Interface/AddOns/Blizzard_UIWidgets/Classic/Blizzard_UIWidgetTopCenterFrame.lua
@@ -1,42 +1,20 @@
UIWidgetTopCenterContainerMixin = {}
local function WidgetsLayout(widgetContainer, sortedWidgets)
- -- Need to keep this at least width/height 1 because other frames anchor to it and trying to anchor to a frame of height 0 is undefined.
+ -- Need to keep this at least height 1 because other frames anchor to it and trying to anchor to a frame of height 0 is undefined.
local widgetsHeight = 1;
- local maxIconWidgetWidth = 1;
for index, widgetFrame in ipairs(sortedWidgets) do
- if widgetFrame.widgetType == Enum.UIWidgetVisualizationType.IconAndText then
- -- Align the widgets to the left of the container.
- local xOffset = 0;
- if not widgetFrame.Icon:IsShown() then
- -- Because the icon does not span the entirety of its atlas tile, use magic number to offset the UI element.
- local iconEmptySpaceWidthOffset = -12;
-
- -- Align all text elements in the vertical layout, even for entries with no icon.
- xOffset = widgetFrame.Icon:GetWidth() + iconEmptySpaceWidthOffset;
- end
- widgetFrame:SetPoint("LEFT", widgetContainer, "LEFT", xOffset, 0);
-
- -- Cache the largest icon widget width so it can be used to size the container and keep all rows visually centered.
- if widgetFrame.alignWidth > maxIconWidgetWidth then
- maxIconWidgetWidth = widgetFrame.alignWidth;
- end
- end
-
- -- Stack the widgets.
- if (index == 1) then
- widgetFrame:SetPoint("TOP", widgetContainer, "TOP");
+ -- Stack the widgets and center them on their container.
+ if ( index == 1 ) then
+ widgetFrame:SetPoint("TOP", widgetContainer, "TOP", 0, 0);
else
local relative = sortedWidgets[index - 1];
- widgetFrame:SetPoint("TOP", relative, "BOTTOM");
+ widgetFrame:SetPoint("TOP", relative, "BOTTOM", 0, 0);
end
widgetsHeight = widgetsHeight + widgetFrame:GetHeight();
end
-
- -- Size the container to its contents. This results in left-aligned rows appearing centered in the container.
- widgetContainer:SetWidth(maxIconWidgetWidth);
widgetContainer:SetHeight(widgetsHeight);
end
@@ -55,4 +33,4 @@ function UIWidgetTopCenterContainerMixin:SetSpectatorMode(spectatorMode, relativ
self:SetPoint("TOP", 0, -15);
self:SetScale(1.0);
end
-end
\ No newline at end of file
+end
diff --git a/Interface/AddOns/Blizzard_UnitPopup/Cataclysm/UnitPopupButtons.lua b/Interface/AddOns/Blizzard_UnitPopup/Cataclysm/UnitPopupButtons.lua
index 1e55f321cd..8fdc0287ff 100644
--- a/Interface/AddOns/Blizzard_UnitPopup/Cataclysm/UnitPopupButtons.lua
+++ b/Interface/AddOns/Blizzard_UnitPopup/Cataclysm/UnitPopupButtons.lua
@@ -265,15 +265,3 @@ end
function UnitPopupAchievementButtonMixin:OnClick(contextData)
InspectAchievements(contextData.unit);
end
-
-function UnitPopupSelectRoleButtonMixin:CanShow(contextData)
- if not CanShowSetRoleButton() then
- return false;
- end
-
- if not IsInGroup() then
- return false;
- end
-
- return UnitIsGroupLeader("player") or UnitIsGroupAssistant("player") or UnitIsUnit(contextData.unit, "player");
-end
\ No newline at end of file
diff --git a/Interface/AddOns/Blizzard_UnitPopup/Classic/UnitPopupButtons_Shared.lua b/Interface/AddOns/Blizzard_UnitPopup/Classic/UnitPopupButtons_Shared.lua
index e53a166a15..2a93dc3e51 100644
--- a/Interface/AddOns/Blizzard_UnitPopup/Classic/UnitPopupButtons_Shared.lua
+++ b/Interface/AddOns/Blizzard_UnitPopup/Classic/UnitPopupButtons_Shared.lua
@@ -245,27 +245,6 @@ function UnitPopupLootPromoteButtonMixin:OnClick(contextData)
SetLootMethod("master", UnitPopupSharedUtil.GetFullPlayerName(contextData), 2);
end
-function UnitPopupRafGrantLevelButtonMixin:GetText(contextData)
- return RAF_GRANT_LEVEL;
-end
-
-function UnitPopupRafGrantLevelButtonMixin:CanShow(contextData)
- return C_RecruitAFriend.IsReferAFriendLinked(contextData.unit)
-end
-
-function UnitPopupRafGrantLevelButtonMixin:IsEnabled(contextData)
- return C_RecruitAFriend.CanGrantLevel(contextData.unit)
-end
-
-function UnitPopupRafGrantLevelButtonMixin:OnClick(contextData)
- local isAlliedRace = UnitAlliedRaceInfo(contextData.unit);
- if isAlliedRace then
- StaticPopup_Show("RAF_GRANT_LEVEL_ALLIED_RACE", nil, nil, contextData.unit);
- else
- GrantLevel(contextData.unit);
- end
-end
-
-- Overrides
function UnitPopupRaidDifficulty1ButtonMixin:IsDisabled()
if IsInGroup(LE_PARTY_CATEGORY_INSTANCE) then
@@ -423,13 +402,13 @@ end
function UnitPopupRafSummonButtonMixin:CanShow(contextData)
local guid = UnitPopupSharedUtil.GetGUID(contextData);
- return guid and C_RecruitAFriend.IsReferAFriendLinked(guid);
+ return guid and C_RecruitAFriend.IsRecruitAFriendLinked(guid);
end
function UnitPopupRafSummonButtonMixin:OnClick(contextData)
local guid = UnitPopupSharedUtil.GetGUID(contextData);
- local name = UnitPopupSharedUtil.GetFullPlayerName(contextData);
- C_RecruitAFriend.SummonFriend(guid, name);
+ local fullName = UnitPopupSharedUtil.GetFullPlayerName(contextData);
+ C_RecruitAFriend.SummonFriend(guid, fullName);
end
function UnitPopupBnetTargetButtonMixin:IsEnabled(contextData)
@@ -598,4 +577,5 @@ end
function UnitPopupGuildInviteButtonMixin:CanShow()
return CanGuildInvite();
-end
\ No newline at end of file
+end
+
diff --git a/Interface/AddOns/Blizzard_UnitPopup/Vanilla/UnitPopupMenus.lua b/Interface/AddOns/Blizzard_UnitPopup/Vanilla/UnitPopupMenus.lua
index e897904065..78b3d837c8 100644
--- a/Interface/AddOns/Blizzard_UnitPopup/Vanilla/UnitPopupMenus.lua
+++ b/Interface/AddOns/Blizzard_UnitPopup/Vanilla/UnitPopupMenus.lua
@@ -17,6 +17,7 @@ function UnitPopupMenuSelf:GetEntries()
UnitPopupResetInstancesButtonMixin,
UnitPopupOtherSubsectionTitle,
UnitPopupVoiceChatButtonMixin,
+ UnitPopupSelectRoleButtonMixin,
UnitPopupMovePlayerFrameButtonMixin,
UnitPopupMoveTargetFrameButtonMixin,
UnitPopupPartyInstanceLeaveButtonMixin,
@@ -50,6 +51,7 @@ function UnitPopupMenuParty:GetEntries()
UnitPopupMenuFriendlyPlayerInteract, --This is a submenu
UnitPopupOtherSubsectionTitle,
UnitPopupVoiceChatButtonMixin,
+ UnitPopupSelectRoleButtonMixin,
UnitPopupMovePlayerFrameButtonMixin,
UnitPopupMoveTargetFrameButtonMixin,
UnitPopupReportGroupMemberButtonMixin,
@@ -84,6 +86,7 @@ function UnitPopupMenuRaidPlayer:GetEntries()
UnitPopupMenuFriendlyPlayerInteract, --This is a subMenu
UnitPopupOtherSubsectionTitle,
UnitPopupVoiceChatButtonMixin,
+ UnitPopupSelectRoleButtonMixin,
UnitPopupMovePlayerFrameButtonMixin,
UnitPopupMoveTargetFrameButtonMixin,
UnitPopupReportGroupMemberButtonMixin,
diff --git a/Interface/AddOns/Blizzard_UnitPopup/Wrath/UnitPopupButtons.lua b/Interface/AddOns/Blizzard_UnitPopup/Wrath/UnitPopupButtons.lua
index aab5085a47..e983aef2a1 100644
--- a/Interface/AddOns/Blizzard_UnitPopup/Wrath/UnitPopupButtons.lua
+++ b/Interface/AddOns/Blizzard_UnitPopup/Wrath/UnitPopupButtons.lua
@@ -266,22 +266,6 @@ function UnitPopupAchievementButtonMixin:OnClick(contextData)
InspectAchievements(contextData.unit);
end
-function UnitPopupSelectRoleButtonMixin:CanShow(contextData)
- if not IsInGroup() then
- return false;
- end
-
- return UnitIsGroupLeader("player") or UnitIsGroupAssistant("player") or UnitIsUnit(contextData.unit, "player");
-end
-
-function UnitPopupSelectRoleButtonMixin:GetEntries()
- return {
- UnitPopupSetRoleTankButton,
- UnitPopupSetRoleHealerButton,
- UnitPopupSetRoleDpsButton,
- }
-end
-
function UnitPopupSetRoleTankButton:IsEnabled()
return true;
end
diff --git a/Interface/AddOns/Blizzard_UnitPopup/Wrath/UnitPopupMenus.lua b/Interface/AddOns/Blizzard_UnitPopup/Wrath/UnitPopupMenus.lua
index a824f9a35c..94373bf7af 100644
--- a/Interface/AddOns/Blizzard_UnitPopup/Wrath/UnitPopupMenus.lua
+++ b/Interface/AddOns/Blizzard_UnitPopup/Wrath/UnitPopupMenus.lua
@@ -4,6 +4,7 @@ function UnitPopupMenuSelf:GetEntries()
UnitPopupSelectRoleButtonMixin,
UnitPopupRaidTargetButtonMixin,
UnitPopupSetFocusButtonMixin,
+ UnitPopupSelfHighlightSelectButtonMixin,
UnitPopupPvpFlagButtonMixin,
UnitPopupLootSubsectionTitle,
UnitPopupLootMethodButtonMixin,
diff --git a/Interface/AddOns/Blizzard_UnitPopupShared/UnitPopupShared.lua b/Interface/AddOns/Blizzard_UnitPopupShared/UnitPopupShared.lua
index dc06fd8d79..2dce5b41fe 100644
--- a/Interface/AddOns/Blizzard_UnitPopupShared/UnitPopupShared.lua
+++ b/Interface/AddOns/Blizzard_UnitPopupShared/UnitPopupShared.lua
@@ -103,7 +103,7 @@ function UnitPopupManager:OpenMenu(which, contextData)
local title, class = GetNameAndClass(contextData.unit, contextData.name);
frame.fontString:SetText(title);
- if class and not IsOnGlueScreen() then
+ if class and not C_Glue.IsOnGlueScreen() then
local colorCode = select(4, GetClassColor(class));
local color = CreateColorFromHexString(colorCode);
frame.fontString:SetTextColor(color:GetRGBA());
diff --git a/Interface/AddOns/Blizzard_UnitPopupShared/UnitPopupSharedButtonMixins.lua b/Interface/AddOns/Blizzard_UnitPopupShared/UnitPopupSharedButtonMixins.lua
index e5619c3e62..717fd3190f 100644
--- a/Interface/AddOns/Blizzard_UnitPopupShared/UnitPopupSharedButtonMixins.lua
+++ b/Interface/AddOns/Blizzard_UnitPopupShared/UnitPopupSharedButtonMixins.lua
@@ -546,7 +546,7 @@ UnitPopupRemoveBnetFriendButtonMixin = CreateFromMixins(UnitPopupRemoveFriendBut
function UnitPopupRemoveBnetFriendButtonMixin:OnClick(contextData)
local accountInfo = contextData.accountInfo;
local promptText;
- if not IsOnGlueScreen() then
+ if not C_Glue.IsOnGlueScreen() then
if accountInfo then
if accountInfo.isBattleTagFriend then
promptText = string.format(BATTLETAG_REMOVE_FRIEND_CONFIRMATION, accountInfo.accountName);
@@ -2753,7 +2753,6 @@ end
function UnitPopupSelfHighlightSelectButtonMixin:GetEntries()
return {
UnitPopupSelfHighlightCircleButtonMixin,
- UnitPopupSelfHighlightOutlineButtonMixin,
UnitPopupSelfHighlightIconButtonMixin,
};
end
@@ -2762,7 +2761,6 @@ UnitPopupSelfHighlightCommonMixin = CreateFromMixins(UnitPopupCheckboxButtonMixi
function UnitPopupSelfHighlightCommonMixin:SetFindSelfAnywhere()
local shouldFindSelfAnywhere = GetCVarBool("findYourselfModeCircle") or
- GetCVarBool("findYourselfModeOutline") or
GetCVarBool("findYourselfModeIcon");
SetCVar("findYourselfAnywhere", shouldFindSelfAnywhere);
@@ -2795,16 +2793,6 @@ function UnitPopupSelfHighlightCircleButtonMixin:GetCVarName()
return "findYourselfModeCircle";
end
-UnitPopupSelfHighlightOutlineButtonMixin = CreateFromMixins(UnitPopupSelfHighlightCommonMixin);
-
-function UnitPopupSelfHighlightOutlineButtonMixin:GetText(contextData)
- return SELF_HIGHLIGHT_OUTLINE;
-end
-
-function UnitPopupSelfHighlightOutlineButtonMixin:GetCVarName()
- return "findYourselfModeOutline";
-end
-
UnitPopupSelfHighlightIconButtonMixin = CreateFromMixins(UnitPopupSelfHighlightCommonMixin);
function UnitPopupSelfHighlightIconButtonMixin:GetText(contextData)
@@ -3541,9 +3529,24 @@ function UnitPopupSelectRoleButtonMixin:GetText(contextData)
return SET_ROLE;
end
---Override in UnitPopupButtons
function UnitPopupSelectRoleButtonMixin:CanShow(contextData)
- return false;
+ if not CanShowSetRoleButton() then
+ return false;
+ end
+
+ if C_Scenario.IsInScenario() then
+ return false;
+ end
+
+ if not IsInGroup() then
+ return false;
+ end
+
+ if HasLFGRestrictions() then
+ return false;
+ end
+
+ return UnitIsGroupLeader("player") or UnitIsGroupAssistant("player") or UnitIsUnit(contextData.unit, "player");
end
function UnitPopupSelectRoleButtonMixin:GetEntries()
@@ -3567,7 +3570,7 @@ function UnitPopupSetRoleNoneButton:GetTextHeight()
end
function UnitPopupSetRoleNoneButton:GetRole()
- return nill;
+ return nil;
end
function UnitPopupSetRoleNoneButton:OnClick(contextData)
@@ -3590,6 +3593,10 @@ function UnitPopupSetRoleTankButton:GetRole()
end
function UnitPopupSetRoleTankButton:IsEnabled(contextData)
+ if (AreClassRolesSoftSuggestions()) then
+ return true;
+ end
+
local canBeTank, canBeHealer, canBeDamager = UnitGetAvailableRoles(contextData.unit);
return canBeTank;
end
@@ -3605,6 +3612,10 @@ function UnitPopupSetRoleDpsButton:GetRole()
end
function UnitPopupSetRoleDpsButton:IsEnabled(contextData)
+ if (AreClassRolesSoftSuggestions()) then
+ return true;
+ end
+
local canBeTank, canBeHealer, canBeDamager = UnitGetAvailableRoles(contextData.unit);
return canBeDamager;
end
@@ -3620,6 +3631,10 @@ function UnitPopupSetRoleHealerButton:GetRole()
end
function UnitPopupSetRoleHealerButton:IsEnabled(contextData)
+ if (AreClassRolesSoftSuggestions()) then
+ return true;
+ end
+
local canBeTank, canBeHealer, canBeDamager = UnitGetAvailableRoles(contextData.unit);
return canBeHealer;
end
diff --git a/Interface/AddOns/Blizzard_WorldMap/Blizzard_WorldMap.xml b/Interface/AddOns/Blizzard_WorldMap/Blizzard_WorldMap.xml
index 790570e6b7..91ccf8ca78 100644
--- a/Interface/AddOns/Blizzard_WorldMap/Blizzard_WorldMap.xml
+++ b/Interface/AddOns/Blizzard_WorldMap/Blizzard_WorldMap.xml
@@ -271,7 +271,7 @@
-
+
@@ -279,11 +279,7 @@
-
-
-
-
-
+
@@ -305,11 +301,7 @@
-
-
-
-
-
+
@@ -331,11 +323,7 @@
-
-
-
-
-
+
diff --git a/Interface/AddOns/Blizzard_WorldMap/Blizzard_WorldMapTemplates.xml b/Interface/AddOns/Blizzard_WorldMap/Blizzard_WorldMapTemplates.xml
index 05901e53bb..69b3bd8b0e 100644
--- a/Interface/AddOns/Blizzard_WorldMap/Blizzard_WorldMapTemplates.xml
+++ b/Interface/AddOns/Blizzard_WorldMap/Blizzard_WorldMapTemplates.xml
@@ -2,7 +2,24 @@
..\..\..\..\..\WoW\Data\Interface\AddOns\Blizzard_SharedXML\UI.xsd">
-
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/Interface/AddOns/Blizzard_WorldMap/Cata/Blizzard_WorldMap.lua b/Interface/AddOns/Blizzard_WorldMap/Cata/Blizzard_WorldMap.lua
index ba6e39dd52..d3995102b4 100644
--- a/Interface/AddOns/Blizzard_WorldMap/Cata/Blizzard_WorldMap.lua
+++ b/Interface/AddOns/Blizzard_WorldMap/Cata/Blizzard_WorldMap.lua
@@ -4,6 +4,8 @@ function WorldMapMixin:SynchronizeDisplayState()
if self:IsMaximized() then
self.MiniBorderFrame:Hide();
+ self.WorldMapLevelDropDown:ClearAllPoints();
+
WorldMapFrame_SetOpacity(0);
self:SetSize(self.maximizedWidth, self.maximizedHeight);
@@ -16,11 +18,19 @@ function WorldMapMixin:SynchronizeDisplayState()
WorldMapZoomOutButton:Show();
WorldMapZoneMinimapDropdown:Show();
WorldMapMagnifyingGlassButton:Show();
-
+ if(self.WorldMapLevelDropDown:IsShown()) then
+ WorldMapLevelUpButton:Show();
+ WorldMapLevelDownButton:Show();
+ end
+ self.WorldMapLevelDropDown.header:Show();
+
WorldMapFrameCloseButton:SetPoint("TOPRIGHT", self.BorderFrame, "TOPRIGHT", 5, 4);
self.MaximizeMinimizeFrame:SetPoint("RIGHT", WorldMapFrameCloseButton, "LEFT", 12, 0);
self.ScrollContainer:SetPoint("TOPLEFT", WorldMapFrame, "TOPLEFT", 11, -70);
WorldMapTrackQuest:SetPoint("BOTTOMLEFT", WorldMapFrame, "BOTTOMLEFT", 10, 4);
+ self.WorldMapLevelDropDown:SetPoint("TOPRIGHT", self, "TOPRIGHT", -65, -35);
+ WorldMapLevelUpButton:SetPoint("TOPLEFT", self.WorldMapLevelDropDown, "TOPRIGHT", 5, 8);
+ WorldMapLevelDownButton:SetPoint("BOTTOMLEFT", self.WorldMapLevelDropDown, "BOTTOMRIGHT", 5, -8);
MaximizeUIPanel(self);
else
@@ -28,6 +38,7 @@ function WorldMapMixin:SynchronizeDisplayState()
self:SetMovable("true");
WorldMapFrame:ClearAllPoints();
+ self.WorldMapLevelDropDown:ClearAllPoints();
WorldMapFrame:SetPoint("TOPLEFT", WorldMapScreenAnchor, 0, 0);
WorldMapFrame:SetUserPlaced(true);
@@ -43,12 +54,17 @@ function WorldMapMixin:SynchronizeDisplayState()
WorldMapZoomOutButton:Hide();
WorldMapZoneMinimapDropdown:Hide();
WorldMapMagnifyingGlassButton:Hide();
+ WorldMapLevelUpButton:Hide();
+ WorldMapLevelDownButton:Hide();
+ self.WorldMapLevelDropDown.header:Hide();
WorldMapFrameCloseButton:SetPoint("TOPRIGHT", MiniBorderRight, "TOPRIGHT", -44, 5);
self.MaximizeMinimizeFrame:SetPoint("RIGHT", WorldMapFrameCloseButton, "LEFT", 10, 0);
self.ScrollContainer:SetPoint("TOPLEFT", WorldMapFrame, "TOPLEFT", 20, -22);
self.ScrollContainer:SetPoint("BOTTOMRIGHT", WorldMapFrame, "BOTTOMRIGHT", -10, 28);
WorldMapTrackQuest:SetPoint("BOTTOMLEFT", WorldMapFrame, "BOTTOMLeft", 20, 4);
+ self.WorldMapLevelDropDown:SetFrameLevel(self:GetParent():GetFrameLevel() + 4);
+ self.WorldMapLevelDropDown:SetPoint("TOPLEFT", self:GetCanvasContainer(), "TOPLEFT", 0, 0);
RestoreUIPanelArea(self);
end
@@ -229,6 +245,8 @@ end
function WorldMapMixin:AddOverlayFrames()
self:AddOverlayFrame("WorldMapZoneTimerTemplate", "FRAME", "BOTTOM", self:GetCanvasContainer(), "BOTTOM", 0, 20);
+ self.WorldMapLevelDropDown = self:AddOverlayFrame("WorldMapFloorNavigationFrameTemplate", "DROPDOWNBUTTON", "TOPRIGHT", self, "TOPRIGHT", -65, -35);
+ self.WorldMapLevelDropDown:SetWidth(130);
end
function WorldMapMixin:OnMapChanged()
@@ -252,6 +270,15 @@ function WorldMapMixin:OnMapChanged()
WorldMapContinentDropdown:GenerateMenu();
WorldMapZoneDropdown:GenerateMenu();
WorldMapFrame_SetMapName();
+
+ --Update Area Dropdown arrows
+ if(self.WorldMapLevelDropDown:IsShown() and self:IsMaximized()) then
+ WorldMapLevelUpButton:Show();
+ WorldMapLevelDownButton:Show();
+ else
+ WorldMapLevelUpButton:Hide();
+ WorldMapLevelDownButton:Hide();
+ end
end
function WorldMapMixin:OnShow()
@@ -548,6 +575,50 @@ function WorldMapZoneMinimapDropdown_GetText(value)
return nil;
end
+function WorldMapLevelDown_OnClick(self)
+ local mapID = self:GetParent():GetMapID();
+
+ local mapGroupID = C_Map.GetMapGroupID(mapID);
+ if not mapGroupID then
+ return;
+ end
+
+ local mapGroupMembersInfo = C_Map.GetMapGroupMembersInfo(mapGroupID);
+ if not mapGroupMembersInfo then
+ return;
+ end
+
+ for i, mapGroupMemberInfo in ipairs(mapGroupMembersInfo) do
+ if(mapGroupMemberInfo.mapID == mapID and i ~= #mapGroupMembersInfo) then
+ self:GetParent():SetMapID(mapGroupMembersInfo[i+1].mapID);
+ end
+ end
+
+ PlaySound(SOUNDKIT.U_CHAT_SCROLL_BUTTON);
+end
+
+function WorldMapLevelUp_OnClick(self)
+ local mapID = self:GetParent():GetMapID();
+
+ local mapGroupID = C_Map.GetMapGroupID(mapID);
+ if not mapGroupID then
+ return;
+ end
+
+ local mapGroupMembersInfo = C_Map.GetMapGroupMembersInfo(mapGroupID);
+ if not mapGroupMembersInfo then
+ return;
+ end
+
+ for i, mapGroupMemberInfo in ipairs(mapGroupMembersInfo) do
+ if(mapGroupMemberInfo.mapID == mapID and i ~= 1) then
+ self:GetParent():SetMapID(mapGroupMembersInfo[i-1].mapID);
+ end
+ end
+
+ PlaySound(SOUNDKIT.U_CHAT_SCROLL_BUTTON);
+end
+
function DoesInstanceTypeMatchBattlefieldMapSettings()
local instanceType = GetBattlefieldMapInstanceType();
local value = GetCVar("showBattlefieldMinimap");
diff --git a/Interface/AddOns/Blizzard_WorldMap/Cata/Blizzard_WorldMap.xml b/Interface/AddOns/Blizzard_WorldMap/Cata/Blizzard_WorldMap.xml
index 13c74d56ea..6c6b6ddff2 100644
--- a/Interface/AddOns/Blizzard_WorldMap/Cata/Blizzard_WorldMap.xml
+++ b/Interface/AddOns/Blizzard_WorldMap/Cata/Blizzard_WorldMap.xml
@@ -280,7 +280,7 @@
-
+
@@ -306,7 +306,7 @@
-
+
@@ -332,7 +332,7 @@
-
+
@@ -363,6 +363,42 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/Interface/AddOns/Blizzard_WorldMap/WM_WorldQuestDataProvider.lua b/Interface/AddOns/Blizzard_WorldMap/WM_WorldQuestDataProvider.lua
index ef35be660d..9c1c9309e2 100644
--- a/Interface/AddOns/Blizzard_WorldMap/WM_WorldQuestDataProvider.lua
+++ b/Interface/AddOns/Blizzard_WorldMap/WM_WorldQuestDataProvider.lua
@@ -5,7 +5,7 @@ function WorldMap_WorldQuestDataProviderMixin:GetPinTemplate()
end
function WorldMap_WorldQuestDataProviderMixin:ShouldShowQuest(info)
- if self.focusedQuestID or self:IsQuestSuppressed(info.questId) then
+ if self.focusedQuestID or self:IsQuestSuppressed(info.questID) then
return false;
end
local mapID = self:GetMap():GetMapID();
diff --git a/Interface/AddOns/Blizzard_WorldMap/Wrath/Blizzard_WorldMap.lua b/Interface/AddOns/Blizzard_WorldMap/Wrath/Blizzard_WorldMap.lua
index f84cac1568..4b18e616c3 100644
--- a/Interface/AddOns/Blizzard_WorldMap/Wrath/Blizzard_WorldMap.lua
+++ b/Interface/AddOns/Blizzard_WorldMap/Wrath/Blizzard_WorldMap.lua
@@ -4,6 +4,8 @@ function WorldMapMixin:SynchronizeDisplayState()
if self:IsMaximized() then
self.MiniBorderFrame:Hide();
+ self.WorldMapLevelDropDown:ClearAllPoints();
+
WorldMapFrame_SetOpacity(0);
self:SetSize(self.maximizedWidth, self.maximizedHeight);
@@ -16,11 +18,19 @@ function WorldMapMixin:SynchronizeDisplayState()
WorldMapZoomOutButton:Show();
WorldMapZoneMinimapDropdown:Show();
WorldMapMagnifyingGlassButton:Show();
+ if(self.WorldMapLevelDropDown:IsShown()) then
+ WorldMapLevelUpButton:Show();
+ WorldMapLevelDownButton:Show();
+ end
+ self.WorldMapLevelDropDown.header:Show();
WorldMapFrameCloseButton:SetPoint("TOPRIGHT", self.BorderFrame, "TOPRIGHT", 5, 4);
self.MaximizeMinimizeFrame:SetPoint("RIGHT", WorldMapFrameCloseButton, "LEFT", 12, 0);
self.ScrollContainer:SetPoint("TOPLEFT", WorldMapFrame, "TOPLEFT", 11, -70);
WorldMapTrackQuest:SetPoint("BOTTOMLEFT", WorldMapFrame, "BOTTOMLEFT", 10, 4);
+ self.WorldMapLevelDropDown:SetPoint("TOPRIGHT", self, "TOPRIGHT", -65, -35);
+ WorldMapLevelUpButton:SetPoint("TOPLEFT", self.WorldMapLevelDropDown, "TOPRIGHT", 5, 8);
+ WorldMapLevelDownButton:SetPoint("BOTTOMLEFT", self.WorldMapLevelDropDown, "BOTTOMRIGHT", 5, -8);
MaximizeUIPanel(self);
else
@@ -28,6 +38,7 @@ function WorldMapMixin:SynchronizeDisplayState()
self:SetMovable("true");
WorldMapFrame:ClearAllPoints();
+ self.WorldMapLevelDropDown:ClearAllPoints();
WorldMapFrame:SetPoint("TOPLEFT", WorldMapScreenAnchor, 0, 0);
WorldMapFrame:SetUserPlaced(true);
@@ -43,12 +54,15 @@ function WorldMapMixin:SynchronizeDisplayState()
WorldMapZoomOutButton:Hide();
WorldMapZoneMinimapDropdown:Hide();
WorldMapMagnifyingGlassButton:Hide();
+ self.WorldMapLevelDropDown.header:Hide();
WorldMapFrameCloseButton:SetPoint("TOPRIGHT", MiniBorderRight, "TOPRIGHT", -44, 5);
self.MaximizeMinimizeFrame:SetPoint("RIGHT", WorldMapFrameCloseButton, "LEFT", 10, 0);
self.ScrollContainer:SetPoint("TOPLEFT", WorldMapFrame, "TOPLEFT", 20, -22);
self.ScrollContainer:SetPoint("BOTTOMRIGHT", WorldMapFrame, "BOTTOMRIGHT", -10, 28);
WorldMapTrackQuest:SetPoint("BOTTOMLEFT", WorldMapFrame, "BOTTOMLeft", 20, 4);
+ self.WorldMapLevelDropDown:SetFrameLevel(self:GetParent():GetFrameLevel() + 4);
+ self.WorldMapLevelDropDown:SetPoint("TOPLEFT", self:GetCanvasContainer(), "TOPLEFT", 0, 0);
RestoreUIPanelArea(self);
end
@@ -110,6 +124,7 @@ function WorldMapMixin:OnLoad()
self:SetShouldZoomInstantly(true);
self:AddStandardDataProviders();
+ self:AddOverlayFrames();
self:SetMapID(C_Map.GetFallbackWorldMapID());
@@ -225,8 +240,14 @@ function WorldMapMixin:AddStandardDataProviders()
pinFrameLevelsManager:AddFrameLevel("PIN_FRAME_LEVEL_AREA_POI_BANNER");
end
+function WorldMapMixin:AddOverlayFrames()
+ self.WorldMapLevelDropDown = self:AddOverlayFrame("WorldMapFloorNavigationFrameTemplate", "DROPDOWNBUTTON", "TOPRIGHT", self, "TOPRIGHT", -65, -35);
+ self.WorldMapLevelDropDown:SetWidth(130);
+end
+
function WorldMapMixin:OnMapChanged()
MapCanvasMixin.OnMapChanged(self);
+ self:RefreshOverlayFrames();
self:RefreshQuestLog();
if C_MapInternal then
@@ -245,6 +266,15 @@ function WorldMapMixin:OnMapChanged()
WorldMapContinentDropdown:GenerateMenu();
WorldMapZoneDropdown:GenerateMenu();
WorldMapFrame_SetMapName();
+
+ --Update Area Dropdown arrows
+ if(self.WorldMapLevelDropDown:IsShown() and self:IsMaximized()) then
+ WorldMapLevelUpButton:Show();
+ WorldMapLevelDownButton:Show();
+ else
+ WorldMapLevelUpButton:Hide();
+ WorldMapLevelDownButton:Hide();
+ end
end
function WorldMapMixin:OnShow()
@@ -273,6 +303,28 @@ function WorldMapMixin:OnHide()
PlaySound(SOUNDKIT.IG_QUEST_LOG_CLOSE);
end
+function WorldMapMixin:RefreshOverlayFrames()
+ if self.overlayFrames then
+ for i, frame in ipairs(self.overlayFrames) do
+ frame:Refresh();
+ end
+ end
+end
+
+function WorldMapMixin:AddOverlayFrame(templateName, templateType, anchorPoint, relativeFrame, relativePoint, offsetX, offsetY)
+ local frame = CreateFrame(templateType, nil, self, templateName);
+ if anchorPoint then
+ frame:SetPoint(anchorPoint, relativeFrame, relativePoint, offsetX, offsetY);
+ end
+ frame.relativeFrame = relativeFrame or self;
+ if not self.overlayFrames then
+ self.overlayFrames = { };
+ end
+ tinsert(self.overlayFrames, frame);
+
+ return frame;
+end
+
function WorldMapMixin:GetCurrentMapContinent()
local mapID = self:GetMapID();
@@ -519,6 +571,50 @@ function WorldMapZoneMinimapDropdown_GetText(value)
return nil;
end
+function WorldMapLevelDown_OnClick(self)
+ local mapID = self:GetParent():GetMapID();
+
+ local mapGroupID = C_Map.GetMapGroupID(mapID);
+ if not mapGroupID then
+ return;
+ end
+
+ local mapGroupMembersInfo = C_Map.GetMapGroupMembersInfo(mapGroupID);
+ if not mapGroupMembersInfo then
+ return;
+ end
+
+ for i, mapGroupMemberInfo in ipairs(mapGroupMembersInfo) do
+ if(mapGroupMemberInfo.mapID == mapID and i ~= #mapGroupMembersInfo) then
+ self:GetParent():SetMapID(mapGroupMembersInfo[i+1].mapID);
+ end
+ end
+
+ PlaySound(SOUNDKIT.U_CHAT_SCROLL_BUTTON);
+end
+
+function WorldMapLevelUp_OnClick(self)
+ local mapID = self:GetParent():GetMapID();
+
+ local mapGroupID = C_Map.GetMapGroupID(mapID);
+ if not mapGroupID then
+ return;
+ end
+
+ local mapGroupMembersInfo = C_Map.GetMapGroupMembersInfo(mapGroupID);
+ if not mapGroupMembersInfo then
+ return;
+ end
+
+ for i, mapGroupMemberInfo in ipairs(mapGroupMembersInfo) do
+ if(mapGroupMemberInfo.mapID == mapID and i ~= 1) then
+ self:GetParent():SetMapID(mapGroupMembersInfo[i-1].mapID);
+ end
+ end
+
+ PlaySound(SOUNDKIT.U_CHAT_SCROLL_BUTTON);
+end
+
function DoesInstanceTypeMatchBattlefieldMapSettings()
local instanceType = GetBattlefieldMapInstanceType();
local value = GetCVar("showBattlefieldMinimap");
diff --git a/Interface/AddOns/Blizzard_WorldMap/Wrath/Blizzard_WorldMap.xml b/Interface/AddOns/Blizzard_WorldMap/Wrath/Blizzard_WorldMap.xml
index 70164cba9b..a269562323 100644
--- a/Interface/AddOns/Blizzard_WorldMap/Wrath/Blizzard_WorldMap.xml
+++ b/Interface/AddOns/Blizzard_WorldMap/Wrath/Blizzard_WorldMap.xml
@@ -363,6 +363,42 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+