12.07.2015 Views

Wiley-World.of.Warcraft.Programming.A.Guide.and.Reference.for.Creating.WoW.Addons

Wiley-World.of.Warcraft.Programming.A.Guide.and.Reference.for.Creating.WoW.Addons

Wiley-World.of.Warcraft.Programming.A.Guide.and.Reference.for.Creating.WoW.Addons

SHOW MORE
SHOW LESS
  • No tags were found...

Create successful ePaper yourself

Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.

598 Part IV ■ <strong>Reference</strong>Returns:canQuery—1 if the player can submit an auction query; otherwise nil (1nil)canMassQuery—1 if the player can submit a mass auction query; otherwise nil(1nil)CanSendLFGQueryReturns whether the player can per<strong>for</strong>m a given LFM query.canSend = CanSendLFGQuery(type, index)LFM requests are throttled, preventing abuse <strong>of</strong> the server by clients sendingtoo many queries in short succession. The server may block repeat requests <strong>for</strong>the same query parameters while allowing requests with differentparameters—checking this function be<strong>for</strong>e calling LFGQuery() verifieswhether the specific query parameters are currently allowed.Arguments:type—Index <strong>of</strong> an LFG query type (in the list returned by GetLFGTypes())(number)index—Index <strong>of</strong> an LFG entry (in the list returned by GetLFGTypeEntries(type)) (number)Returns:canSend—true if the player can submit a LFG query <strong>for</strong> the given type/index,otherwise false (boolean)CanShowAchievementUIReturns whether the Achievements UI should be enabled.canShow = CanShowAchievementUI()Used by the default UI to determine whether to show or hide the menu button<strong>for</strong> Achievements (as it also does <strong>for</strong> Talents); currently always returns true.Returns:canShow—true if the Achievements UI should be enabled, otherwise false(boolean)CanShowResetInstancesReturns whether the player can reset instances.canResetInstances = CanShowResetInstances()Used to determine whether to display the ‘‘Reset Instance’’ option in the unitpopup menu <strong>for</strong> the player.Only instances to which the player is not saved may be reset (i.e. normal 5-m<strong>and</strong>ungeons, not heroic dungeons or raids), <strong>and</strong> only by a solo player or groupleader.Returns:canResetInstances—1 if the player can currently reset instances; otherwisenil (1nil)

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!