Originally Posted by Jarod24
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:
local inProvingGround = IsInProvingGround(); --Returns: nil or 1. --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.