Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
What's new
10
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Open sidebar
Simpy
BlizzardInterfaceCode
Commits
a55ea6aa
Commit
a55ea6aa
authored
Nov 13, 2020
by
TOM_RUS
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
WOW-36599patch9.0.2_Beta
parent
c5903bda
Changes
8
Hide whitespace changes
Inline
Side-by-side
Showing
8 changed files
with
122 additions
and
29 deletions
+122
-29
Interface/AddOns/Blizzard_APIDocumentation/ItemDocumentation.lua
...ce/AddOns/Blizzard_APIDocumentation/ItemDocumentation.lua
+14
-0
Interface/AddOns/Blizzard_PVPUI/Blizzard_PVPUI.lua
Interface/AddOns/Blizzard_PVPUI/Blizzard_PVPUI.lua
+13
-1
Interface/AddOns/Blizzard_SharedMapDataProviders/WorldQuestDataProvider.lua
...lizzard_SharedMapDataProviders/WorldQuestDataProvider.lua
+1
-1
Interface/AddOns/Blizzard_WorldMap/Blizzard_WorldMapTemplates.lua
...e/AddOns/Blizzard_WorldMap/Blizzard_WorldMapTemplates.lua
+19
-10
Interface/FrameXML/ChatFrame.lua
Interface/FrameXML/ChatFrame.lua
+27
-15
Interface/FrameXML/Constants.lua
Interface/FrameXML/Constants.lua
+3
-2
Interface/FrameXML/MapUtil.lua
Interface/FrameXML/MapUtil.lua
+38
-0
Interface/FrameXML/WorldMapFrame.lua
Interface/FrameXML/WorldMapFrame.lua
+7
-0
No files found.
Interface/AddOns/Blizzard_APIDocumentation/ItemDocumentation.lua
View file @
a55ea6aa
...
...
@@ -258,6 +258,20 @@ local Item =
{
Name
=
"stackCount"
,
Type
=
"number"
,
Nilable
=
false
},
},
},
{
Name
=
"IsAnimaItemByID"
,
Type
=
"Function"
,
Arguments
=
{
{
Name
=
"itemInfo"
,
Type
=
"string"
,
Nilable
=
false
},
},
Returns
=
{
{
Name
=
"isAnimaItem"
,
Type
=
"bool"
,
Nilable
=
false
},
},
},
{
Name
=
"IsBound"
,
Type
=
"Function"
,
...
...
Interface/AddOns/Blizzard_PVPUI/Blizzard_PVPUI.lua
View file @
a55ea6aa
...
...
@@ -250,6 +250,7 @@ function PVPUIFrame_ConfigureRewardFrame(rewardFrame, honor, experience, itemRew
rewardQuantity
=
reward
.
quantity
;
elseif
reward
.
id
==
Constants
.
CurrencyConsts
.
CONQUEST_CURRENCY_ID
then
rewardFrame
.
conquestAmount
=
reward
.
quantity
;
rewardTexture
=
rewardTexture
or
texture
;
end
end
end
...
...
@@ -264,7 +265,18 @@ function PVPUIFrame_ConfigureRewardFrame(rewardFrame, honor, experience, itemRew
end
end
if
currencyID
or
itemID
or
honor
>
0
or
experience
>
0
then
if
not
rewardTexture
then
if
honor
>
0
then
local
currencyInfo
=
C_CurrencyInfo
.
GetBasicCurrencyInfo
(
Constants
.
CurrencyConsts
.
HONOR_CURRENCY_ID
,
honor
);
if
currencyInfo
then
rewardTexture
=
currencyInfo
.
icon
;
end
elseif
experience
>
0
then
rewardTexture
=
"Interface\\Icons\\xp_icon"
end
end
if
rewardTexture
then
SetPortraitToTexture
(
rewardFrame
.
Icon
,
rewardTexture
);
rewardFrame
.
honor
=
honor
;
rewardFrame
.
experience
=
experience
;
...
...
Interface/AddOns/Blizzard_SharedMapDataProviders/WorldQuestDataProvider.lua
View file @
a55ea6aa
...
...
@@ -213,7 +213,7 @@ function WorldQuestDataProviderMixin:RefreshAllData(fromOnShow)
local
mapID
=
mapCanvas
:
GetMapID
();
if
(
mapID
)
then
taskInfo
=
C_TaskQuest
.
GetQuestsForPlayerByMapID
(
mapID
);
self
.
matchWorldMapFilters
=
MapUtil
.
Map
HasEmissarie
s
(
mapID
);
self
.
matchWorldMapFilters
=
MapUtil
.
Map
ShouldShowWorldQuestFilter
s
(
mapID
);
end
if
taskInfo
then
...
...
Interface/AddOns/Blizzard_WorldMap/Blizzard_WorldMapTemplates.lua
View file @
a55ea6aa
...
...
@@ -94,7 +94,8 @@ function WorldMapTrackingOptionsButtonMixin:OnSelection(value, checked)
SetCVar
(
value
,
checked
and
"1"
or
"0"
);
elseif
(
value
==
"worldQuestFilterResources"
or
value
==
"worldQuestFilterArtifactPower"
or
value
==
"worldQuestFilterProfessionMaterials"
or
value
==
"worldQuestFilterGold"
or
value
==
"worldQuestFilterEquipment"
or
value
==
"worldQuestFilterReputation"
)
then
value
==
"worldQuestFilterEquipment"
or
value
==
"worldQuestFilterReputation"
or
value
==
"worldQuestFilterAnima"
)
then
-- World quest reward filter cvars
SetCVar
(
value
,
checked
and
"1"
or
"0"
);
end
...
...
@@ -147,7 +148,7 @@ function WorldMapTrackingOptionsButtonMixin:InitializeDropDown()
-- If we aren't on a map which has emissaries don't show the world quest reward filter options.
local
mapID
=
self
:
GetParent
():
GetMapID
();
if
not
mapID
or
not
MapUtil
.
Map
HasEmissarie
s
(
mapID
)
then
if
not
mapID
or
not
MapUtil
.
Map
ShouldShowWorldQuestFilter
s
(
mapID
)
then
return
;
end
...
...
@@ -181,15 +182,23 @@ function WorldMapTrackingOptionsButtonMixin:InitializeDropDown()
info
.
keepShownOnClick
=
true
;
info
.
func
=
OnSelection
;
info
.
text
=
WORLD_QUEST_REWARD_FILTERS_RESOURCES
;
info
.
value
=
"worldQuestFilterResources"
;
info
.
checked
=
GetCVarBool
(
"worldQuestFilterResources"
);
UIDropDownMenu_AddButton
(
info
);
-- TODO:: Further adjustments to more cleanly determine filters per map and make this future-proof.
if
MapUtil
.
IsShadowlandsZoneMap
(
mapID
)
then
info
.
text
=
WORLD_QUEST_REWARD_FILTERS_ANIMA
;
info
.
value
=
"worldQuestFilterAnima"
;
info
.
checked
=
GetCVarBool
(
"worldQuestFilterAnima"
);
UIDropDownMenu_AddButton
(
info
);
else
info
.
text
=
WORLD_QUEST_REWARD_FILTERS_RESOURCES
;
info
.
value
=
"worldQuestFilterResources"
;
info
.
checked
=
GetCVarBool
(
"worldQuestFilterResources"
);
UIDropDownMenu_AddButton
(
info
);
info
.
text
=
WORLD_QUEST_REWARD_FILTERS_ARTIFACT_POWER
;
info
.
value
=
"worldQuestFilterArtifactPower"
;
info
.
checked
=
GetCVarBool
(
"worldQuestFilterArtifactPower"
);
UIDropDownMenu_AddButton
(
info
);
info
.
text
=
WORLD_QUEST_REWARD_FILTERS_ARTIFACT_POWER
;
info
.
value
=
"worldQuestFilterArtifactPower"
;
info
.
checked
=
GetCVarBool
(
"worldQuestFilterArtifactPower"
);
UIDropDownMenu_AddButton
(
info
);
end
info
.
text
=
WORLD_QUEST_REWARD_FILTERS_PROFESSION_MATERIALS
;
info
.
value
=
"worldQuestFilterProfessionMaterials"
;
...
...
Interface/FrameXML/ChatFrame.lua
View file @
a55ea6aa
...
...
@@ -2136,7 +2136,7 @@ SlashCmdList["FRIENDS"] = function(msg)
end
if
not
msg
or
msg
==
""
then
ToggleFriendsPanel
();
else
else
local
player
,
note
=
strmatch
(
msg
,
"%s*([^%s]+)%s*(.*)"
);
if
player
then
C_FriendList
.
AddOrRemoveFriend
(
player
,
note
);
...
...
@@ -2934,6 +2934,30 @@ function ChatFrame_AddChannel(chatFrame, channel)
return
channelIndex
;
end
local
function
ChatFrame_CheckAddChannel
(
chatFrame
,
eventType
,
channelID
)
-- This is called in the event that a user receives chat events for a channel that isn't enabled for any chat frames.
-- Minor hack, because chat channel filtering is backed by the client, but driven entirely from Lua.
-- This solves the issue of Guides abdicating their status, and then re-applying in the same game session, unless ChatFrame_AddChannel
-- is called, the channel filter will be off even though it's still enabled in the client, since abdication removes the chat channel and its config.
-- Only add to default (since multiple chat frames receive the event and we don't want to add to others)
if
chatFrame
~=
DEFAULT_CHAT_FRAME
then
return
false
;
end
-- Only add if the user is joining a channel
if
eventType
~=
"YOU_CHANGED"
then
return
false
;
end
-- Only add regional channels
if
not
C_ChatInfo
.
IsChannelRegionalForChannelID
(
channelID
)
then
return
false
;
end
return
ChatFrame_AddChannel
(
chatFrame
,
C_ChatInfo
.
GetChannelShortcutForChannelID
(
channelID
))
~=
nil
;
end
function
ChatFrame_GetCommunitiesChannelLocalID
(
clubId
,
streamId
)
local
channelName
=
Chat_GetCommunitiesChannelName
(
clubId
,
streamId
);
local
localID
=
GetChannelName
(
channelName
);
...
...
@@ -3126,17 +3150,12 @@ function ChatFrame_ConfigEventHandler(self, event, ...)
local
isInitialLogin
,
isUIReload
=
...
;
if
isInitialLogin
then
C_Timer
.
After
(
3
,
ChatFrame_CheckShowNewcomerGraduation
);
self
:
RegisterEvent
(
"ZONE_CHANGED_NEW_AREA"
);
end
end
self
.
chatLevelUP
=
{};
LevelUpDisplay_InitPlayerStates
(
self
.
chatLevelUP
);
return
true
;
elseif
(
event
==
"ZONE_CHANGED_NEW_AREA"
)
then
ChatFrame_CheckRemoveNewcomerChannel
();
self
:
UnregisterEvent
(
"ZONE_CHANGED_NEW_AREA"
);
return
true
;
elseif
(
event
==
"NEUTRAL_FACTION_SELECT_RESULT"
)
then
self
.
defaultLanguage
=
GetDefaultLanguage
();
...
...
@@ -3446,12 +3465,6 @@ function ChatFrame_CheckShowNewcomerGraduation(isFromGraduationEvent)
end
end
function
ChatFrame_CheckRemoveNewcomerChannel
()
if
not
IsActivePlayerNewcomer
()
and
not
IsActivePlayerMentor
()
then
LeaveChannelByName
(
C_ChatInfo
.
GetChannelShortcutForChannelID
(
C_ChatInfo
.
GetMentorChannelID
()));
end
end
function
ChatFrame_MessageEventHandler
(
self
,
event
,
...
)
if
(
strsub
(
event
,
1
,
8
)
==
"CHAT_MSG"
)
then
local
arg1
,
arg2
,
arg3
,
arg4
,
arg5
,
arg6
,
arg7
,
arg8
,
arg9
,
arg10
,
arg11
,
arg12
,
arg13
,
arg14
,
arg15
,
arg16
,
arg17
=
...
;
...
...
@@ -3511,9 +3524,8 @@ function ChatFrame_MessageEventHandler(self, event, ...)
end
end
if
not
found
or
not
info
then
if
arg1
==
"YOU_CHANGED"
and
C_ChatInfo
.
IsChannelRegional
(
arg8
)
then
ChatFrame_AddChannel
(
self
,
C_ChatInfo
.
GetChannelShortcutForChannelID
(
arg7
));
else
local
eventType
,
channelID
=
arg1
,
arg7
;
if
not
ChatFrame_CheckAddChannel
(
self
,
eventType
,
channelID
)
then
return
true
;
end
end
...
...
Interface/FrameXML/Constants.lua
View file @
a55ea6aa
...
...
@@ -935,8 +935,9 @@ KEY_PADBACK_REV = "GamePad -";
-- "Shapes" label style specializations
KEY_PAD1_SHP
=
"GamePad X"
;
KEY_PAD2_SHP
=
"GamePad O"
;
KEY_PAD3_SHP
=
"GamePad S"
;
KEY_PAD4_SHP
=
"GamePad T"
;
KEY_PAD3_SHP
=
"GamePad Square"
;
KEY_PAD4_SHP
=
"GamePad Triangle"
;
KEY_PAD5_SHP
=
"GamePad Mute"
;
KEY_PADLSTICK_SHP
=
"GamePad L3"
;
KEY_PADRSTICK_SHP
=
"GamePad R3"
;
KEY_PADLSHOULDER_SHP
=
"GamePad L1"
;
...
...
Interface/FrameXML/MapUtil.lua
View file @
a55ea6aa
local
SHADOWLANDS_CONTINENT_MAP_ID
=
1550
;
local
ORIBOS_UI_MAP_IDS
=
{
1670
,
1671
,
1672
,
1673
};
MapUtil
=
{};
function
MapUtil
.
IsMapTypeZone
(
mapID
)
...
...
@@ -97,3 +101,37 @@ function MapUtil.GetMapCenterOnMap(mapID, topMapID)
local
centerY
=
top
+
(
bottom
-
top
)
*
.
5
;
return
centerX
,
centerY
;
end
function
MapUtil
.
IsChildMap
(
mapID
,
ancestorMapID
)
local
mapInfo
=
C_Map
.
GetMapInfo
(
mapID
);
while
(
mapInfo
~=
nil
)
and
(
mapInfo
.
parentMapID
~=
nil
)
do
if
mapInfo
.
parentMapID
==
ancestorMapID
then
return
true
;
end
mapInfo
=
C_Map
.
GetMapInfo
(
mapInfo
.
parentMapID
);
end
return
false
;
end
function
MapUtil
.
IsOribosMap
(
mapID
)
return
tContains
(
ORIBOS_UI_MAP_IDS
,
mapID
);
end
function
MapUtil
.
IsShadowlandsZoneMap
(
mapID
)
if
mapID
==
SHADOWLANDS_CONTINENT_MAP_ID
or
MapUtil
.
IsOribosMap
(
mapID
)
then
return
true
;
end
local
mapInfo
=
C_Map
.
GetMapInfo
(
mapID
);
if
(
mapInfo
.
mapType
~=
Enum
.
UIMapType
.
Zone
)
and
(
mapInfo
.
mapType
~=
Enum
.
UIMapType
.
Continent
)
then
return
false
;
end
return
MapUtil
.
IsChildMap
(
mapID
,
SHADOWLANDS_CONTINENT_MAP_ID
);
end
function
MapUtil
.
MapShouldShowWorldQuestFilters
(
mapID
)
return
MapUtil
.
MapHasEmissaries
(
mapID
)
or
MapUtil
.
IsShadowlandsZoneMap
(
mapID
);
end
Interface/FrameXML/WorldMapFrame.lua
View file @
a55ea6aa
...
...
@@ -12,6 +12,7 @@ WORLD_QUEST_REWARD_TYPE_FLAG_ARTIFACT_POWER = 0x0004;
WORLD_QUEST_REWARD_TYPE_FLAG_MATERIALS
=
0x0008
;
WORLD_QUEST_REWARD_TYPE_FLAG_EQUIPMENT
=
0x0010
;
WORLD_QUEST_REWARD_TYPE_FLAG_REPUTATION
=
0x0020
;
WORLD_QUEST_REWARD_TYPE_FLAG_ANIMA
=
0x0040
;
function
WorldMap_GetWorldQuestRewardType
(
questID
)
if
(
not
HaveQuestRewardData
(
questID
)
)
then
C_TaskQuest
.
RequestPreloadRewardData
(
questID
);
...
...
@@ -54,6 +55,10 @@ function WorldMap_GetWorldQuestRewardType(questID)
if
(
classID
==
LE_ITEM_CLASS_TRADEGOODS
)
then
worldQuestRewardType
=
bit
.
bor
(
worldQuestRewardType
,
WORLD_QUEST_REWARD_TYPE_FLAG_MATERIALS
);
end
if
(
C_Item
.
IsAnimaItemByID
(
itemID
)
)
then
worldQuestRewardType
=
bit
.
bor
(
worldQuestRewardType
,
WORLD_QUEST_REWARD_TYPE_FLAG_ANIMA
);
end
end
end
...
...
@@ -103,6 +108,8 @@ function WorldMap_DoesWorldQuestInfoPassFilters(info, ignoreTypeFilters)
typeMatchesFilters
=
true
;
elseif
(
GetCVarBool
(
"worldQuestFilterReputation"
)
and
bit
.
band
(
worldQuestRewardType
,
WORLD_QUEST_REWARD_TYPE_FLAG_REPUTATION
)
~=
0
)
then
typeMatchesFilters
=
true
;
elseif
(
GetCVarBool
(
"worldQuestFilterAnima"
)
and
bit
.
band
(
worldQuestRewardType
,
WORLD_QUEST_REWARD_TYPE_FLAG_ANIMA
)
~=
0
)
then
typeMatchesFilters
=
true
;
end
-- We always want to show quests that do not fit any of the enumerated reward types.
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment