Thread Tools Display Modes
04-30-18, 08:18 PM   #1
thomasjohnshannon
A Theradrim Guardian
 
thomasjohnshannon's Avatar
AddOn Author - Click to view addons
Join Date: Sep 2009
Posts: 68
New/changed in build 26522.

I was looking over the code from the patch and here are a few of the things I noticed.

Old loot code has been removed. RIP Master Loot

New functions and table info added to C_TaxiMap.

Updated cancelaura macro command function. Now uses CancelSpellByName(name) instead of CancelUnitBuff(unit, spell, [filter or rank]).

New leave vehicle slash function.

Lua Code:
  1. SECURE_ACTIONS.leavevehicle =
  2. function (self, unit, button)
  3.    VehicleExit();
  4. end;

Small change to ITEM_QUALITY_COLORS.

Lua Code:
  1. local r, g, b = GetItemQualityColor(i);
  2. local color = CreateColor(r, g, b, 1);
  3. ITEM_QUALITY_COLORS[i] = { r = r, g = g, b = b, hex = color:GenerateHexColorMarkup(), color = color };
With related new function GenerateHexColorMarkup.

Lua Code:
  1. function ColorMixin:GenerateHexColorMarkup()
  2.   return "|c"..self:GenerateHexColor();
  3. end

New map function.
Lua Code:
  1. {
  2.   Name = "GetPlayerMapPosition",
  3.   Type = "Function",
  4.   Documentation = { "Only works for the player and party members." },
  5.  
  6.   Arguments =
  7.   {
  8.     { Name = "uiMapID", Type = "number", Nilable = false },
  9.     { Name = "unitToken", Type = "string", Nilable = false },
  10.   },
  11.  
  12.   Returns =
  13.   {
  14.     { Name = "position", Type = "table", Mixin = "Vector2DMixin", Nilable = true },
  15.   },
  16. },

New GameTooltip functions.

Lua Code:
  1. function GameTooltip_SetTitle(tooltip, text, overrideColor, wrap)
  2.   local titleColor = overrideColor or HIGHLIGHT_FONT_COLOR;
  3.   local r, g, b, a = titleColor:GetRGBA();
  4.   tooltip:SetText(text, r, g, b, a, wrap);
  5. end
  6.  
  7. function GameTooltip_AddNormalLine(tooltip, text, wrap)
  8.   GameTooltip_AddColoredLine(tooltip, text, NORMAL_FONT_COLOR, wrap);
  9. end
  10.  
  11. function GameTooltip_AddInstructionLine(tooltip, text, wrap)
  12.   GameTooltip_AddColoredLine(tooltip, text, GREEN_FONT_COLOR, wrap);
  13. end
  14.  
  15. function GameTooltip_AddColoredLine(tooltip, text, color, wrap)
  16.   local r, g, b, a = color:GetRGBA();
  17.   tooltip:AddLine(text, r, g, b, a, wrap);
  18. end
  19.  
  20. function EmbeddedItemTooltip_SetSpellByQuestReward(self, rewardIndex, questID)
  21.   local texture, name, isTradeskillSpell, isSpellLearned, hideSpellLearnText, isBoostSpell, garrFollowerID, genericUnlock, spellID = GetQuestLogRewardSpell(rewardIndex, questID);
  22.   if garrFollowerID then
  23.     EmbeddedItemTooltip_PrepareForFollower(self);
  24.     local data = GarrisonFollowerTooltipTemplate_BuildDefaultDataForID(garrFollowerID);
  25.     GarrisonFollowerTooltipTemplate_SetGarrisonFollower(self.FollowerTooltip, data);
  26.     EmbeddedItemTooltip_UpdateSize(self);
  27.     return true;
  28.   elseif name and texture then
  29.     self.itemID = nil;
  30.     self.spellID = spellID;
  31.  
  32.     self:Show();
  33.     EmbeddedItemTooltip_PrepareForSpell(self);
  34.     self.Tooltip:SetOwner(self, "ANCHOR_NONE");
  35.     self.Tooltip:SetQuestLogRewardSpell(rewardIndex, questID);
  36.     SetItemButtonQuality(self, LE_ITEM_QUALITY_COMMON);
  37.     SetItemButtonCount(self, 0);
  38.     self.Icon:SetTexture(texture);
  39.     self.Tooltip:SetPoint("TOPLEFT", self.Icon, "TOPRIGHT", 0, 10);
  40.     EmbeddedItemTooltip_UpdateSize(self);
  41.     return true;
  42.   end
  43.   return false;
  44. end

New Achievement function.

Lua Code:
  1. function OpenAchievementFrameToAchievement(achievementID)
  2.   if ( not AchievementFrame ) then
  3.     AchievementFrame_LoadUI();
  4.   end
  5.   if ( not AchievementFrame:IsShown() ) then
  6.     AchievementFrame_ToggleAchievementFrame();
  7.   end
  8.   AchievementFrame_SelectAchievement(achievementID);
  9. end

New util function.

Lua Code:
  1. function CallMethodOnNearestAncestor(self, methodName, ...)
  2.   local ancestor = self:GetParent();
  3.   while ancestor and not ancestor[methodName] do
  4.     ancestor = ancestor:GetParent();
  5.   end
  6.  
  7.   if ancestor then
  8.     ancestor[methodName](ancestor, ...);
  9.     return true;
  10.   end
  11.  
  12.   return false;
  13. end
__________________
Thomas aka Urnn

Last edited by thomasjohnshannon : 04-30-18 at 10:32 PM.
  Reply With Quote
05-01-18, 09:44 PM   #2
VincentSDSH
Non-Canadian Luzer!
 
VincentSDSH's Avatar
AddOn Author - Click to view addons
Join Date: Jun 2006
Posts: 350
Wow...this seems like a lot to get coords, am I doing this right?
Lua Code:
  1. local x, y = C_Map.GetPlayerMapPosition(  C_Map.GetBestMapForUnit("player") , "player" ):GetXY()
__________________
AddonsExecutive Assistant User Configurable To-Do ListLegible Mail Choose the Font for Your Mail
  Reply With Quote
05-02-18, 02:22 AM   #3
Rilgamon
Premium Member
 
Rilgamon's Avatar
Premium Member
AddOn Author - Click to view addons
Join Date: Sep 2009
Posts: 822
I dont understand why they did not make uiMapId the second parameter and optional,
defaulting to C_Map.GetBestMapForUnit(unit).
__________________
The cataclysm broke the world ... and the pandas could not fix it!
  Reply With Quote
05-02-18, 02:47 AM   #4
VincentSDSH
Non-Canadian Luzer!
 
VincentSDSH's Avatar
AddOn Author - Click to view addons
Join Date: Jun 2006
Posts: 350
Originally Posted by Rilgamon View Post
I dont understand why they did not make uiMapId the second parameter and optional,
defaulting to C_Map.GetBestMapForUnit(unit).
Convention of uiMapID being the first parameter? I can't explain it. It's not like you're going to

x, y = C_Map.GetPlayerMapPosition( C_Map.GetBestMapForUnit("player"), "party1"):GetXY()

That'd be a damned weird way to ask "is party1 in the same zone I am?"
__________________
AddonsExecutive Assistant User Configurable To-Do ListLegible Mail Choose the Font for Your Mail
  Reply With Quote
05-02-18, 01:15 PM   #5
Seerah
Fishing Trainer
 
Seerah's Avatar
WoWInterface Super Mod
Featured
Join Date: Oct 2006
Posts: 10,860
Originally Posted by VincentSDSH View Post
Wow...this seems like a lot to get coords, am I doing this right?
Lua Code:
  1. local x, y = C_Map.GetPlayerMapPosition(  C_Map.GetBestMapForUnit("player") , "player" ):GetXY()
Or you could just do this:
Lua Code:
  1. local positionData = C_Map.GetPlayerMapPosition(C_Map.GetBestMapForUnit("player"), "player")
And then use positionData.x and positionData.y


/edited because GetCurrentMapID is tied to the world map display
__________________
"You'd be surprised how many people violate this simple principle every day of their lives and try to fit square pegs into round holes, ignoring the clear reality that Things Are As They Are." -Benjamin Hoff, The Tao of Pooh


Last edited by Seerah : 05-02-18 at 01:52 PM.
  Reply With Quote
05-02-18, 01:20 PM   #6
Seerah
Fishing Trainer
 
Seerah's Avatar
WoWInterface Super Mod
Featured
Join Date: Oct 2006
Posts: 10,860
Originally Posted by VincentSDSH View Post
Convention of uiMapID being the first parameter? I can't explain it. It's not like you're going to

x, y = C_Map.GetPlayerMapPosition( C_Map.GetBestMapForUnit("player"), "party1"):GetXY()

That'd be a damned weird way to ask "is party1 in the same zone I am?"
Can't you just do this?
Lua Code:
  1. if C_Map.GetBestMapForUnit("player") == C_Map.GetBestMapForUnit("party1") then
  2. .......
__________________
"You'd be surprised how many people violate this simple principle every day of their lives and try to fit square pegs into round holes, ignoring the clear reality that Things Are As They Are." -Benjamin Hoff, The Tao of Pooh

  Reply With Quote
05-02-18, 04:54 PM   #7
VincentSDSH
Non-Canadian Luzer!
 
VincentSDSH's Avatar
AddOn Author - Click to view addons
Join Date: Jun 2006
Posts: 350
Originally Posted by Seerah View Post
Can't you just do this?
Lua Code:
  1. if C_Map.GetBestMapForUnit("player") == C_Map.GetBestMapForUnit("party1") then
  2. .......
Yes, that was sorta my point: there's no logical reason to pass in different units.

The method to get x, y coords...feels like congress designed it. It works, but I cringe every time I see the code, even with pointers into C_Map.
__________________
AddonsExecutive Assistant User Configurable To-Do ListLegible Mail Choose the Font for Your Mail
  Reply With Quote
05-02-18, 05:20 PM   #8
JDoubleU00
A Firelord
 
JDoubleU00's Avatar
AddOn Author - Click to view addons
Join Date: Mar 2008
Posts: 463
Originally Posted by VincentSDSH View Post
Yes, that was sorta my point: there's no logical reason to pass in different units.

The method to get x, y coords...feels like congress designed it. It works, but I cringe every time I see the code, even with pointers into C_Map.
Congress? lol You're giving them way to much credit.
__________________
Author of JWExpBar and JWRepBar.
  Reply With Quote
05-02-18, 07:35 PM   #9
Seerah
Fishing Trainer
 
Seerah's Avatar
WoWInterface Super Mod
Featured
Join Date: Oct 2006
Posts: 10,860
Some people might like the actual coordinates of their party members. You could set waypoints to them, etc.
__________________
"You'd be surprised how many people violate this simple principle every day of their lives and try to fit square pegs into round holes, ignoring the clear reality that Things Are As They Are." -Benjamin Hoff, The Tao of Pooh

  Reply With Quote
05-03-18, 01:24 AM   #10
Rilgamon
Premium Member
 
Rilgamon's Avatar
Premium Member
AddOn Author - Click to view addons
Join Date: Sep 2009
Posts: 822
Originally Posted by Seerah View Post
Some people might like the actual coordinates of their party members. You could set waypoints to them, etc.
Sure, thats totally ok.
But in 99% you will use C_Map.GetBestMapForUnit to find the units uiMapId.
You'll alway pass the same unit to both functions.
Coords are updated frequently so I guess its quite an impact if I query
the uiMapId through C_Map.GetBestMapForUnit or if C_Map.GetPlayerMapPosition would do it itself (if I could skip it).
__________________
The cataclysm broke the world ... and the pandas could not fix it!
  Reply With Quote
05-03-18, 01:40 AM   #11
VincentSDSH
Non-Canadian Luzer!
 
