Quantcast WoWInterface - View Single Post - Assorted 5.4.0 API changes
View Single Post
09-08-13, 09:21 AM   #24
Dridzt
A Pyroguard Emberseer
 
Dridzt's Avatar
AddOn Author - Click to view addons
Join Date: Nov 2005
Posts: 1,257
Originally Posted by Jarod24 View Post
Just tested the IsInProvingGround() function and it will only return 1 after the player has talked to the NPC inside the scenario and the timer has finished counting down.


Lua Code:
  1. local inProvingGround = IsInProvingGround();
  2.   --Returns: nil or 1.
  3.   --Remarks: Will only return 1 after the countdown timer has finished when the player is inside the proving grounds scenario.
Thanks, as I have noted this is an UI function, not WoW API so if it's used by someone it would be for convenience, no guarantees on how it will work down the road.
Currently it is defined as
Code:
function IsInProvingGround()
	if (WorldStateProvingGroundsFrame) then
		return WorldStateProvingGroundsFrame:IsVisible()
	else
		return nil;
	end
end
in WatchFrame.lua
It would be interesting to check what C_Scenario.GetProvingGroundsInfo() and / or GetInstanceInfo() return in proving grounds as that's probably a better way to test for them.

Last edited by Dridzt : 09-08-13 at 09:25 AM.
  Reply With Quote