VincentSDSH's Avatar
AddOn Author - Click to view addons
Join Date: Jun 2006
Posts: 350
Originally Posted by Seerah View Post
Some people might like the actual coordinates of their party members. You could set waypoints to them, etc.
I didn't see anyone argue against coords for party members. If you were setting waypoints, you'd also set them off your current map, so you're still doing a double lookup. Otherwise, it's back to what I said before: a nil result from ..."player", "party3"... is a weird way to ask if you're on the same map or not (i.e., you'd never want to do it that way).

Tbh, if you were going to send back an array, why not have mapID as part of the array along with x and y rather than multiple queries?

Lua Code:
  1. local pos = C_Map.GetPlayerMapPosition("party2")
  2. print( "party2 is at "..tostring(pos.x)..", "..tostring(pos.y) )
  3. print( "party2 is on mapID: "..tostring(pos.mapID) )

I think Rilgamon has the right of it, and this method of getting x,y for addons feels like an afterthought in their overall rebuild of the mapping system.
__________________
AddonsExecutive Assistant User Configurable To-Do ListLegible Mail Choose the Font for Your Mail
  Reply With Quote
05-03-18, 02:15 AM   #12
TOM_RUS
A Warpwood Thunder Caller
AddOn Author - Click to view addons
Join Date: Sep 2008
Posts: 95
Originally Posted by Seerah View Post
Some people might like the actual coordinates of their party members. You could set waypoints to them, etc.
You better be using UnitPosition() if you ever need such things. Works cross zones out of the box, no need to care about uimapid's and works much faster than all that C_Map stuff.
  Reply With Quote
05-03-18, 04:03 AM   #13
Nevcairiel
Premium Member
Premium Member
AddOn Author - Click to view addons
Join Date: Aug 2006
Posts: 63
The entire point of the new map API is to remove behind the scenes "magic", it now does exactly what it says on the tin and what you ask it to do. No ambiguity, no magic, no hidden C state. If you don't pass a zone, then you don't know which zone it choose to represent the coordinates in - and without that information, you can't use them properly.

Passing a uiMapID to GetPlayerZonePosition is certainly useful, since maps are an overlay on top of the real world, there is never just one map that applies to you, at least there is like the world map, the continent map, the zone map, and if you're anywhere deeper there is even more on top of that.

If you're worried about the overhead of asking for the map everytime, you could just track zone changes and update it only then (although there is a bunch of events one needs to take care of) - but generally, don't worry about micro-optimizations like this.

Last edited by Nevcairiel : 05-03-18 at 04:32 AM.
  Reply With Quote
05-03-18, 04:53 AM   #14
Rilgamon
Premium Member
 
Rilgamon's Avatar
Premium Member
AddOn Author - Click to view addons
Join Date: Sep 2009
Posts: 822
Dont get me wrong,Nevcairiel. I really love seeing a rewrite of the engine. When the cataclysm brought so many not working elements into our world and the expected repairs did not happen in pandaria (thats the reason for my tagline ) I pretty much lost the fun in trying new things with addons.
With the documentation included it's really a new enabler for many great things I'm sure.
Still a few shortcuts could help
__________________
The cataclysm broke the world ... and the pandas could not fix it!
  Reply With Quote
05-03-18, 01:25 PM   #15
VincentSDSH
Non-Canadian Luzer!
 
VincentSDSH's Avatar
AddOn Author - Click to view addons
Join Date: Jun 2006
Posts: 350
What Rilgamon said. Many long-delayed optimizations and expansive refactors create certain areas of (fairly unavoidable) usage-weaknesses. At a framework level, after refactors/redesigns, in a hand-shake environment there is a usage-optimization pass, looking at clustered function usage to create efficient (to use Rilgamon's term) 'shortcuts' which aid in coding, debugging, and long-term (and multi-person) maintenance -- the reason we write so many libraries -- but when there is a distinct performance issue (Lua vs C) there is an incentive to provide some of them at the most optimized layer; those helper-functions are a very minimal expense on the framework developer and improve the overall quality of products using the framework.

I mean, I can't believe someone looked at this and said "Yeah, that's a great idea! Huge usage improvement!"
Lua Code:
  1. C_Map.GetPlayerMapPosition(  C_Map.GetBestMapForUnit("player") , "player" )
Whatever other awesome things the mapping system might do (and I'm bloody grateful for the rewrite of the poor thing), this is a bit pants.

As the sage says:
Originally Posted by Rilgamon View Post
Still a few shortcuts could help
__________________
AddonsExecutive Assistant User Configurable To-Do ListLegible Mail Choose the Font for Your Mail
  Reply With Quote
05-03-18, 03:16 PM   #16
Seerah
Fishing Trainer
 
Seerah's Avatar
WoWInterface Super Mod
Featured
Join Date: Oct 2006
Posts: 10,860
Well, the new system does allow you to get your player's (or party members') coordinates based on any map, not just your current zone. There may be some use for that, either in the default UI or for addon devs who feel they can utilize it. Either now or in the future.

If they made the uiMapID an optional second argument, defaulting to the "best map for unit", the API would still need to check which map that is before returning coordinates and location data. And if they gave you a shortcut function, it may very well still do C_Map.GetPlayerMapPosition( C_Map.GetBestMapForUnit("player"), "player") on the back-end.

It's like Nev says:
Originally Posted by Nevcairel
If you don't pass a zone, then you don't know which zone it choose to represent the coordinates in - and without that information, you can't use them properly.
__________________
"You'd be surprised how many people violate this simple principle every day of their lives and try to fit square pegs into round holes, ignoring the clear reality that Things Are As They Are." -Benjamin Hoff, The Tao of Pooh

  Reply With Quote
05-03-18, 03:46 PM   #17
Rilgamon
Premium Member
 
Rilgamon's Avatar
Premium Member
AddOn Author - Click to view addons
Join Date: Sep 2009
Posts: 822
Originally Posted by Seerah View Post
It's like Nev says:
If I call C_Map.GetBestMapForUnit(unit) in Lua or C_Map.GetPlayerMapPosition(unit) would call it in C the result will be the same just quicker and with less code written in Lua.
__________________
The cataclysm broke the world ... and the pandas could not fix it!
  Reply With Quote
05-08-18, 06:32 PM   #18
thomasjohnshannon
A Theradrim Guardian
 
thomasjohnshannon's Avatar
AddOn Author - Click to view addons
Join Date: Sep 2009
Posts: 68
More Map API Changes (26567)

Removed

SetMap was removed but it could just be RequestPreloadMap. Both excisted in the last patch but now we only have RequestPreloadMap.

Lua Code:
  1. {
  2.   Name = "GetCurrentMapID",
  3.   Type = "Function",
  4.  
  5.   Returns =
  6.   {
  7.     { Name = "uiMapID", Type = "number", Nilable = false },
  8.   },
  9. },

New Functions

Lua Code:
  1. {
  2.   Name = "GetMapBannersForMap",
  3.   Type = "Function",
  4.  
  5.   Arguments =
  6.   {
  7.     { Name = "uiMapID", Type = "number", Nilable = false },
  8.   },
  9.  
  10.   Returns =
  11.   {
  12.     { Name = "mapBanners", Type = "table", InnerType = "MapBannerInfo", Nilable = false },
  13.   },
  14. },
  15. {
  16.   Name = "GetMapLinksForMap",
  17.   Type = "Function",
  18.  
  19.   Arguments =
  20.   {
  21.     { Name = "uiMapID", Type = "number", Nilable = false },
  22.   },
  23.  
  24.   Returns =
  25.   {
  26.     { Name = "mapLinks", Type = "table", InnerType = "MapLinkInfo", Nilable = false },
  27.   },
  28. },
  29. {
  30.   Name = "GetMapPosFromWorldPos",
  31.   Type = "Function",
  32.  
  33.   Arguments =
  34.   {
  35.     { Name = "continentID", Type = "number", Nilable = false },
  36.     { Name = "worldPosition", Type = "table", Mixin = "Vector2DMixin", Nilable = false },
  37.     { Name = "overrideUiMapID", Type = "number", Nilable = true },
  38.   },
  39.  
  40.   Returns =
  41.   {
  42.     { Name = "uiMapID", Type = "number", Nilable = false },
  43.     { Name = "mapPosition", Type = "table", Mixin = "Vector2DMixin", Nilable = false },
  44.   },
  45. },
  46. {
  47.   Name = "GetWorldPosFromMapPos",
  48.   Type = "Function",
  49.  
  50.   Arguments =
  51.   {
  52.     { Name = "uiMapID", Type = "number", Nilable = false },
  53.     { Name = "mapPosition", Type = "table", Mixin = "Vector2DMixin", Nilable = false },
  54.   },
  55.  
  56.   Returns =
  57.   {
  58.     { Name = "continentID", Type = "number", Nilable = false },
  59.     { Name = "worldPosition", Type = "table", Mixin = "Vector2DMixin", Nilable = false },
  60.   },
  61. },

Map event info added.

Lua Code:
  1. Events =
  2. {
  3. {
  4.   Name = "NewWmoChunk",
  5.   Type = "Event",
  6.   LiteralName = "NEW_WMO_CHUNK",
  7. },
  8. {
  9.   Name = "ZoneChanged",
  10.   Type = "Event",
  11.   LiteralName = "ZONE_CHANGED",
  12. },
  13. {
  14.   Name = "ZoneChangedIndoors",
  15.   Type = "Event",
  16.   LiteralName = "ZONE_CHANGED_INDOORS",
  17. },
  18. {
  19.   Name = "ZoneChangedNewArea",
  20.   Type = "Event",
  21.   LiteralName = "ZONE_CHANGED_NEW_AREA",
  22. },
  23. },
__________________
Thomas aka Urnn
  Reply With Quote
05-08-18, 07:30 PM   #19
thomasjohnshannon
A Theradrim Guardian
 
thomasjohnshannon's Avatar
AddOn Author - Click to view addons
Join Date: Sep 2009
Posts: 68
More (26567) Changes

IsWarModeEnabled was renamed to IsWarModeFeatureEnabled.
ShowUIPanel(WorldMapFrame); replaced with OpenWorldMap();

Quest Tag constants changed.

Lua Code:
  1. {
  2.   Name = "QuestTag",
  3.   Type = "Enumeration",
  4.   NumValues = 10,
  5.   MinValue = 0,
  6.   MaxValue = 102,
  7.   Fields =
  8.   {
  9.     { Name = "Group", Type = "QuestTag", EnumValue = 1 },
  10.     { Name = "Pvp", Type = "QuestTag", EnumValue = 41 },
  11.     { Name = "Raid", Type = "QuestTag", EnumValue = 62 },
  12.     { Name = "Dungeon", Type = "QuestTag", EnumValue = 81 },
  13.     { Name = "Legendary", Type = "QuestTag", EnumValue = 83 },
  14.     { Name = "Heroic", Type = "QuestTag", EnumValue = 85 },
  15.     { Name = "Raid10", Type = "QuestTag", EnumValue = 88 },
  16.     { Name = "Raid25", Type = "QuestTag", EnumValue = 89 },
  17.     { Name = "Scenario", Type = "QuestTag", EnumValue = 98 },
  18.     { Name = "Account", Type = "QuestTag", EnumValue = 102 },
  19.   },
  20. },
  21.  
  22. [Enum.QuestTag.Dungeon] = { 0.421875, 0.5625, 0, 0.28125 },
  23. [Enum.QuestTag.Scenario] = { 0.5625, 0.703125, 0, 0.28125 },
  24. [Enum.QuestTag.Account] = { 0.84375, 0.984375, 0, 0.28125 },
  25. [Enum.QuestTag.Legendary] = { 0, 0.140625, 0.28125, 0.5625 },
  26. [Enum.QuestTag.Group] = { 0.140625, 0.28125, 0.28125, 0.5625 },
  27. [Enum.QuestTag.Pvp] = { 0.28125, 0.421875, 0.28125, 0.5625 },
  28. [Enum.QuestTag.Heroic] = { 0, 0.140625, 0.5625, 0.84375 },
  29. -- same texture for all raids
  30. [Enum.QuestTag.Raid] = { 0.703125, 0.84375, 0, 0.28125 },
  31. [Enum.QuestTag.Raid10] = { 0.703125, 0.84375, 0, 0.28125 },
  32. [Enum.QuestTag.Raid25] = { 0.703125, 0.84375, 0, 0.28125 },

New Functions

Lua Code:
  1. {
  2.   Name = "GetStaggerPercentage",
  3.   Type = "Function",
  4.  
  5.   Arguments =
  6.   {
  7.     { Name = "unit", Type = "string", Nilable = false },
  8.   },
  9.  
  10.   Returns =
  11.   {
  12.     { Name = "stagger", Type = "number", Nilable = false },
  13.     { Name = "staggerAgainstTarget", Type = "number", Nilable = true },
  14.   },
  15. },
  16.  
  17. {
  18.   Name = "GetHonorRewardInfo",
  19.   Type = "Function",
  20.  
  21.   Arguments =
  22.   {
  23.     { Name = "honorLevel", Type = "number", Nilable = false },
  24.   },
  25.  
  26.   Returns =
  27.   {
  28.     { Name = "info", Type = "HonorRewardInfo", Nilable = true },
  29.   },
  30. },
  31. {
  32.   Name = "GetNextHonorLevelForReward",
  33.   Type = "Function",
  34.  
  35.   Arguments =
  36.   {
  37.     { Name = "honorLevel", Type = "number", Nilable = false },
  38.   },
  39.  
  40.   Returns =
  41.   {
  42.     { Name = "nextHonorLevelWithReward", Type = "number", Nilable = true },
  43.   },
  44. },
  45. {
  46.   Name = "GetPvpTierInfo",
  47.   Type = "Function",
  48.  
  49.   Arguments =
  50.   {
  51.     { Name = "tierID", Type = "number", Nilable = false },
  52.   },
  53.  
  54.   Returns =
  55.   {
  56.     { Name = "pvpTierInfo", Type = "PvpTierInfo", Nilable = true },
  57.   },
  58. },
  59.  
  60. {
  61.   Name = "GetSpellsDisplay",
  62.   Type = "Function",
  63.  
  64.   Arguments =
  65.   {
  66.     { Name = "specializationID", Type = "number", Nilable = false },
  67.   },
  68.  
  69.   Returns =
  70.   {
  71.     { Name = "spellID", Type = "table", InnerType = "number", Nilable = false },
  72.   },
  73. },
__________________
Thomas aka Urnn
  Reply With Quote
05-09-18, 05:21 PM   #20
Nevcairiel
Premium Member
Premium Member
AddOn Author - Click to view addons
Join Date: Aug 2006
Posts: 63
Originally Posted by thomasjohnshannon View Post
SetMap was removed but it could just be RequestPreloadMap. Both excisted in the last patch but now we only have RequestPreloadMap.
Both SetMap and GetCurrentMapID have been removed because there finally is absolutely no stateful map API anymore. There is no concept of a global "current map" anymore - its now tracked by any map frame on its own. Similarly, the WORLD_MAP_UPDATE event has been removed, because it no longer applies. If you want to be notified when the world map changes the map its showing, hook into WorldMapFrame.OnMapChanged

If you want to know which map the World Map is looking at, call WorldMapFrame:GetMapID(), or call WorldMapFrame:NavigateToMap() to change it.

This allows you to implement other map-things without messing with the World Map, like the new BattlefieldMap that returned in the recent build. It uses much of the same logic of the World Map, but it could show a different map if you wanted to.

Last edited by Nevcairiel : 05-10-18 at 10:12 AM.
  Reply With Quote

WoWInterface » PTR » PTR API and Graphics Changes » New/changed in build 26522.

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off