removed later content and updated ui comnponents and multi-return

This commit is contained in:
Ben
2023-10-16 14:41:43 -05:00
parent 0361e746e6
commit bc4fc9632b
70 changed files with 14232 additions and 16523 deletions

View File

@@ -1,69 +1,20 @@
/** @noSelfInFile */
/// <reference path="global.d.ts" />
/// <reference path="enums.d.ts" />
/**
* Returns the highest expansion id the current account has been flagged for.
*/
declare function GetAccountExpansionLevel(): EXPANSION_CLASSIC | EXPANSION_BURNING_CRUSADE | EXPANSION_WRATH_OF_THE_LICH_KING | EXPANSION_CATACLYSM |
EXPANSION_MISTS_OF_PANDARIA | EXPANSION_WARLORDS_OF_DRAENOR | EXPANSION_LEGION | EXPANSION_BATTLE_FOR_AZEROTH;
/**
* Returns the time spent logged in in current billing unit. This function is to limit players from playing the game for too long
* @return Amount of time left in seconds to play as rested. See details below for clarification. Returns nil for EU and US accounts
*/
declare function GetBillingTimeRested(): number;
/**
* Returns whether the player is using a trial (free-to-play) account
* @see https://wow.gamepedia.com/API_IsTrialAccount
*/
declare function IsTrialAccount(): boolean;
/**
* Returns the cap on trial character level, money and profession skill for Starter Edition accounts
* @returns
* 1. rLevel number - character level cap, currently 20
* 2. rMoney number - max amount of money in copper, currently 10000000
* 3. profCap number - profession level cap, currently 0
* @see https://wow.gamepedia.com/API_GetRestrictedAccountData
*/
declare function GetRestrictedAccountData(): [number, number, number];
/**
* unknown
*/
declare function GetSecondsUntilParentalControlsKick(): WoWAPI.Unknown;
/**
* Returns if the account has been secured with Blizzard Mobile Authenticator
* @returns accountSecured
* @since 7.3.5 (2018-01-16)
*/
declare function IsAccountSecured(): boolean;
/**
* Returns if the account has trial account restrictions
*/
declare function IsRestrictedAccount(): WoWAPI.Unknown;
/**
* unknown behaviour
* @since 6.1.0 (2015-02-24)
* @see https://wow.gamepedia.com/API_IsVeteranTrialAccount
*/
declare function IsVeteranTrialAccount(): boolean;
/**
* Indicates the player's account has reached a daily curfew of 90 minutes, imposed on children and any non-confirmed adults in China to comply with local law
* @returns 1 if the account is "unhealthy", nil if not. See details below for clarification. Always returns nil outside China.
* @see https://wow.gamepedia.com/API_NoPlayTime
*/
declare function NoPlayTime(): WoWAPI.Flag;
/**
* unknown behaviour
* @since 9.0.1 (2020-10-13)
*/
declare function SendSubscriptionInterstitialResponse(): Enum.SubscriptionInterstitialResponseType;
/** @noSelfInFile */
/// <reference path="global.d.ts" />
/**
* Returns the highest expansion id the current account has been flagged for.
*/
declare function GetAccountExpansionLevel(): EXPANSION_CLASSIC | EXPANSION_BURNING_CRUSADE | EXPANSION_WRATH_OF_THE_LICH_KING | EXPANSION_CATACLYSM |
EXPANSION_MISTS_OF_PANDARIA | EXPANSION_WARLORDS_OF_DRAENOR | EXPANSION_LEGION | EXPANSION_BATTLE_FOR_AZEROTH;
/**
* Returns the time spent logged in in current billing unit. This function is to limit players from playing the game for too long
* @return Amount of time left in seconds to play as rested. See details below for clarification. Returns nil for EU and US accounts
*/
declare function GetBillingTimeRested(): number;
/**
* Returns whether the player is using a trial (free-to-play) account
*/
declare function IsTrialAccount(): boolean;

View File

@@ -1,295 +1,284 @@
/** @noSelfInFile */
/// <reference path="global.d.ts" />
/// <reference path="unit.d.ts" />
declare namespace WoWAPI {
/**
* Achievement links are returned by GetAchievementLink().
* @example |cffffff00|Hachievement:2186:00000000002FDDE9:1:12:19:8:4294967295:4294967295:4294967295:4294967295|h[The Immortal]|h|r
*/
type AchievementLink = Hyperlink;
}
/**
* Marks an achievement for tracking in the WatchFrame.
*
* @param achivementId ID of the achievement to add to tracking
* @event TRACKED_ACHIEVEMENT_UPDATE
*/
declare function AddTrackedAchievement(achivementId: number): void;
/**
* Returns whether account-wide achievements are hidden from other players
*
* @returns true if other players cannot view your account-level achievements; false otherwise
*/
declare function AreAccountAchievementsHidden(): boolean;
/**
* Returns if the AchievementUI can be displayed
*
* @returns true if the achievement data is available (and hence the AchievementUI can be displayed), false otherwise
*/
declare function CanShowAchievementUI(): boolean;
/**
* Remove the unit being compared
* @see https://wow.gamepedia.com/API_ClearAchievementComparisonUnit
*/
declare function ClearAchievementComparisonUnit(): void;
/**
* @see https://wow.gamepedia.com/API_ClearAchievementSearchString
*/
declare function ClearAchievementSearchString(): WoWAPI.Unknown;
/**
* Returns the category number the requested achievement belongs to
*
* @param achivementId ID of the achievement to retrieve information for
* @returns ID of the achievement's category.
*/
declare function GetAchievementCategory(achivementId: number): number;
/**
* Returns information about the comparison unit's achievements
*
* @param achivementId ID of the achievement to retrieve information for
* @see https://wow.gamepedia.com/API_GetAchievementComparisonInfo
* @tupleReturn
*/
declare function GetAchievementComparisonInfo(achivementId: number): [boolean, number, number, number];
/**
* Returns information about the given Achievement's specified criteria
*
* @param achivementId Achievement ID the queried criteria belongs to
* @param criteriaIndex Index of the criteria to query, ascending from 1 up to GetAchievementNumCriteria(achievementID).
* @see https://wow.gamepedia.com/API_GetAchievementCriteriaInfo
* @tupleReturn
*/
// tslint:disable-next-line max-line-length
declare function GetAchievementCriteriaInfo(achivementId: number, criteriaIndex: number): [string, number, boolean, number, number, string, number, number, string, number, boolean];
/**
* Returns information about the given Achievement's specified criteria
*
* @param achivementId Achievement ID the queried criteria belongs to
* @param criteriaId Index of the criteria to query, ascending from 1 up to GetAchievementNumCriteria(achievementID).
* @see https://wow.gamepedia.com/API_GetAchievementCriteriaInfoByID
*/
// tslint:disable-next-line max-line-length
declare function GetAchievementCriteriaInfoByID(achivementId: number, criteriaId: number): [string, number, boolean, number, string, number, number, string, number, boolean];
/**
* Returns information about the given Achievement
*
* @param achivementId ID of the achievement to retrieve information for
* @param index An offset into the achievement category, between 1 and GetCategoryNumAchievements(categoryID)
* @see https://wow.gamepedia.com/API_GetAchievementInfo
* @tupleReturn
*/
// tslint:disable-next-line max-line-length
declare function GetAchievementInfo(achivementId: number, index: number): [number, string, number, boolean, number, number, number, string, number, number, string, boolean, boolean, string];
// tslint:disable-next-line max-line-length
declare function GetAchievementInfo(categoryId: number, index: number): [number, string, number, boolean, number, number, number, string, number, number, string, boolean, boolean, string];
/**
* Returns a achievementLink for the specified Achievement
*
* @param achivementId The ID of the Achievement
* @see https://wow.gamepedia.com/API_GetAchievementLink
*/
declare function GetAchievementLink(achivementId: number): WoWAPI.AchievementLink;
/**
* Returns the number of criteria for the given Achievement
*
* @param achivementId The ID of the Achievement
* @see https://wow.gamepedia.com/API_GetAchievementNumCriteria
*/
declare function GetAchievementNumCriteria(achivementId: number): number;
/**
* Returns information about the given Category
*
* @param categoryId The ID of the category to get the info for.
* @see https://wow.gamepedia.com/API_GetCategoryInfo
* @tupleReturn
*/
declare function GetCategoryInfo(categoryId: number): [string, number, number];
/**
* Returns the list of Achievement categories
*
* @returns array containing achievement category IDs, in no particular order
* @see https://wow.gamepedia.com/API_GetCategoryList
*/
declare function GetCategoryList(): number[];
/**
* Returns the total, completed and incompleted number of achievements in a specific category
*
* @param categoryId Achievement category ID, as returned by GetCategoryList.
* @param includeAll If true-equivalent, include all achievements, otherwise, only includes those currently visible
* @see https://wow.gamepedia.com/API_GetCategoryNumAchievements
* @tupleReturn
*/
declare function GetCategoryNumAchievements(categoryId: number, includeAll?: boolean): [number, number, number];
/**
* Return the value of the requested Statistic from the comparison unit
*
* @param achivementId The ID of the Achievement
* @returns The value of the requested Statistic from the comparison unit
* @see https://wow.gamepedia.com/API_GetComparisonStatistic
*/
declare function GetComparisonStatistic(achivementId: number): string;
/**
* Returns the ID of a filtered achievement, resulting from a call to SetAchievementSearchString.
*
* @param index The index of the filtered achievement to return the ID of, between 1 and GetNumFilteredAchievements().
* @returns The ID of an achievement.
* @see https://wow.gamepedia.com/API_GetFilteredAchievementID
* @since 7.0.3
*/
declare function GetFilteredAchievementID(index: number): number;
/**
* Return the next achievement in a chain
*
* @param achivementId The ID of the Achievement
* @returns The ID of the next Achievement in chain or nil
* @see https://wow.gamepedia.com/API_GetNextAchievement
*/
declare function GetNextAchievement(achivementId: number): number | null;
/**
* Returns the number of completed achievements for the comparison player
*
* @param achivementId ID of the achievement to retrieve information for
* @see https://wow.gamepedia.com/API_GetNumComparisonCompletedAchievements
*/
declare function GetNumComparisonCompletedAchievements(achivementId: number): [number, number];
/**
* Return the total number of Achievements, and number completed
*
* @see https://wow.gamepedia.com/API_GetNumCompletedAchievements
* @tupleReturn
*/
declare function GetNumCompletedAchievements(): [number, number];
/**
* Returns the number of achievements that match the search string specified calling SetAchievementSearchString
*
* @returns The number of achievements that match the search string
* @see https://wow.gamepedia.com/API_GetNumFilteredAchievements
* @since 7.0.3
*/
declare function GetNumFilteredAchievements(): number;
/**
* Return the previous achievement in a chain
*
* @param achivementId The ID of the Achievement
* @returns The ID of the previous Achievement in chain or nil
* @see https://wow.gamepedia.com/API_GetPreviousAchievement
*/
declare function GetPreviousAchievement(achivementId: number): number | null;
/**
* Return the value of the requested Statistic
*
* @param achievementId The ID of the Achievement
* @returns The value of the requested Statistic
* @see https://wow.gamepedia.com/API_GetStatistic
*/
declare function GetStatistic(achievementId: number): WoWAPI.UnknownStringKeyTable;
/**
* Returns a table of achievement categories
*
* @returns list of all the categories
* @see https://wow.gamepedia.com/API_GetStatisticsCategoryList
*/
declare function GetStatisticsCategoryList(): WoWAPI.UnknownNumberKeyTable;
/**
* Returns the total number of Achievement Points earned
*
* @returns Total points earned
* @see https://wow.gamepedia.com/API_GetTotalAchievementPoints
*/
declare function GetTotalAchievementPoints(): number;
/**
* Returns a list of (up to 10) currently tracked achievements
*
* @returns achievementId(s) of achievements you are currently tracking
* @see https://wow.gamepedia.com/API_GetTrackedAchievements
* @since 3.0.2
* @tupleReturn
*/
declare function GetTrackedAchievements(): [number, number, number, number, number, number, number, number, number, number];
/**
* Returns the total number of tracked achievements
*
* @returns number of achievements you are currently tracking, up to 10.
* @see https://wow.gamepedia.com/API_GetNumTrackedAchievements
* @since 3.1.0
*/
declare function GetNumTrackedAchievements(): number;
/**
* Indicates whether the specified achievement is eligible to be completed
*
* @param achievementId ID of the achievement to query
* @see https://wow.gamepedia.com/API_IsAchievementEligible
* @since 4.0.1
*/
declare function IsAchievementEligible(achievementId: number): WoWAPI.Unknown;
/**
* Un-marks an achievement for tracking in the WatchFrame
*
* @param achievementId ID of the achievement to add to tracking
* @see https://wow.gamepedia.com/API_RemoveTrackedAchievement
* @event TRACKED_ACHIEVEMENT_UPDATE
* @since 3.1.0
*/
declare function RemoveTrackedAchievement(achievementId: number): void;
/**
* Sets the unit to be compared to.
*
* @param unit unit to query, e.g. "target"
* @returns Returns true/false depending on whether the unit is valid
* @see https://wow.gamepedia.com/API_SetAchievementComparisonUnit
* @event INSPECT_ACHIEVEMENT_READY
*/
declare function SetAchievementComparisonUnit(unit: WoWAPI.UnitId): boolean;
/**
* Starts a search for achievements containing the specified text
*
* @param searchText Text to search for in the achievements
* @returns true if the search is finished, false otherwise
* @event ACHIEVEMENT_SEARCH_UPDATED
* @see https://wow.gamepedia.com/API_SetAchievementSearchString
* @since 7.0.3
*/
declare function SetAchievementSearchString(searchText: string): boolean;
/**
* Sets whether account-wide achievements are shown to other players
*
* @param show true to allow other players to view all achievements your account has achieved, false to only allow viewing achievements
* for individual characters
* @see https://wow.gamepedia.com/API_ShowAccountAchievements
* @since 5.0.4
*/
declare function ShowAccountAchievements(show: boolean): void;
/** @noSelfInFile */
/// <reference path="global.d.ts" />
/// <reference path="unit.d.ts" />
declare namespace WoWAPI {
/**
* Achievement links are returned by GetAchievementLink().
* @example |cffffff00|Hachievement:2186:00000000002FDDE9:1:12:19:8:4294967295:4294967295:4294967295:4294967295|h[The Immortal]|h|r
*/
type AchievementLink = Hyperlink;
}
/**
* Marks an achievement for tracking in the WatchFrame.
*
* @param achivementId ID of the achievement to add to tracking
* @event TRACKED_ACHIEVEMENT_UPDATE
*/
declare function AddTrackedAchievement(achivementId: number): void;
/**
* Returns whether account-wide achievements are hidden from other players
*
* @returns true if other players cannot view your account-level achievements; false otherwise
*/
declare function AreAccountAchievementsHidden(): boolean;
/**
* Returns if the AchievementUI can be displayed
*
* @returns true if the achievement data is available (and hence the AchievementUI can be displayed), false otherwise
*/
declare function CanShowAchievementUI(): boolean;
/**
* Returns the category number the requested achievement belongs to
*
* @param achivementId ID of the achievement to retrieve information for
* @returns ID of the achievement's category.
*/
declare function GetAchievementCategory(achivementId: number): number;
/**
* Returns information about the comparison unit's achievements
*
* @param achivementId ID of the achievement to retrieve information for
* @see https://wow.gamepedia.com/API_GetAchievementComparisonInfo
* @tupleReturn
*/
declare function GetAchievementComparisonInfo(achivementId: number): [boolean, number, number, number];
/**
* Returns information about the given Achievement's specified criteria
*
* @param achivementId Achievement ID the queried criteria belongs to
* @param criteriaIndex Index of the criteria to query, ascending from 1 up to GetAchievementNumCriteria(achievementID).
* @see https://wow.gamepedia.com/API_GetAchievementCriteriaInfo
* @tupleReturn
*/
// tslint:disable-next-line max-line-length
declare function GetAchievementCriteriaInfo(achivementId: number, criteriaIndex: number): [string, number, boolean, number, number, string, number, number, string, number, boolean];
/**
* Returns information about the given Achievement's specified criteria
*
* @param achivementId Achievement ID the queried criteria belongs to
* @param criteriaId Index of the criteria to query, ascending from 1 up to GetAchievementNumCriteria(achievementID).
* @see https://wow.gamepedia.com/API_GetAchievementCriteriaInfoByID
*/
// tslint:disable-next-line max-line-length
declare function GetAchievementCriteriaInfoByID(achivementId: number, criteriaId: number): [string, number, boolean, number, string, number, number, string, number, boolean];
/**
* Returns information about the given Achievement
*
* @param achivementId ID of the achievement to retrieve information for
* @param index An offset into the achievement category, between 1 and GetCategoryNumAchievements(categoryID)
* @see https://wow.gamepedia.com/API_GetAchievementInfo
* @tupleReturn
*/
// tslint:disable-next-line max-line-length
declare function GetAchievementInfo(achivementId: number, index: number): [number, string, number, boolean, number, number, number, string, number, number, string, boolean, boolean, string];
// tslint:disable-next-line max-line-length
declare function GetAchievementInfo(categoryId: number, index: number): [number, string, number, boolean, number, number, number, string, number, number, string, boolean, boolean, string];
/**
* Returns a achievementLink for the specified Achievement
*
* @param achivementId The ID of the Achievement
* @see https://wow.gamepedia.com/API_GetAchievementLink
*/
declare function GetAchievementLink(achivementId: number): WoWAPI.AchievementLink;
/**
* Returns the number of criteria for the given Achievement
*
* @param achivementId The ID of the Achievement
* @see https://wow.gamepedia.com/API_GetAchievementNumCriteria
*/
declare function GetAchievementNumCriteria(achivementId: number): number;
/**
* Returns information about the given Category
*
* @param categoryId The ID of the category to get the info for.
* @see https://wow.gamepedia.com/API_GetCategoryInfo
* @tupleReturn
*/
declare function GetCategoryInfo(categoryId: number): [string, number, number];
/**
* Returns the list of Achievement categories
*
* @returns array containing achievement category IDs, in no particular order
* @see https://wow.gamepedia.com/API_GetCategoryList
*/
declare function GetCategoryList(): number[];
/**
* Returns the total, completed and incompleted number of achievements in a specific category
*
* @param categoryId Achievement category ID, as returned by GetCategoryList.
* @param includeAll If true-equivalent, include all achievements, otherwise, only includes those currently visible
* @see https://wow.gamepedia.com/API_GetCategoryNumAchievements
* @tupleReturn
*/
declare function GetCategoryNumAchievements(categoryId: number, includeAll?: boolean): [number, number, number];
/**
* Return the value of the requested Statistic from the comparison unit
*
* @param achivementId The ID of the Achievement
* @returns The value of the requested Statistic from the comparison unit
* @see https://wow.gamepedia.com/API_GetComparisonStatistic
*/
declare function GetComparisonStatistic(achivementId: number): string;
/**
* Returns the ID of a filtered achievement, resulting from a call to SetAchievementSearchString.
*
* @param index The index of the filtered achievement to return the ID of, between 1 and GetNumFilteredAchievements().
* @returns The ID of an achievement.
* @see https://wow.gamepedia.com/API_GetFilteredAchievementID
* @since 7.0.3
*/
declare function GetFilteredAchievementID(index: number): number;
/**
* Return the next achievement in a chain
*
* @param achivementId The ID of the Achievement
* @returns The ID of the next Achievement in chain or nil
* @see https://wow.gamepedia.com/API_GetNextAchievement
*/
declare function GetNextAchievement(achivementId: number): number | null;
/**
* Returns the number of completed achievements for the comparison player
*
* @param achivementId ID of the achievement to retrieve information for
* @see https://wow.gamepedia.com/API_GetNumComparisonCompletedAchievements
*/
declare function GetNumComparisonCompletedAchievements(achivementId: number): [number, number];
/**
* Return the total number of Achievements, and number completed
*
* @see https://wow.gamepedia.com/API_GetNumCompletedAchievements
* @tupleReturn
*/
declare function GetNumCompletedAchievements(): [number, number];
/**
* Returns the number of achievements that match the search string specified calling SetAchievementSearchString
*
* @returns The number of achievements that match the search string
* @see https://wow.gamepedia.com/API_GetNumFilteredAchievements
* @since 7.0.3
*/
declare function GetNumFilteredAchievements(): number;
/**
* Return the previous achievement in a chain
*
* @param achivementId The ID of the Achievement
* @returns The ID of the previous Achievement in chain or nil
* @see https://wow.gamepedia.com/API_GetPreviousAchievement
*/
declare function GetPreviousAchievement(achivementId: number): number | null;
/**
* Return the value of the requested Statistic
*
* @param achievementId The ID of the Achievement
* @returns The value of the requested Statistic
* @see https://wow.gamepedia.com/API_GetStatistic
*/
declare function GetStatistic(achievementId: number): WoWAPI.UnknownStringKeyTable;
/**
* Returns a table of achievement categories
*
* @returns list of all the categories
* @see https://wow.gamepedia.com/API_GetStatisticsCategoryList
*/
declare function GetStatisticsCategoryList(): WoWAPI.UnknownNumberKeyTable;
/**
* Returns the total number of Achievement Points earned
*
* @returns Total points earned
* @see https://wow.gamepedia.com/API_GetTotalAchievementPoints
*/
declare function GetTotalAchievementPoints(): number;
/**
* Returns a list of (up to 10) currently tracked achievements
*
* @returns achievementId(s) of achievements you are currently tracking
* @see https://wow.gamepedia.com/API_GetTrackedAchievements
* @since 3.0.2
* @tupleReturn
*/
declare function GetTrackedAchievements(): [number, number, number, number, number, number, number, number, number, number];
/**
* Returns the total number of tracked achievements
*
* @returns number of achievements you are currently tracking, up to 10.
* @see https://wow.gamepedia.com/API_GetNumTrackedAchievements
* @since 3.1.0
*/
declare function GetNumTrackedAchievements(): number;
/**
* Indicates whether the specified achievement is eligible to be completed
*
* @param achievementId ID of the achievement to query
* @see https://wow.gamepedia.com/API_IsAchievementEligible
* @since 4.0.1
*/
declare function IsAchievementEligible(achievementId: number): WoWAPI.Unknown;
/**
* Un-marks an achievement for tracking in the WatchFrame
*
* @param achievementId ID of the achievement to add to tracking
* @see https://wow.gamepedia.com/API_RemoveTrackedAchievement
* @event TRACKED_ACHIEVEMENT_UPDATE
* @since 3.1.0
*/
declare function RemoveTrackedAchievement(achievementId: number): void;
/**
* Sets the unit to be compared to.
*
* @param unit unit to query, e.g. "target"
* @returns Returns true/false depending on whether the unit is valid
* @see https://wow.gamepedia.com/API_SetAchievementComparisonUnit
* @event INSPECT_ACHIEVEMENT_READY
*/
declare function SetAchievementComparisonUnit(unit: WoWAPI.UnitId): boolean;
/**
* Starts a search for achievements containing the specified text
*
* @param searchText Text to search for in the achievements
* @returns true if the search is finished, false otherwise
* @event ACHIEVEMENT_SEARCH_UPDATED
* @see https://wow.gamepedia.com/API_SetAchievementSearchString
* @since 7.0.3
*/
declare function SetAchievementSearchString(searchText: string): boolean;
/**
* Sets whether account-wide achievements are shown to other players
*
* @param show true to allow other players to view all achievements your account has achieved, false to only allow viewing achievements
* for individual characters
* @see https://wow.gamepedia.com/API_ShowAccountAchievements
* @since 5.0.4
*/
declare function ShowAccountAchievements(show: boolean): void;

View File

@@ -1,302 +1,302 @@
/** @noSelfInFile */
/// <reference path="global.d.ts" />
/// <reference path="ui/ui.d.ts" />
/**
* Presses the specified FrameXML action button
*
* @param buttonId The button ID of the button to push
* @see https://wow.gamepedia.com/API_ActionButtonDown
* @private PROTECTED UI
*/
declare function ActionButtonDown(buttonId: number): void;
/**
* Releases the specified action button
*
* @param buttonId The button ID of the button to release (Integers from 1 to 12)
* @see https://wow.gamepedia.com/API_ActionButtonUp
* @private PROTECTED UI
*/
declare function ActionButtonUp(buttonId: number): void;
/**
* Returns true if the action has a numeric range requirement.
*
* @param slotId The slot ID to test
* @returns True if the specified slot contains an action which has a numeric range requirement
* @see https://wow.gamepedia.com/API_ActionHasRange
*/
declare function ActionHasRange(slotId: ActionBarSlotId): boolean;
/**
* Begin "Left click" in the 3D world
*
* @see https://wow.gamepedia.com/API_CameraOrSelectOrMoveStart
* @private PROTECTED
*/
declare function CameraOrSelectOrMoveStart(): void;
/**
* End "Left click" in the 3D game world
*
* @param stickyFlag If present and set then any camera offset is 'sticky' and remains until explicitly cancelled
* @see https://wow.gamepedia.com/API_CameraOrSelectOrMoveStop
* @private PROTECTED
*/
declare function CameraOrSelectOrMoveStop(stickyFlag?: WoWAPI.Unknown): void;
/**
* Changes the current action button to the one specified in the arguments
*
* @param actionBarPage Which page of your action bar to switch to. Expects an integer 1-6.
* @see https://wow.gamepedia.com/API_ChangeActionBarPage
* @private NOCOMBAT
*/
declare function ChangeActionBarPage(actionBarPage: ActionBarPage): void;
/**
* Returns the index of the currently-selected action bar page
*
* @returns integer index of the current action bar page, ascending from 1.
* @see https://wow.gamepedia.com/API_GetActionBarPage
*/
declare function GetActionBarPage(): ActionBarPage;
/**
* Gets the toggle states of the extra action bars.
*
* @returns bottomLeftState, bottomRightState, sideRightState, sideRight2State
* @see https://wow.gamepedia.com/API_GetActionBarToggles
* @tupleReturn
*/
declare function GetActionBarToggles(): [boolean, boolean, boolean, boolean];
/**
* Returns information about the charges of a charge-accumulating player ability
*
* @param slotId The action slot to retrieve data from
* @returns currentCharges, maxCharges, cooldownStart, cooldownDuration, chargeModRate
* @see https://wow.gamepedia.com/API_GetActionCharges
* @tupleReturn
*/
declare function GetActionCharges(slotId: ActionBarSlotId): [number, number, number, number, number];
/**
* Retrieves the cooldown data of the action specified
*
* @param slotId The action slot to retrieve data from
* @returns start, duration, enable, modRate
* @see https://wow.gamepedia.com/API_GetActionCooldown
* @tupleReturn
*/
declare function GetActionCooldown(slotId: ActionBarSlotId): [number, number, number, number];
/**
* Gets the available count for an action, if applicable
*
* @param slotId The action slot to retrieve data from
* @returns The action's count as displayed on the action's icon; e.g. for a potion action, returns the number of potions left.
* 0, if the action has no count or if the specified action slot is empty
* @see https://wow.gamepedia.com/API_GetActionCount
*/
declare function GetActionCount(slotId: ActionBarSlotId): string | number;
/**
* Returns information about a specific action
*
* @param slotId Action slot to retrieve information about.
* @returns actionType, id, subType
* @see https://wow.gamepedia.com/API_GetActionInfo
* @tupleReturn
*/
declare function GetActionInfo(slotId: ActionBarSlotId): [string, WoWAPI.Unknown, WoWAPI.Unknown];
/**
* Gets the text label for an action
*
* @param slotId Action slot to retrieve information about
* @returns The action's text, if present. Macro actions use their names for their action text. nil, if the slot has no action text,
* or is empty. Most standard WoW action icons don't have action text
* @see https://wow.gamepedia.com/API_GetActionText
*/
declare function GetActionText(slotId: ActionBarSlotId): string | null;
/**
* Returns the filepath for an action's texture
*
* @param slotId Action slot to retrieve information about
* @returns The texture filepath for the action's icon image. nil, if the slot is empty
* @see https://wow.gamepedia.com/API_GetActionTexture
*/
declare function GetActionTexture(slotId: ActionBarSlotId): WoWAPI.TexturePath | null;
/**
* Returns the current bonus action bar index
*
* @returns The current bonus action bar index
* @see https://wow.gamepedia.com/API_GetBonusBarOffset
*/
declare function GetBonusBarOffset(): number;
/**
* Returns the name of the button responsible causing the OnClick handler to fire
*
* @returns name of the button responsible for the innermost OnClick event. For example, "LeftButton"
* @see https://wow.gamepedia.com/API_GetMouseButtonClicked
*/
declare function GetMouseButtonClicked(): WoWAPI.MouseButton;
/**
* Tests if an action slot is occupied
*
* @param slotId The tested action slot
* @returns 1, if the slot contains an action. nil, if the slot is empty
* @see https://wow.gamepedia.com/API_HasAction
*/
declare function HasAction(slotId: ActionBarSlotId): WoWAPI.Flag | null;
/**
* Returns whether an action is in range for use
*
* @param slotId The action slot to test
* @returns nil if the slot has no action, or if the action cannot be used on the current target; 0 if the action is out of range, and 1 otherwise
* @see https://wow.gamepedia.com/API_IsActionInRange
*/
declare function IsActionInRange(slotId: ActionBarSlotId): WoWAPI.Flag | null;
/**
* Determine whether action slot is an attack action
*
* @param slotId The action slot to test
* @returns nil if the specified slot is not an attack action, or is empty. 1 if the slot is an attack action and should flash red during combat
* @see https://wow.gamepedia.com/API_IsAttackAction
*/
declare function IsAttackAction(slotId: ActionBarSlotId): WoWAPI.Flag | null;
/**
* Determine whether action slot is auto repeating
*
* @param slotId The action slot to test
* @returns 1 if the action in the slot is currently auto-repeating, nil if it is not auto-repeating or the slot is empty
* @see https://wow.gamepedia.com/API_IsAutoRepeatAction
*/
declare function IsAutoRepeatAction(slotId: ActionBarSlotId): WoWAPI.Flag | null;
/**
* Determine whether an action is currently executing
*
* @param slotId action slot ID to query.
* @returns 1 if the action in the slot is currently executing, nil otherwise
* @see https://wow.gamepedia.com/API_IsCurrentAction
*/
declare function IsCurrentAction(slotId: ActionBarSlotId): WoWAPI.Flag | null;
/**
* Tests if the action is linked to a consumable item
*
* @param slotId The tested action slot
* @returns True if the action in the specified slot is linked to a consumable, e.g. a potion action. Consumable actions have a small number
* displayed in the bottom right corner of their action icon. False if the action is not consumable or if the action is empty
* @see https://wow.gamepedia.com/API_IsConsumableAction
*/
declare function IsConsumableAction(slotId: ActionBarSlotId): boolean;
/**
* An equip action is created if you drag a weapon from the Inventory to an action bar slot. If you click this action to
* equip the weapon, the action icon will obtain a green outline. It is in this case that IsEquippedAction() returns 1.
* All other cases (e.g. empty slot, non-equip action, equip action is of the current weapon but hasn't been used yet) will return nil.
*
* @param slotId The tested action
* @returns 1 if the specified action is an action that equips a weapon and if the action has been used to equip the current weapon. nil otherwise
* @see https://wow.gamepedia.com/API_IsEquippedAction
*/
declare function IsEquippedAction(slotId: ActionBarSlotId): WoWAPI.Flag | null;
/**
* Determine if an action can be used (you have sufficient mana, reagents and the action is not on cooldown).
*
* @param slotId Action slot to query
* @returns isUsable, notEnoughMana
* @see https://wow.gamepedia.com/API_IsUsableAction
* @tupleReturn
*/
declare function IsUsableAction(slotId: ActionBarSlotId): [boolean, boolean];
/**
* Determine if player has a pet with an action bar.
*
* @returns nil if the player has no pet (or the pet has no action bar), 1 if a pet action bar should be shown
* @see https://wow.gamepedia.com/API_PetHasActionBar
*/
declare function PetHasActionBar(): WoWAPI.Flag | null;
/**
* Pick up an action for drag-and-drop
*
* @param slotId The action slot to pick the action up from
* @see https://wow.gamepedia.com/API_PickupAction
* @private PROTECTED NOCOMBAT
*/
declare function PickupAction(slotId: ActionBarSlotId): void;
/**
* Pick up a pet action for drag-and-drop
*
* @param petSlotId The pet action slot to pick the action up from (1-10).
* @see https://wow.gamepedia.com/API_PickupPetAction
* @private PROTECTED NOCOMBAT
*/
declare function PickupPetAction(petSlotId: SlotActionBarPet): void;
/**
* Place the drag-and-drop item as an action
*
* @param slotId The action slot to place the action into.
* @see https://wow.gamepedia.com/API_PlaceAction
*/
declare function PlaceAction(slotId: ActionBarSlotId): void;
/**
* Set the desired state of the extra action bars
*
* @param bottomLeftState 1 if the left-hand bottom action bar is to be shown, 0 or nil otherwise.
* @param bottomRightState 1 if the right-hand bottom action bar is to be shown, 0 or nil otherwise.
* @param sideRightState 1 if the first (outer) right side action bar is to be shown, 0 or nil otherwise.
* @param sideRight2State 1 if the second (inner) right side action bar is to be shown, 0 or nil otherwise
* @param alwaysShow 1 if the bars are always shown, 0 or nil otherwise.
* @see https://wow.gamepedia.com/API_SetActionBarToggles
*/
// tslint:disable-next-line max-line-length
declare function SetActionBarToggles(bottomLeftState: WoWAPI.Flag, bottomRightState: WoWAPI.Flag, sideRightState: WoWAPI.Flag, sideRight2State: WoWAPI.Flag, alwaysShow: WoWAPI.Flag): void;
/**
* Begin "Right click" in the 3D game world.
*
* @see https://wow.gamepedia.com/API_TurnOrActionStart
* @private PROTECTED
*/
declare function TurnOrActionStart(): void;
/**
* End "Right click" in the 3D game world
*
* @see https://wow.gamepedia.com/API_TurnOrActionStop
* @private PROTECTED
*/
declare function TurnOrActionStop(): void;
/**
* Perform the action in the specified action slot
*
* @param slot The action action slot to use
* @param checkCursor Can be 0, 1, or nil. Appears to indicate whether the action button was clicked (1) or used via hotkey (0);
* probably involved in placing skills/items in the action bar after they've been picked up. I can confirm this. If you pass 0 for checkCursor,
* it will use the action regardless of whether another item/skill is on the cursor. If you pass 1 for checkCursor,
* it will replace the spell/action on the slot with the new one.
* @param onSelf Can be 0, 1, or nil. If present and 1, then the action is performed on the player, not the target. If "true" is passed instead
* of 1, Blizzard produces a Lua error.
* @private PROTECTED
*/
declare function UseAction(slot: ActionBarSlotId, checkCursor?: WoWAPI.Flag, onSelf?: WoWAPI.Flag): void;
/** @noSelfInFile */
/// <reference path="global.d.ts" />
/// <reference path="ui/ui.d.ts" />
/**
* Presses the specified FrameXML action button
*
* @param buttonId The button ID of the button to push
* @see https://wow.gamepedia.com/API_ActionButtonDown
* @private PROTECTED UI
*/
declare function ActionButtonDown(buttonId: number): void;
/**
* Releases the specified action button
*
* @param buttonId The button ID of the button to release (Integers from 1 to 12)
* @see https://wow.gamepedia.com/API_ActionButtonUp
* @private PROTECTED UI
*/
declare function ActionButtonUp(buttonId: number): void;
/**
* Returns true if the action has a numeric range requirement.
*
* @param slotId The slot ID to test
* @returns True if the specified slot contains an action which has a numeric range requirement
* @see https://wow.gamepedia.com/API_ActionHasRange
*/
declare function ActionHasRange(slotId: ActionBarSlotId): boolean;
/**
* Begin "Left click" in the 3D world
*
* @see https://wow.gamepedia.com/API_CameraOrSelectOrMoveStart
* @private PROTECTED
*/
declare function CameraOrSelectOrMoveStart(): void;
/**
* End "Left click" in the 3D game world
*
* @param stickyFlag If present and set then any camera offset is 'sticky' and remains until explicitly cancelled
* @see https://wow.gamepedia.com/API_CameraOrSelectOrMoveStop
* @private PROTECTED
*/
declare function CameraOrSelectOrMoveStop(stickyFlag?: WoWAPI.Unknown): void;
/**
* Changes the current action button to the one specified in the arguments
*
* @param actionBarPage Which page of your action bar to switch to. Expects an integer 1-6.
* @see https://wow.gamepedia.com/API_ChangeActionBarPage
* @private NOCOMBAT
*/
declare function ChangeActionBarPage(actionBarPage: ActionBarPage): void;
/**
* Returns the index of the currently-selected action bar page
*
* @returns integer index of the current action bar page, ascending from 1.
* @see https://wow.gamepedia.com/API_GetActionBarPage
*/
declare function GetActionBarPage(): ActionBarPage;
/**
* Gets the toggle states of the extra action bars.
*
* @returns bottomLeftState, bottomRightState, sideRightState, sideRight2State
* @see https://wow.gamepedia.com/API_GetActionBarToggles
* @tupleReturn
*/
declare function GetActionBarToggles(): [boolean, boolean, boolean, boolean];
/**
* Returns information about the charges of a charge-accumulating player ability
*
* @param slotId The action slot to retrieve data from
* @returns currentCharges, maxCharges, cooldownStart, cooldownDuration, chargeModRate
* @see https://wow.gamepedia.com/API_GetActionCharges
* @tupleReturn
*/
declare function GetActionCharges(slotId: ActionBarSlotId): [number, number, number, number, number];
/**
* Retrieves the cooldown data of the action specified
*
* @param slotId The action slot to retrieve data from
* @returns start, duration, enable, modRate
* @see https://wow.gamepedia.com/API_GetActionCooldown
* @tupleReturn
*/
declare function GetActionCooldown(slotId: ActionBarSlotId): [number, number, number, number];
/**
* Gets the available count for an action, if applicable
*
* @param slotId The action slot to retrieve data from
* @returns The action's count as displayed on the action's icon; e.g. for a potion action, returns the number of potions left.
* 0, if the action has no count or if the specified action slot is empty
* @see https://wow.gamepedia.com/API_GetActionCount
*/
declare function GetActionCount(slotId: ActionBarSlotId): string | number;
/**
* Returns information about a specific action
*
* @param slotId Action slot to retrieve information about.
* @returns actionType, id, subType
* @see https://wow.gamepedia.com/API_GetActionInfo
* @tupleReturn
*/
declare function GetActionInfo(slotId: ActionBarSlotId): [string, WoWAPI.Unknown, WoWAPI.Unknown];
/**
* Gets the text label for an action
*
* @param slotId Action slot to retrieve information about
* @returns The action's text, if present. Macro actions use their names for their action text. nil, if the slot has no action text,
* or is empty. Most standard WoW action icons don't have action text
* @see https://wow.gamepedia.com/API_GetActionText
*/
declare function GetActionText(slotId: ActionBarSlotId): string | null;
/**
* Returns the filepath for an action's texture
*
* @param slotId Action slot to retrieve information about
* @returns The texture filepath for the action's icon image. nil, if the slot is empty
* @see https://wow.gamepedia.com/API_GetActionTexture
*/
declare function GetActionTexture(slotId: ActionBarSlotId): WoWAPI.TexturePath | null;
/**
* Returns the current bonus action bar index
*
* @returns The current bonus action bar index
* @see https://wow.gamepedia.com/API_GetBonusBarOffset
*/
declare function GetBonusBarOffset(): number;
/**
* Returns the name of the button responsible causing the OnClick handler to fire
*
* @returns name of the button responsible for the innermost OnClick event. For example, "LeftButton"
* @see https://wow.gamepedia.com/API_GetMouseButtonClicked
*/
declare function GetMouseButtonClicked(): WoWAPI.MouseButton;
/**
* Tests if an action slot is occupied
*
* @param slotId The tested action slot
* @returns 1, if the slot contains an action. nil, if the slot is empty
* @see https://wow.gamepedia.com/API_HasAction
*/
declare function HasAction(slotId: ActionBarSlotId): WoWAPI.Flag | null;
/**
* Returns whether an action is in range for use
*
* @param slotId The action slot to test
* @returns nil if the slot has no action, or if the action cannot be used on the current target; 0 if the action is out of range, and 1 otherwise
* @see https://wow.gamepedia.com/API_IsActionInRange
*/
declare function IsActionInRange(slotId: ActionBarSlotId): WoWAPI.Flag | null;
/**
* Determine whether action slot is an attack action
*
* @param slotId The action slot to test
* @returns nil if the specified slot is not an attack action, or is empty. 1 if the slot is an attack action and should flash red during combat
* @see https://wow.gamepedia.com/API_IsAttackAction
*/
declare function IsAttackAction(slotId: ActionBarSlotId): WoWAPI.Flag | null;
/**
* Determine whether action slot is auto repeating
*
* @param slotId The action slot to test
* @returns 1 if the action in the slot is currently auto-repeating, nil if it is not auto-repeating or the slot is empty
* @see https://wow.gamepedia.com/API_IsAutoRepeatAction
*/
declare function IsAutoRepeatAction(slotId: ActionBarSlotId): WoWAPI.Flag | null;
/**
* Determine whether an action is currently executing
*
* @param slotId action slot ID to query.
* @returns 1 if the action in the slot is currently executing, nil otherwise
* @see https://wow.gamepedia.com/API_IsCurrentAction
*/
declare function IsCurrentAction(slotId: ActionBarSlotId): WoWAPI.Flag | null;
/**
* Tests if the action is linked to a consumable item
*
* @param slotId The tested action slot
* @returns True if the action in the specified slot is linked to a consumable, e.g. a potion action. Consumable actions have a small number
* displayed in the bottom right corner of their action icon. False if the action is not consumable or if the action is empty
* @see https://wow.gamepedia.com/API_IsConsumableAction
*/
declare function IsConsumableAction(slotId: ActionBarSlotId): boolean;
/**
* An equip action is created if you drag a weapon from the Inventory to an action bar slot. If you click this action to
* equip the weapon, the action icon will obtain a green outline. It is in this case that IsEquippedAction() returns 1.
* All other cases (e.g. empty slot, non-equip action, equip action is of the current weapon but hasn't been used yet) will return nil.
*
* @param slotId The tested action
* @returns 1 if the specified action is an action that equips a weapon and if the action has been used to equip the current weapon. nil otherwise
* @see https://wow.gamepedia.com/API_IsEquippedAction
*/
declare function IsEquippedAction(slotId: ActionBarSlotId): WoWAPI.Flag | null;
/**
* Determine if an action can be used (you have sufficient mana, reagents and the action is not on cooldown).
*
* @param slotId Action slot to query
* @returns isUsable, notEnoughMana
* @see https://wow.gamepedia.com/API_IsUsableAction
* @tupleReturn
*/
declare function IsUsableAction(slotId: ActionBarSlotId): [boolean, boolean];
/**
* Determine if player has a pet with an action bar.
*
* @returns nil if the player has no pet (or the pet has no action bar), 1 if a pet action bar should be shown
* @see https://wow.gamepedia.com/API_PetHasActionBar
*/
declare function PetHasActionBar(): WoWAPI.Flag | null;
/**
* Pick up an action for drag-and-drop
*
* @param slotId The action slot to pick the action up from
* @see https://wow.gamepedia.com/API_PickupAction
* @private PROTECTED NOCOMBAT
*/
declare function PickupAction(slotId: ActionBarSlotId): void;
/**
* Pick up a pet action for drag-and-drop
*
* @param petSlotId The pet action slot to pick the action up from (1-10).
* @see https://wow.gamepedia.com/API_PickupPetAction
* @private PROTECTED NOCOMBAT
*/
declare function PickupPetAction(petSlotId: SlotActionBarPet): void;
/**
* Place the drag-and-drop item as an action
*
* @param slotId The action slot to place the action into.
* @see https://wow.gamepedia.com/API_PlaceAction
*/
declare function PlaceAction(slotId: ActionBarSlotId): void;
/**
* Set the desired state of the extra action bars
*
* @param bottomLeftState 1 if the left-hand bottom action bar is to be shown, 0 or nil otherwise.
* @param bottomRightState 1 if the right-hand bottom action bar is to be shown, 0 or nil otherwise.
* @param sideRightState 1 if the first (outer) right side action bar is to be shown, 0 or nil otherwise.
* @param sideRight2State 1 if the second (inner) right side action bar is to be shown, 0 or nil otherwise
* @param alwaysShow 1 if the bars are always shown, 0 or nil otherwise.
* @see https://wow.gamepedia.com/API_SetActionBarToggles
*/
// tslint:disable-next-line max-line-length
declare function SetActionBarToggles(bottomLeftState: WoWAPI.Flag, bottomRightState: WoWAPI.Flag, sideRightState: WoWAPI.Flag, sideRight2State: WoWAPI.Flag, alwaysShow: WoWAPI.Flag): void;
/**
* Begin "Right click" in the 3D game world.
*
* @see https://wow.gamepedia.com/API_TurnOrActionStart
* @private PROTECTED
*/
declare function TurnOrActionStart(): void;
/**
* End "Right click" in the 3D game world
*
* @see https://wow.gamepedia.com/API_TurnOrActionStop
* @private PROTECTED
*/
declare function TurnOrActionStop(): void;
/**
* Perform the action in the specified action slot
*
* @param slot The action action slot to use
* @param checkCursor Can be 0, 1, or nil. Appears to indicate whether the action button was clicked (1) or used via hotkey (0);
* probably involved in placing skills/items in the action bar after they've been picked up. I can confirm this. If you pass 0 for checkCursor,
* it will use the action regardless of whether another item/skill is on the cursor. If you pass 1 for checkCursor,
* it will replace the spell/action on the slot with the new one.
* @param onSelf Can be 0, 1, or nil. If present and 1, then the action is performed on the player, not the target. If "true" is passed instead
* of 1, Blizzard produces a Lua error.
* @private PROTECTED
*/
declare function UseAction(slot: ActionBarSlotId, checkCursor?: WoWAPI.Flag, onSelf?: WoWAPI.Flag): void;

View File

@@ -1,185 +1,185 @@
/** @noSelfInFile */
/// <reference path="global.d.ts" />
/**
* Accept the challenge to a duel.
*
* @see https://wow.gamepedia.com/API_AcceptDuel
*/
declare function AcceptDuel(): void;
/**
* Toggles auto-attacking of the player's current target
*
* @see https://wow.gamepedia.com/API_AttackTarget
* @private PROTECTED
*/
declare function AttackTarget(): void;
/**
* Forfeits the current duel, or declines an invitation to duel
*
* @see https://wow.gamepedia.com/API_CancelDuel
*/
declare function CancelDuel(): void;
/**
* Cancels the logout timer (from camping or quitting).
*
* @see https://wow.gamepedia.com/API_CancelLogout
* @private PROTECTED
*/
declare function CancelLogout(): void;
/**
* Rejects a summon request
*
* @see https://wow.gamepedia.com/API_CancelSummon
*/
declare function CancelSummon(): void;
/**
* Accepts a summon request (only works during the two minutes the summon is available).
*
* @see https://wow.gamepedia.com/API_ConfirmSummon
*/
declare function ConfirmSummon(): void;
/**
* The player stops descending (while flying or swimming).
*
* @see https://wow.gamepedia.com/API_DescendStop
* @private PROTECTED
*/
declare function DescendStop(): void;
/**
* Dismounts the player if the player was mounted
*
* @see https://wow.gamepedia.com/API_Dismount
* @since 2.0.3
*/
declare function Dismount(): void;
/**
* Instantly quits the game, bypassing the usual 20 seconds countdown
*
* @see https://wow.gamepedia.com/API_ForceQuit
* @private PROTECTED
*/
declare function ForceQuit(): void;
/**
* Returns which type of weapon the player currently has unsheathed, if any
*
* @returns 1=None, 2=Melee, 3=Ranged
* @see https://wow.gamepedia.com/API_GetSheathState
* @since 4.3.0
*/
declare function GetSheathState(): 1 | 2 | 3;
/**
* Returns the amount of time left on your PVP flag
*
* @returns Amount of time (in milliseconds) until your PVP flag wears off.
* @see https://wow.gamepedia.com/API_GetPVPTimer
*/
declare function GetPVPTimer(): number;
/**
* Returns the name of the area you're being summoned to
*
* @see https://wow.gamepedia.com/API_GetSummonConfirmAreaName
*/
declare function GetSummonConfirmAreaName(): WoWAPI.Unknown;
/**
* Get the name of the unit which initiated the players summon
*
* @returns Name of the player summoning you, or nil if no summon is currently pending
* @see https://wow.gamepedia.com/API_GetSummonConfirmSummoner
*/
declare function GetSummonConfirmSummoner(): string;
/**
* Returns the amount of time left before the pending summon expires
*
* @see https://wow.gamepedia.com/API_GetSummonConfirmTimeLeft
*/
declare function GetSummonConfirmTimeLeft(): WoWAPI.Unknown;
/**
* Logs the player character out of the game.
*
* @see https://wow.gamepedia.com/API_Logout
* @event PLAYER_CAMPING
* @private PROTECTED
*/
declare function Logout(): void;
/**
* Quits the game.
*
* @see https://wow.gamepedia.com/API_Quit
* @event PLAYER_QUITING
* @private PROTECTED
*/
declare function Quit(): void;
/**
* Performs a random roll between two numbers
*
* @param low lowest number (default 1)
* @param high highest number (default 100)
* @description Yield: <Your name> rolls. <number> (1-10)
* @see https://wow.gamepedia.com/API_RandomRoll
*/
declare function RandomRoll(low?: number, high?: number): void;
/**
* Used to toggle PVP on or Off
*
* @param flag 0 or 1; 0 Toggles PVP off, 1 Toggles PVP on.
* @see https://wow.gamepedia.com/API_SetPVP
*/
declare function SetPVP(flag: WoWAPI.Flag | null): void;
/**
* The player sits, stands, or begins to descend (while swimming or flying)
*
* @see https://wow.gamepedia.com/API_SitStandOrDescendStart
* @since 2.1.0
* @private PROTECTED
*/
declare function SitStandOrDescendStart(): void;
/**
* Invites the specified player to a duel
*
* @param playerName The name of the player you wish to duel
* @see https://wow.gamepedia.com/API_StartDuel
*/
declare function StartDuel(playerName: string): void;
/**
* Toggles PvP setting on or off
*
* @see https://wow.gamepedia.com/API_TogglePVP
*/
declare function TogglePVP(): void;
/**
* Toggles sheathed or unsheathed weapons
*
* @see https://wow.gamepedia.com/API_ToggleSheath
* @event UNIT_MODEL_CHANGED
*/
declare function ToggleSheath(): void;
/**
* Use an active soulstone to resurrect yourself after death. Also works for Shamans with Reincarnation available
*
* @see https://wow.gamepedia.com/API_UseSoulstone
*/
declare function UseSoulstone(): void;
/** @noSelfInFile */
/// <reference path="global.d.ts" />
/**
* Accept the challenge to a duel.
*
* @see https://wow.gamepedia.com/API_AcceptDuel
*/
declare function AcceptDuel(): void;
/**
* Toggles auto-attacking of the player's current target
*
* @see https://wow.gamepedia.com/API_AttackTarget
* @private PROTECTED
*/
declare function AttackTarget(): void;
/**
* Forfeits the current duel, or declines an invitation to duel
*
* @see https://wow.gamepedia.com/API_CancelDuel
*/
declare function CancelDuel(): void;
/**
* Cancels the logout timer (from camping or quitting).
*
* @see https://wow.gamepedia.com/API_CancelLogout
* @private PROTECTED
*/
declare function CancelLogout(): void;
/**
* Rejects a summon request
*
* @see https://wow.gamepedia.com/API_CancelSummon
*/
declare function CancelSummon(): void;
/**
* Accepts a summon request (only works during the two minutes the summon is available).
*
* @see https://wow.gamepedia.com/API_ConfirmSummon
*/
declare function ConfirmSummon(): void;
/**
* The player stops descending (while flying or swimming).
*
* @see https://wow.gamepedia.com/API_DescendStop
* @private PROTECTED
*/
declare function DescendStop(): void;
/**
* Dismounts the player if the player was mounted
*
* @see https://wow.gamepedia.com/API_Dismount
* @since 2.0.3
*/
declare function Dismount(): void;
/**
* Instantly quits the game, bypassing the usual 20 seconds countdown
*
* @see https://wow.gamepedia.com/API_ForceQuit
* @private PROTECTED
*/
declare function ForceQuit(): void;
/**
* Returns which type of weapon the player currently has unsheathed, if any
*
* @returns 1=None, 2=Melee, 3=Ranged
* @see https://wow.gamepedia.com/API_GetSheathState
* @since 4.3.0
*/
declare function GetSheathState(): 1 | 2 | 3;
/**
* Returns the amount of time left on your PVP flag
*
* @returns Amount of time (in milliseconds) until your PVP flag wears off.
* @see https://wow.gamepedia.com/API_GetPVPTimer
*/
declare function GetPVPTimer(): number;
/**
* Returns the name of the area you're being summoned to
*
* @see https://wow.gamepedia.com/API_GetSummonConfirmAreaName
*/
declare function GetSummonConfirmAreaName(): WoWAPI.Unknown;
/**
* Get the name of the unit which initiated the players summon
*
* @returns Name of the player summoning you, or nil if no summon is currently pending
* @see https://wow.gamepedia.com/API_GetSummonConfirmSummoner
*/
declare function GetSummonConfirmSummoner(): string;
/**
* Returns the amount of time left before the pending summon expires
*
* @see https://wow.gamepedia.com/API_GetSummonConfirmTimeLeft
*/
declare function GetSummonConfirmTimeLeft(): WoWAPI.Unknown;
/**
* Logs the player character out of the game.
*
* @see https://wow.gamepedia.com/API_Logout
* @event PLAYER_CAMPING
* @private PROTECTED
*/
declare function Logout(): void;
/**
* Quits the game.
*
* @see https://wow.gamepedia.com/API_Quit
* @event PLAYER_QUITING
* @private PROTECTED
*/
declare function Quit(): void;
/**
* Performs a random roll between two numbers
*
* @param low lowest number (default 1)
* @param high highest number (default 100)
* @description Yield: <Your name> rolls. <number> (1-10)
* @see https://wow.gamepedia.com/API_RandomRoll
*/
declare function RandomRoll(low?: number, high?: number): void;
/**
* Used to toggle PVP on or Off
*
* @param flag 0 or 1; 0 Toggles PVP off, 1 Toggles PVP on.
* @see https://wow.gamepedia.com/API_SetPVP
*/
declare function SetPVP(flag: WoWAPI.Flag | null): void;
/**
* The player sits, stands, or begins to descend (while swimming or flying)
*
* @see https://wow.gamepedia.com/API_SitStandOrDescendStart
* @since 2.1.0
* @private PROTECTED
*/
declare function SitStandOrDescendStart(): void;
/**
* Invites the specified player to a duel
*
* @param playerName The name of the player you wish to duel
* @see https://wow.gamepedia.com/API_StartDuel
*/
declare function StartDuel(playerName: string): void;
/**
* Toggles PvP setting on or off
*
* @see https://wow.gamepedia.com/API_TogglePVP
*/
declare function TogglePVP(): void;
/**
* Toggles sheathed or unsheathed weapons
*
* @see https://wow.gamepedia.com/API_ToggleSheath
* @event UNIT_MODEL_CHANGED
*/
declare function ToggleSheath(): void;
/**
* Use an active soulstone to resurrect yourself after death. Also works for Shamans with Reincarnation available
*
* @see https://wow.gamepedia.com/API_UseSoulstone
*/
declare function UseSoulstone(): void;

View File

@@ -1,207 +1,207 @@
/** @noSelfInFile */
/// <reference path="global.d.ts" />
declare namespace WoWAPI {
/**
* Addon is banned by the client
*/
type ADDON_LOAD_REASON_BANNED = "BANNED";
/**
* The addon's file(s) are corrupt
*/
type ADDON_LOAD_REASON_CORRUPT = "CORRUPT";
/**
* Addon's dependency is banned by the client
*/
type ADDON_LOAD_REASON_DEP_BANNED = "DEP_BANNED";
/**
* The addon's dependency cannot load because its file(s) are corrupt
*/
type ADDON_LOAD_REASON_DEP_CORRUPT = "DEP_CORRUPT";
/**
* The addon cannot load without its dependency enabled
*/
type ADDON_LOAD_REASON_DEP_DISABLED = "DEP_DISABLED";
/**
* The addon cannot load if its dependency cannot load
*/
type ADDON_LOAD_REASON_DEP_INCOMPATIBLE = "DEP_INCOMPATIBLE";
/**
* The addon's dependency is physically not there
*/
type ADDON_LOAD_REASON_DEP_MISSING = "DEP_MISSING";
/**
* The addon's dependency must be loadable on demand too
*/
type ADDON_LOAD_REASON_DEP_NOT_DEMAND_LOADED = "DEP_NOT_DEMAND_LOADED";
/**
* Addon is disabled on the character select screen
*/
type ADDON_LOAD_REASON_DISABLED = "DISABLED";
/**
* The addon is too old.
*/
type ADDON_LOAD_REASON_INCOMPATIBLE = "INCOMPATIBLE";
/**
* The addon is physically not there
*/
type ADDON_LOAD_REASON_MISSING = "MISSING";
/**
* As of 1.8 only addons marked as LoadOnDemand can be loaded via this function
*/
type ADDON_LOAD_REASON_NOT_DEMAND_LOADED = "NOT_DEMAND_LOADED";
/**
* Unknown, presumably the interface version in the .toc file is incorrect
*/
type ADDON_LOAD_REASON_INTERFACE_VERSION = "INTERFACE_VERSION";
/**
* all possible load error reasons
*/
type ADDON_LOAD_REASON = ADDON_LOAD_REASON_BANNED | ADDON_LOAD_REASON_CORRUPT | ADDON_LOAD_REASON_DEP_BANNED | ADDON_LOAD_REASON_DEP_CORRUPT |
ADDON_LOAD_REASON_DEP_DISABLED | ADDON_LOAD_REASON_DEP_INCOMPATIBLE | ADDON_LOAD_REASON_DEP_MISSING |
ADDON_LOAD_REASON_DEP_NOT_DEMAND_LOADED | ADDON_LOAD_REASON_DISABLED | ADDON_LOAD_REASON_INCOMPATIBLE | ADDON_LOAD_REASON_MISSING |
ADDON_LOAD_REASON_NOT_DEMAND_LOADED | ADDON_LOAD_REASON_INTERFACE_VERSION;
}
/**
* Disable an AddOn for subsequent sessions
*
* @param index The index of the AddOn to disable in the user's AddOn list, from 1 to GetNumAddOns().
* @see https://wow.gamepedia.com/API_DisableAddOn
*/
declare function DisableAddOn(index: number): void;
/**
* Disable an AddOn for subsequent sessions
*
* @param name The name of the AddOn to be disabled
* @param character The name of the character (without realm) for whom to disable the addon. Defaults to the current character
* @see https://wow.gamepedia.com/API_DisableAddOn
*/
declare function DisableAddOn(name: string, character?: string): void;
/**
* Disable all AddOns for subsequent sessions
*
* @see https://wow.gamepedia.com/API_DisableAllAddOns
*/
declare function DisableAllAddOns(): void;
/**
* Enable an AddOn for subsequent sessions
*
* @param indexOrName The index of the AddOn to enable in the user's AddOn list OR The name of the AddOn to be enabled
* @see https://wow.gamepedia.com/API_EnableAddOn
*/
declare function EnableAddOn(indexOrName: number | string): void;
/**
* Enable all AddOns for subsequent sessions
*
* @see https://wow.gamepedia.com/API_EnableAllAddOns
*/
declare function EnableAllAddOns(): void;
/**
* Get the required dependencies for an AddOn
*
* @param indexOrName The index of the AddOn in the user's AddOn list. Note that you cannot access Blizzard-provided AddOns through this mechanism.
* OR The name of the AddOn to be queries. You can access Blizzard-provided AddOns through this mechanism
* @returns Name of an addon the specified addon lists as a required dependency
* @see https://wow.gamepedia.com/API_GetAddOnDependencies
* @tupleReturn
*/
declare function GetAddOnDependencies(indexOrName: number | string): [...string[]];
/**
* Unknown
*
* @param character Unknown
* @param addonIndex Unknown
* @see https://wow.gamepedia.com/API_GetAddOnEnableState
*/
declare function GetAddOnEnableState(character: WoWAPI.Unknown, addonIndex: WoWAPI.Unknown): WoWAPI.Unknown;
/**
* Get information about an AddOn
*
* @param indexOrName The index of the AddOn in the user's AddOn list. Note that you cannot access Blizzard-provided AddOns through this
* mechanism OR The name of the AddOn to be queried. You can access Blizzard-provided AddOns through this mechanism
* @returns name, title, notes, loadable, reason, security, newVersion
* @see https://wow.gamepedia.com/API_GetAddOnInfo
* @tupleReturn
*/
declare function GetAddOnInfo(indexOrName: number | string): [string, string, string, boolean, WoWAPI.ADDON_LOAD_REASON, string, boolean];
/**
* get addon metadata from the toc file
*
* @param addonNameOrIndex Addon name to look up metadata for
* @param field Field name. May be Title, Notes, Author, Version, or anything starting with X-
* @returns The value of the field, nil if not defined.
* @see https://wow.gamepedia.com/API_GetAddOnMetadata
*/
declare function GetAddOnMetadata(addonNameOrIndex: string | number, field: string): string | null;
/**
* Returns a list of optional dependencies
*
* @param indexOrName The index of the AddOn in the user's AddOn list. Note that you cannot access Blizzard-provided AddOns through this mechanism.
* OR The name of the AddOn to be queries. You can access Blizzard-provided AddOns through this mechanism
* @see https://wow.gamepedia.com/API_GetAddOnOptionalDependencies
* @tupleReturn
*/
declare function GetAddOnOptionalDependencies(indexOrName: number | string): [...string[]];
/**
* Get the number of user supplied AddOns
*
* @see https://wow.gamepedia.com/API_GetNumAddOns
*/
declare function GetNumAddOns(): number;
/**
* Returns whether an addon has been loaded
*
* @param indexOrName The index of the addon in the user's addon list. You cannot query Blizzard-provided AddOns using this parameter OR
* The name of the addon to be queried. You can query Blizzard-provided addon using this parameter
* @returns loaded, finished
* @see https://wow.gamepedia.com/API_IsAddOnLoaded
* @tupleReturn
*/
declare function IsAddOnLoaded(indexOrName: number | string): [WoWAPI.Flag, WoWAPI.Flag];
/**
* Determine if an AddOn is loaded on demand (via .toc file dependencies or LoadAddOn) rather than at startup
*
* @param indexOrName The index of the AddOn in the user's AddOn list. Note that you cannot access Blizzard-provided AddOns through this mechanism.
* OR The name of the AddOn to be queries. You can access Blizzard-provided AddOns through this mechanism
* @returns Indicates if the AddOn is loaded on demand, 1 if it is, nil if it is loaded on startup
* @see https://wow.gamepedia.com/API_IsAddOnLoadOnDemand
*/
declare function IsAddOnLoadOnDemand(indexOrName: number | string): WoWAPI.Flag;
/**
* Request the loading of an On-Demand AddOn
*
* @param indexOrName The index of the AddOn in the user's AddOn list. Note that you cannot access Blizzard-provided AddOns through this mechanism.
* OR The name of the AddOn to be queries. You can access Blizzard-provided AddOns through this mechanism
* @returns loaded, reason
* @see https://wow.gamepedia.com/API_LoadAddOn
* @tupleReturn
*/
declare function LoadAddOn(indexOrName: number | string): [WoWAPI.Flag, WoWAPI.ADDON_LOAD_REASON];
/** @noSelfInFile */
/// <reference path="global.d.ts" />
declare namespace WoWAPI {
/**
* Addon is banned by the client
*/
type ADDON_LOAD_REASON_BANNED = "BANNED";
/**
* The addon's file(s) are corrupt
*/
type ADDON_LOAD_REASON_CORRUPT = "CORRUPT";
/**
* Addon's dependency is banned by the client
*/
type ADDON_LOAD_REASON_DEP_BANNED = "DEP_BANNED";
/**
* The addon's dependency cannot load because its file(s) are corrupt
*/
type ADDON_LOAD_REASON_DEP_CORRUPT = "DEP_CORRUPT";
/**
* The addon cannot load without its dependency enabled
*/
type ADDON_LOAD_REASON_DEP_DISABLED = "DEP_DISABLED";
/**
* The addon cannot load if its dependency cannot load
*/
type ADDON_LOAD_REASON_DEP_INCOMPATIBLE = "DEP_INCOMPATIBLE";
/**
* The addon's dependency is physically not there
*/
type ADDON_LOAD_REASON_DEP_MISSING = "DEP_MISSING";
/**
* The addon's dependency must be loadable on demand too
*/
type ADDON_LOAD_REASON_DEP_NOT_DEMAND_LOADED = "DEP_NOT_DEMAND_LOADED";
/**
* Addon is disabled on the character select screen
*/
type ADDON_LOAD_REASON_DISABLED = "DISABLED";
/**
* The addon is too old.
*/
type ADDON_LOAD_REASON_INCOMPATIBLE = "INCOMPATIBLE";
/**
* The addon is physically not there
*/
type ADDON_LOAD_REASON_MISSING = "MISSING";
/**
* As of 1.8 only addons marked as LoadOnDemand can be loaded via this function
*/
type ADDON_LOAD_REASON_NOT_DEMAND_LOADED = "NOT_DEMAND_LOADED";
/**
* Unknown, presumably the interface version in the .toc file is incorrect
*/
type ADDON_LOAD_REASON_INTERFACE_VERSION = "INTERFACE_VERSION";
/**
* all possible load error reasons
*/
type ADDON_LOAD_REASON = ADDON_LOAD_REASON_BANNED | ADDON_LOAD_REASON_CORRUPT | ADDON_LOAD_REASON_DEP_BANNED | ADDON_LOAD_REASON_DEP_CORRUPT |
ADDON_LOAD_REASON_DEP_DISABLED | ADDON_LOAD_REASON_DEP_INCOMPATIBLE | ADDON_LOAD_REASON_DEP_MISSING |
ADDON_LOAD_REASON_DEP_NOT_DEMAND_LOADED | ADDON_LOAD_REASON_DISABLED | ADDON_LOAD_REASON_INCOMPATIBLE | ADDON_LOAD_REASON_MISSING |
ADDON_LOAD_REASON_NOT_DEMAND_LOADED | ADDON_LOAD_REASON_INTERFACE_VERSION;
}
/**
* Disable an AddOn for subsequent sessions
*
* @param index The index of the AddOn to disable in the user's AddOn list, from 1 to GetNumAddOns().
* @see https://wow.gamepedia.com/API_DisableAddOn
*/
declare function DisableAddOn(index: number): void;
/**
* Disable an AddOn for subsequent sessions
*
* @param name The name of the AddOn to be disabled
* @param character The name of the character (without realm) for whom to disable the addon. Defaults to the current character
* @see https://wow.gamepedia.com/API_DisableAddOn
*/
declare function DisableAddOn(name: string, character?: string): void;
/**
* Disable all AddOns for subsequent sessions
*
* @see https://wow.gamepedia.com/API_DisableAllAddOns
*/
declare function DisableAllAddOns(): void;
/**
* Enable an AddOn for subsequent sessions
*
* @param indexOrName The index of the AddOn to enable in the user's AddOn list OR The name of the AddOn to be enabled
* @see https://wow.gamepedia.com/API_EnableAddOn
*/
declare function EnableAddOn(indexOrName: number | string): void;
/**
* Enable all AddOns for subsequent sessions
*
* @see https://wow.gamepedia.com/API_EnableAllAddOns
*/
declare function EnableAllAddOns(): void;
/**
* Get the required dependencies for an AddOn
*
* @param indexOrName The index of the AddOn in the user's AddOn list. Note that you cannot access Blizzard-provided AddOns through this mechanism.
* OR The name of the AddOn to be queries. You can access Blizzard-provided AddOns through this mechanism
* @returns Name of an addon the specified addon lists as a required dependency
* @see https://wow.gamepedia.com/API_GetAddOnDependencies
* @tupleReturn
*/
declare function GetAddOnDependencies(indexOrName: number | string): [...string[]];
/**
* Unknown
*
* @param character Unknown
* @param addonIndex Unknown
* @see https://wow.gamepedia.com/API_GetAddOnEnableState
*/
declare function GetAddOnEnableState(character: WoWAPI.Unknown, addonIndex: WoWAPI.Unknown): WoWAPI.Unknown;
/**
* Get information about an AddOn
*
* @param indexOrName The index of the AddOn in the user's AddOn list. Note that you cannot access Blizzard-provided AddOns through this
* mechanism OR The name of the AddOn to be queried. You can access Blizzard-provided AddOns through this mechanism
* @returns name, title, notes, loadable, reason, security, newVersion
* @see https://wow.gamepedia.com/API_GetAddOnInfo
* @tupleReturn
*/
declare function GetAddOnInfo(indexOrName: number | string): [string, string, string, boolean, WoWAPI.ADDON_LOAD_REASON, string, boolean];
/**
* get addon metadata from the toc file
*
* @param addonNameOrIndex Addon name to look up metadata for
* @param field Field name. May be Title, Notes, Author, Version, or anything starting with X-
* @returns The value of the field, nil if not defined.
* @see https://wow.gamepedia.com/API_GetAddOnMetadata
*/
declare function GetAddOnMetadata(addonNameOrIndex: string | number, field: string): string | null;
/**
* Returns a list of optional dependencies
*
* @param indexOrName The index of the AddOn in the user's AddOn list. Note that you cannot access Blizzard-provided AddOns through this mechanism.
* OR The name of the AddOn to be queries. You can access Blizzard-provided AddOns through this mechanism
* @see https://wow.gamepedia.com/API_GetAddOnOptionalDependencies
* @tupleReturn
*/
declare function GetAddOnOptionalDependencies(indexOrName: number | string): [...string[]];
/**
* Get the number of user supplied AddOns
*
* @see https://wow.gamepedia.com/API_GetNumAddOns
*/
declare function GetNumAddOns(): number;
/**
* Returns whether an addon has been loaded
*
* @param indexOrName The index of the addon in the user's addon list. You cannot query Blizzard-provided AddOns using this parameter OR
* The name of the addon to be queried. You can query Blizzard-provided addon using this parameter
* @returns loaded, finished
* @see https://wow.gamepedia.com/API_IsAddOnLoaded
* @tupleReturn
*/
declare function IsAddOnLoaded(indexOrName: number | string): [WoWAPI.Flag, WoWAPI.Flag];
/**
* Determine if an AddOn is loaded on demand (via .toc file dependencies or LoadAddOn) rather than at startup
*
* @param indexOrName The index of the AddOn in the user's AddOn list. Note that you cannot access Blizzard-provided AddOns through this mechanism.
* OR The name of the AddOn to be queries. You can access Blizzard-provided AddOns through this mechanism
* @returns Indicates if the AddOn is loaded on demand, 1 if it is, nil if it is loaded on startup
* @see https://wow.gamepedia.com/API_IsAddOnLoadOnDemand
*/
declare function IsAddOnLoadOnDemand(indexOrName: number | string): WoWAPI.Flag;
/**
* Request the loading of an On-Demand AddOn
*
* @param indexOrName The index of the AddOn in the user's AddOn list. Note that you cannot access Blizzard-provided AddOns through this mechanism.
* OR The name of the AddOn to be queries. You can access Blizzard-provided AddOns through this mechanism
* @returns loaded, reason
* @see https://wow.gamepedia.com/API_LoadAddOn
* @tupleReturn
*/
declare function LoadAddOn(indexOrName: number | string): [WoWAPI.Flag, WoWAPI.ADDON_LOAD_REASON];

View File

@@ -1,248 +1,248 @@
/** @noSelfInFile */
/// <reference path="global.d.ts" />
/// <reference path="ui/ui.d.ts" />
declare namespace WoWAPI {
type ARCHAELOLOGY_RARITY_COMMON = 0;
type ARCHAELOLOGY_RARITY_RARE = 1;
type ARCHAELOLOGY_RARITY = ARCHAELOLOGY_RARITY_COMMON | ARCHAELOLOGY_RARITY_RARE;
type ARCHAELOLOGY_BRANCH_DWARF = 1;
type ARCHAELOLOGY_BRANCH_DRAENEI = 2;
type ARCHAELOLOGY_BRANCH_FOSSIL = 3;
type ARCHAELOLOGY_BRANCH_NIGHT_ELF = 4;
type ARCHAELOLOGY_BRANCH_NERUBIAN = 5;
type ARCHAELOLOGY_BRANCH_ORC = 6;
type ARCHAELOLOGY_BRANCH_TOL_VIR = 7;
type ARCHAELOLOGY_BRANCH_TROLL = 8;
type ARCHAELOLOGY_BRANCH_VRYKUL = 27;
type ARCHAELOLOGY_BRANCH_MANTID = 29;
type ARCHAELOLOGY_BRANCH_PANDAREN = 229;
type ARCHAELOLOGY_BRANCH_MOGU = 231;
type ARCHAELOLOGY_BRANCH_ARAKKOA = 315;
type ARCHAELOLOGY_BRANCH_DRAENOR_CLANS = 350;
type ARCHAELOLOGY_BRANCH_OGRE = 382;
type ARCHAELOLOGY_BRANCH_HIGHBORNE = 404;
type ARCHAELOLOGY_BRANCH_HIGHMOUNTAIN_TAUREN = 406;
type ARCHAELOLOGY_BRANCH_DEMONIC = 408;
/**
* all currently known branches
*/
type ARCHAELOLOGY_BRANCH = ARCHAELOLOGY_BRANCH_DWARF | ARCHAELOLOGY_BRANCH_DRAENEI | ARCHAELOLOGY_BRANCH_FOSSIL |
ARCHAELOLOGY_BRANCH_NIGHT_ELF | ARCHAELOLOGY_BRANCH_NERUBIAN | ARCHAELOLOGY_BRANCH_ORC | ARCHAELOLOGY_BRANCH_TOL_VIR |
ARCHAELOLOGY_BRANCH_TROLL | ARCHAELOLOGY_BRANCH_VRYKUL | ARCHAELOLOGY_BRANCH_MANTID | ARCHAELOLOGY_BRANCH_PANDAREN |
ARCHAELOLOGY_BRANCH_MOGU | ARCHAELOLOGY_BRANCH_ARAKKOA | ARCHAELOLOGY_BRANCH_DRAENOR_CLANS | ARCHAELOLOGY_BRANCH_OGRE |
ARCHAELOLOGY_BRANCH_HIGHBORNE | ARCHAELOLOGY_BRANCH_HIGHMOUNTAIN_TAUREN | ARCHAELOLOGY_BRANCH_DEMONIC;
}
/**
* Returns how many digsites are in a zone like Azsuna or Elwynn Forest
*
* @returns the number of digsites the player can use [Survey] on in a zone. The player must actually be in a zone that can be surveyed
* @see https://wow.gamepedia.com/API_ArchaeologyMapUpdateAll
* @since 5.4.0
*/
declare function ArchaeologyMapUpdateAll(): number;
/**
* Unknown
*
* @param index Unknown
* @see https://wow.gamepedia.com/API_ArchaeologyGetIconInfo
* @since 4.0.0
*/
declare function ArchaeologyGetIconInfo(index: WoWAPI.Unknown): WoWAPI.Unknown;
/**
* Returns 1 if item could be added to the selected artifact
*
* @param itemId Unknown
* @see https://wow.gamepedia.com/API_CanItemBeSocketedToArtifact
* @since 4.0.0
*/
declare function CanItemBeSocketedToArtifact(itemId: number): WoWAPI.Flag;
/**
* Returns whether the player is currently on a digsite
*
* @returns true if the player is currently on a digsite (and can use [Survey]), false otherwise
* @see https://wow.gamepedia.com/API_CanScanResearchSite
* @since 5.4.0
*/
declare function CanScanResearchSite(): boolean;
/**
* Return true if artifact can be solved
*
* @see https://wow.gamepedia.com/API_CanSolveArtifact
* @since 4.0.0
*/
declare function CanSolveArtifact(): boolean;
/**
* Unknown
*
* @see https://wow.gamepedia.com/API_CloseResearch
* @since 4.0.0
*/
declare function CloseResearch(): WoWAPI.Unknown;
/**
* Returns the information for a specific race's active artifact
*
* @param raceIndex Index of the race to pick the artifact from
* @returns artifactName, artifactDescription, artifactRarity, artifactIcon, hoverDescription, keystoneCount, bgTexture
* @see https://wow.gamepedia.com/API_GetActiveArtifactByRace
* @since 4.0.0
* @tupleReturn
*/
// tslint:disable-next-line max-line-length
declare function GetActiveArtifactByRace(raceIndex: number): [string, string, WoWAPI.ARCHAELOLOGY_RARITY, WoWAPI.TexturePath, string, number, WoWAPI.TexturePath];
/**
* Returns the localized name for Archaeology
*
* @returns Localized name of the Archaeology secondary skill
* @see https://wow.gamepedia.com/API_GetArchaeologyInfo
* @since 4.0.0
*/
declare function GetArchaeologyInfo(): string;
/**
* Returns the information for a specific race used in Archaeology
*
* @param raceIndex Index of the race to query, between 1 and GetNumArchaeologyRaces().
* @returns raceName, raceTexture, raceItemID, numFragmentsCollected, numFragmentsRequired, maxFragments
* @see https://wow.gamepedia.com/API_GetArchaeologyRaceInfo
* @since 4.0.0
* @tupleReturn
*/
declare function GetArchaeologyRaceInfo(raceIndex: number): [string, WoWAPI.TexturePath, number, number, number, number];
/**
* Returns information about a branch of Archaeology
*
* @param branchId ID of the research branch (race) to query.
* @returns raceName, raceTextureID, raceItemID, numFragmentsCollected, numFragmentsRequired, maxFragments
* @see https://wow.gamepedia.com/API_GetArchaeologyRaceInfoByID
* @since 5.4.0
* @tupleReturn
*/
declare function GetArchaeologyRaceInfoByID(branchId: WoWAPI.ARCHAELOLOGY_BRANCH): [string, WoWAPI.TexturePath, number, number, number, number];
/**
* Returns the information for a specific race's artifact
*
* @param raceIndex Index of the race to pick the artifact from
* @param artifactIndex Index of the artifact
* @returns artifactName, artifactDescription, artifactRarity, artifactIcon, hoverDescription, keystoneCount, bgTexture, firstCompletionTime, completionCount
* @see https://wow.gamepedia.com/API_GetArtifactInfoByRace
* @since 4.0.0
* @tupleReturn
*/
// tslint:disable-next-line max-line-length
declare function GetArtifactInfoByRace(raceIndex: number, artifactIndex: number): [string, string, WoWAPI.ARCHAELOLOGY_RARITY, WoWAPI.TexturePath, string, number, WoWAPI.TexturePath, number, number];
/**
* Returns the number of Archaeology races in the game
*
* @returns The number of Archaeology races in the game
* @see https://wow.gamepedia.com/API_GetNumArchaeologyRaces
* @since 4.0.0
*/
declare function GetNumArchaeologyRaces(): number;
/**
* Returns the amount of artifacts the player has acquired from the provided race.
*
* @param raceIndex Index of the race to be selected.
* @returns Number of artifacts for that race
* @see https://wow.gamepedia.com/API_GetNumArtifactsByRace
* @since 4.0.0
*/
declare function GetNumArtifactsByRace(raceIndex: number): number;
/**
* Returns the information for the selected race's current archaeology artifact
*
* @returns artifactName, artifactDescription, artifactRarity, artifactIcon, hoverDescription, keystoneCount, bgTexture, spellId
* @see https://wow.gamepedia.com/API_GetSelectedArtifactInfo
* @since 4.0.0
* @tupleReturn
*/
declare function GetSelectedArtifactInfo(): [string, string, WoWAPI.ARCHAELOLOGY_RARITY, WoWAPI.TexturePath, string, number, WoWAPI.TexturePath, number];
/**
* Returns information about current used fragments for the selected artifact
*
* @returns numFragmentsCollected, numFragmentsAdded, numFragmentsRequired
* @see https://wow.gamepedia.com/API_GetArtifactProgress
* @since 4.0.0
* @tupleReturn
*/
declare function GetArtifactProgress(): [number, number, number];
/**
* Unknown
*
* @param args Unknown
* @see https://wow.gamepedia.com/API_IsArtifactCompletionHistoryAvailable
* @since 4.0.0
*/
declare function IsArtifactCompletionHistoryAvailable(...args: WoWAPI.Unknown[]): WoWAPI.Unknown;
/**
* Returns if there is a keystone in the artifact
*
* @param keystoneIndex Unknown
* @see https://wow.gamepedia.com/API_ItemAddedToArtifact
* @since 4.0.0
*/
declare function ItemAddedToArtifact(keystoneIndex: WoWAPI.Unknown): WoWAPI.Unknown;
/**
* Set the artifact-pointer to raceIndex
*
* @param raceIndex Index of the race to select
* @see https://wow.gamepedia.com/API_SetSelectedArtifact
* @since 4.0.0
*/
declare function SetSelectedArtifact(raceIndex: number): void;
/**
* Remove a Keystone from the selected artifact
*
* @returns True if the keystone is successfully removed
* @see https://wow.gamepedia.com/API_RemoveItemFromArtifact
* @since 4.0.0
*/
declare function RemoveItemFromArtifact(): boolean;
/**
* Queries the server for archeology data. RESEARCH_ARTIFACT_HISTORY_READY is fired when data is available
*
* @event RESEARCH_ARTIFACT_HISTORY_READY
* @see https://wow.gamepedia.com/API_RequestArtifactCompletionHistory
* @since 4.0.0
*/
declare function RequestArtifactCompletionHistory(): void;
/**
* Socked a Keystone to the selected artifact
*
* @returns True if the keystone is successfully added
* @see https://wow.gamepedia.com/API_SocketItemToArtifact
* @since 4.0.0
*/
declare function SocketItemToArtifact(): boolean;
/**
* Solve the selected artifact
*
* @see https://wow.gamepedia.com/API_SolveArtifact
* @since 4.0.0
*/
declare function SolveArtifact(): WoWAPI.Unknown;
/** @noSelfInFile */
/// <reference path="global.d.ts" />
/// <reference path="ui/ui.d.ts" />
declare namespace WoWAPI {
type ARCHAELOLOGY_RARITY_COMMON = 0;
type ARCHAELOLOGY_RARITY_RARE = 1;
type ARCHAELOLOGY_RARITY = ARCHAELOLOGY_RARITY_COMMON | ARCHAELOLOGY_RARITY_RARE;
type ARCHAELOLOGY_BRANCH_DWARF = 1;
type ARCHAELOLOGY_BRANCH_DRAENEI = 2;
type ARCHAELOLOGY_BRANCH_FOSSIL = 3;
type ARCHAELOLOGY_BRANCH_NIGHT_ELF = 4;
type ARCHAELOLOGY_BRANCH_NERUBIAN = 5;
type ARCHAELOLOGY_BRANCH_ORC = 6;
type ARCHAELOLOGY_BRANCH_TOL_VIR = 7;
type ARCHAELOLOGY_BRANCH_TROLL = 8;
type ARCHAELOLOGY_BRANCH_VRYKUL = 27;
type ARCHAELOLOGY_BRANCH_MANTID = 29;
type ARCHAELOLOGY_BRANCH_PANDAREN = 229;
type ARCHAELOLOGY_BRANCH_MOGU = 231;
type ARCHAELOLOGY_BRANCH_ARAKKOA = 315;
type ARCHAELOLOGY_BRANCH_DRAENOR_CLANS = 350;
type ARCHAELOLOGY_BRANCH_OGRE = 382;
type ARCHAELOLOGY_BRANCH_HIGHBORNE = 404;
type ARCHAELOLOGY_BRANCH_HIGHMOUNTAIN_TAUREN = 406;
type ARCHAELOLOGY_BRANCH_DEMONIC = 408;
/**
* all currently known branches
*/
type ARCHAELOLOGY_BRANCH = ARCHAELOLOGY_BRANCH_DWARF | ARCHAELOLOGY_BRANCH_DRAENEI | ARCHAELOLOGY_BRANCH_FOSSIL |
ARCHAELOLOGY_BRANCH_NIGHT_ELF | ARCHAELOLOGY_BRANCH_NERUBIAN | ARCHAELOLOGY_BRANCH_ORC | ARCHAELOLOGY_BRANCH_TOL_VIR |
ARCHAELOLOGY_BRANCH_TROLL | ARCHAELOLOGY_BRANCH_VRYKUL | ARCHAELOLOGY_BRANCH_MANTID | ARCHAELOLOGY_BRANCH_PANDAREN |
ARCHAELOLOGY_BRANCH_MOGU | ARCHAELOLOGY_BRANCH_ARAKKOA | ARCHAELOLOGY_BRANCH_DRAENOR_CLANS | ARCHAELOLOGY_BRANCH_OGRE |
ARCHAELOLOGY_BRANCH_HIGHBORNE | ARCHAELOLOGY_BRANCH_HIGHMOUNTAIN_TAUREN | ARCHAELOLOGY_BRANCH_DEMONIC;
}
/**
* Returns how many digsites are in a zone like Azsuna or Elwynn Forest
*
* @returns the number of digsites the player can use [Survey] on in a zone. The player must actually be in a zone that can be surveyed
* @see https://wow.gamepedia.com/API_ArchaeologyMapUpdateAll
* @since 5.4.0
*/
declare function ArchaeologyMapUpdateAll(): number;
/**
* Unknown
*
* @param index Unknown
* @see https://wow.gamepedia.com/API_ArchaeologyGetIconInfo
* @since 4.0.0
*/
declare function ArchaeologyGetIconInfo(index: WoWAPI.Unknown): WoWAPI.Unknown;
/**
* Returns 1 if item could be added to the selected artifact
*
* @param itemId Unknown
* @see https://wow.gamepedia.com/API_CanItemBeSocketedToArtifact
* @since 4.0.0
*/
declare function CanItemBeSocketedToArtifact(itemId: number): WoWAPI.Flag;
/**
* Returns whether the player is currently on a digsite
*
* @returns true if the player is currently on a digsite (and can use [Survey]), false otherwise
* @see https://wow.gamepedia.com/API_CanScanResearchSite
* @since 5.4.0
*/
declare function CanScanResearchSite(): boolean;
/**
* Return true if artifact can be solved
*
* @see https://wow.gamepedia.com/API_CanSolveArtifact
* @since 4.0.0
*/
declare function CanSolveArtifact(): boolean;
/**
* Unknown
*
* @see https://wow.gamepedia.com/API_CloseResearch
* @since 4.0.0
*/
declare function CloseResearch(): WoWAPI.Unknown;
/**
* Returns the information for a specific race's active artifact
*
* @param raceIndex Index of the race to pick the artifact from
* @returns artifactName, artifactDescription, artifactRarity, artifactIcon, hoverDescription, keystoneCount, bgTexture
* @see https://wow.gamepedia.com/API_GetActiveArtifactByRace
* @since 4.0.0
* @tupleReturn
*/
// tslint:disable-next-line max-line-length
declare function GetActiveArtifactByRace(raceIndex: number): [string, string, WoWAPI.ARCHAELOLOGY_RARITY, WoWAPI.TexturePath, string, number, WoWAPI.TexturePath];
/**
* Returns the localized name for Archaeology
*
* @returns Localized name of the Archaeology secondary skill
* @see https://wow.gamepedia.com/API_GetArchaeologyInfo
* @since 4.0.0
*/
declare function GetArchaeologyInfo(): string;
/**
* Returns the information for a specific race used in Archaeology
*
* @param raceIndex Index of the race to query, between 1 and GetNumArchaeologyRaces().
* @returns raceName, raceTexture, raceItemID, numFragmentsCollected, numFragmentsRequired, maxFragments
* @see https://wow.gamepedia.com/API_GetArchaeologyRaceInfo
* @since 4.0.0
* @tupleReturn
*/
declare function GetArchaeologyRaceInfo(raceIndex: number): [string, WoWAPI.TexturePath, number, number, number, number];
/**
* Returns information about a branch of Archaeology
*
* @param branchId ID of the research branch (race) to query.
* @returns raceName, raceTextureID, raceItemID, numFragmentsCollected, numFragmentsRequired, maxFragments
* @see https://wow.gamepedia.com/API_GetArchaeologyRaceInfoByID
* @since 5.4.0
* @tupleReturn
*/
declare function GetArchaeologyRaceInfoByID(branchId: WoWAPI.ARCHAELOLOGY_BRANCH): [string, WoWAPI.TexturePath, number, number, number, number];
/**
* Returns the information for a specific race's artifact
*
* @param raceIndex Index of the race to pick the artifact from
* @param artifactIndex Index of the artifact
* @returns artifactName, artifactDescription, artifactRarity, artifactIcon, hoverDescription, keystoneCount, bgTexture, firstCompletionTime, completionCount
* @see https://wow.gamepedia.com/API_GetArtifactInfoByRace
* @since 4.0.0
* @tupleReturn
*/
// tslint:disable-next-line max-line-length
declare function GetArtifactInfoByRace(raceIndex: number, artifactIndex: number): [string, string, WoWAPI.ARCHAELOLOGY_RARITY, WoWAPI.TexturePath, string, number, WoWAPI.TexturePath, number, number];
/**
* Returns the number of Archaeology races in the game
*
* @returns The number of Archaeology races in the game
* @see https://wow.gamepedia.com/API_GetNumArchaeologyRaces
* @since 4.0.0
*/
declare function GetNumArchaeologyRaces(): number;
/**
* Returns the amount of artifacts the player has acquired from the provided race.
*
* @param raceIndex Index of the race to be selected.
* @returns Number of artifacts for that race
* @see https://wow.gamepedia.com/API_GetNumArtifactsByRace
* @since 4.0.0
*/
declare function GetNumArtifactsByRace(raceIndex: number): number;
/**
* Returns the information for the selected race's current archaeology artifact
*
* @returns artifactName, artifactDescription, artifactRarity, artifactIcon, hoverDescription, keystoneCount, bgTexture, spellId
* @see https://wow.gamepedia.com/API_GetSelectedArtifactInfo
* @since 4.0.0
* @tupleReturn
*/
declare function GetSelectedArtifactInfo(): [string, string, WoWAPI.ARCHAELOLOGY_RARITY, WoWAPI.TexturePath, string, number, WoWAPI.TexturePath, number];
/**
* Returns information about current used fragments for the selected artifact
*
* @returns numFragmentsCollected, numFragmentsAdded, numFragmentsRequired
* @see https://wow.gamepedia.com/API_GetArtifactProgress
* @since 4.0.0
* @tupleReturn
*/
declare function GetArtifactProgress(): [number, number, number];
/**
* Unknown
*
* @param args Unknown
* @see https://wow.gamepedia.com/API_IsArtifactCompletionHistoryAvailable
* @since 4.0.0
*/
declare function IsArtifactCompletionHistoryAvailable(...args: WoWAPI.Unknown[]): WoWAPI.Unknown;
/**
* Returns if there is a keystone in the artifact
*
* @param keystoneIndex Unknown
* @see https://wow.gamepedia.com/API_ItemAddedToArtifact
* @since 4.0.0
*/
declare function ItemAddedToArtifact(keystoneIndex: WoWAPI.Unknown): WoWAPI.Unknown;
/**
* Set the artifact-pointer to raceIndex
*
* @param raceIndex Index of the race to select
* @see https://wow.gamepedia.com/API_SetSelectedArtifact
* @since 4.0.0
*/
declare function SetSelectedArtifact(raceIndex: number): void;
/**
* Remove a Keystone from the selected artifact
*
* @returns True if the keystone is successfully removed
* @see https://wow.gamepedia.com/API_RemoveItemFromArtifact
* @since 4.0.0
*/
declare function RemoveItemFromArtifact(): boolean;
/**
* Queries the server for archeology data. RESEARCH_ARTIFACT_HISTORY_READY is fired when data is available
*
* @event RESEARCH_ARTIFACT_HISTORY_READY
* @see https://wow.gamepedia.com/API_RequestArtifactCompletionHistory
* @since 4.0.0
*/
declare function RequestArtifactCompletionHistory(): void;
/**
* Socked a Keystone to the selected artifact
*
* @returns True if the keystone is successfully added
* @see https://wow.gamepedia.com/API_SocketItemToArtifact
* @since 4.0.0
*/
declare function SocketItemToArtifact(): boolean;
/**
* Solve the selected artifact
*
* @see https://wow.gamepedia.com/API_SolveArtifact
* @since 4.0.0
*/
declare function SolveArtifact(): WoWAPI.Unknown;

View File

@@ -1,71 +1,71 @@
/** @noSelfInFile */
/// <reference path="global.d.ts" />
declare namespace WoWAPI {
type ARENA_TEAM_GREEN = 0;
type ARENA_TEAM_GOLD = 1;
type ARENA_TEAM = ARENA_TEAM_GREEN | ARENA_TEAM_GOLD;
type ARENA_ID_2VS2 = 4;
type ARENA_ID_3VS3 = 5;
type ARENA_ID = ARENA_ID_2VS2 | ARENA_ID_3VS3;
}
/**
* Returns information regarding an Arena team
*
* @param index Which team to get information on, 0 is Green team and 1 is Gold Team
* @returns teamName, oldTeamRating, newTeamRating, teamRating
* @see https://wow.gamepedia.com/API_GetBattlefieldTeamInfo
* @tupleReturn
*/
declare function GetBattlefieldTeamInfo(index: WoWAPI.ARENA_TEAM): [string, number, number, number];
/**
* Returns the current arena season. Returns 0 when there is no active season
*
* @returns Current arena season
* @see https://wow.gamepedia.com/API_GetCurrentArenaSeason
*/
declare function GetCurrentArenaSeason(): number;
/**
* Gets the previous Arena season
*
* @see https://wow.gamepedia.com/API_GetPreviousArenaSeason
*/
declare function GetPreviousArenaSeason(): WoWAPI.Unknown;
/**
* Used for checking if the player is inside an arena or if it's a rated match. If you are in waiting room and/or countdown is going on, it will return false
*
* @returns isArena, isRegistered
* @see https://wow.gamepedia.com/API_IsActiveBattlefieldArena
* @tupleReturn
*/
declare function IsActiveBattlefieldArena(): [boolean, boolean];
/**
* Returns a value based on whether the player is the arena team captain
*
* @param index The team index
* @see https://wow.gamepedia.com/API_IsArenaTeamCaptain
*/
declare function IsArenaTeamCaptain(index: WoWAPI.ARENA_TEAM): boolean;
/**
* Returns true if you are a member of an arena team.
*
* @see https://wow.gamepedia.com/API_IsInArenaTeam
*/
declare function IsInArenaTeam(): boolean;
/**
* Queue for a arena either solo or as a group
*
* @param arenaId The arena id
* @param joinAsGroup Unknown
* @see https://wow.gamepedia.com/API_JoinSkirmish
*/
declare function JoinSkirmish(arenaId: WoWAPI.ARENA_ID, joinAsGroup?: boolean): void;
/** @noSelfInFile */
/// <reference path="global.d.ts" />
declare namespace WoWAPI {
type ARENA_TEAM_GREEN = 0;
type ARENA_TEAM_GOLD = 1;
type ARENA_TEAM = ARENA_TEAM_GREEN | ARENA_TEAM_GOLD;
type ARENA_ID_2VS2 = 4;
type ARENA_ID_3VS3 = 5;
type ARENA_ID = ARENA_ID_2VS2 | ARENA_ID_3VS3;
}
/**
* Returns information regarding an Arena team
*
* @param index Which team to get information on, 0 is Green team and 1 is Gold Team
* @returns teamName, oldTeamRating, newTeamRating, teamRating
* @see https://wow.gamepedia.com/API_GetBattlefieldTeamInfo
* @tupleReturn
*/
declare function GetBattlefieldTeamInfo(index: WoWAPI.ARENA_TEAM): [string, number, number, number];
/**
* Returns the current arena season. Returns 0 when there is no active season
*
* @returns Current arena season
* @see https://wow.gamepedia.com/API_GetCurrentArenaSeason
*/
declare function GetCurrentArenaSeason(): number;
/**
* Gets the previous Arena season
*
* @see https://wow.gamepedia.com/API_GetPreviousArenaSeason
*/
declare function GetPreviousArenaSeason(): WoWAPI.Unknown;
/**
* Used for checking if the player is inside an arena or if it's a rated match. If you are in waiting room and/or countdown is going on, it will return false
*
* @returns isArena, isRegistered
* @see https://wow.gamepedia.com/API_IsActiveBattlefieldArena
* @tupleReturn
*/
declare function IsActiveBattlefieldArena(): [boolean, boolean];
/**
* Returns a value based on whether the player is the arena team captain
*
* @param index The team index
* @see https://wow.gamepedia.com/API_IsArenaTeamCaptain
*/
declare function IsArenaTeamCaptain(index: WoWAPI.ARENA_TEAM): boolean;
/**
* Returns true if you are a member of an arena team.
*
* @see https://wow.gamepedia.com/API_IsInArenaTeam
*/
declare function IsInArenaTeam(): boolean;
/**
* Queue for a arena either solo or as a group
*
* @param arenaId The arena id
* @param joinAsGroup Unknown
* @see https://wow.gamepedia.com/API_JoinSkirmish
*/
declare function JoinSkirmish(arenaId: WoWAPI.ARENA_ID, joinAsGroup?: boolean): void;

View File

@@ -1,3 +1,3 @@
/** @noSelfInFile */
// @todo: write declarations!
/** @noSelfInFile */
// @todo: write declarations!

View File

@@ -1,4 +0,0 @@
declare namespace WoWAPI {
type AtlasID = string;
}

File diff suppressed because it is too large Load Diff

View File

@@ -1,31 +1,31 @@
/** @noSelfInFile */
/**
* Map a bank item button or bag to an inventory slot button for use in inventory functions
* @param buttodId bank item/bag ID.
* @param isBag 1 if buttonID is a bag, nil otherwise. Same result as ContainerIDToInventoryID, except this one only works for
* bank bags and is more awkward to use
* @see https://wow.gamepedia.com/API_BankButtonIDToInvSlotID
*/
declare function BankButtonIDToInvSlotID(buttodId: number, isBag: WoWAPI.Flag): WoWAPI.INVENTORY_SLOT_ID;
/**
* Will Close the Bank Frame if opened
* @see https://wow.gamepedia.com/API_CloseBankFrame
*/
declare function CloseBankFrame(): void;
/**
* Returns the price of a particular bank slot
* @param numSlot Number of slots already purchased
* @return Price of the next bank slot in copper
* @see https://wow.gamepedia.com/API_GetBankSlotCost
*/
declare function GetBankSlotCost(numSlot: number): number;
/**
* Returns information about the number of purchased bank bag slots
* @see https://wow.gamepedia.com/API_GetNumBankSlots
* @tupleReturn
*/
declare function GetNumBankSlots(): [number, WoWAPI.Flag];
/** @noSelfInFile */
/**
* Map a bank item button or bag to an inventory slot button for use in inventory functions
* @param buttodId bank item/bag ID.
* @param isBag 1 if buttonID is a bag, nil otherwise. Same result as ContainerIDToInventoryID, except this one only works for
* bank bags and is more awkward to use
* @see https://wow.gamepedia.com/API_BankButtonIDToInvSlotID
*/
declare function BankButtonIDToInvSlotID(buttodId: number, isBag: WoWAPI.Flag): WoWAPI.INVENTORY_SLOT_ID;
/**
* Will Close the Bank Frame if opened
* @see https://wow.gamepedia.com/API_CloseBankFrame
*/
declare function CloseBankFrame(): void;
/**
* Returns the price of a particular bank slot
* @param numSlot Number of slots already purchased
* @return Price of the next bank slot in copper
* @see https://wow.gamepedia.com/API_GetBankSlotCost
*/
declare function GetBankSlotCost(numSlot: number): number;
/**
* Returns information about the number of purchased bank bag slots
* @see https://wow.gamepedia.com/API_GetNumBankSlots
* @tupleReturn
*/
declare function GetNumBankSlots(): [number, WoWAPI.Flag];

View File

@@ -1,56 +1,56 @@
/** @noSelfInFile */
declare namespace WoWAPI {
type FacialHairCustomizationGlobalType = "EARRINGS" | "FEATURES" | "HAIR" | "HORNS" | "MARKINGS" | "NORMAL" | "PIERCINGS" | "TUSKS";
type FacialHairCustomizationType = "HORNS" | "NORMAL";
}
/**
* Purchases currently selected customizations from the barber shop
* @see https://wow.gamepedia.com/API_ApplyBarberShopStyle
*/
declare function ApplyBarberShopStyle(): void;
/**
* Resets all customization categories to original styles
* @see https://wow.gamepedia.com/API_BarberShopReset
*/
declare function BarberShopReset(): void;
/**
* Exits the barber shop without applying selected customizations
* @see https://wow.gamepedia.com/API_CancelBarberShop
*/
declare function CancelBarberShop(): void;
/**
* Returns information about the current selection for a barber shop customization
* @see https://wow.gamepedia.com/API_GetBarberShopStyleInfo
* @tupleReturn
*/
declare function GetBarberShopStyleInfo(catId: number): [string, WoWAPI.Unknown, WoWAPI.Unknown, WoWAPI.Flag];
/**
* Returns the total costs of the cosmetic changes
* @see https://wow.gamepedia.com/API_GetBarberShopTotalCost
*/
declare function GetBarberShopTotalCost(): number;
/**
* Returns the type of facial hair customization available to the character
* @see https://wow.gamepedia.com/API_GetFacialHairCustomization
*/
declare function GetFacialHairCustomization(): WoWAPI.FacialHairCustomizationGlobalType;
/**
* https://wow.gamepedia.com/API_GetHairCustomization
* @see https://wow.gamepedia.com/API_GetHairCustomization
*/
declare function GetHairCustomization(): WoWAPI.FacialHairCustomizationType;
/**
* Alters style selection in a particular customization category
* @param catId Ascending index of the customization category that should be changed to the next/previous style
* @param reverse 1 if the selection should be changed to the previous style, nil if to the next
*/
declare function SetNextBarberShopStyle(catId: number, reverse?: WoWAPI.Flag): void;
/** @noSelfInFile */
declare namespace WoWAPI {
type FacialHairCustomizationGlobalType = "EARRINGS" | "FEATURES" | "HAIR" | "HORNS" | "MARKINGS" | "NORMAL" | "PIERCINGS" | "TUSKS";
type FacialHairCustomizationType = "HORNS" | "NORMAL";
}
/**
* Purchases currently selected customizations from the barber shop
* @see https://wow.gamepedia.com/API_ApplyBarberShopStyle
*/
declare function ApplyBarberShopStyle(): void;
/**
* Resets all customization categories to original styles
* @see https://wow.gamepedia.com/API_BarberShopReset
*/
declare function BarberShopReset(): void;
/**
* Exits the barber shop without applying selected customizations
* @see https://wow.gamepedia.com/API_CancelBarberShop
*/
declare function CancelBarberShop(): void;
/**
* Returns information about the current selection for a barber shop customization
* @see https://wow.gamepedia.com/API_GetBarberShopStyleInfo
* @tupleReturn
*/
declare function GetBarberShopStyleInfo(catId: number): [string, WoWAPI.Unknown, WoWAPI.Unknown, WoWAPI.Flag];
/**
* Returns the total costs of the cosmetic changes
* @see https://wow.gamepedia.com/API_GetBarberShopTotalCost
*/
declare function GetBarberShopTotalCost(): number;
/**
* Returns the type of facial hair customization available to the character
* @see https://wow.gamepedia.com/API_GetFacialHairCustomization
*/
declare function GetFacialHairCustomization(): WoWAPI.FacialHairCustomizationGlobalType;
/**
* https://wow.gamepedia.com/API_GetHairCustomization
* @see https://wow.gamepedia.com/API_GetHairCustomization
*/
declare function GetHairCustomization(): WoWAPI.FacialHairCustomizationType;
/**
* Alters style selection in a particular customization category
* @param catId Ascending index of the customization category that should be changed to the next/previous style
* @param reverse 1 if the selection should be changed to the previous style, nil if to the next
*/
declare function SetNextBarberShopStyle(catId: number, reverse?: WoWAPI.Flag): void;

View File

@@ -1,218 +1,218 @@
/** @noSelfInFile */
declare namespace WoWAPI {
type BattlefieldStatusType = "queued" | "confirm" | "active" | "none" | "error";
type BattlefieldTeamSize = 0 | 2 | 3 | 5;
type BattlefieldType = "ARENA" | "BATTLEGROUND" | "WARGAME";
type BattlefieldWinType = null | 0 | 1 | 255;
type BattlefieldUiStateType = 0 | 1 | 2;
type BattlefieldFaction = null | undefined | void | 0 | 1;
}
/**
* Acccept the area Spirit Healer's resurrection in battlegrounds
* @see https://wow.gamepedia.com/API_AcceptAreaSpiritHeal
*/
declare function AcceptAreaSpiritHeal(): void;
/**
* Confirms entry into a Battleground you are queued for that is ready
* @param index The battlefield in queue to enter
* @param accept Whether or not to accept entry to the battlefield
* @protected HARDWARE_EVENT
* @see https://wow.gamepedia.com/API_AcceptBattlefieldPort
*/
declare function AcceptBattlefieldPort(index: number, accept: boolean): void;
/**
* Cancels the area Spirit Healer's resurrection in battlegrounds
* @see https://wow.gamepedia.com/API_CancelAreaSpiritHeal
*/
declare function CancelAreaSpiritHeal(): void;
/**
* Returns, whether the player can join a battlefield as group or not
* @return returns true, if the player can join the battlefield as group
* @see https://wow.gamepedia.com/API_CanJoinBattlefieldAsGroup
*/
declare function CanJoinBattlefieldAsGroup(): boolean;
/**
* Gets the time left until the next resurrection cast.
* @return Seconds until the Spirit Guide casts its next Area Resurrection. Returns 0 if player is not dead
* @see https://wow.gamepedia.com/API_GetAreaSpiritHealerTime
*/
declare function GetAreaSpiritHealerTime(): number;
/**
* Get estimated wait time for a Battlefield's availability
* @returns Milliseconds until Battlefield opening is available (estimated)
* @see https://wow.gamepedia.com/API_GetBattlefieldEstimatedWaitTime
*/
declare function GetBattlefieldEstimatedWaitTime(): number;
/**
* Used to position the flag icon on the world map and the battlefield minimap
* @param index Index to get the flag position from
* @see https://wow.gamepedia.com/API_GetBattlefieldFlagPosition
* @tupleReturn
*/
declare function GetBattlefieldFlagPosition(index: number): [number, number, string];
/**
* Get shutdown timer for the battlefield instance
* @returns the number of milliseconds before the Battlefield will close after a battle is finished. This is 0 before the battle is finished
* @see https://wow.gamepedia.com/API_GetBattlefieldInstanceExpiration
*/
declare function GetBattlefieldInstanceExpiration(): number;
/**
* Returns the time passed since the battleground started
* @returns miliseconds passed since the battle started
* @see https://wow.gamepedia.com/API_GetBattlefieldInstanceRunTime
*/
declare function GetBattlefieldInstanceRunTime(): number;
/**
* Returns the remaining seconds of a battlefield port
* @param index Index of queue to get the expiration from
* @returns Remaining time of battlefield port in seconds
* @see https://wow.gamepedia.com/API_GetBattlefieldPortExpiration
*/
declare function GetBattlefieldPortExpiration(index: number): number;
/**
* Returns information about a player's score in battlegrounds
* @param playerIndex The characters index in battlegrounds, going from 1 to GetNumBattlefieldScores().
* @see https://wow.gamepedia.com/API_GetBattlefieldScore
* @tupleReturn
*/
declare function GetBattlefieldScore(playerIndex: number): [string, number, number, number, number, number, string, string, string, number, number, string];
/**
* Get data from the custom battlefield scoreboard columns
* @param playerIndex Player you want to grab the data for
* @param columnIndex Column you want to grab the data from
* @description Used to retrieve data from battleground specific scoreboard columns like flag captures in Warsong Gulch.
* If you want to make sure you have the most recent data you will have to call RequestBattlefieldScoreData and then wait for UPDATE_BATTLEFIELD_SCORE
* @see https://wow.gamepedia.com/API_GetBattlefieldStatData
*/
declare function GetBattlefieldStatData(playerIndex: number, columnIndex: number): WoWAPI.Unknown;
/**
* Get list of battleground specific columns on the scoreboard
* @param columnIndex Column to get data for
* @see https://wow.gamepedia.com/API_GetBattlefieldStatInfo
* @tupleReturn
*/
declare function GetBattlefieldStatInfo(columnIndex: number): [string, string, string];
/**
* Get the status of the arena, battleground, or wargame that the player is either queued for or inside
* @param battlefieldIndex Index of the battlefield you wish to view, in the range of 1 to GetMaxBattlefieldID()
* @see https://wow.gamepedia.com/API_GetBattlefieldStatus
* @tupleReturn
*/
// tslint:disable-next-line max-line-length
declare function GetBattlefieldStatus(battlefieldIndex: number): [WoWAPI.BattlefieldStatusType, string, WoWAPI.BattlefieldTeamSize, number, WoWAPI.Unknown, WoWAPI.BattlefieldType, WoWAPI.Unknown, WoWAPI.UnitRoleType];
/**
* Get time this player's been in the queue in milliseconds
* @param battlegroundQueuePosition The queue position
* @see https://wow.gamepedia.com/API_GetBattlefieldTimeWaited
*/
declare function GetBattlefieldTimeWaited(battlegroundQueuePosition: number): number;
/**
* Get the winner of the battlefield
* @returns Faction/team that has won the battlefield. Results are: nil if nobody has won, 0 for Horde, 1 for Alliance and 255
* for a draw in a battleground, 0 for Green Team and 1 for Yellow in an arena
* @see https://wow.gamepedia.com/API_GetBattlefieldWinner
*/
declare function GetBattlefieldWinner(): WoWAPI.BattlefieldWinType;
/**
* Returns information about a battleground type
* @param battlegroundTypeIndex battleground type index, 1 to GetNumBattlegroundTypes().
* @see https://wow.gamepedia.com/API_GetBattlegroundInfo
* @tupleReturn
*/
declare function GetBattlegroundInfo(battlegroundTypeIndex: number): [string, WoWAPI.Flag, WoWAPI.Flag, WoWAPI.Flag, number, string];
/**
* Returns the max number of battlefields you can queue for
* @returns Max number of Battlefields
* @see https://wow.gamepedia.com/API_GetMaxBattlefieldID
* @since 4.3.0
*/
declare function GetMaxBattlefieldID(): number;
/**
* Appears to return the number of scores in the battleground/field scoreboard
* @see https://wow.gamepedia.com/API_GetNumBattlefieldScores
*/
declare function GetNumBattlefieldScores(): WoWAPI.Unknown;
/**
* Appears to return the number of columns in the battleground/field scoreboard, other than the common ones (Killing Blows, Kills, Deaths, Bonus Honour):
* @returns Number of columns available for the battleground (2 for Warsong Gulch and Arathi Basin, 7 for Alterac Valley)
* @see https://wow.gamepedia.com/API_GetNumBattlefieldStats
*/
declare function GetNumBattlefieldStats(): number;
/**
* Returns the number of world state UI elements. These are displayed in the WorldStateFrame at the top center of the screen
* @see https://wow.gamepedia.com/API_GetNumWorldStateUI
*/
declare function GetNumWorldStateUI(): number;
/**
* Get score and flag status within a battlefield
* @param worldUiStateIndex between 1 and GetNumWorldStateUI().
* @see https://wow.gamepedia.com/API_GetWorldStateUIInfo
* @tupleReturn
*/
// tslint:disable-next-line max-line-length
declare function GetWorldStateUIInfo(worldUiStateIndex: number): [number, WoWAPI.BattlefieldUiStateType, boolean, string, string, string, string, string, string, number, number, number];
/**
* Queues the player, or the player's group, for a battlefield instance
* @param battlefieldIndex Which battlefield instance to queue for (0 for first available), or which arena bracket to queue for
* @param asGroup If true-equivalent, the player's group is queued for the battlefield, otherwise, only the player is queued
* @param isRated If true-equivalent, and queueing for an arena bracket, the group is queued for a rated match as opposed to a skirmish
* @deprecated
* @protected Protected functions can only be called from a secure execution path.
*/
declare function JoinBattlefield(battlefieldIndex: number, asGroup?: boolean, isRated?: boolean): void;
/**
* Leaves the current battlefield
* @description Leaves the current battlefield the player is inside, pre-2.0.1 this would only leave the battlefield if it had been won or
* lost this was changed in 2.0.1 to exit you from the battlefield regardless if it was finished or not and will give you deserter.
* @see https://wow.gamepedia.com/API_LeaveBattlefield
*/
declare function LeaveBattlefield(): void;
/**
* Requests the lastest battlefield score data from the server
* @event UPDATE_BATTLEFIELD_SCORE
* @see https://wow.gamepedia.com/API_RequestBattlefieldScoreData
*/
declare function RequestBattlefieldScoreData(): void;
/**
* Requests information about the available instances of a particular battleground
* @param instanceIndex Index of the battleground type to request instance information for; valid indices start from 1 and go up to GetNumBattlegroundTypes().
* @event PVPQUEUE_ANYWHERE_SHOW
* @description Calling JoinBattlefield after calling this function, but before PVPQUEUE_ANYWHERE_SHOW, will fail silently; you must wait for
* the instance list to become available before you can queue for an instance.
* @see https://wow.gamepedia.com/API_RequestBattlegroundInstanceInfo
*/
declare function RequestBattlegroundInstanceInfo(instanceIndex: number): void;
/**
* Set the faction to show on the battlefield scoreboard
* @param faction nil = All, 0 = Horde, 1 = Alliance
* @see https://wow.gamepedia.com/API_SetBattlefieldScoreFaction
*/
declare function SetBattlefieldScoreFaction(faction?: WoWAPI.BattlefieldFaction): void;
/** @noSelfInFile */
declare namespace WoWAPI {
type BattlefieldStatusType = "queued" | "confirm" | "active" | "none" | "error";
type BattlefieldTeamSize = 0 | 2 | 3 | 5;
type BattlefieldType = "ARENA" | "BATTLEGROUND" | "WARGAME";
type BattlefieldWinType = null | 0 | 1 | 255;
type BattlefieldUiStateType = 0 | 1 | 2;
type BattlefieldFaction = null | undefined | void | 0 | 1;
}
/**
* Acccept the area Spirit Healer's resurrection in battlegrounds
* @see https://wow.gamepedia.com/API_AcceptAreaSpiritHeal
*/
declare function AcceptAreaSpiritHeal(): void;
/**
* Confirms entry into a Battleground you are queued for that is ready
* @param index The battlefield in queue to enter
* @param accept Whether or not to accept entry to the battlefield
* @protected HARDWARE_EVENT
* @see https://wow.gamepedia.com/API_AcceptBattlefieldPort
*/
declare function AcceptBattlefieldPort(index: number, accept: boolean): void;
/**
* Cancels the area Spirit Healer's resurrection in battlegrounds
* @see https://wow.gamepedia.com/API_CancelAreaSpiritHeal
*/
declare function CancelAreaSpiritHeal(): void;
/**
* Returns, whether the player can join a battlefield as group or not
* @return returns true, if the player can join the battlefield as group
* @see https://wow.gamepedia.com/API_CanJoinBattlefieldAsGroup
*/
declare function CanJoinBattlefieldAsGroup(): boolean;
/**
* Gets the time left until the next resurrection cast.
* @return Seconds until the Spirit Guide casts its next Area Resurrection. Returns 0 if player is not dead
* @see https://wow.gamepedia.com/API_GetAreaSpiritHealerTime
*/
declare function GetAreaSpiritHealerTime(): number;
/**
* Get estimated wait time for a Battlefield's availability
* @returns Milliseconds until Battlefield opening is available (estimated)
* @see https://wow.gamepedia.com/API_GetBattlefieldEstimatedWaitTime
*/
declare function GetBattlefieldEstimatedWaitTime(): number;
/**
* Used to position the flag icon on the world map and the battlefield minimap
* @param index Index to get the flag position from
* @see https://wow.gamepedia.com/API_GetBattlefieldFlagPosition
* @tupleReturn
*/
declare function GetBattlefieldFlagPosition(index: number): [number, number, string];
/**
* Get shutdown timer for the battlefield instance
* @returns the number of milliseconds before the Battlefield will close after a battle is finished. This is 0 before the battle is finished
* @see https://wow.gamepedia.com/API_GetBattlefieldInstanceExpiration
*/
declare function GetBattlefieldInstanceExpiration(): number;
/**
* Returns the time passed since the battleground started
* @returns miliseconds passed since the battle started
* @see https://wow.gamepedia.com/API_GetBattlefieldInstanceRunTime
*/
declare function GetBattlefieldInstanceRunTime(): number;
/**
* Returns the remaining seconds of a battlefield port
* @param index Index of queue to get the expiration from
* @returns Remaining time of battlefield port in seconds
* @see https://wow.gamepedia.com/API_GetBattlefieldPortExpiration
*/
declare function GetBattlefieldPortExpiration(index: number): number;
/**
* Returns information about a player's score in battlegrounds
* @param playerIndex The characters index in battlegrounds, going from 1 to GetNumBattlefieldScores().
* @see https://wow.gamepedia.com/API_GetBattlefieldScore
* @tupleReturn
*/
declare function GetBattlefieldScore(playerIndex: number): [string, number, number, number, number, number, string, string, string, number, number, string];
/**
* Get data from the custom battlefield scoreboard columns
* @param playerIndex Player you want to grab the data for
* @param columnIndex Column you want to grab the data from
* @description Used to retrieve data from battleground specific scoreboard columns like flag captures in Warsong Gulch.
* If you want to make sure you have the most recent data you will have to call RequestBattlefieldScoreData and then wait for UPDATE_BATTLEFIELD_SCORE
* @see https://wow.gamepedia.com/API_GetBattlefieldStatData
*/
declare function GetBattlefieldStatData(playerIndex: number, columnIndex: number): WoWAPI.Unknown;
/**
* Get list of battleground specific columns on the scoreboard
* @param columnIndex Column to get data for
* @see https://wow.gamepedia.com/API_GetBattlefieldStatInfo
* @tupleReturn
*/
declare function GetBattlefieldStatInfo(columnIndex: number): [string, string, string];
/**
* Get the status of the arena, battleground, or wargame that the player is either queued for or inside
* @param battlefieldIndex Index of the battlefield you wish to view, in the range of 1 to GetMaxBattlefieldID()
* @see https://wow.gamepedia.com/API_GetBattlefieldStatus
* @tupleReturn
*/
// tslint:disable-next-line max-line-length
declare function GetBattlefieldStatus(battlefieldIndex: number): [WoWAPI.BattlefieldStatusType, string, WoWAPI.BattlefieldTeamSize, number, WoWAPI.Unknown, WoWAPI.BattlefieldType, WoWAPI.Unknown, WoWAPI.UnitRoleType];
/**
* Get time this player's been in the queue in milliseconds
* @param battlegroundQueuePosition The queue position
* @see https://wow.gamepedia.com/API_GetBattlefieldTimeWaited
*/
declare function GetBattlefieldTimeWaited(battlegroundQueuePosition: number): number;
/**
* Get the winner of the battlefield
* @returns Faction/team that has won the battlefield. Results are: nil if nobody has won, 0 for Horde, 1 for Alliance and 255
* for a draw in a battleground, 0 for Green Team and 1 for Yellow in an arena
* @see https://wow.gamepedia.com/API_GetBattlefieldWinner
*/
declare function GetBattlefieldWinner(): WoWAPI.BattlefieldWinType;
/**
* Returns information about a battleground type
* @param battlegroundTypeIndex battleground type index, 1 to GetNumBattlegroundTypes().
* @see https://wow.gamepedia.com/API_GetBattlegroundInfo
* @tupleReturn
*/
declare function GetBattlegroundInfo(battlegroundTypeIndex: number): [string, WoWAPI.Flag, WoWAPI.Flag, WoWAPI.Flag, number, string];
/**
* Returns the max number of battlefields you can queue for
* @returns Max number of Battlefields
* @see https://wow.gamepedia.com/API_GetMaxBattlefieldID
* @since 4.3.0
*/
declare function GetMaxBattlefieldID(): number;
/**
* Appears to return the number of scores in the battleground/field scoreboard
* @see https://wow.gamepedia.com/API_GetNumBattlefieldScores
*/
declare function GetNumBattlefieldScores(): WoWAPI.Unknown;
/**
* Appears to return the number of columns in the battleground/field scoreboard, other than the common ones (Killing Blows, Kills, Deaths, Bonus Honour):
* @returns Number of columns available for the battleground (2 for Warsong Gulch and Arathi Basin, 7 for Alterac Valley)
* @see https://wow.gamepedia.com/API_GetNumBattlefieldStats
*/
declare function GetNumBattlefieldStats(): number;
/**
* Returns the number of world state UI elements. These are displayed in the WorldStateFrame at the top center of the screen
* @see https://wow.gamepedia.com/API_GetNumWorldStateUI
*/
declare function GetNumWorldStateUI(): number;
/**
* Get score and flag status within a battlefield
* @param worldUiStateIndex between 1 and GetNumWorldStateUI().
* @see https://wow.gamepedia.com/API_GetWorldStateUIInfo
* @tupleReturn
*/
// tslint:disable-next-line max-line-length
declare function GetWorldStateUIInfo(worldUiStateIndex: number): [number, WoWAPI.BattlefieldUiStateType, boolean, string, string, string, string, string, string, number, number, number];
/**
* Queues the player, or the player's group, for a battlefield instance
* @param battlefieldIndex Which battlefield instance to queue for (0 for first available), or which arena bracket to queue for
* @param asGroup If true-equivalent, the player's group is queued for the battlefield, otherwise, only the player is queued
* @param isRated If true-equivalent, and queueing for an arena bracket, the group is queued for a rated match as opposed to a skirmish
* @deprecated
* @protected Protected functions can only be called from a secure execution path.
*/
declare function JoinBattlefield(battlefieldIndex: number, asGroup?: boolean, isRated?: boolean): void;
/**
* Leaves the current battlefield
* @description Leaves the current battlefield the player is inside, pre-2.0.1 this would only leave the battlefield if it had been won or
* lost this was changed in 2.0.1 to exit you from the battlefield regardless if it was finished or not and will give you deserter.
* @see https://wow.gamepedia.com/API_LeaveBattlefield
*/
declare function LeaveBattlefield(): void;
/**
* Requests the lastest battlefield score data from the server
* @event UPDATE_BATTLEFIELD_SCORE
* @see https://wow.gamepedia.com/API_RequestBattlefieldScoreData
*/
declare function RequestBattlefieldScoreData(): void;
/**
* Requests information about the available instances of a particular battleground
* @param instanceIndex Index of the battleground type to request instance information for; valid indices start from 1 and go up to GetNumBattlegroundTypes().
* @event PVPQUEUE_ANYWHERE_SHOW
* @description Calling JoinBattlefield after calling this function, but before PVPQUEUE_ANYWHERE_SHOW, will fail silently; you must wait for
* the instance list to become available before you can queue for an instance.
* @see https://wow.gamepedia.com/API_RequestBattlegroundInstanceInfo
*/
declare function RequestBattlegroundInstanceInfo(instanceIndex: number): void;
/**
* Set the faction to show on the battlefield scoreboard
* @param faction nil = All, 0 = Horde, 1 = Alliance
* @see https://wow.gamepedia.com/API_SetBattlefieldScoreFaction
*/
declare function SetBattlefieldScoreFaction(faction?: WoWAPI.BattlefieldFaction): void;

View File

@@ -1,98 +1,98 @@
/** @noSelfInFile */
declare namespace WoWAPI {
type CurrentBindingWhich = 1 | 2;
type BindingSetType = 0 | CurrentBindingWhich;
}
/**
* Returns the command name and all keys currently bound to the specified binding
* @param bindingIndex index of the binding to query, from 1 to GetNumBindings().
* @param mode Unknown, defaults to 1
* @see https://wow.gamepedia.com/API_GetBinding
* @tupleReturn
*/
declare function GetBinding(bindingIndex: number, mode?: WoWAPI.Unknown): [string, string, string];
/**
* Returns the name of the action performed by the specified binding
* @param binding The name of the key (eg. "BUTTON1", "1", "CTRL-G")
* @param checkOverride if true, override bindings will be checked, otherwise, only default (bindings.xml/SetBinding) bindings are consulted
* @returns action command performed by the binding. If no action is bound to the key, an empty string is returned
* @see https://wow.gamepedia.com/API_GetBindingAction
*/
declare function GetBindingAction(binding: string, checkOverride?: boolean): string;
/**
* Returns all keys currently bound to the command specified by command. This function is almost identical to GetBinding(index)
* except it takes the command name as an argument instead of the index and doesn't return the command name along with the key bindings
* @param command The name of the command to get key bindings for (e.g. MOVEFORWARD, TOGGLEFRIENDSTAB)
* @returns The string representation(s) of all the key(s) bound to this command (e.g. W, CTRL-F)
* @see https://wow.gamepedia.com/API_GetBindingKey
* @tupleReturn
*/
declare function GetBindingKey(command: string): [...string[]];
/**
* Returns the localized string value for the given key and prefix. Essentially a glorified getglobal() function
* @param key The name of the key (e.g. "UP", "SHIFT-PAGEDOWN")
* @param prefix The prefix of the variable name you're looking for. Usually "KEY_" or "BINDING_NAME_"
* @param abbreviate Whether to return an abbreviated version of the modifier keys
* @returns The value of the global variable derived from the prefix and key name you specified. For example, "UP" and "KEY_"
* would return the value of the global variable KEY_UP which is "Up Arrow" in the english locale. If the global variable doesn't exist for
* the combination specified, it appears to just return the key name you specified. Modifier key prefixes are stripped from the input and added
* back in to the output
* @see https://wow.gamepedia.com/API_GetBindingText
*/
declare function GetBindingText(key: string, prefix: string, abbreviate?: boolean): string;
/**
* Returns whether account- or character-specific bindings are active.
* @returns ACCOUNT_BINDINGS = 1 (indicates that account-wide bindings are currently active), CHARACTER_BINDINGS = 2
* (indicates that per-character bindings are currently active)
* @see https://wow.gamepedia.com/API_GetCurrentBindingSet
*/
declare function GetCurrentBindingSet(): WoWAPI.CurrentBindingWhich;
/**
* Returns the total number of key bindings listed in the key bindings window. This includes not only actions that can be bound,
* but also the category headers in the window. This would generally be used in conjunction with GetBinding to loop through and set/get
* all of the key bindings available
* @returns The total number of key bindings (including headers) listed in the key bindings window.
* @see https://wow.gamepedia.com/API_GetNumBindings
*/
declare function GetNumBindings(): WoWAPI.Unknown;
/**
* Loads a binding set into memory, activating those bindings
* @param bindingSet Which binding set to load; one of the following three numeric constants: DEFAULT_BINDINGS (0), ACCOUNT_BINDINGS (1), CHARACTER_BINDINGS (2)
* @event UPDATE_BINDINGS
* @see https://wow.gamepedia.com/API_LoadBindings
*/
declare function LoadBindings(bindingSet: WoWAPI.BindingSetType): void;
/**
* Executes a key binding as if a key was pressed
* @param command Name of the key binding to be executed
* @param up if "up", the binding is run as if the key was released
* @description The "command" argument must match one of the (usually capitalized) binding names in a Bindings.xml file.
* This can be a name that appears in the Blizzard FrameXML Bindings.xml, or one that is specified in an AddOn. RunBinding cannot be used
* to call a Protected Function from insecure execution paths. By default, the key binding is executed as if the key was pressed down, in other
* words the keystate variable will have value "down" during the binding's execution. By specifying the optional second argument
* (the actual string "up"), the binding is instead executed as if the key was released, in other words the keystate variable will have value
* "up" during the binding's execution
* @see https://wow.gamepedia.com/API_RunBinding
*/
declare function RunBinding(command: string, up?: string): void;
/**
* Writes the current in-memory key bindings to disk
* @param bindingSafeType Can be the values 1 or 2. This value indicates whether the current key bindings set should be saved as account or character specific
* @event UPDATE_BINDINGS
* @see https://wow.gamepedia.com/API_SaveBindings
*/
declare function SaveBindings(bindingSafeType: WoWAPI.CurrentBindingWhich): void;
/**
* @todo: SetBinding() ...
*/
/** @noSelfInFile */
declare namespace WoWAPI {
type CurrentBindingWhich = 1 | 2;
type BindingSetType = 0 | CurrentBindingWhich;
}
/**
* Returns the command name and all keys currently bound to the specified binding
* @param bindingIndex index of the binding to query, from 1 to GetNumBindings().
* @param mode Unknown, defaults to 1
* @see https://wow.gamepedia.com/API_GetBinding
* @tupleReturn
*/
declare function GetBinding(bindingIndex: number, mode?: WoWAPI.Unknown): [string, string, string];
/**
* Returns the name of the action performed by the specified binding
* @param binding The name of the key (eg. "BUTTON1", "1", "CTRL-G")
* @param checkOverride if true, override bindings will be checked, otherwise, only default (bindings.xml/SetBinding) bindings are consulted
* @returns action command performed by the binding. If no action is bound to the key, an empty string is returned
* @see https://wow.gamepedia.com/API_GetBindingAction
*/
declare function GetBindingAction(binding: string, checkOverride?: boolean): string;
/**
* Returns all keys currently bound to the command specified by command. This function is almost identical to GetBinding(index)
* except it takes the command name as an argument instead of the index and doesn't return the command name along with the key bindings
* @param command The name of the command to get key bindings for (e.g. MOVEFORWARD, TOGGLEFRIENDSTAB)
* @returns The string representation(s) of all the key(s) bound to this command (e.g. W, CTRL-F)
* @see https://wow.gamepedia.com/API_GetBindingKey
* @tupleReturn
*/
declare function GetBindingKey(command: string): [...string[]];
/**
* Returns the localized string value for the given key and prefix. Essentially a glorified getglobal() function
* @param key The name of the key (e.g. "UP", "SHIFT-PAGEDOWN")
* @param prefix The prefix of the variable name you're looking for. Usually "KEY_" or "BINDING_NAME_"
* @param abbreviate Whether to return an abbreviated version of the modifier keys
* @returns The value of the global variable derived from the prefix and key name you specified. For example, "UP" and "KEY_"
* would return the value of the global variable KEY_UP which is "Up Arrow" in the english locale. If the global variable doesn't exist for
* the combination specified, it appears to just return the key name you specified. Modifier key prefixes are stripped from the input and added
* back in to the output
* @see https://wow.gamepedia.com/API_GetBindingText
*/
declare function GetBindingText(key: string, prefix: string, abbreviate?: boolean): string;
/**
* Returns whether account- or character-specific bindings are active.
* @returns ACCOUNT_BINDINGS = 1 (indicates that account-wide bindings are currently active), CHARACTER_BINDINGS = 2
* (indicates that per-character bindings are currently active)
* @see https://wow.gamepedia.com/API_GetCurrentBindingSet
*/
declare function GetCurrentBindingSet(): WoWAPI.CurrentBindingWhich;
/**
* Returns the total number of key bindings listed in the key bindings window. This includes not only actions that can be bound,
* but also the category headers in the window. This would generally be used in conjunction with GetBinding to loop through and set/get
* all of the key bindings available
* @returns The total number of key bindings (including headers) listed in the key bindings window.
* @see https://wow.gamepedia.com/API_GetNumBindings
*/
declare function GetNumBindings(): WoWAPI.Unknown;
/**
* Loads a binding set into memory, activating those bindings
* @param bindingSet Which binding set to load; one of the following three numeric constants: DEFAULT_BINDINGS (0), ACCOUNT_BINDINGS (1), CHARACTER_BINDINGS (2)
* @event UPDATE_BINDINGS
* @see https://wow.gamepedia.com/API_LoadBindings
*/
declare function LoadBindings(bindingSet: WoWAPI.BindingSetType): void;
/**
* Executes a key binding as if a key was pressed
* @param command Name of the key binding to be executed
* @param up if "up", the binding is run as if the key was released
* @description The "command" argument must match one of the (usually capitalized) binding names in a Bindings.xml file.
* This can be a name that appears in the Blizzard FrameXML Bindings.xml, or one that is specified in an AddOn. RunBinding cannot be used
* to call a Protected Function from insecure execution paths. By default, the key binding is executed as if the key was pressed down, in other
* words the keystate variable will have value "down" during the binding's execution. By specifying the optional second argument
* (the actual string "up"), the binding is instead executed as if the key was released, in other words the keystate variable will have value
* "up" during the binding's execution
* @see https://wow.gamepedia.com/API_RunBinding
*/
declare function RunBinding(command: string, up?: string): void;
/**
* Writes the current in-memory key bindings to disk
* @param bindingSafeType Can be the values 1 or 2. This value indicates whether the current key bindings set should be saved as account or character specific
* @event UPDATE_BINDINGS
* @see https://wow.gamepedia.com/API_SaveBindings
*/
declare function SaveBindings(bindingSafeType: WoWAPI.CurrentBindingWhich): void;
/**
* @todo: SetBinding() ...
*/

View File

@@ -1,78 +1,78 @@
/** @noSelfInFile */
declare namespace WoWAPI {
interface C_BlackMarket {
/**
* Notifies the server that the Black Market UI was closed
* @event BLACK_MARKET_CLOSE
* @see https://wow.gamepedia.com/API_C_BlackMarket.Close
* @since 5.0.4
*/
Close(): void;
/**
* Returns information about a specific black market auction
* @param marketId black market auction ID
* @description These functions will only return information when the black market UI is open (according to the server,
* i.e. BLACK_MARKET_OPEN has fired, and BLACK_MARKET_CLOSE has not fired since)
* @since 5.0.4
* @see https://wow.gamepedia.com/API_C_BlackMarket.GetItemInfoByID
* @tupleReturn
*/
// tslint:disable-next-line max-line-length
GetItemInfoByID(marketId: number): [string, TexturePath, number, string, number, string, string, number, number, number, boolean, number, number, ItemLink, number];
/**
* Returns information about a specific black market auction
* @description These functions will only return information when the black market UI is open (according to the server,
* i.e. BLACK_MARKET_OPEN has fired, and BLACK_MARKET_CLOSE has not fired since)
* @since 5.0.4
* @see https://wow.gamepedia.com/API_C_BlackMarket.GetItemInfoByID
* @tupleReturn
*/
GetHotItem(): [string, TexturePath, number, string, number, string, string, number, number, number, boolean, number, number, ItemLink, number];
/**
* Returns information about a specific black market auction
* @param index black market auction index, ascending from 1 to C_BlackMarket.GetNumItems()
* @description These functions will only return information when the black market UI is open (according to the server,
* i.e. BLACK_MARKET_OPEN has fired, and BLACK_MARKET_CLOSE has not fired since)
* @since 5.0.4
* @see https://wow.gamepedia.com/API_C_BlackMarket.GetItemInfoByID
* @tupleReturn
*/
// tslint:disable-next-line max-line-length
GetItemInfoByIndex(index: number): [string, TexturePath, number, string, number, string, string, number, number, number, boolean, number, number, ItemLink, number];
/**
* Returns the number of auctions on the Black Market Auction House
* @returns number of auctions on the black market
* @since 5.0.4
* @see https://wow.gamepedia.com/API_C_BlackMarket.GetNumItems
*/
GetNumItems(): number;
/**
* Places a bid on a black market auction
* @param marketId black market auction ID (not line index!) to bid on.
* @param bid bid amount, in copper
* @since 5.0.4
* @see https://wow.gamepedia.com/API_C_BlackMarket.ItemPlaceBid
* @requires HARDWARE_EVENT
*/
ItemPlaceBid(marketId: number, bid: number): void;
/**
* Requests updated black market auction information from the server
* @event BLACK_MARKET_ITEM_UPDATE
* @description The black market UI must be open according to the server (i.e. BLACK_MARKET_OPEN has fired, and BLACK_MARKET_CLOSE
* has not fired since) in order for this function to have any effect
* @see https://wow.gamepedia.com/API_C_BlackMarket.RequestItems
* @since 5.0.4
*/
RequestItems(): void;
}
}
declare const C_BlackMarket: WoWAPI.C_BlackMarket;
/** @noSelfInFile */
declare namespace WoWAPI {
interface C_BlackMarket {
/**
* Notifies the server that the Black Market UI was closed
* @event BLACK_MARKET_CLOSE
* @see https://wow.gamepedia.com/API_C_BlackMarket.Close
* @since 5.0.4
*/
Close(): void;
/**
* Returns information about a specific black market auction
* @param marketId black market auction ID
* @description These functions will only return information when the black market UI is open (according to the server,
* i.e. BLACK_MARKET_OPEN has fired, and BLACK_MARKET_CLOSE has not fired since)
* @since 5.0.4
* @see https://wow.gamepedia.com/API_C_BlackMarket.GetItemInfoByID
* @tupleReturn
*/
// tslint:disable-next-line max-line-length
GetItemInfoByID(marketId: number): [string, TexturePath, number, string, number, string, string, number, number, number, boolean, number, number, ItemLink, number];
/**
* Returns information about a specific black market auction
* @description These functions will only return information when the black market UI is open (according to the server,
* i.e. BLACK_MARKET_OPEN has fired, and BLACK_MARKET_CLOSE has not fired since)
* @since 5.0.4
* @see https://wow.gamepedia.com/API_C_BlackMarket.GetItemInfoByID
* @tupleReturn
*/
GetHotItem(): [string, TexturePath, number, string, number, string, string, number, number, number, boolean, number, number, ItemLink, number];
/**
* Returns information about a specific black market auction
* @param index black market auction index, ascending from 1 to C_BlackMarket.GetNumItems()
* @description These functions will only return information when the black market UI is open (according to the server,
* i.e. BLACK_MARKET_OPEN has fired, and BLACK_MARKET_CLOSE has not fired since)
* @since 5.0.4
* @see https://wow.gamepedia.com/API_C_BlackMarket.GetItemInfoByID
* @tupleReturn
*/
// tslint:disable-next-line max-line-length
GetItemInfoByIndex(index: number): [string, TexturePath, number, string, number, string, string, number, number, number, boolean, number, number, ItemLink, number];
/**
* Returns the number of auctions on the Black Market Auction House
* @returns number of auctions on the black market
* @since 5.0.4
* @see https://wow.gamepedia.com/API_C_BlackMarket.GetNumItems
*/
GetNumItems(): number;
/**
* Places a bid on a black market auction
* @param marketId black market auction ID (not line index!) to bid on.
* @param bid bid amount, in copper
* @since 5.0.4
* @see https://wow.gamepedia.com/API_C_BlackMarket.ItemPlaceBid
* @requires HARDWARE_EVENT
*/
ItemPlaceBid(marketId: number, bid: number): void;
/**
* Requests updated black market auction information from the server
* @event BLACK_MARKET_ITEM_UPDATE
* @description The black market UI must be open according to the server (i.e. BLACK_MARKET_OPEN has fired, and BLACK_MARKET_CLOSE
* has not fired since) in order for this function to have any effect
* @see https://wow.gamepedia.com/API_C_BlackMarket.RequestItems
* @since 5.0.4
*/
RequestItems(): void;
}
}
declare const C_BlackMarket: WoWAPI.C_BlackMarket;

168
declarations/buff.d.ts vendored
View File

@@ -1,84 +1,84 @@
/** @noSelfInFile */
declare namespace WoWAPI {
type BuffFilterType = "HELPFUL" | "HARMFUL" | "PLAYER" | "RAID" | "CANCELABLE" | "NOT_CANCELABLE";
type BuffWeaponHandType = 1 | 2;
type DebuffType = "Magic" | "Disease" | "Poison" | "Curse" | "";
}
/**
* Removes a specific buff from the unit
* @param unitId Unit to cancel the buff from, must be under the player's control
* @param spellName Name of the buff to cancel
* @param spellRank Spell rank
* @requires NO_COMBAT
* @see https://wow.gamepedia.com/API_CancelUnitBuff
*/
declare function CancelUnitBuff(unitId: WoWAPI.UnitId, spellName: string, spellRank?: string): void;
/**
* Removes a specific buff from the unit
* @param unitId Unit to cancel the buff from, must be under the player's control
* @param buffIndex index of the buff to cancel, ascending from 1.
* @param filter any of combination of "HELPFUL|HARMFUL|PLAYER|RAID|CANCELABLE|NOT_CANCELABLE".
* @requires NO_COMBAT
* @see https://wow.gamepedia.com/API_CancelUnitBuff
*/
declare function CancelUnitBuff(unitId: WoWAPI.UnitId, buffIndex: number, filter?: WoWAPI.BuffFilterType & string): void;
/**
* Cancels a druid's shapeshift buff
* @deprecated
* @protected
* @see https://wow.gamepedia.com/API_CancelShapeshiftForm
*/
declare function CancelShapeshiftForm(): void;
/**
* Removes temporary item buffs, such as Rogue poisons, Shaman weapon buffs, and sharpening stones from either the Main Hand or Off Hand equipment slots
* @param weaponHand 1 for Main Hand, 2 for Off Hand
* @deprecated
* @protected
* @see https://wow.gamepedia.com/API_CancelItemTempEnchantment
*/
declare function CancelItemTempEnchantment(weaponHand: WoWAPI.BuffWeaponHandType): void;
/**
* Returns information about the player's current temporary enchants, such as fishing lures or sharpening stones and weightstones produced by blacksmiths
* @see https://wow.gamepedia.com/API_GetWeaponEnchantInfo
* @tupleReturn
*/
declare function GetWeaponEnchantInfo(): [boolean, number, number, number, boolean, number, number, number];
/**
* Returns information about a buff or debuff on the specified unit
* @param unitId unit whose auras to query
* @param index index (from 1 to 40)
* @param filter list of filters, separated by spaces or pipes. "HELPFUL" by default
* @see https://wow.gamepedia.com/API_UnitAura
* @tupleReturn
*/
// tslint:disable-next-line max-line-length
declare function UnitAura(unitId: WoWAPI.UnitId, index: number, filter?: WoWAPI.BuffFilterType & string): [string, WoWAPI.TexturePath, number, WoWAPI.DebuffType, number, number, WoWAPI.UnitId, boolean, boolean, number, boolean, boolean, boolean, boolean, number];
/**
* Retrieve info about a certain buff on a certain unit
* @param unitId unit whose buffs to query
* @param index index (from 1 to 40)
* @param filter list of filters, separated by spaces or pipes ("|"). "HELPFUL" by default
* @see https://wow.gamepedia.com/API_UnitBuff
* @tupleReturn
*/
// tslint:disable-next-line max-line-length
declare function UnitBuff(unitId: WoWAPI.UnitId, index: number, filter?: WoWAPI.BuffFilterType & string): [string, WoWAPI.TexturePath, number, WoWAPI.DebuffType, number, number, WoWAPI.UnitId, boolean, boolean, number, boolean, boolean, boolean, number, number, number, number];
/**
* Retrieve info about a specified debuff on a certain unit
* @param unitId unit whose buffs to query
* @param index index (from 1 to 40)
* @param filter list of filters, separated by spaces or pipes ("|"). "HELPFUL" by default
* @see https://wow.gamepedia.com/API_UnitBuff
* @tupleReturn
*/
// tslint:disable-next-line max-line-length
declare function UnitDebuff(unitId: WoWAPI.UnitId, index: number, filter?: WoWAPI.BuffFilterType & string): [string, WoWAPI.TexturePath, number, WoWAPI.DebuffType, number, number, WoWAPI.UnitId, boolean, boolean, number, boolean, boolean, boolean, number, number, number, number];
/** @noSelfInFile */
declare namespace WoWAPI {
type BuffFilterType = "HELPFUL" | "HARMFUL" | "PLAYER" | "RAID" | "CANCELABLE" | "NOT_CANCELABLE";
type BuffWeaponHandType = 1 | 2;
type DebuffType = "Magic" | "Disease" | "Poison" | "Curse" | "";
}
/**
* Removes a specific buff from the unit
* @param unitId Unit to cancel the buff from, must be under the player's control
* @param spellName Name of the buff to cancel
* @param spellRank Spell rank
* @requires NO_COMBAT
* @see https://wow.gamepedia.com/API_CancelUnitBuff
*/
declare function CancelUnitBuff(unitId: WoWAPI.UnitId, spellName: string, spellRank?: string): void;
/**
* Removes a specific buff from the unit
* @param unitId Unit to cancel the buff from, must be under the player's control
* @param buffIndex index of the buff to cancel, ascending from 1.
* @param filter any of combination of "HELPFUL|HARMFUL|PLAYER|RAID|CANCELABLE|NOT_CANCELABLE".
* @requires NO_COMBAT
* @see https://wow.gamepedia.com/API_CancelUnitBuff
*/
declare function CancelUnitBuff(unitId: WoWAPI.UnitId, buffIndex: number, filter?: WoWAPI.BuffFilterType & string): void;
/**
* Cancels a druid's shapeshift buff
* @deprecated
* @protected
* @see https://wow.gamepedia.com/API_CancelShapeshiftForm
*/
declare function CancelShapeshiftForm(): void;
/**
* Removes temporary item buffs, such as Rogue poisons, Shaman weapon buffs, and sharpening stones from either the Main Hand or Off Hand equipment slots
* @param weaponHand 1 for Main Hand, 2 for Off Hand
* @deprecated
* @protected
* @see https://wow.gamepedia.com/API_CancelItemTempEnchantment
*/
declare function CancelItemTempEnchantment(weaponHand: WoWAPI.BuffWeaponHandType): void;
/**
* Returns information about the player's current temporary enchants, such as fishing lures or sharpening stones and weightstones produced by blacksmiths
* @see https://wow.gamepedia.com/API_GetWeaponEnchantInfo
* @tupleReturn
*/
declare function GetWeaponEnchantInfo(): [boolean, number, number, number, boolean, number, number, number];
/**
* Returns information about a buff or debuff on the specified unit
* @param unitId unit whose auras to query
* @param index index (from 1 to 40)
* @param filter list of filters, separated by spaces or pipes. "HELPFUL" by default
* @see https://wow.gamepedia.com/API_UnitAura
* @tupleReturn
*/
// tslint:disable-next-line max-line-length
declare function UnitAura(unitId: WoWAPI.UnitId, index: number, filter?: WoWAPI.BuffFilterType & string): [string, WoWAPI.TexturePath, number, WoWAPI.DebuffType, number, number, WoWAPI.UnitId, boolean, boolean, number, boolean, boolean, boolean, boolean, number];
/**
* Retrieve info about a certain buff on a certain unit
* @param unitId unit whose buffs to query
* @param index index (from 1 to 40)
* @param filter list of filters, separated by spaces or pipes ("|"). "HELPFUL" by default
* @see https://wow.gamepedia.com/API_UnitBuff
* @tupleReturn
*/
// tslint:disable-next-line max-line-length
declare function UnitBuff(unitId: WoWAPI.UnitId, index: number, filter?: WoWAPI.BuffFilterType & string): [string, WoWAPI.TexturePath, number, WoWAPI.DebuffType, number, number, WoWAPI.UnitId, boolean, boolean, number, boolean, boolean, boolean, number, number, number, number];
/**
* Retrieve info about a specified debuff on a certain unit
* @param unitId unit whose buffs to query
* @param index index (from 1 to 40)
* @param filter list of filters, separated by spaces or pipes ("|"). "HELPFUL" by default
* @see https://wow.gamepedia.com/API_UnitBuff
* @tupleReturn
*/
// tslint:disable-next-line max-line-length
declare function UnitDebuff(unitId: WoWAPI.UnitId, index: number, filter?: WoWAPI.BuffFilterType & string): [string, WoWAPI.TexturePath, number, WoWAPI.DebuffType, number, number, WoWAPI.UnitId, boolean, boolean, number, boolean, boolean, boolean, number, number, number, number];

View File

@@ -1,5 +1,5 @@
/** @noSelfInFile */
declare namespace WoWAPI {
type CalendarEventType = "PLAYER" | "GUILD" | "ARENA" | "HOLIDAY" | "RAID_LOCKOUT";
}
/** @noSelfInFile */
declare namespace WoWAPI {
type CalendarEventType = "PLAYER" | "GUILD" | "ARENA" | "HOLIDAY" | "RAID_LOCKOUT";
}

View File

@@ -1,251 +1,251 @@
/** @noSelfInFile */
/**
* Begin "Left click" in the 3D world
* @protected
* @deprecated
* @see https://wow.gamepedia.com/API_CameraOrSelectOrMoveStart
*/
declare function CameraOrSelectOrMoveStart(): void;
/**
* End "Left click" in the 3D game world
* @param stickyFlag If present and set then any camera offset is 'sticky' and remains until explicitly cancelled
* @protected
* @deprecated
* @see https://wow.gamepedia.com/API_CameraOrSelectOrMoveStop
*/
declare function CameraOrSelectOrMoveStop(stickyFlag?: boolean): void;
/**
* Zooms the camera into the viewplane
* @param increment float increment
* @description Zooms the camera into the viewplane by increment. The increment must be between 0.0 and 50 with 0.0 indicating no
* zoom relative to current view and 50 being maximum zoom. From a completely zoomed out position, an increment of 50 will result in
* a first person camera angle
* @see https://wow.gamepedia.com/API_CameraZoomIn
*/
declare function CameraZoomIn(increment: number): void;
/**
* Zooms the camera out of the viewplane
* @param increment float increment
* @description Zooms the camera out of the viewplane by increment. The increment must be between 0.0 and the max camera distance.
* As of patch 1.9.0 if the 'Interface Options > Advanced Options > Max Camera Distance' setting is set to Low, then the largest
* value for increment is 15. If this setting is set to High, then the largest value for increment is 30. You can test for the max camera
* distance by zooming in to first person and counting the number of times you can call this function with increment set to 1.0 and still zoom out
* @see https://wow.gamepedia.com/API_CameraZoomOut
*/
declare function CameraZoomOut(increment: number): void;
/**
* Rotates the camera about the Z-axis
* @param angle float angle
* @description Rotates the camera about the Z-axis by the angle amount specified in degrees
* @see https://wow.gamepedia.com/API_FlipCameraYaw
*/
declare function FlipCameraYaw(angle: number): void;
/**
* Gets the current zoom level of the camera
* @returns float, the currently set zoom level
* @description Doesn't take camera collisions with the environment into account and will return what the camera would be at. If the
* camera is in motion, the zoom level that is set that frame is used, not the zoom level that the camera is traveling to.
* @see https://wow.gamepedia.com/API_GetCameraZoom
*/
declare function GetCameraZoom(): number;
/**
* For checking whether mouselook mode is currently active
* @returns true if mouselook mode is active, false otherwise
* @see https://wow.gamepedia.com/API_IsMouselooking
*/
declare function IsMouselooking(): boolean;
/**
* Enters mouse look mode, during which mouse movement is used to alter the character's movement/facing direction
* @see https://wow.gamepedia.com/API_MouselookStart
*/
declare function MouselookStart(): void;
/**
* Exits mouse look mode; allows mouse input to move the mouse cursor
* @see https://wow.gamepedia.com/API_MouselookStop
*/
declare function MouselookStop(): void;
/**
* Begins rotating the camera down around your character
* - Speed is a multiplier on the CVar 'cameraPitchMoveSpeed', which is in degrees/second
* - If speed is omitted, it is assumed to be 1.0.
* - Negative numbers go the opposite way, a speed of 0.0 will stop it.
* - This is not canceled by moving your character or interacting with the camera
* - Applying a negative speed is not the same as using the other function to go the opposite way, both vectors are applied
* simultaneously. If you rotate both ways equally, it will appear to stop, but the rotations are still being applied, though canceling each other
* @param speed Speed at which to begin rotating
* @see https://wow.gamepedia.com/API_MoveViewDownStart
*/
declare function MoveViewDownStart(speed: number): void;
/**
* Stops rotating the camera Down
* @see https://wow.gamepedia.com/API_MoveViewDownStop
*/
declare function MoveViewDownStop(): void;
/**
* Begins zooming the camera in
* - Speed is a multiplier on the CVar 'cameraZoomSpeed', which is in increments/second. A zoom increment appears to be about a yard from the character
* - If speed is omitted, it is assumed to be 1.0
* - Negative numbers go the opposite way, a speed of 0.0 will stop it.
* - This is not canceled by moving your character, but is canceled by using the mousewheel to zoom
* - Applying a negative speed is not the same as using the other function to go the opposite way, both vectors are applied
* simultaneously. If you zoom both ways equally, it will appear to stop, but the rotations are still being applied, though canceling each other
* @param speed Speed at which to begin zooming
* @see https://wow.gamepedia.com/API_MoveViewInStart
*/
declare function MoveViewInStart(speed: number): void;
/**
* Stops moving the camera In
* @see https://wow.gamepedia.com/API_MoveViewInStop
*/
declare function MoveViewInStop(): void;
/**
* Begins rotating the camera to the left around your character
* - Speed is a multiplier on the CVar 'cameraYawMoveSpeed', which is in degrees/second
* - If speed is omitted, it is assumed to be 1.0
* - Negative numbers go the opposite way, a speed of 0.0 will stop it.
* - This is not canceled by moving your character or interacting with the camera
* - Applying a negative speed is not the same as using the other function to go the opposite way, both vectors are applied simultaneously.
* If you zoom both ways equally, it will appear to stop, but the rotations are still being applied, though canceling each other
* @param speed Speed at which to begin rotating
* @see https://wow.gamepedia.com/API_MoveViewLeftStart
*/
declare function MoveViewLeftStart(speed: number): void;
/**
* Stops rotating the camera to the Left
* @see https://wow.gamepedia.com/API_MoveViewLeftStop
*/
declare function MoveViewLeftStop(): void;
/**
* Begins zooming the camera out
* - Speed is a multiplier on the CVar 'cameraZoomSpeed', which is in increments/second. A zoom increment appears to be about a yard from the character
* - If speed is omitted, it is assumed to be 1.0
* - Negative numbers go the opposite way, a speed of 0.0 will stop it
* - This is not canceled by moving your character, but is canceled by using the mousewheel to zoom
* - Applying a negative speed is not the same as using the other function to go the opposite way, both vectors are applied simultaneously.
* If you zoom both ways equally, it will appear to stop, but the rotations are still being applied, though canceling each other
* @param speed Speed at which to begin zooming
* @see https://wow.gamepedia.com/API_MoveViewOutStart
*/
declare function MoveViewOutStart(speed: number): void;
/**
* Stops moving the camera out
* @see https://wow.gamepedia.com/API_MoveViewOutStop
*/
declare function MoveViewOutStop(): void;
/**
* Begins rotating the camera to the right around your character
* - Speed is a multiplier on the CVar 'cameraYawMoveSpeed', which is in degrees/second
* - If speed is omitted, it is assumed to be 1.0.
* - Negative numbers go the opposite way, a speed of 0.0 will stop it
* - This is not canceled by moving your character or interacting with the camera
* - Applying a negative speed is not the same as using the other function to go the opposite way, both vectors are applied simultaneously.
* If you rotate both ways equally, it will appear to stop, but the rotations are still being applied, though canceling each other
* @param speed Speed at which to begin rotating
* @see https://wow.gamepedia.com/API_MoveViewRightStart
*/
declare function MoveViewRightStart(speed: number): void;
/**
* Stops rotating the camera to the Right
* @see https://wow.gamepedia.com/API_MoveViewRightStop
*/
declare function MoveViewRightStop(): void;
/**
* Begins rotating the camera up around your character
* - Speed is a multiplier on the CVar 'cameraPitchMoveSpeed', which is in degrees/second
* - If speed is omitted, it is assumed to be 1.0
* - Negative numbers go the opposite way, a speed of 0.0 will stop it
* - This is not canceled by moving your character or interacting with the camera
* - Applying a negative speed is not the same as using the other function to go the opposite way, both vectors are applied simultaneously.
* If you rotate both ways equally, it will appear to stop, but the rotations are still being applied, though canceling each other
* @param speed Speed at which to begin rotating
* @see https://wow.gamepedia.com/API_MoveViewUpStart
*/
declare function MoveViewUpStart(speed: number): void;
/**
* Stops rotating the camera Up
* @see https://wow.gamepedia.com/API_MoveViewUpStop
*/
declare function MoveViewUpStop(): void;
/**
* unknown
* @param args unknown
* @protected
* @deprecated
*/
declare function PitchDownStart(...args: WoWAPI.Unknown[]): void;
/**
* unknown
* @param args unknown
* @protected
* @deprecated
*/
declare function PitchDownStop(...args: WoWAPI.Unknown[]): void;
/**
* unknown
* @param args unknown
* @protected
* @deprecated
*/
declare function PitchUpStart(...args: WoWAPI.Unknown[]): void;
/**
* unknown
* @param args unknown
* @protected
* @deprecated
*/
declare function PitchUpStop(...args: WoWAPI.Unknown[]): void;
/**
* Cycles forward through the five predefined camera positions
*/
declare function NextView(): void;
/**
* Cycles backward through the five predefined camera positions
*/
declare function PrevView(): void;
/**
* Resets the specified (1-5) predefined camera position to it's default if it was changed using SaveView(index)
* @param index the index set to
*/
declare function ResetView(index: 1 | 2 | 3 | 4 | 5): void;
/**
* Saves a camera angle for later retrieval with SetView. The last position loaded is stored in the CVar cameraView
* @param viewIndex The index (2-5) to save the camera angle to. (1 is reserved for first person view)
* @see https://wow.gamepedia.com/API_SaveView
*/
declare function SaveView(viewIndex: 2 | 3 | 4 | 5): void;
/**
* Sets a camera perspective from one previously saved with SaveView. The last position loaded is stored in the CVar cameraView
* @param viewIndex The view index (1-5) to return to (1 is always first person, and cannot be saved with SaveView)
* @see https://wow.gamepedia.com/API_SetView
*/
declare function SetView(viewIndex: 1 | 2 | 3 | 4 | 5): void;
/** @noSelfInFile */
/**
* Begin "Left click" in the 3D world
* @protected
* @deprecated
* @see https://wow.gamepedia.com/API_CameraOrSelectOrMoveStart
*/
declare function CameraOrSelectOrMoveStart(): void;
/**
* End "Left click" in the 3D game world
* @param stickyFlag If present and set then any camera offset is 'sticky' and remains until explicitly cancelled
* @protected
* @deprecated
* @see https://wow.gamepedia.com/API_CameraOrSelectOrMoveStop
*/
declare function CameraOrSelectOrMoveStop(stickyFlag?: boolean): void;
/**
* Zooms the camera into the viewplane
* @param increment float increment
* @description Zooms the camera into the viewplane by increment. The increment must be between 0.0 and 50 with 0.0 indicating no
* zoom relative to current view and 50 being maximum zoom. From a completely zoomed out position, an increment of 50 will result in
* a first person camera angle
* @see https://wow.gamepedia.com/API_CameraZoomIn
*/
declare function CameraZoomIn(increment: number): void;
/**
* Zooms the camera out of the viewplane
* @param increment float increment
* @description Zooms the camera out of the viewplane by increment. The increment must be between 0.0 and the max camera distance.
* As of patch 1.9.0 if the 'Interface Options > Advanced Options > Max Camera Distance' setting is set to Low, then the largest
* value for increment is 15. If this setting is set to High, then the largest value for increment is 30. You can test for the max camera
* distance by zooming in to first person and counting the number of times you can call this function with increment set to 1.0 and still zoom out
* @see https://wow.gamepedia.com/API_CameraZoomOut
*/
declare function CameraZoomOut(increment: number): void;
/**
* Rotates the camera about the Z-axis
* @param angle float angle
* @description Rotates the camera about the Z-axis by the angle amount specified in degrees
* @see https://wow.gamepedia.com/API_FlipCameraYaw
*/
declare function FlipCameraYaw(angle: number): void;
/**
* Gets the current zoom level of the camera
* @returns float, the currently set zoom level
* @description Doesn't take camera collisions with the environment into account and will return what the camera would be at. If the
* camera is in motion, the zoom level that is set that frame is used, not the zoom level that the camera is traveling to.
* @see https://wow.gamepedia.com/API_GetCameraZoom
*/
declare function GetCameraZoom(): number;
/**
* For checking whether mouselook mode is currently active
* @returns true if mouselook mode is active, false otherwise
* @see https://wow.gamepedia.com/API_IsMouselooking
*/
declare function IsMouselooking(): boolean;
/**
* Enters mouse look mode, during which mouse movement is used to alter the character's movement/facing direction
* @see https://wow.gamepedia.com/API_MouselookStart
*/
declare function MouselookStart(): void;
/**
* Exits mouse look mode; allows mouse input to move the mouse cursor
* @see https://wow.gamepedia.com/API_MouselookStop
*/
declare function MouselookStop(): void;
/**
* Begins rotating the camera down around your character
* - Speed is a multiplier on the CVar 'cameraPitchMoveSpeed', which is in degrees/second
* - If speed is omitted, it is assumed to be 1.0.
* - Negative numbers go the opposite way, a speed of 0.0 will stop it.
* - This is not canceled by moving your character or interacting with the camera
* - Applying a negative speed is not the same as using the other function to go the opposite way, both vectors are applied
* simultaneously. If you rotate both ways equally, it will appear to stop, but the rotations are still being applied, though canceling each other
* @param speed Speed at which to begin rotating
* @see https://wow.gamepedia.com/API_MoveViewDownStart
*/
declare function MoveViewDownStart(speed: number): void;
/**
* Stops rotating the camera Down
* @see https://wow.gamepedia.com/API_MoveViewDownStop
*/
declare function MoveViewDownStop(): void;
/**
* Begins zooming the camera in
* - Speed is a multiplier on the CVar 'cameraZoomSpeed', which is in increments/second. A zoom increment appears to be about a yard from the character
* - If speed is omitted, it is assumed to be 1.0
* - Negative numbers go the opposite way, a speed of 0.0 will stop it.
* - This is not canceled by moving your character, but is canceled by using the mousewheel to zoom
* - Applying a negative speed is not the same as using the other function to go the opposite way, both vectors are applied
* simultaneously. If you zoom both ways equally, it will appear to stop, but the rotations are still being applied, though canceling each other
* @param speed Speed at which to begin zooming
* @see https://wow.gamepedia.com/API_MoveViewInStart
*/
declare function MoveViewInStart(speed: number): void;
/**
* Stops moving the camera In
* @see https://wow.gamepedia.com/API_MoveViewInStop
*/
declare function MoveViewInStop(): void;
/**
* Begins rotating the camera to the left around your character
* - Speed is a multiplier on the CVar 'cameraYawMoveSpeed', which is in degrees/second
* - If speed is omitted, it is assumed to be 1.0
* - Negative numbers go the opposite way, a speed of 0.0 will stop it.
* - This is not canceled by moving your character or interacting with the camera
* - Applying a negative speed is not the same as using the other function to go the opposite way, both vectors are applied simultaneously.
* If you zoom both ways equally, it will appear to stop, but the rotations are still being applied, though canceling each other
* @param speed Speed at which to begin rotating
* @see https://wow.gamepedia.com/API_MoveViewLeftStart
*/
declare function MoveViewLeftStart(speed: number): void;
/**
* Stops rotating the camera to the Left
* @see https://wow.gamepedia.com/API_MoveViewLeftStop
*/
declare function MoveViewLeftStop(): void;
/**
* Begins zooming the camera out
* - Speed is a multiplier on the CVar 'cameraZoomSpeed', which is in increments/second. A zoom increment appears to be about a yard from the character
* - If speed is omitted, it is assumed to be 1.0
* - Negative numbers go the opposite way, a speed of 0.0 will stop it
* - This is not canceled by moving your character, but is canceled by using the mousewheel to zoom
* - Applying a negative speed is not the same as using the other function to go the opposite way, both vectors are applied simultaneously.
* If you zoom both ways equally, it will appear to stop, but the rotations are still being applied, though canceling each other
* @param speed Speed at which to begin zooming
* @see https://wow.gamepedia.com/API_MoveViewOutStart
*/
declare function MoveViewOutStart(speed: number): void;
/**
* Stops moving the camera out
* @see https://wow.gamepedia.com/API_MoveViewOutStop
*/
declare function MoveViewOutStop(): void;
/**
* Begins rotating the camera to the right around your character
* - Speed is a multiplier on the CVar 'cameraYawMoveSpeed', which is in degrees/second
* - If speed is omitted, it is assumed to be 1.0.
* - Negative numbers go the opposite way, a speed of 0.0 will stop it
* - This is not canceled by moving your character or interacting with the camera
* - Applying a negative speed is not the same as using the other function to go the opposite way, both vectors are applied simultaneously.
* If you rotate both ways equally, it will appear to stop, but the rotations are still being applied, though canceling each other
* @param speed Speed at which to begin rotating
* @see https://wow.gamepedia.com/API_MoveViewRightStart
*/
declare function MoveViewRightStart(speed: number): void;
/**
* Stops rotating the camera to the Right
* @see https://wow.gamepedia.com/API_MoveViewRightStop
*/
declare function MoveViewRightStop(): void;
/**
* Begins rotating the camera up around your character
* - Speed is a multiplier on the CVar 'cameraPitchMoveSpeed', which is in degrees/second
* - If speed is omitted, it is assumed to be 1.0
* - Negative numbers go the opposite way, a speed of 0.0 will stop it
* - This is not canceled by moving your character or interacting with the camera
* - Applying a negative speed is not the same as using the other function to go the opposite way, both vectors are applied simultaneously.
* If you rotate both ways equally, it will appear to stop, but the rotations are still being applied, though canceling each other
* @param speed Speed at which to begin rotating
* @see https://wow.gamepedia.com/API_MoveViewUpStart
*/
declare function MoveViewUpStart(speed: number): void;
/**
* Stops rotating the camera Up
* @see https://wow.gamepedia.com/API_MoveViewUpStop
*/
declare function MoveViewUpStop(): void;
/**
* unknown
* @param args unknown
* @protected
* @deprecated
*/
declare function PitchDownStart(...args: WoWAPI.Unknown[]): void;
/**
* unknown
* @param args unknown
* @protected
* @deprecated
*/
declare function PitchDownStop(...args: WoWAPI.Unknown[]): void;
/**
* unknown
* @param args unknown
* @protected
* @deprecated
*/
declare function PitchUpStart(...args: WoWAPI.Unknown[]): void;
/**
* unknown
* @param args unknown
* @protected
* @deprecated
*/
declare function PitchUpStop(...args: WoWAPI.Unknown[]): void;
/**
* Cycles forward through the five predefined camera positions
*/
declare function NextView(): void;
/**
* Cycles backward through the five predefined camera positions
*/
declare function PrevView(): void;
/**
* Resets the specified (1-5) predefined camera position to it's default if it was changed using SaveView(index)
* @param index the index set to
*/
declare function ResetView(index: 1 | 2 | 3 | 4 | 5): void;
/**
* Saves a camera angle for later retrieval with SetView. The last position loaded is stored in the CVar cameraView
* @param viewIndex The index (2-5) to save the camera angle to. (1 is reserved for first person view)
* @see https://wow.gamepedia.com/API_SaveView
*/
declare function SaveView(viewIndex: 2 | 3 | 4 | 5): void;
/**
* Sets a camera perspective from one previously saved with SaveView. The last position loaded is stored in the CVar cameraView
* @param viewIndex The view index (1-5) to return to (1 is always first person, and cannot be saved with SaveView)
* @see https://wow.gamepedia.com/API_SetView
*/
declare function SetView(viewIndex: 1 | 2 | 3 | 4 | 5): void;

View File

@@ -1,240 +1,240 @@
/** @noSelfInFile */
declare namespace WoWAPI {
type ChannelChatType = "SAY" | "EMOTE" | "YELL" | "PARTY" | "GUILD" | "OFFICER" | "RAID" | "RAID_WARNING" | "INSTANCE_CHAT" | "WHISPER" | "CHANNEL" |
"AFK" | "DND";
type ChannelLanguageId = 1 | 2 | 3 | 6 | 7 | 8 | 10 | 13 | 14 | 33 | 35 | 40 | 43 | 44;
}
/**
* Makes messages from a specified chat channel output in a specific chat frame
* - A single channel may be configured to display in multiple chat windows/frames
* - Chat output architecture has changed since release; calling this function alone is no longer sufficient to add a channel
* to a particular frame in the default UI. Use ChatFrame_AddChannel(chatFrame, "channelName") instead, like so
* @param windowId index of the chat window/frame (ascending from 1) to add the channel to
* @param channelName name of the chat channel to add to the frame
* @see https://wow.gamepedia.com/API_AddChatWindowChannel
*/
declare function AddChatWindowChannel(windowId: number, channelName: string): void;
/**
* Bans a player from the specified channel
* @param channelName The name of the channel to ban on
* @param playerName The name of the player to ban
* @see https://wow.gamepedia.com/API_ChannelBan
*/
declare function ChannelBan(channelName: string, playerName: string): void;
/**
* Invites the specified user to the channel
* @param channelName The name of the channel to invite to
* @param playerName The name of the player to invite
* @see https://wow.gamepedia.com/API_ChannelInvite
*/
declare function ChannelInvite(channelName: string, playerName: string): void;
/**
* Kicks the specified user to the channel
* @param channelName The name of the channel to kick from
* @param playerName The name of the player to kick
* @see https://wow.gamepedia.com/API_ChannelKick
*/
declare function ChannelKick(channelName: string, playerName: string): void;
/**
* Sets the specified player as the channel moderator
* @param channelName The name of the channel to set moderator status on
* @param playerName The name of the player to set as a moderator
* @see https://wow.gamepedia.com/API_ChannelModerator
*/
declare function ChannelModerator(channelName: string, playerName: string): void;
/**
* Turns off the specified player's ability to speak in a channel
* @param channelName The name of the channel to mute on
* @param playerName The name of the player to mute
* @see https://wow.gamepedia.com/API_ChannelMute
*/
declare function ChannelMute(channelName: string, playerName: string): void;
/**
* Toggles the channel to display announcements either on or off
* @param channelName The name of the channel to toggle announcements on
* @param name unknown
* @see https://wow.gamepedia.com/API_ChannelToggleAnnouncements
*/
declare function ChannelToggleAnnouncements(channelName: string, name: string): void;
/**
* Unbans a player from the specified channel
* @param channelName The name of the channel to remove the ban on
* @param playerName The name of the player to unban
* @see https://wow.gamepedia.com/API_ChannelUnban
*/
declare function ChannelUnban(channelName: string, playerName: string): void;
/**
* Takes the specified user away from the moderator status
* @param channelName The name of the channel to remove moderator status on
* @param playerName The name of the player to remove moderator status from
* @see https://wow.gamepedia.com/API_ChannelUnmoderator
*/
declare function ChannelUnmoderator(channelName: string, playerName: string): void;
/**
* Unmutes the specified user on the channel
* @param channelName The name of the channel to remove mute on
* @param playerName The name of the player to remove mute from (allow to speak)
* @see https://wow.gamepedia.com/API_ChannelUnmute
*/
declare function ChannelUnmute(channelName: string, playerName: string): void;
/**
* Displays the name of the owner of the specified channel in the Default Chat Frame. Same as typing "/owner <channel>" in chat
* @param channelName The name of the channel
* @see https://wow.gamepedia.com/API_DisplayChannelOwner
*/
declare function DisplayChannelOwner(channelName: string): void;
/**
* Retrieves all available server channels (zone dependent).
* @returns channel1, channel2, ...
* @see https://wow.gamepedia.com/API_EnumerateServerChannels
* @tupleReturn
*/
declare function EnumerateServerChannels(): [...string[]];
/**
* Retrieves joined channels
* @returns id1, name1, disabled1, ...
* @see https://wow.gamepedia.com/API_GetChannelList
* @tupleReturn
*/
// tslint:disable-next-line max-line-length
declare function GetChannelList(): [number, string, boolean, number, string, boolean, number, string, boolean, number, string, boolean, number, string, boolean, number, string, boolean];
/**
* Returns information about the specified channel
* - **return1**: the id of the channel, or 0 if the channel is not found
* - **return2**: the name of the channel, e.g. "Trade - Stormwind", or nil if the player is not in the queried channel
* - **return3**: ?, usually 0
* @param channelIdOrName Channel id to query, e.g. 1 for the chat channel currently addressable using /1 or Name of the channel to query, e.g. "Trade - City".
* @see https://wow.gamepedia.com/API_GetChannelName
* @tupleReturn
*/
declare function GetChannelName(channelIdOrName: number | string): [number, string, number];
/**
* Get the channels received by a chat window
* @param frameId The frame number of the chat frame to be queried (starts at 1).
* @returns name1, zone1, name2, zone2, ...
* @see https://wow.gamepedia.com/API_GetChatWindowChannels
* @tupleReturn
*/
// tslint:disable-next-line max-line-length
declare function GetChatWindowChannels(frameId: number): [string, number, string, number, string, number, string, number, string, number, string, number, string, number];
/**
* Joins the channel with the specified name. A player can be in a maximum of 10 chat channels. In opposite to API_JoinTemporaryChannel
* the channel will be re-joined after relogging
* @param channelName The name of the channel to join
* @param password The channel password, nil if none
* @param frameId The chat frame ID number to add the channel to. Use Frame:GetID() to retrieve it for chat frame objects
* @param hasVoice Enable voice chat for this channel
* @returns **
* - The type of channel. 0 for a undefined channel, 1 for the zone General channel, etc
* - The name of the channel (Ohklus: seems to be nil for most channels)
* @see https://wow.gamepedia.com/API_JoinChannelByName
*/
declare function JoinChannelByName(channelName: string, password?: string, frameId?: number, hasVoice?: boolean): [number, string];
/**
* Joins the channel with the specified name. A player can be in a maximum of 10 chat channels. In opposite to API_JoinTemporaryChannel
* the channel will be re-joined after relogging
* @param channelName The name of the channel to join
* @param password The channel password, nil if none
* @param frameId The chat frame ID number to add the channel to. Use Frame:GetID() to retrieve it for chat frame objects
* @param hasVoice Enable voice chat for this channel
* @returns **
* - The type of channel. 0 for a undefined channel, 1 for the zone General channel, etc
* - The name of the channel (Ohklus: seems to be nil for most channels)
* @see https://wow.gamepedia.com/API_JoinPermanentChannel
* @tupleReturn
*/
declare function JoinPermanentChannel(channelName: string, password?: string, frameId?: number, hasVoice?: boolean): [number, string];
/**
* Joins the channel with the specified name. A player can be in a maximum of 10 chat channels. In opposite to API_JoinPermanentChannel
* the channel will be left at logout
* @param channelName The name of the channel to join
* @param password The channel password, nil if none
* @param frameId The chat frame ID number to add the channel to. Use Frame:GetID() to retrieve it for chat frame objects
* @param hasVoice Enable voice chat for this channel
* @returns **
* - The type of channel. 0 for a undefined channel, 1 for the zone General channel, etc
* - The name of the channel (Ohklus: seems to be nil for most channels)
* @see https://wow.gamepedia.com/API_JoinTemporaryChannel
* @tupleReturn
*/
declare function JoinTemporaryChannel(channelName: string, password?: string, frameId?: number, hasVoice?: boolean): [number, string];
/**
* Leaves the channel with the specified name
* @param channelName The name of the channel to leave
* @see https://wow.gamepedia.com/API_LeaveChannelByName
*/
declare function LeaveChannelByName(channelName: string): void;
/**
* Lists members in the given channel to the chat window
* @param channelName Case-insensitive channel name or channel number from which to list the members, e.g. "trade - city". If no argument
* is given, list all of the numbered channels you are a member of
* @see https://wow.gamepedia.com/API_ListChannelByName
*/
declare function ListChannelByName(channelName?: string | number): WoWAPI.Unknown;
/**
* Lists all of the channels
* @see https://wow.gamepedia.com/API_ListChannels
*/
declare function ListChannels(): void;
/**
* Blocks further messages from a specified chat channel from appearing in a specific chat frame
* @param windowId index of the chat window/frame (ascending from 1) to remove the channel from
* @param channelName name of the chat channel to remove from the frame
* @description Chat output architecture has changed since release; calling this function alone is no longer sufficient to block a channel
* from a particular frame in the default UI. Use ChatFrame_RemoveChannel(chatFrame, "channelName") instead
* @see https://wow.gamepedia.com/API_RemoveChatWindowChannel
*/
declare function RemoveChatWindowChannel(windowId: number, channelName: string): void;
/**
* Sends a chat message
* @param message The message to be sent, maximum length of 255 characters. (Not all characters in this string are allowed: See list of valid
* chat message characters)
* @param chatType The type of chat message to be sent, "SAY", "PARTY", etc. See the list of chatTypeIds. If chatType is nil or omitted then "SAY" will be used
* @param languageId The languageID used to translate the message. If languageID is nil or omitted the default language will be used:
* Orcish for the Horde, and Common for the Alliance, as returned by GetDefaultLanguage("player").
* @param channelOrName The channel or player receiving the message for "CHANNEL"/"WHISPER" communication. If sending to a channel you must
* use the number (eg. "1"); obtain it using GetChannelName("channelName"). This field is required for the "CHANNEL"/"WHISPER" chat types and
* ignored for any other chat type
* @see https://wow.gamepedia.com/API_SendChatMessage
*/
declare function SendChatMessage(message: string, chatType?: WoWAPI.ChannelChatType, languageId?: WoWAPI.ChannelLanguageId, channelOrName?: string): void;
/**
* Sets the channel owner
* @param channelName channel name to be changed
* @param newOwner the new owner of the channel
* @see https://wow.gamepedia.com/API_SetChannelOwner
*/
declare function SetChannelOwner(channelName: string, newOwner: string): void;
/**
* Changes the password of the current channel
* @param channelName The name of the channel
* @param password The password to assign to the channel
* @see https://wow.gamepedia.com/API_SetChannelPassword
*/
declare function SetChannelPassword(channelName: string, password: string): void;
/** @noSelfInFile */
declare namespace WoWAPI {
type ChannelChatType = "SAY" | "EMOTE" | "YELL" | "PARTY" | "GUILD" | "OFFICER" | "RAID" | "RAID_WARNING" | "INSTANCE_CHAT" | "WHISPER" | "CHANNEL" |
"AFK" | "DND";
type ChannelLanguageId = 1 | 2 | 3 | 6 | 7 | 8 | 10 | 13 | 14 | 33 | 35 | 40 | 43 | 44;
}
/**
* Makes messages from a specified chat channel output in a specific chat frame
* - A single channel may be configured to display in multiple chat windows/frames
* - Chat output architecture has changed since release; calling this function alone is no longer sufficient to add a channel
* to a particular frame in the default UI. Use ChatFrame_AddChannel(chatFrame, "channelName") instead, like so
* @param windowId index of the chat window/frame (ascending from 1) to add the channel to
* @param channelName name of the chat channel to add to the frame
* @see https://wow.gamepedia.com/API_AddChatWindowChannel
*/
declare function AddChatWindowChannel(windowId: number, channelName: string): void;
/**
* Bans a player from the specified channel
* @param channelName The name of the channel to ban on
* @param playerName The name of the player to ban
* @see https://wow.gamepedia.com/API_ChannelBan
*/
declare function ChannelBan(channelName: string, playerName: string): void;
/**
* Invites the specified user to the channel
* @param channelName The name of the channel to invite to
* @param playerName The name of the player to invite
* @see https://wow.gamepedia.com/API_ChannelInvite
*/
declare function ChannelInvite(channelName: string, playerName: string): void;
/**
* Kicks the specified user to the channel
* @param channelName The name of the channel to kick from
* @param playerName The name of the player to kick
* @see https://wow.gamepedia.com/API_ChannelKick
*/
declare function ChannelKick(channelName: string, playerName: string): void;
/**
* Sets the specified player as the channel moderator
* @param channelName The name of the channel to set moderator status on
* @param playerName The name of the player to set as a moderator
* @see https://wow.gamepedia.com/API_ChannelModerator
*/
declare function ChannelModerator(channelName: string, playerName: string): void;
/**
* Turns off the specified player's ability to speak in a channel
* @param channelName The name of the channel to mute on
* @param playerName The name of the player to mute
* @see https://wow.gamepedia.com/API_ChannelMute
*/
declare function ChannelMute(channelName: string, playerName: string): void;
/**
* Toggles the channel to display announcements either on or off
* @param channelName The name of the channel to toggle announcements on
* @param name unknown
* @see https://wow.gamepedia.com/API_ChannelToggleAnnouncements
*/
declare function ChannelToggleAnnouncements(channelName: string, name: string): void;
/**
* Unbans a player from the specified channel
* @param channelName The name of the channel to remove the ban on
* @param playerName The name of the player to unban
* @see https://wow.gamepedia.com/API_ChannelUnban
*/
declare function ChannelUnban(channelName: string, playerName: string): void;
/**
* Takes the specified user away from the moderator status
* @param channelName The name of the channel to remove moderator status on
* @param playerName The name of the player to remove moderator status from
* @see https://wow.gamepedia.com/API_ChannelUnmoderator
*/
declare function ChannelUnmoderator(channelName: string, playerName: string): void;
/**
* Unmutes the specified user on the channel
* @param channelName The name of the channel to remove mute on
* @param playerName The name of the player to remove mute from (allow to speak)
* @see https://wow.gamepedia.com/API_ChannelUnmute
*/
declare function ChannelUnmute(channelName: string, playerName: string): void;
/**
* Displays the name of the owner of the specified channel in the Default Chat Frame. Same as typing "/owner <channel>" in chat
* @param channelName The name of the channel
* @see https://wow.gamepedia.com/API_DisplayChannelOwner
*/
declare function DisplayChannelOwner(channelName: string): void;
/**
* Retrieves all available server channels (zone dependent).
* @returns channel1, channel2, ...
* @see https://wow.gamepedia.com/API_EnumerateServerChannels
* @tupleReturn
*/
declare function EnumerateServerChannels(): [...string[]];
/**
* Retrieves joined channels
* @returns id1, name1, disabled1, ...
* @see https://wow.gamepedia.com/API_GetChannelList
* @tupleReturn
*/
// tslint:disable-next-line max-line-length
declare function GetChannelList(): [number, string, boolean, number, string, boolean, number, string, boolean, number, string, boolean, number, string, boolean, number, string, boolean];
/**
* Returns information about the specified channel
* - **return1**: the id of the channel, or 0 if the channel is not found
* - **return2**: the name of the channel, e.g. "Trade - Stormwind", or nil if the player is not in the queried channel
* - **return3**: ?, usually 0
* @param channelIdOrName Channel id to query, e.g. 1 for the chat channel currently addressable using /1 or Name of the channel to query, e.g. "Trade - City".
* @see https://wow.gamepedia.com/API_GetChannelName
* @tupleReturn
*/
declare function GetChannelName(channelIdOrName: number | string): [number, string, number];
/**
* Get the channels received by a chat window
* @param frameId The frame number of the chat frame to be queried (starts at 1).
* @returns name1, zone1, name2, zone2, ...
* @see https://wow.gamepedia.com/API_GetChatWindowChannels
* @tupleReturn
*/
// tslint:disable-next-line max-line-length
declare function GetChatWindowChannels(frameId: number): [string, number, string, number, string, number, string, number, string, number, string, number, string, number];
/**
* Joins the channel with the specified name. A player can be in a maximum of 10 chat channels. In opposite to API_JoinTemporaryChannel
* the channel will be re-joined after relogging
* @param channelName The name of the channel to join
* @param password The channel password, nil if none
* @param frameId The chat frame ID number to add the channel to. Use Frame:GetID() to retrieve it for chat frame objects
* @param hasVoice Enable voice chat for this channel
* @returns **
* - The type of channel. 0 for a undefined channel, 1 for the zone General channel, etc
* - The name of the channel (Ohklus: seems to be nil for most channels)
* @see https://wow.gamepedia.com/API_JoinChannelByName
*/
declare function JoinChannelByName(channelName: string, password?: string, frameId?: number, hasVoice?: boolean): [number, string];
/**
* Joins the channel with the specified name. A player can be in a maximum of 10 chat channels. In opposite to API_JoinTemporaryChannel
* the channel will be re-joined after relogging
* @param channelName The name of the channel to join
* @param password The channel password, nil if none
* @param frameId The chat frame ID number to add the channel to. Use Frame:GetID() to retrieve it for chat frame objects
* @param hasVoice Enable voice chat for this channel
* @returns **
* - The type of channel. 0 for a undefined channel, 1 for the zone General channel, etc
* - The name of the channel (Ohklus: seems to be nil for most channels)
* @see https://wow.gamepedia.com/API_JoinPermanentChannel
* @tupleReturn
*/
declare function JoinPermanentChannel(channelName: string, password?: string, frameId?: number, hasVoice?: boolean): [number, string];
/**
* Joins the channel with the specified name. A player can be in a maximum of 10 chat channels. In opposite to API_JoinPermanentChannel
* the channel will be left at logout
* @param channelName The name of the channel to join
* @param password The channel password, nil if none
* @param frameId The chat frame ID number to add the channel to. Use Frame:GetID() to retrieve it for chat frame objects
* @param hasVoice Enable voice chat for this channel
* @returns **
* - The type of channel. 0 for a undefined channel, 1 for the zone General channel, etc
* - The name of the channel (Ohklus: seems to be nil for most channels)
* @see https://wow.gamepedia.com/API_JoinTemporaryChannel
* @tupleReturn
*/
declare function JoinTemporaryChannel(channelName: string, password?: string, frameId?: number, hasVoice?: boolean): [number, string];
/**
* Leaves the channel with the specified name
* @param channelName The name of the channel to leave
* @see https://wow.gamepedia.com/API_LeaveChannelByName
*/
declare function LeaveChannelByName(channelName: string): void;
/**
* Lists members in the given channel to the chat window
* @param channelName Case-insensitive channel name or channel number from which to list the members, e.g. "trade - city". If no argument
* is given, list all of the numbered channels you are a member of
* @see https://wow.gamepedia.com/API_ListChannelByName
*/
declare function ListChannelByName(channelName?: string | number): WoWAPI.Unknown;
/**
* Lists all of the channels
* @see https://wow.gamepedia.com/API_ListChannels
*/
declare function ListChannels(): void;
/**
* Blocks further messages from a specified chat channel from appearing in a specific chat frame
* @param windowId index of the chat window/frame (ascending from 1) to remove the channel from
* @param channelName name of the chat channel to remove from the frame
* @description Chat output architecture has changed since release; calling this function alone is no longer sufficient to block a channel
* from a particular frame in the default UI. Use ChatFrame_RemoveChannel(chatFrame, "channelName") instead
* @see https://wow.gamepedia.com/API_RemoveChatWindowChannel
*/
declare function RemoveChatWindowChannel(windowId: number, channelName: string): void;
/**
* Sends a chat message
* @param message The message to be sent, maximum length of 255 characters. (Not all characters in this string are allowed: See list of valid
* chat message characters)
* @param chatType The type of chat message to be sent, "SAY", "PARTY", etc. See the list of chatTypeIds. If chatType is nil or omitted then "SAY" will be used
* @param languageId The languageID used to translate the message. If languageID is nil or omitted the default language will be used:
* Orcish for the Horde, and Common for the Alliance, as returned by GetDefaultLanguage("player").
* @param channelOrName The channel or player receiving the message for "CHANNEL"/"WHISPER" communication. If sending to a channel you must
* use the number (eg. "1"); obtain it using GetChannelName("channelName"). This field is required for the "CHANNEL"/"WHISPER" chat types and
* ignored for any other chat type
* @see https://wow.gamepedia.com/API_SendChatMessage
*/
declare function SendChatMessage(message: string, chatType?: WoWAPI.ChannelChatType, languageId?: WoWAPI.ChannelLanguageId, channelOrName?: string): void;
/**
* Sets the channel owner
* @param channelName channel name to be changed
* @param newOwner the new owner of the channel
* @see https://wow.gamepedia.com/API_SetChannelOwner
*/
declare function SetChannelOwner(channelName: string, newOwner: string): void;
/**
* Changes the password of the current channel
* @param channelName The name of the channel
* @param password The password to assign to the channel
* @see https://wow.gamepedia.com/API_SetChannelPassword
*/
declare function SetChannelPassword(channelName: string, password: string): void;

View File

@@ -1,247 +1,247 @@
/** @noSelfInFile */
declare namespace WoWAPI {
type CharacterTotemElementType = 1 | 2 | 3 | 4;
type CharacterRestState = 0 | 1;
type CharacterDeathkightRuneType = 0 | 1 | 2 | 3 | 4 | 5 | 6;
}
/**
* Accepts a resurrection, returning the character to life
* @description Most player-sponsored resurrection offers expire automatically after 60 seconds
* @see https://wow.gamepedia.com/API_AcceptResurrect
*/
declare function AcceptResurrect(): void;
/**
* Accept the durability loss / resurrection sickness when being resurrected by the spirit healer
* @description Name is misleading: you no longer lose XP when you use the spirit healer. You're really accepting 25% durability penalty
* and (if over level 10) resurrection sickness
* @see https://wow.gamepedia.com/API_AcceptXPLoss
*/
declare function AcceptXPLoss(): void;
/**
* Declines a resurrection offer
* @see https://wow.gamepedia.com/API_DeclineResurrect
*/
declare function DeclineResurrect(): void;
/**
* Destroys a totem/minion
* @param slot The totem type to be destroyed, where Fire is 1, Earth is 2, Water is 3 and Air is 4.
* @event PLAYER_TOTEM_UPDATE
* @protected
* @deprecated
* @see https://wow.gamepedia.com/API_DestroyTotem
*/
declare function DestroyTotem(slot: WoWAPI.CharacterTotemElementType): void;
/**
* Finds the subzone the player's Hearthstone is set to
* @returns Returns the String name of the subzone the player's Hearthstone is set to, e.g. "Tarren Mill", "Crossroads", or "Brill".
* @see https://wow.gamepedia.com/API_GetBindLocation
*/
declare function GetBindLocation(): string;
/**
* Retrieves the number of combo points gained by a player
* @param unitId Either "player" or "vehicle".
* @param target Normally "target", but can be any valid UnitId
* @deprecated Combo Points for rogues are now shared across all targets and they are no longer lost when switching targets. GetComboPoints
* will return 0 if target is friendly or not found. Use UnitPower(unitId, 4) to get combo points without an enemy targeted
* @see https://wow.gamepedia.com/API_GetComboPoints
*/
declare function GetComboPoints(unitId: WoWAPI.UnitId, target: WoWAPI.UnitId): number;
/**
* Returns the integer of the title currently selected by the player
* @see https://wow.gamepedia.com/API_GetCurrentTitle
*/
declare function GetCurrentTitle(): number;
/**
* Gives information about the mirror bar. (Spirit release, exhaustion/fatigue, etc)
* @param timerIndex timer index, from 1 to MIRRORTIMER_NUMTIMERS (3 as of 3.2). In general, the following correspondence holds:
* 1 = Fatigue, 2 = Breath, 3 = Feign Death
* @see https://wow.gamepedia.com/API_GetMirrorTimerInfo
* @tupleReturn
*/
declare function GetMirrorTimerInfo(timerIndex: number): [string, number, number, number, WoWAPI.Flag, string];
/**
* Returns the current value of a mirror timer (fatigue, breath, feign death etc).
* @param timerIndex the first return value from GetMirrorTimerInfo, identifying the timer queried. Valid values include "EXHAUSTION", "BREATH"
* and "FEIGNDEATH".
* @returns current value of the timer. If the timer is not active, 0 is returned
* @see https://wow.gamepedia.com/API_GetMirrorTimerProgress
*/
declare function GetMirrorTimerProgress(timerIndex: number): number;
/**
* Returns an integer value of your held money
* @returns The amount of money the player's character has, in copper
* @see https://wow.gamepedia.com/API_GetMoney
*/
declare function GetMoney(): number;
/**
* Gets the highest number in the Title index
* @returns The last number in the TitleId index
* @see https://wow.gamepedia.com/API_GetNumTitles
*/
declare function GetNumTitles(): number;
/**
* Checks to see if the player has enabled PvP ("Permaflagged")
* @returns 1 if the player has selected to be PvP flagged, 0 otherwise
* @see https://wow.gamepedia.com/API_GetPVPDesired
*/
declare function GetPVPDesired(): WoWAPI.Flag;
/**
* retrieve the ranged crit chance as a two-decimal float
* @returns The players critical strike chance with the currently equipped range weapon as a floating point figure
* @see https://wow.gamepedia.com/API_GetRangedCritChance
*/
declare function GetRangedCritChance(): number;
/**
* Returns whether the player is in a rested (earning double XP for kills) or normal state
* @see https://wow.gamepedia.com/API_GetRestState
* @tupleReturn
*/
declare function GetRestState(): [WoWAPI.CharacterRestState, string, number];
/**
* Gets the cooldown information about a Death Knight's Rune
* @param runeId A number between 1 and 6 denoting which rune to be queried
* @see https://wow.gamepedia.com/API_GetRuneCooldown
* @tupleReturn
*/
declare function GetRuneCooldown(runeId: WoWAPI.CharacterDeathkightRuneType): [number, number, boolean];
/**
* Gets the name of the title associated with a title index
* @param titleId Title ID to return the name of
* @since 2.0.1
* @see https://wow.gamepedia.com/API_GetTitleName
* @tupleReturn
*/
declare function GetTitleName(titleId: number): [string, boolean];
/**
* Returns the number of XP gained from killing mobs until "player" goes from rest state to normal state
* @returns Number (if player is "rested"), null (if player is "normal")
* @see https://wow.gamepedia.com/API_GetXPExhaustion
*/
declare function GetXPExhaustion(): number | null;
/**
* Checks whether you have full control over your character (i.e. you are not feared, etc)
* @see https://wow.gamepedia.com/API_HasFullControl
*/
declare function HasFullControl(): boolean;
/**
* Returns whether or not, and how, your character can self-resurrect
* @returns the type of self-resurrect available to your character (known values are "Use Soulstone", "Reincarnate", and "Twisting Nether")
* or nil if none are available
* @see https://wow.gamepedia.com/API_HasSoulstone
*/
declare function HasSoulstone(): string | null;
/**
* Checks if the character is currently falling
* @returns true if the character is currently falling, false otherwise
* @see https://wow.gamepedia.com/API_IsFalling
*/
declare function IsFalling(): boolean;
/**
* Checks whether the player is currently flying
* @returns true if the character is currently flying, false otherwise
* @since 2.0.1
* @see https://wow.gamepedia.com/API_IsFlying
*/
declare function IsFlying(): boolean;
/**
* Checks if the character's current location is classified as being a flyable area
* @returns true if the area is classified as flyable, false otherwise
* @see https://wow.gamepedia.com/API_IsFlyableArea
*/
declare function IsFlyableArea(): boolean;
/**
* Returns whether the player's character is currently indoors. Most mounts are not usable indoors
* @returns true if the character is currently indoors, false otherwise
* @see https://wow.gamepedia.com/API_IsIndoors
*/
declare function IsIndoors(): boolean;
/**
* Checks to see if the player is mounted or not
* @returns true if the character is currently mounted, false otherwise
* @see https://wow.gamepedia.com/API_IsMounted
*/
declare function IsMounted(): boolean;
/**
* Returns whether the player's character is currently outdoors
* @returns true if the character is currently outdoors, false otherwise.
* @see https://wow.gamepedia.com/API_IsOutdoors
*/
declare function IsOutdoors(): boolean;
/**
* Returns whether the player's character is currently outside of the map
* @returns 1 if the player's character is currently outside of the map, nil otherwise
* @description Players may end up outside of a map's bounds (and therefore dead) both as a consequence of geometry errors and normal world
* design: for instance, falling off the Eye of the Storm, or being dropped off the top of Icecrown Citadel by the Lich King's val'kyrs
* @see https://wow.gamepedia.com/API_IsOutOfBounds
*/
declare function IsOutOfBounds(): boolean;
/**
* Checks to see if Player is resting
* @returns Whether the player is resting
* @see https://wow.gamepedia.com/API_IsResting
*/
declare function IsResting(): boolean;
/**
* Checks to see if Player is stealthed
* @returns true if stealthed, otherwise false
* @see https://wow.gamepedia.com/API_IsStealthed
*/
declare function IsStealthed(): boolean;
/**
* Returns whether the player character is swimming
* @returns 1 if the player is swimming, nil otherwise.
* @see https://wow.gamepedia.com/API_IsSwimming
*/
declare function IsSwimming(): boolean;
/**
* Generates an error message saying you cannot do that while dead
* @event UI_ERROR_MESSAGE
* @see https://wow.gamepedia.com/API_NotWhileDeadError
*/
declare function NotWhileDeadError(): void;
/**
* Resurrects when the player is standing near its corpse
* @see https://wow.gamepedia.com/API_RetrieveCorpse
*/
declare function RetrieveCorpse(): void;
/**
* Changes your character's displayed title
* @param titleId ID of the title you want to set. The identifiers are global and therefore do not depend on which titles you have learned.
* Invalid or unlearned values clear your title. See TitleId for a list
* @requires HARDWARE_EVENT
* @see https://wow.gamepedia.com/API_SetCurrentTitle
*/
declare function SetCurrentTitle(titleId: number): void;
/** @noSelfInFile */
declare namespace WoWAPI {
type CharacterTotemElementType = 1 | 2 | 3 | 4;
type CharacterRestState = 0 | 1;
type CharacterDeathkightRuneType = 0 | 1 | 2 | 3 | 4 | 5 | 6;
}
/**
* Accepts a resurrection, returning the character to life
* @description Most player-sponsored resurrection offers expire automatically after 60 seconds
* @see https://wow.gamepedia.com/API_AcceptResurrect
*/
declare function AcceptResurrect(): void;
/**
* Accept the durability loss / resurrection sickness when being resurrected by the spirit healer
* @description Name is misleading: you no longer lose XP when you use the spirit healer. You're really accepting 25% durability penalty
* and (if over level 10) resurrection sickness
* @see https://wow.gamepedia.com/API_AcceptXPLoss
*/
declare function AcceptXPLoss(): void;
/**
* Declines a resurrection offer
* @see https://wow.gamepedia.com/API_DeclineResurrect
*/
declare function DeclineResurrect(): void;
/**
* Destroys a totem/minion
* @param slot The totem type to be destroyed, where Fire is 1, Earth is 2, Water is 3 and Air is 4.
* @event PLAYER_TOTEM_UPDATE
* @protected
* @deprecated
* @see https://wow.gamepedia.com/API_DestroyTotem
*/
declare function DestroyTotem(slot: WoWAPI.CharacterTotemElementType): void;
/**
* Finds the subzone the player's Hearthstone is set to
* @returns Returns the String name of the subzone the player's Hearthstone is set to, e.g. "Tarren Mill", "Crossroads", or "Brill".
* @see https://wow.gamepedia.com/API_GetBindLocation
*/
declare function GetBindLocation(): string;
/**
* Retrieves the number of combo points gained by a player
* @param unitId Either "player" or "vehicle".
* @param target Normally "target", but can be any valid UnitId
* @deprecated Combo Points for rogues are now shared across all targets and they are no longer lost when switching targets. GetComboPoints
* will return 0 if target is friendly or not found. Use UnitPower(unitId, 4) to get combo points without an enemy targeted
* @see https://wow.gamepedia.com/API_GetComboPoints
*/
declare function GetComboPoints(unitId: WoWAPI.UnitId, target: WoWAPI.UnitId): number;
/**
* Returns the integer of the title currently selected by the player
* @see https://wow.gamepedia.com/API_GetCurrentTitle
*/
declare function GetCurrentTitle(): number;
/**
* Gives information about the mirror bar. (Spirit release, exhaustion/fatigue, etc)
* @param timerIndex timer index, from 1 to MIRRORTIMER_NUMTIMERS (3 as of 3.2). In general, the following correspondence holds:
* 1 = Fatigue, 2 = Breath, 3 = Feign Death
* @see https://wow.gamepedia.com/API_GetMirrorTimerInfo
* @tupleReturn
*/
declare function GetMirrorTimerInfo(timerIndex: number): [string, number, number, number, WoWAPI.Flag, string];
/**
* Returns the current value of a mirror timer (fatigue, breath, feign death etc).
* @param timerIndex the first return value from GetMirrorTimerInfo, identifying the timer queried. Valid values include "EXHAUSTION", "BREATH"
* and "FEIGNDEATH".
* @returns current value of the timer. If the timer is not active, 0 is returned
* @see https://wow.gamepedia.com/API_GetMirrorTimerProgress
*/
declare function GetMirrorTimerProgress(timerIndex: number): number;
/**
* Returns an integer value of your held money
* @returns The amount of money the player's character has, in copper
* @see https://wow.gamepedia.com/API_GetMoney
*/
declare function GetMoney(): number;
/**
* Gets the highest number in the Title index
* @returns The last number in the TitleId index
* @see https://wow.gamepedia.com/API_GetNumTitles
*/
declare function GetNumTitles(): number;
/**
* Checks to see if the player has enabled PvP ("Permaflagged")
* @returns 1 if the player has selected to be PvP flagged, 0 otherwise
* @see https://wow.gamepedia.com/API_GetPVPDesired
*/
declare function GetPVPDesired(): WoWAPI.Flag;
/**
* retrieve the ranged crit chance as a two-decimal float
* @returns The players critical strike chance with the currently equipped range weapon as a floating point figure
* @see https://wow.gamepedia.com/API_GetRangedCritChance
*/
declare function GetRangedCritChance(): number;
/**
* Returns whether the player is in a rested (earning double XP for kills) or normal state
* @see https://wow.gamepedia.com/API_GetRestState
* @tupleReturn
*/
declare function GetRestState(): [WoWAPI.CharacterRestState, string, number];
/**
* Gets the cooldown information about a Death Knight's Rune
* @param runeId A number between 1 and 6 denoting which rune to be queried
* @see https://wow.gamepedia.com/API_GetRuneCooldown
* @tupleReturn
*/
declare function GetRuneCooldown(runeId: WoWAPI.CharacterDeathkightRuneType): [number, number, boolean];
/**
* Gets the name of the title associated with a title index
* @param titleId Title ID to return the name of
* @since 2.0.1
* @see https://wow.gamepedia.com/API_GetTitleName
* @tupleReturn
*/
declare function GetTitleName(titleId: number): [string, boolean];
/**
* Returns the number of XP gained from killing mobs until "player" goes from rest state to normal state
* @returns Number (if player is "rested"), null (if player is "normal")
* @see https://wow.gamepedia.com/API_GetXPExhaustion
*/
declare function GetXPExhaustion(): number | null;
/**
* Checks whether you have full control over your character (i.e. you are not feared, etc)
* @see https://wow.gamepedia.com/API_HasFullControl
*/
declare function HasFullControl(): boolean;
/**
* Returns whether or not, and how, your character can self-resurrect
* @returns the type of self-resurrect available to your character (known values are "Use Soulstone", "Reincarnate", and "Twisting Nether")
* or nil if none are available
* @see https://wow.gamepedia.com/API_HasSoulstone
*/
declare function HasSoulstone(): string | null;
/**
* Checks if the character is currently falling
* @returns true if the character is currently falling, false otherwise
* @see https://wow.gamepedia.com/API_IsFalling
*/
declare function IsFalling(): boolean;
/**
* Checks whether the player is currently flying
* @returns true if the character is currently flying, false otherwise
* @since 2.0.1
* @see https://wow.gamepedia.com/API_IsFlying
*/
declare function IsFlying(): boolean;
/**
* Checks if the character's current location is classified as being a flyable area
* @returns true if the area is classified as flyable, false otherwise
* @see https://wow.gamepedia.com/API_IsFlyableArea
*/
declare function IsFlyableArea(): boolean;
/**
* Returns whether the player's character is currently indoors. Most mounts are not usable indoors
* @returns true if the character is currently indoors, false otherwise
* @see https://wow.gamepedia.com/API_IsIndoors
*/
declare function IsIndoors(): boolean;
/**
* Checks to see if the player is mounted or not
* @returns true if the character is currently mounted, false otherwise
* @see https://wow.gamepedia.com/API_IsMounted
*/
declare function IsMounted(): boolean;
/**
* Returns whether the player's character is currently outdoors
* @returns true if the character is currently outdoors, false otherwise.
* @see https://wow.gamepedia.com/API_IsOutdoors
*/
declare function IsOutdoors(): boolean;
/**
* Returns whether the player's character is currently outside of the map
* @returns 1 if the player's character is currently outside of the map, nil otherwise
* @description Players may end up outside of a map's bounds (and therefore dead) both as a consequence of geometry errors and normal world
* design: for instance, falling off the Eye of the Storm, or being dropped off the top of Icecrown Citadel by the Lich King's val'kyrs
* @see https://wow.gamepedia.com/API_IsOutOfBounds
*/
declare function IsOutOfBounds(): boolean;
/**
* Checks to see if Player is resting
* @returns Whether the player is resting
* @see https://wow.gamepedia.com/API_IsResting
*/
declare function IsResting(): boolean;
/**
* Checks to see if Player is stealthed
* @returns true if stealthed, otherwise false
* @see https://wow.gamepedia.com/API_IsStealthed
*/
declare function IsStealthed(): boolean;
/**
* Returns whether the player character is swimming
* @returns 1 if the player is swimming, nil otherwise.
* @see https://wow.gamepedia.com/API_IsSwimming
*/
declare function IsSwimming(): boolean;
/**
* Generates an error message saying you cannot do that while dead
* @event UI_ERROR_MESSAGE
* @see https://wow.gamepedia.com/API_NotWhileDeadError
*/
declare function NotWhileDeadError(): void;
/**
* Resurrects when the player is standing near its corpse
* @see https://wow.gamepedia.com/API_RetrieveCorpse
*/
declare function RetrieveCorpse(): void;
/**
* Changes your character's displayed title
* @param titleId ID of the title you want to set. The identifiers are global and therefore do not depend on which titles you have learned.
* Invalid or unlearned values clear your title. See TitleId for a list
* @requires HARDWARE_EVENT
* @see https://wow.gamepedia.com/API_SetCurrentTitle
*/
declare function SetCurrentTitle(titleId: number): void;

View File

@@ -1,226 +1,226 @@
/** @noSelfInFile */
declare const CR_DEFENSE_SKILL = 2;
declare const CR_DODGE = 3;
declare const CR_PARRY = 4;
declare const CR_BLOCK = 5;
declare const CR_HIT_MELEE = 6;
declare const CR_HIT_RANGED = 7;
declare const CR_HIT_SPELL = 8;
declare const CR_CRIT_MELEE = 9;
declare const CR_CRIT_RANGED = 10;
declare const CR_CRIT_SPELL = 11;
declare const CR_MULTISTRIKE = 12;
declare const CR_READINESS = 13;
declare const CR_SPEED = 14;
declare const COMBAT_RATING_RESILIENCE_CRIT_TAKEN = 15;
declare const COMBAT_RATING_RESILIENCE_PLAYER_DAMAGE_TAKEN = 16;
declare const CR_LIFESTEAL = 17;
declare const CR_HASTE_MELEE = 18;
declare const CR_HASTE_RANGED = 19;
declare const CR_HASTE_SPELL = 20;
declare const CR_AVOIDANCE = 21;
declare const CR_WEAPON_SKILL_RANGED = 23;
declare const CR_EXPERTISE = 24;
declare const CR_ARMOR_PENETRATION = 25;
declare const CR_MASTERY = 26;
declare const CR_VERSATILITY_DAMAGE_DONE = 29;
declare const CR_VERSATILITY_DAMAGE_TAKEN = 31;
declare namespace WoWAPI {
type CombatRatingIdentifier = 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 23 | 24 | 25 | 26 | 29 | 31;
}
/**
* Returns attack power granted by particular amount of a particular stat
* @param statIndex Index of the stat (Strength, Agility, ...) to check the bonus AP of
* @param amount Amount of the stat to check the AP value of
* @returns Amount of attack power granted by the specified amount of the specified stat
* @see https://wow.gamepedia.com/API_GetAttackPowerForStat
*/
declare function GetAttackPowerForStat(statIndex: number, amount: number): number;
/**
* Player's block chance in percentage
* @see https://wow.gamepedia.com/API_GetBlockChance
*/
declare function GetBlockChance(): number;
/**
* Returns the number of points of a specific combat rating the player has
* @param combatRatingIdentifier A combat rating identifier from PaperDollFrame.lua
* @see https://wow.gamepedia.com/API_GetCombatRating
*/
declare function GetCombatRating(combatRatingIdentifier: WoWAPI.CombatRatingIdentifier): number;
/**
* Returns the bonus, in percent (or other converted units, such as skill points), of a specific combat rating for the player
* @param combatRatingIdentifier A combat rating identifier from PaperDollFrame.lua
* @see https://wow.gamepedia.com/API_GetCombatRatingBonus
*/
declare function GetCombatRatingBonus(combatRatingIdentifier: WoWAPI.CombatRatingIdentifier): number;
/**
* Returns the player's critical hit chance
* @returns The player's melee critical hit chance, as a percentage; e.g. 5.3783211 corresponding to a ~5.38% crit chance
* @see https://wow.gamepedia.com/API_GetCritChance
*/
declare function GetCritChance(): number;
/**
* Returns the player's dodge change
* @see https://wow.gamepedia.com/API_GetDodgeChance
*/
declare function GetDodgeChance(): number;
/**
* Returns the player's expertise percentage for main hand, offhand and ranged attacks
* - **arg1**: Expertise percentage for swings with your main hand weapon
* - **arg2**: Expertise percentage for swings with your offhand weapon
* - **arg3**: Expertise percentage for your ranged weapon
* @description Expertise reduces the chance that the player's attacks are dodged or parried by an enemy.
* This function returns the amount of percentage points Experise reduces the dodge/parry chance by (e.g. a return value of 3.5 means a
* 3.5% reduction to both dodge and parry probabilities).
* @see https://wow.gamepedia.com/API_GetExpertise
* @tupleReturn
*/
declare function GetExpertise(): [number, number, number];
/**
* Returns the player's haste
*/
declare function GetHaste(): number;
/**
* Returns the amount of Melee Hit %, not from Melee Hit Rating, that your character has
* @returns hit modifier (e.g. 16 for 16%)
* @see https://wow.gamepedia.com/API_GetHitModifier
*/
declare function GetHitModifier(): number;
/**
* Gets the player's current mana regeneration rates (in mana per 1 seconds).
* - **arg1**: mana regeneration when not casting spells
* - **arg2**: mana regeneration while casting spells
* @see https://wow.gamepedia.com/API_GetManaRegen
* @tupleReturn
*/
declare function GetManaRegen(): [number, number];
/**
* Returns the (raw) mastery of the player
* @returns sum of player's base and rating bonus mastery
* @description Mastery does not suffer diminishing returns, but the value returns by GetMastery is not, necessarily, your final Mastery value.
* Different classes, in different forms, can have a multiplier performed against the value returned by GetMastery. To find your true Mastery,
* and the multiplier factor used to calculate it, see GetMasteryEffect
* @see https://wow.gamepedia.com/API_GetMastery
*/
declare function GetMastery(): number;
/**
* Returns the effect of player's current Mastery
* - **arg1**: Current effect of the player's mastery, typically a damage increase percentage, or a percentage chance to trigger some
* specialization-specific effect
* - **arg2**: A spec-dependent coefficient multiplied onto the player's raw mastery effect (as returned by GetMastery) to yield the actual
* effect of the mastery
* @see https://wow.gamepedia.com/API_GetMasteryEffect
* @since 5.0.4
* @tupleReturn
*/
declare function GetMasteryEffect(): [number, number];
/**
* unknown
* @param combatRatingIdentifier unknown
*/
declare function GetMaxCombatRatingBonus(combatRatingIdentifier: WoWAPI.CombatRatingIdentifier): WoWAPI.Unknown;
/**
* Returns player's Melee attack haste
*/
declare function GetMeleeHaste(): WoWAPI.Unknown;
/**
* unknown
*/
declare function GetModResilienceDamageReduction(): WoWAPI.Unknown;
/**
* unknown
*/
declare function GetOverrideAPBySpellPower(): WoWAPI.Unknown;
/**
* unknown
*/
declare function GetOverrideSpellPowerByAP(...args: WoWAPI.Unknown[]): WoWAPI.Unknown;
/**
* Player's parry chance in percentage
* @see https://wow.gamepedia.com/API_GetParryChance
*/
declare function GetParryChance(): number;
/**
* unknown
*/
declare function GetPetMeleeHaste(): WoWAPI.Unknown;
/**
* unknown
*/
declare function GetPetSpellBonusDamage(): WoWAPI.Unknown;
/**
* unknown
*/
declare function GetPowerRegenForPowerType(powerType: WoWAPI.UnitPowerType): WoWAPI.Unknown;
/**
* The players critical strike chance with the currently equipped range weapon as a floating point figure
* @description If you are displaying this figure in a UI element and want it to update, hook to the UNIT_INVENTORY_CHANGED and
* SPELLS_CHANGED events as well as any other that effect equipment and buffs
* @see https://wow.gamepedia.com/API_GetRangedCritChance
*/
declare function GetRangedCritChance(): number;
/**
* Returns the percentage of damage blocked by your shield
* @returns the percentage of damage reduced your shield
* @see https://wow.gamepedia.com/API_GetShieldBlock
*/
declare function GetShieldBlock(): number;
/**
* Returns the raw spell damage bonus of the player for a given spell tree
* @param spellTreeId the spell tree
* - 1 for Physical
* - 2 for Holy
* - 3 for Fire
* - 4 for Nature
* - 5 for Frost
* - 6 for Shadow
* - 7 for Arcane
* @see https://wow.gamepedia.com/API_GetSpellBonusDamage
*/
declare function GetSpellBonusDamage(spellTreeId: WoWAPI.SpellTreeId): number;
/**
* Returns the raw bonus healing of the player
* @returns The raw bonus healing of the player
* @see https://wow.gamepedia.com/API_GetSpellBonusHealing
*/
declare function GetSpellBonusHealing(): number;
/**
* Returns the amount of Spell Hit %, not from Spell Hit Rating, that your character has
* @returns hit modifier (e.g. 16 for 16%)
* @see https://wow.gamepedia.com/API_GetSpellHitModifier
* @since 4.0.1
*/
declare function GetSpellHitModifier(): number;
/**
* unknown
*/
declare function GetSpellPenetration(): WoWAPI.Unknown;
/** @noSelfInFile */
declare const CR_DEFENSE_SKILL = 2;
declare const CR_DODGE = 3;
declare const CR_PARRY = 4;
declare const CR_BLOCK = 5;
declare const CR_HIT_MELEE = 6;
declare const CR_HIT_RANGED = 7;
declare const CR_HIT_SPELL = 8;
declare const CR_CRIT_MELEE = 9;
declare const CR_CRIT_RANGED = 10;
declare const CR_CRIT_SPELL = 11;
declare const CR_MULTISTRIKE = 12;
declare const CR_READINESS = 13;
declare const CR_SPEED = 14;
declare const COMBAT_RATING_RESILIENCE_CRIT_TAKEN = 15;
declare const COMBAT_RATING_RESILIENCE_PLAYER_DAMAGE_TAKEN = 16;
declare const CR_LIFESTEAL = 17;
declare const CR_HASTE_MELEE = 18;
declare const CR_HASTE_RANGED = 19;
declare const CR_HASTE_SPELL = 20;
declare const CR_AVOIDANCE = 21;
declare const CR_WEAPON_SKILL_RANGED = 23;
declare const CR_EXPERTISE = 24;
declare const CR_ARMOR_PENETRATION = 25;
declare const CR_MASTERY = 26;
declare const CR_VERSATILITY_DAMAGE_DONE = 29;
declare const CR_VERSATILITY_DAMAGE_TAKEN = 31;
declare namespace WoWAPI {
type CombatRatingIdentifier = 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 23 | 24 | 25 | 26 | 29 | 31;
}
/**
* Returns attack power granted by particular amount of a particular stat
* @param statIndex Index of the stat (Strength, Agility, ...) to check the bonus AP of
* @param amount Amount of the stat to check the AP value of
* @returns Amount of attack power granted by the specified amount of the specified stat
* @see https://wow.gamepedia.com/API_GetAttackPowerForStat
*/
declare function GetAttackPowerForStat(statIndex: number, amount: number): number;
/**
* Player's block chance in percentage
* @see https://wow.gamepedia.com/API_GetBlockChance
*/
declare function GetBlockChance(): number;
/**
* Returns the number of points of a specific combat rating the player has
* @param combatRatingIdentifier A combat rating identifier from PaperDollFrame.lua
* @see https://wow.gamepedia.com/API_GetCombatRating
*/
declare function GetCombatRating(combatRatingIdentifier: WoWAPI.CombatRatingIdentifier): number;
/**
* Returns the bonus, in percent (or other converted units, such as skill points), of a specific combat rating for the player
* @param combatRatingIdentifier A combat rating identifier from PaperDollFrame.lua
* @see https://wow.gamepedia.com/API_GetCombatRatingBonus
*/
declare function GetCombatRatingBonus(combatRatingIdentifier: WoWAPI.CombatRatingIdentifier): number;
/**
* Returns the player's critical hit chance
* @returns The player's melee critical hit chance, as a percentage; e.g. 5.3783211 corresponding to a ~5.38% crit chance
* @see https://wow.gamepedia.com/API_GetCritChance
*/
declare function GetCritChance(): number;
/**
* Returns the player's dodge change
* @see https://wow.gamepedia.com/API_GetDodgeChance
*/
declare function GetDodgeChance(): number;
/**
* Returns the player's expertise percentage for main hand, offhand and ranged attacks
* - **arg1**: Expertise percentage for swings with your main hand weapon
* - **arg2**: Expertise percentage for swings with your offhand weapon
* - **arg3**: Expertise percentage for your ranged weapon
* @description Expertise reduces the chance that the player's attacks are dodged or parried by an enemy.
* This function returns the amount of percentage points Experise reduces the dodge/parry chance by (e.g. a return value of 3.5 means a
* 3.5% reduction to both dodge and parry probabilities).
* @see https://wow.gamepedia.com/API_GetExpertise
* @tupleReturn
*/
declare function GetExpertise(): [number, number, number];
/**
* Returns the player's haste
*/
declare function GetHaste(): number;
/**
* Returns the amount of Melee Hit %, not from Melee Hit Rating, that your character has
* @returns hit modifier (e.g. 16 for 16%)
* @see https://wow.gamepedia.com/API_GetHitModifier
*/
declare function GetHitModifier(): number;
/**
* Gets the player's current mana regeneration rates (in mana per 1 seconds).
* - **arg1**: mana regeneration when not casting spells
* - **arg2**: mana regeneration while casting spells
* @see https://wow.gamepedia.com/API_GetManaRegen
* @tupleReturn
*/
declare function GetManaRegen(): [number, number];
/**
* Returns the (raw) mastery of the player
* @returns sum of player's base and rating bonus mastery
* @description Mastery does not suffer diminishing returns, but the value returns by GetMastery is not, necessarily, your final Mastery value.
* Different classes, in different forms, can have a multiplier performed against the value returned by GetMastery. To find your true Mastery,
* and the multiplier factor used to calculate it, see GetMasteryEffect
* @see https://wow.gamepedia.com/API_GetMastery
*/
declare function GetMastery(): number;
/**
* Returns the effect of player's current Mastery
* - **arg1**: Current effect of the player's mastery, typically a damage increase percentage, or a percentage chance to trigger some
* specialization-specific effect
* - **arg2**: A spec-dependent coefficient multiplied onto the player's raw mastery effect (as returned by GetMastery) to yield the actual
* effect of the mastery
* @see https://wow.gamepedia.com/API_GetMasteryEffect
* @since 5.0.4
* @tupleReturn
*/
declare function GetMasteryEffect(): [number, number];
/**
* unknown
* @param combatRatingIdentifier unknown
*/
declare function GetMaxCombatRatingBonus(combatRatingIdentifier: WoWAPI.CombatRatingIdentifier): WoWAPI.Unknown;
/**
* Returns player's Melee attack haste
*/
declare function GetMeleeHaste(): WoWAPI.Unknown;
/**
* unknown
*/
declare function GetModResilienceDamageReduction(): WoWAPI.Unknown;
/**
* unknown
*/
declare function GetOverrideAPBySpellPower(): WoWAPI.Unknown;
/**
* unknown
*/
declare function GetOverrideSpellPowerByAP(...args: WoWAPI.Unknown[]): WoWAPI.Unknown;
/**
* Player's parry chance in percentage
* @see https://wow.gamepedia.com/API_GetParryChance
*/
declare function GetParryChance(): number;
/**
* unknown
*/
declare function GetPetMeleeHaste(): WoWAPI.Unknown;
/**
* unknown
*/
declare function GetPetSpellBonusDamage(): WoWAPI.Unknown;
/**
* unknown
*/
declare function GetPowerRegenForPowerType(powerType: WoWAPI.UnitPowerType): WoWAPI.Unknown;
/**
* The players critical strike chance with the currently equipped range weapon as a floating point figure
* @description If you are displaying this figure in a UI element and want it to update, hook to the UNIT_INVENTORY_CHANGED and
* SPELLS_CHANGED events as well as any other that effect equipment and buffs
* @see https://wow.gamepedia.com/API_GetRangedCritChance
*/
declare function GetRangedCritChance(): number;
/**
* Returns the percentage of damage blocked by your shield
* @returns the percentage of damage reduced your shield
* @see https://wow.gamepedia.com/API_GetShieldBlock
*/
declare function GetShieldBlock(): number;
/**
* Returns the raw spell damage bonus of the player for a given spell tree
* @param spellTreeId the spell tree
* - 1 for Physical
* - 2 for Holy
* - 3 for Fire
* - 4 for Nature
* - 5 for Frost
* - 6 for Shadow
* - 7 for Arcane
* @see https://wow.gamepedia.com/API_GetSpellBonusDamage
*/
declare function GetSpellBonusDamage(spellTreeId: WoWAPI.SpellTreeId): number;
/**
* Returns the raw bonus healing of the player
* @returns The raw bonus healing of the player
* @see https://wow.gamepedia.com/API_GetSpellBonusHealing
*/
declare function GetSpellBonusHealing(): number;
/**
* Returns the amount of Spell Hit %, not from Spell Hit Rating, that your character has
* @returns hit modifier (e.g. 16 for 16%)
* @see https://wow.gamepedia.com/API_GetSpellHitModifier
* @since 4.0.1
*/
declare function GetSpellHitModifier(): number;
/**
* unknown
*/
declare function GetSpellPenetration(): WoWAPI.Unknown;

View File

@@ -1,41 +1,41 @@
/** @noSelfInFile */
declare namespace WoWAPI {
type AddonMessageType = "PARTY" | "RAID" | "GUILD" | "BATTLEGROUND" | "WHISPER" | "CHANNEL";
type ChatFlag = "AFK" | "DND" | "GM";
type ChatJoinLeftType = "YOU_JOINED" | "YOU_LEFT" | "THROTTLED";
type ChatUserNoticeType = "ANNOUNCEMENTS_OFF" | "ANNOUNCEMENTS_ON" | "BANNED" |
"OWNER_CHANGED" | "INVALID_NAME" | "INVITE" | "MODERATION_OFF" | "MODERATION_ON" |
"MUTED" | "NOT_MEMBER" | "NOT_MODERATED" | "SET_MODERATOR" | "UNSET_MODERATOR";
interface C_ChatInfo {
/**
* Registers an addon message prefix, allowing messages sent over addon channels with that prefix to be received by the client
* @param prefix The message prefix to register for delivery
* @see https://wow.gamepedia.com/API_RegisterAddonMessagePrefix
*/
RegisterAddonMessagePrefix(this: C_ChatInfo, prefix: string): void;
/**
* Sends a message to the hidden addon channel
* @param prefix Message prefix, can be used as your addon identifier; at most 15 characters
* @param text Text to send, at most 250 characters
* @param type AddOn channel to send to. Valid types are "PARTY", "RAID", "GUILD", "BATTLEGROUND", "WHISPER", and "CHANNEL".
* @since 1.12.0
*/
SendAddonMessage(this: C_ChatInfo, prefix: string, text: string, type: Exclude<AddonMessageType, "WHISPER" | "CHANNEL">): void;
/**
* Sends a message to the hidden addon channel
* @param prefix Message prefix, can be used as your addon identifier; at most 15 characters
* @param text Text to send, at most 250 characters
* @param type AddOn channel to send to. Valid types are "PARTY", "RAID", "GUILD", "BATTLEGROUND", "WHISPER", and "CHANNEL".
* @param target sed only for "WHISPER" and "CHANNEL" communications - the player to whisper to for "WHISPER" or the channel name to
* broadcast to for "CHANNEL"
* @since 2.1.0
*/
SendAddonMessage(this: C_ChatInfo, prefix: string, text: string, type: "WHISPER" | "CHANNEL", target: string): void;
}
}
declare const C_ChatInfo: WoWAPI.C_ChatInfo;
/** @noSelfInFile */
declare namespace WoWAPI {
type AddonMessageType = "PARTY" | "RAID" | "GUILD" | "BATTLEGROUND" | "WHISPER" | "CHANNEL";
type ChatFlag = "AFK" | "DND" | "GM";
type ChatJoinLeftType = "YOU_JOINED" | "YOU_LEFT" | "THROTTLED";
type ChatUserNoticeType = "ANNOUNCEMENTS_OFF" | "ANNOUNCEMENTS_ON" | "BANNED" |
"OWNER_CHANGED" | "INVALID_NAME" | "INVITE" | "MODERATION_OFF" | "MODERATION_ON" |
"MUTED" | "NOT_MEMBER" | "NOT_MODERATED" | "SET_MODERATOR" | "UNSET_MODERATOR";
interface C_ChatInfo {
/**
* Registers an addon message prefix, allowing messages sent over addon channels with that prefix to be received by the client
* @param prefix The message prefix to register for delivery
* @see https://wow.gamepedia.com/API_RegisterAddonMessagePrefix
*/
RegisterAddonMessagePrefix(this: C_ChatInfo, prefix: string): void;
/**
* Sends a message to the hidden addon channel
* @param prefix Message prefix, can be used as your addon identifier; at most 15 characters
* @param text Text to send, at most 250 characters
* @param type AddOn channel to send to. Valid types are "PARTY", "RAID", "GUILD", "BATTLEGROUND", "WHISPER", and "CHANNEL".
* @since 1.12.0
*/
SendAddonMessage(this: C_ChatInfo, prefix: string, text: string, type: Exclude<AddonMessageType, "WHISPER" | "CHANNEL">): void;
/**
* Sends a message to the hidden addon channel
* @param prefix Message prefix, can be used as your addon identifier; at most 15 characters
* @param text Text to send, at most 250 characters
* @param type AddOn channel to send to. Valid types are "PARTY", "RAID", "GUILD", "BATTLEGROUND", "WHISPER", and "CHANNEL".
* @param target sed only for "WHISPER" and "CHANNEL" communications - the player to whisper to for "WHISPER" or the channel name to
* broadcast to for "CHANNEL"
* @since 2.1.0
*/
SendAddonMessage(this: C_ChatInfo, prefix: string, text: string, type: "WHISPER" | "CHANNEL", target: string): void;
}
}
declare const C_ChatInfo: WoWAPI.C_ChatInfo;

View File

@@ -1,174 +1,174 @@
/** @noSelfInFile */
declare const AUTOCOMPLETE_FLAG_NONE = 0x00000000;
declare const AUTOCOMPLETE_FLAG_IN_GROUP = 0x00000001;
declare const AUTOCOMPLETE_FLAG_IN_GUILD = 0x00000002;
declare const AUTOCOMPLETE_FLAG_FRIEND = 0x00000004;
declare const AUTOCOMPLETE_FLAG_INTERACTED_WITH = 0x00000010;
declare const AUTOCOMPLETE_FLAG_ONLINE = 0x00000020;
declare const AUTOCOMPLETE_FLAG_ALL = 0xffffffff;
declare namespace WoWAPI {
type ChatTypeInfoBody = { r: number, g: number, b: number, id: string, sticky: boolean };
type ChatTypeInfo = {
SYSTEM: ChatTypeInfoBody,
SAY: ChatTypeInfoBody,
PARTY: ChatTypeInfoBody,
RAID: ChatTypeInfoBody,
GUILD: ChatTypeInfoBody,
OFFICER: ChatTypeInfoBody,
YELL: ChatTypeInfoBody,
WHISPER: ChatTypeInfoBody,
WHISPER_INFORM: ChatTypeInfoBody,
REPLY: ChatTypeInfoBody,
EMOTE: ChatTypeInfoBody,
TEXT_EMOTE: ChatTypeInfoBody,
MONSTER_SAY: ChatTypeInfoBody,
MONSTER_PARTY: ChatTypeInfoBody,
MONSTER_YELL: ChatTypeInfoBody,
MONSTER_WHISPER: ChatTypeInfoBody,
MONSTER_EMOTE: ChatTypeInfoBody,
CHANNEL: ChatTypeInfoBody,
CHANNEL_JOIN: ChatTypeInfoBody,
CHANNEL_LEAVE: ChatTypeInfoBody,
CHANNEL_LIST: ChatTypeInfoBody,
CHANNEL_NOTICE: ChatTypeInfoBody,
CHANNEL_NOTICE_USER: ChatTypeInfoBody,
AFK: ChatTypeInfoBody,
DND: ChatTypeInfoBody,
IGNORED: ChatTypeInfoBody,
SKILL: ChatTypeInfoBody,
LOOT: ChatTypeInfoBody,
MONEY: ChatTypeInfoBody,
OPENING: ChatTypeInfoBody,
TRADESKILLS: ChatTypeInfoBody,
PET_INFO: ChatTypeInfoBody,
COMBAT_MISC_INFO: ChatTypeInfoBody,
COMBAT_XP_GAIN: ChatTypeInfoBody,
COMBAT_HONOR_GAIN: ChatTypeInfoBody,
COMBAT_FACTION_CHANGE: ChatTypeInfoBody,
BG_SYSTEN_NEUTRAL: ChatTypeInfoBody,
BG_SYSTEM_ALLIANCE: ChatTypeInfoBody,
BG_SYSTEN_HORDE: ChatTypeInfoBody,
RAID_LEADER: ChatTypeInfoBody,
RAID_WARNING: ChatTypeInfoBody,
RAID_BOSS_WHISPER: ChatTypeInfoBody,
RAID_BOSS_EMOTE: ChatTypeInfoBody,
FILTERED: ChatTypeInfoBody,
BATTLEGROUND: ChatTypeInfoBody,
BATTLEGROUND_LEADER: ChatTypeInfoBody,
RESTRICTED: ChatTypeInfoBody,
CHANNEL1: ChatTypeInfoBody,
CHANNEL2: ChatTypeInfoBody,
CHANNEL3: ChatTypeInfoBody,
CHANNEL4: ChatTypeInfoBody,
CHANNEL5: ChatTypeInfoBody,
CHANNEL6: ChatTypeInfoBody,
CHANNEL7: ChatTypeInfoBody,
CHANNEL8: ChatTypeInfoBody,
CHANNEL9: ChatTypeInfoBody,
CHANNEL10: ChatTypeInfoBody,
ACHIVEMENT: ChatTypeInfoBody,
GUILD_ACHIVEMENT: ChatTypeInfoBody
};
/**
* the chat frame instance
*/
interface ChatFrame {
/**
* add the given message to the frame
* @param message the message to add
*/
AddMessage(message: string): void;
}
}
declare const ChatTypeInfo: WoWAPI.ChatTypeInfo;
/**
* Retrieves configuration information about a chat window
* @param frameIndex The index of the chat window to get information for (starts at 1 to NUM_CHAT_WINDOWS).
* @see https://wow.gamepedia.com/API_GetChatWindowInfo
* @tupleReturn
*/
declare function GetChatWindowInfo(frameIndex: number): [string, number, number, number, number, WoWAPI.Flag, WoWAPI.Flag, number];
/**
* Get the channels received by a chat window.
* @param frameIndex The frame number of the chat frame to be queried (starts at 1).
* @see https://wow.gamepedia.com/API_GetChatWindowChannels
* @tupleReturn
*/
declare function GetChatWindowChannels(frameIndex: number): [string, number, string, number, string, number];
/**
* Blocks further messages from a specified chat channel from appearing in a specific chat frame
* @param frameIndex index of the chat window/frame (ascending from 1) to remove the channel from
* @param channelName name of the chat channel to remove from the frame
* @see https://wow.gamepedia.com/API_RemoveChatWindowChannel
*/
declare function RemoveChatWindowChannel(frameIndex: number, channelName: string): void;
/**
* Returns chat types received by a chat window
* @param frameIndex Chat window index, ascending from 1
* @see https://wow.gamepedia.com/API_GetChatWindowMessages
* @tupleReturn
*/
declare function GetChatWindowMessages(frameIndex: number): [...string[]];
/**
* Stops the specified chat window from displaying a specified type of messages
* @param frameIndex chat window index, ascending from 1.
* @param messageGroup message type the chat window should no longer receive, e.g. "EMOTE", "SAY", "RAID".
*/
declare function RemoveChatWindowMessages(frameIndex: number, messageGroup: string): void;
/**
* Changes the text color of the specified chat channel. The "color wheel" popup calls this function to do the actual work, once the user is done with the popup
* @param channelName Name of the channel as given in chat-cache.txt files
* @param red red value 0-1
* @param green green value 0-1
* @param blue blue value 0-1
* @see https://wow.gamepedia.com/API_ChangeChatColor
*/
declare function ChangeChatColor(channelName: string, red: number, green: number, blue: number): void;
/**
* Returns possible player names matching a given prefix string and specified requirements
* @param text first characters of the possible names to be autocompleted
* @param include bit mask of filters that the results must match at least one of
* @param exclude bit mask of filters that the results must not match any of
* @param maxResults number of results desired
* @param cursorPosition position of the cursor within the editbox (i.e. how much of the text string should be matching)
* @see https://wow.gamepedia.com/API_GetAutoCompleteResults
* @tupleReturn
*/
declare function GetAutoCompleteResults(text: string, include: number, exclude: number, maxResults: number, cursorPosition?: number): [...string[]];
/**
* Return the numeric type index for a specific chat type
* @param typeCode The type code for the chat type (One of the key values of the ChatTypeInfo table)
* @returns The numeric type index for that chat type, used as the ID number for coloring
* @see https://wow.gamepedia.com/API_GetChatTypeIndex
*/
declare function GetChatTypeIndex(typeCode: keyof WoWAPI.ChatTypeInfo): number;
/**
* Toggles the chat logging and returns the current state
* @param newState toggles chat logging
* @returns current state of logging
* @see https://wow.gamepedia.com/API_LoggingChat
*/
declare function LoggingChat(newState?: boolean): boolean;
/**
* Toggles logging for the combat log and returns the current state
* @param newState Toggles combat logging
* @returns current state of logging
* @see https://wow.gamepedia.com/API_LoggingCombat
*/
declare function LoggingCombat(newState?: boolean): boolean;
/** @noSelfInFile */
declare const AUTOCOMPLETE_FLAG_NONE = 0x00000000;
declare const AUTOCOMPLETE_FLAG_IN_GROUP = 0x00000001;
declare const AUTOCOMPLETE_FLAG_IN_GUILD = 0x00000002;
declare const AUTOCOMPLETE_FLAG_FRIEND = 0x00000004;
declare const AUTOCOMPLETE_FLAG_INTERACTED_WITH = 0x00000010;
declare const AUTOCOMPLETE_FLAG_ONLINE = 0x00000020;
declare const AUTOCOMPLETE_FLAG_ALL = 0xffffffff;
declare namespace WoWAPI {
type ChatTypeInfoBody = { r: number, g: number, b: number, id: string, sticky: boolean };
type ChatTypeInfo = {
SYSTEM: ChatTypeInfoBody,
SAY: ChatTypeInfoBody,
PARTY: ChatTypeInfoBody,
RAID: ChatTypeInfoBody,
GUILD: ChatTypeInfoBody,
OFFICER: ChatTypeInfoBody,
YELL: ChatTypeInfoBody,
WHISPER: ChatTypeInfoBody,
WHISPER_INFORM: ChatTypeInfoBody,
REPLY: ChatTypeInfoBody,
EMOTE: ChatTypeInfoBody,
TEXT_EMOTE: ChatTypeInfoBody,
MONSTER_SAY: ChatTypeInfoBody,
MONSTER_PARTY: ChatTypeInfoBody,
MONSTER_YELL: ChatTypeInfoBody,
MONSTER_WHISPER: ChatTypeInfoBody,
MONSTER_EMOTE: ChatTypeInfoBody,
CHANNEL: ChatTypeInfoBody,
CHANNEL_JOIN: ChatTypeInfoBody,
CHANNEL_LEAVE: ChatTypeInfoBody,
CHANNEL_LIST: ChatTypeInfoBody,
CHANNEL_NOTICE: ChatTypeInfoBody,
CHANNEL_NOTICE_USER: ChatTypeInfoBody,
AFK: ChatTypeInfoBody,
DND: ChatTypeInfoBody,
IGNORED: ChatTypeInfoBody,
SKILL: ChatTypeInfoBody,
LOOT: ChatTypeInfoBody,
MONEY: ChatTypeInfoBody,
OPENING: ChatTypeInfoBody,
TRADESKILLS: ChatTypeInfoBody,
PET_INFO: ChatTypeInfoBody,
COMBAT_MISC_INFO: ChatTypeInfoBody,
COMBAT_XP_GAIN: ChatTypeInfoBody,
COMBAT_HONOR_GAIN: ChatTypeInfoBody,
COMBAT_FACTION_CHANGE: ChatTypeInfoBody,
BG_SYSTEN_NEUTRAL: ChatTypeInfoBody,
BG_SYSTEM_ALLIANCE: ChatTypeInfoBody,
BG_SYSTEN_HORDE: ChatTypeInfoBody,
RAID_LEADER: ChatTypeInfoBody,
RAID_WARNING: ChatTypeInfoBody,
RAID_BOSS_WHISPER: ChatTypeInfoBody,
RAID_BOSS_EMOTE: ChatTypeInfoBody,
FILTERED: ChatTypeInfoBody,
BATTLEGROUND: ChatTypeInfoBody,
BATTLEGROUND_LEADER: ChatTypeInfoBody,
RESTRICTED: ChatTypeInfoBody,
CHANNEL1: ChatTypeInfoBody,
CHANNEL2: ChatTypeInfoBody,
CHANNEL3: ChatTypeInfoBody,
CHANNEL4: ChatTypeInfoBody,
CHANNEL5: ChatTypeInfoBody,
CHANNEL6: ChatTypeInfoBody,
CHANNEL7: ChatTypeInfoBody,
CHANNEL8: ChatTypeInfoBody,
CHANNEL9: ChatTypeInfoBody,
CHANNEL10: ChatTypeInfoBody,
ACHIVEMENT: ChatTypeInfoBody,
GUILD_ACHIVEMENT: ChatTypeInfoBody
};
/**
* the chat frame instance
*/
interface ChatFrame {
/**
* add the given message to the frame
* @param message the message to add
*/
AddMessage(message: string): void;
}
}
declare const ChatTypeInfo: WoWAPI.ChatTypeInfo;
/**
* Retrieves configuration information about a chat window
* @param frameIndex The index of the chat window to get information for (starts at 1 to NUM_CHAT_WINDOWS).
* @see https://wow.gamepedia.com/API_GetChatWindowInfo
* @tupleReturn
*/
declare function GetChatWindowInfo(frameIndex: number): [string, number, number, number, number, WoWAPI.Flag, WoWAPI.Flag, number];
/**
* Get the channels received by a chat window.
* @param frameIndex The frame number of the chat frame to be queried (starts at 1).
* @see https://wow.gamepedia.com/API_GetChatWindowChannels
* @tupleReturn
*/
declare function GetChatWindowChannels(frameIndex: number): [string, number, string, number, string, number];
/**
* Blocks further messages from a specified chat channel from appearing in a specific chat frame
* @param frameIndex index of the chat window/frame (ascending from 1) to remove the channel from
* @param channelName name of the chat channel to remove from the frame
* @see https://wow.gamepedia.com/API_RemoveChatWindowChannel
*/
declare function RemoveChatWindowChannel(frameIndex: number, channelName: string): void;
/**
* Returns chat types received by a chat window
* @param frameIndex Chat window index, ascending from 1
* @see https://wow.gamepedia.com/API_GetChatWindowMessages
* @tupleReturn
*/
declare function GetChatWindowMessages(frameIndex: number): [...string[]];
/**
* Stops the specified chat window from displaying a specified type of messages
* @param frameIndex chat window index, ascending from 1.
* @param messageGroup message type the chat window should no longer receive, e.g. "EMOTE", "SAY", "RAID".
*/
declare function RemoveChatWindowMessages(frameIndex: number, messageGroup: string): void;
/**
* Changes the text color of the specified chat channel. The "color wheel" popup calls this function to do the actual work, once the user is done with the popup
* @param channelName Name of the channel as given in chat-cache.txt files
* @param red red value 0-1
* @param green green value 0-1
* @param blue blue value 0-1
* @see https://wow.gamepedia.com/API_ChangeChatColor
*/
declare function ChangeChatColor(channelName: string, red: number, green: number, blue: number): void;
/**
* Returns possible player names matching a given prefix string and specified requirements
* @param text first characters of the possible names to be autocompleted
* @param include bit mask of filters that the results must match at least one of
* @param exclude bit mask of filters that the results must not match any of
* @param maxResults number of results desired
* @param cursorPosition position of the cursor within the editbox (i.e. how much of the text string should be matching)
* @see https://wow.gamepedia.com/API_GetAutoCompleteResults
* @tupleReturn
*/
declare function GetAutoCompleteResults(text: string, include: number, exclude: number, maxResults: number, cursorPosition?: number): [...string[]];
/**
* Return the numeric type index for a specific chat type
* @param typeCode The type code for the chat type (One of the key values of the ChatTypeInfo table)
* @returns The numeric type index for that chat type, used as the ID number for coloring
* @see https://wow.gamepedia.com/API_GetChatTypeIndex
*/
declare function GetChatTypeIndex(typeCode: keyof WoWAPI.ChatTypeInfo): number;
/**
* Toggles the chat logging and returns the current state
* @param newState toggles chat logging
* @returns current state of logging
* @see https://wow.gamepedia.com/API_LoggingChat
*/
declare function LoggingChat(newState?: boolean): boolean;
/**
* Toggles logging for the combat log and returns the current state
* @param newState Toggles combat logging
* @returns current state of logging
* @see https://wow.gamepedia.com/API_LoggingCombat
*/
declare function LoggingCombat(newState?: boolean): boolean;

View File

@@ -1,31 +1,15 @@
declare namespace WoWAPI {
type CLASSES = "WARRIOR" | "DEATHKNIGHT" | "PALADIN" | "MONK" | "PRIEST" | "SHAMAN" | "DRUID" |
"ROGUE" | "MAGE" | "WARLOCK" | "HUNTER" | "DEMONHUNTER";
type CLASS_WARRIOR = 1;
type CLASS_PALADIN = 2;
type CLASS_HUNTER = 3;
type CLASS_ROGUE = 4;
type CLASS_PRIEST = 5;
type CLASS_DEATH_KNIGHT = 6;
type CLASS_SHAMAN = 7;
type CLASS_MAGE = 8;
type CLASS_WARLOCK = 9;
type CLASS_MONK = 10;
type CLASS_DRUID = 11;
type CLASS_DEMON_HUNTER = 12;
type CLASS_ID = CLASS_WARRIOR | CLASS_PALADIN | CLASS_HUNTER | CLASS_ROGUE | CLASS_PRIEST | CLASS_DEATH_KNIGHT | CLASS_SHAMAN |
CLASS_MAGE | CLASS_WARLOCK | CLASS_MONK | CLASS_DRUID | CLASS_DEMON_HUNTER;
}
/**
* Returns the color value associated with a given class
* @param englishClass the localization-independent name of the class, e.g., 'WARLOCK'. See ClassId for the list of acceptable arguments
* @returns r,g,b,hex
* - **rPerc, gPerc, bPerc**: Number - the value, between 0 and 1, associated with the red, green, and blue - respectively - coordinate in the RGB space
* - **argbHex**: the ARGB hex code of the color, e.g., 'ff8788ee' for 'WARLOCK'.
* @tupleReturn
* @see https://wow.gamepedia.com/API_GetClassColor
*/
declare function GetClassColor(englishClass: WoWAPI.CLASSES): [number, number, number, string];
declare namespace WoWAPI {
type CLASSES = "WARRIOR" | "DEATHKNIGHT" | "PALADIN" | "MONK" | "PRIEST" | "SHAMAN" | "DRUID" |
"ROGUE" | "MAGE" | "WARLOCK" | "HUNTER" | "DEMONHUNTER";
}
/**
* Returns the color value associated with a given class
* @param englishClass the localization-independent name of the class, e.g., 'WARLOCK'. See ClassId for the list of acceptable arguments
* @returns r,g,b,hex
* - **rPerc, gPerc, bPerc**: Number - the value, between 0 and 1, associated with the red, green, and blue - respectively - coordinate in the RGB space
* - **argbHex**: the ARGB hex code of the color, e.g., 'ff8788ee' for 'WARLOCK'.
* @tupleReturn
* @see https://wow.gamepedia.com/API_GetClassColor
*/
declare function GetClassColor(englishClass: WoWAPI.CLASSES): [number, number, number, string];

View File

@@ -1,37 +0,0 @@
declare namespace C_AchivementInfo {
/**
* Returns any reward item for an achievement
* @param achivementId
* @returns rewardItemID
* @see https://wow.gamepedia.com/API_C_AchievementInfo.GetRewardItemID
* @since 8.1.0 (2018-12-11)
*/
function GetRewardItemID(achivementId: number): number | null;
/**
* Returns the next achievement in a series
* @param achivementId
* @returns supercedingAchievements Only returns the next ID in a series even though it's in a table
* @see https://wow.gamepedia.com/API_C_AchievementInfo.GetSupercedingAchievements
* @since 8.1.0 (2018-12-11)
*/
function GetSupercedingAchievements(achivementId: number): number[];
/**
* Needs summary
* @param achivementId
* @returns isValidAchievement
* @see https://wow.gamepedia.com/API_C_AchievementInfo.IsValidAchievement
* @since 9.0.1 (2020-10-13)
*/
function IsValidAchievement(achivementId: number): boolean;
/**
* Sets a portrait texture for the unit being achievement compared
* @param textureObject
* @see https://wow.gamepedia.com/API_C_AchievementInfo.IsValidAchievement
* @since 8.0.1 (2018-07-17)
*/
function IsValidAchievement(textureObject: WoWAPI.Texture): void;
}

View File

@@ -1,53 +0,0 @@
/**
* @see https://wow.gamepedia.com/Adventure_Guide
*/
declare namespace C_AdventureJournal {
/**
* @see https://wow.gamepedia.com/API_C_AdventureJournal.ActivateEntry
* @since 6.2.0
*/
function ActivateEntry(index: WoWAPI.Unknown): WoWAPI.Unknown;
/**
* @see https://wow.gamepedia.com/API_C_AdventureJournal.CanBeShown
* @since 6.2.0
*/
function CanBeShown(...args: WoWAPI.UnknownTable[]): WoWAPI.Unknown;
/**
* @see https://wow.gamepedia.com/API_C_AdventureJournal.GetNumAvailableSuggestions
* @since 6.2.0
*/
function GetNumAvailableSuggestions(...args: WoWAPI.UnknownTable[]): WoWAPI.Unknown;
/**
* @see https://wow.gamepedia.com/API_C_AdventureJournal.GetPrimaryOffset
* @since 6.2.0
*/
function GetPrimaryOffset(...args: WoWAPI.UnknownTable[]): WoWAPI.Unknown;
/**
* @see https://wow.gamepedia.com/API_C_AdventureJournal.GetReward
* @since 6.2.0
*/
function GetReward(...args: WoWAPI.UnknownTable[]): WoWAPI.Unknown;
/**
* @see https://wow.gamepedia.com/API_C_AdventureJournal.GetSuggestions
* @since 6.2.0
*/
function GetSuggestions(...args: WoWAPI.UnknownTable[]): WoWAPI.Unknown;
/**
* @see https://wow.gamepedia.com/API_C_AdventureJournal.SetPrimaryOffset
* @since 6.2.0
*/
function SetPrimaryOffset(...args: WoWAPI.UnknownTable[]): WoWAPI.Unknown;
/**
* @see https://wow.gamepedia.com/API_C_AdventureJournal.UpdateSuggestions
* @since 6.2.0
*/
function UpdateSuggestions(...args: WoWAPI.UnknownTable[]): WoWAPI.Unknown;
}

View File

@@ -1,85 +0,0 @@
declare namespace WoWAPI {
interface AnimaDiversionNodeInfo {
talentId: number;
name: string;
description: string;
costs: AnimaDiversionCostInfo[];
currencyId: number;
icon: number;
normalizedPosition: WoWAPI.Vector2D;
state: Enum.AnimaDiversionNodeState;
}
interface AnimaDiversionCostInfo {
currencyId: number;
quantity: number;
}
}
declare namespace C_AnimaDiversion {
/**
* Closes the AnimaDiversionFrame
* @see https://wow.gamepedia.com/API_C_AnimaDiversion.CloseUI
* @fires ANIMA_DIVERSION_CLOSE
* @since 9.0.1 (2020-10-13)
*/
function CloseUI(): void;
/**
* Returns all Anima Conductor nodes for the player's Covenant
* Requires interacting with an Anima Conductor at least once since logging on; otherwise, returns nil.
* Subsequent calls to C_UI.Reload() will not interrupt this function
* @see https://wow.gamepedia.com/API_C_AnimaDiversion.GetAnimaDiversionNodes
* @since 9.0.1 (2020-10-13)
*/
function GetAnimaDiversionNodes(): WoWAPI.AnimaDiversionNodeInfo[];
/**
* Locates an Anima Conductor
* @returns An Anima Conductor's location on the continent map only while interacting with it; otherwise nil
* @see https://wow.gamepedia.com/API_C_AnimaDiversion.GetOriginPosition
* @since 9.0.1 (2020-10-13)
*/
function GetOriginPosition(): WoWAPI.Vector2D | null;
/**
* Needs summary
* @returns progress
* @see https://wow.gamepedia.com/API_C_AnimaDiversion.GetReinforceProgress
* @since 9.0.1 (2020-10-13)
*/
function GetReinforceProgress(): number;
/**
* Names the texture kit applied to the AnimaDiversionFrame
* @returns Name of a texture kit if the player has interacted with an Anima Conductor at least once since logging on; otherwise, returns nil
* @see https://wow.gamepedia.com/API_C_AnimaDiversion.GetTextureKit
* @since 9.0.1 (2020-10-13)
*/
function GetTextureKit(): string | null;
/**
* Attempts to open the AnimaDiversionFrame
* - Triggers ANIMA_DIVERSION_OPEN only after interacting with an Anima Conductor at least once since logging on, regardless of subsequent
* calls to C_UI.Reload(); otherwise, this function silently fails
* - Despite its name, this function is not used by the native UI when interacting with an Anima Conductor
* - Calling this function after walking away from the Anima Conductor results in an incomplete UI because C_AnimaDiversion.GetOriginPosition() returns nil
* - However, it is possible to close and reopen the frame with full functionality if the player has remained within range
* of the Anima Conductor since interacting with it
* @see https://wow.gamepedia.com/API_C_AnimaDiversion.OpenAnimaDiversionUI
* @fires ANIMA_DIVERSION_OPEN
* @since 9.0.1 (2020-10-13)
*/
function OpenAnimaDiversionUI(): void;
/**
* Needs summary
* @param talentId
* @param temporary
* @see https://wow.gamepedia.com/API_C_AnimaDiversion.SelectAnimaNode
* @since 9.0.1 (2020-10-13)
*/
function SelectAnimaNode(talentId: number, temporary: boolean): void;
}

View File

@@ -1,24 +0,0 @@
declare namespace WoWAPI {
interface ArdenwealdGardenData {
active: number;
ready: number;
remainingSeconds: number;
}
}
declare namespace C_ArdenwealdGardening {
/**
* unknown behaviour
* @see https://wow.gamepedia.com/API_C_ArdenwealdGardening.GetGardenData
* @since 9.0.2 (2020-11-17)
*/
function GetGardenData(): WoWAPI.ArdenwealdGardenData;
/**
* unknown behaviour
* @see https://wow.gamepedia.com/API_C_ArdenwealdGardening.IsGardenAccessible
* @since 9.0.2 (2020-11-17)
*/
function IsGardenAccessible(): boolean;
}

View File

@@ -1,18 +0,0 @@
declare namespace C_CovenantCallings {
/**
* Needs summary.
* @returns unlocked
* @see https://wow.gamepedia.com/API_C_CovenantCallings.AreCallingsUnlocked
* @since 9.0.1 (2020-10-13)
*/
function AreCallingsUnlocked(): boolean;
/**
* Needs summary
* @see https://wow.gamepedia.com/API_C_CovenantCallings.RequestCallings
* @since 9.0.1 (2020-10-13)
*/
function RequestCallings(): void;
}

View File

@@ -1,35 +0,0 @@
declare namespace WoWAPI {
interface CovenantPreviewInfo {
textureKit: string;
transmogSetID: number;
mountID: number;
covenantName: string;
covenantZone: string;
description: string;
covenantCrest: string;
covenantAbilities: CovenantAbilityInfo[];
fromPlayerChoice: boolean;
covenantSoulbinds: CovenantSoulbindInfo[];
featureInfo: CovenantFeatureInfo;
}
}
declare namespace C_CovenantPreview {
/**
* Needs summary
* @see https://wow.gamepedia.com/API_C_CovenantPreview.CloseFromUI
* @since 9.0.1 (2020-10-13)
*/
function CloseFromUI(): void;
/**
* Needs summary
* @param playerChoiceResponseID
* @see https://wow.gamepedia.com/API_C_CovenantPreview.GetCovenantInfoForPlayerChoiceResponseID
* @since 9.0.1 (2020-10-13)
*/
function GetCovenantInfoForPlayerChoiceResponseID(playerChoiceResponseID: number): WoWAPI.CovenantPreviewInfo;
}

View File

@@ -1,123 +0,0 @@
declare namespace WoWAPI {
interface CovenantSanctumFeatureInfo {
garrTalentTreeID: number;
featureType: number;
uiOrder: number;
}
interface CovenantSanctumRenownLevelInfo {
level: number;
locked: boolean;
isMilestone: boolean;
isCapstone: boolean;
}
interface CovenantSanctumRenownRewardInfo {
uiOrder: number;
itemID: number | null;
spellID: number | null;
mountID: number | null;
transmogID: number | null;
transmogSetID: number | null;
titleMaskID: number | null;
garrFollowerID: number | null;
transmogIllusionSourceID: number | null;
icon: number | null;
name: string | null;
description: string | null;
toastDescription: string | null;
}
}
declare namespace C_CovenantSanctumUI {
/**
* Needs summary
* @see https://wow.gamepedia.com/API_C_CovenantSanctumUI.CanAccessReservoir
* @since 9.0.2 (2020-11-17)
*/
function CanAccessReservoir(): boolean;
/**
* Needs summary
* @see https://wow.gamepedia.com/API_C_CovenantSanctumUI.CanDepositAnima
* @since 9.0.2 (2020-11-17)
*/
function CanDepositAnima(): boolean;
/**
* Needs summary
* @see https://wow.gamepedia.com/API_C_CovenantSanctumUI.DepositAnima
* @protected
* @since 9.0.1 (2020-10-13)
*/
function DepositAnima(): boolean;
/**
* Needs summary.
* @see https://wow.gamepedia.com/API_C_CovenantSanctumUI.EndInteraction
* @since 9.0.1 (2020-10-13)
*/
function EndInteraction(): void;
/**
* Needs summary
* @see https://wow.gamepedia.com/API_C_CovenantSanctumUI.GetAnimaInfo
* @returns currencyId, maxDisplayableValue
* @since 9.0.1 (2020-10-13)
*/
function GetAnimaInfo(): [number, number];
/**
* Needs summary
* @see https://wow.gamepedia.com/API_C_CovenantSanctumUI.GetCurrentTalentTreeID
* @since 9.0.2 (2020-11-17)
*/
function GetCurrentTalentTreeID(): number | null;
/**
* Needs summary
* @see https://wow.gamepedia.com/API_C_CovenantSanctumUI.GetFeatures
* @since 9.0.1 (2020-10-13)
*/
function GetFeatures(): WoWAPI.CovenantSanctumFeatureInfo[];
/**
* Needs summary
* @see https://wow.gamepedia.com/API_C_CovenantSanctumUI.GetRenownLevel
* @since 9.0.1 (2020-10-13)
*/
function GetRenownLevel(): number;
/**
* Needs summary
* @see https://wow.gamepedia.com/API_C_CovenantSanctumUI.GetRenownLevels
* @since 9.0.2 (2020-11-17)
*/
function GetRenownLevels(covenantId: Enum.CovenantType): WoWAPI.CovenantSanctumRenownLevelInfo[];
/**
* Needs summary
* @see https://wow.gamepedia.com/API_C_CovenantSanctumUI.GetRenownRewardsForLevel
* @since 9.0.1 (2020-10-13)
*/
function GetRenownRewardsForLevel(covenantId: Enum.CovenantType, renownLevel: number): WoWAPI.CovenantSanctumRenownRewardInfo[];
/**
* Needs summary
* @see https://wow.gamepedia.com/API_C_CovenantSanctumUI.GetSanctumType
* @since 9.0.1 (2020-10-13)
*/
function GetSanctumType(): Enum.GarrTalentFeatureSubtype;
/**
* Needs summary
* @returns currencyIds
* @see https://wow.gamepedia.com/API_C_CovenantSanctumUI.GetSoulCurrencies
* @since 9.0.1 (2020-10-13)
*/
function GetSoulCurrencies(): number[];
}

View File

@@ -1,71 +0,0 @@
declare namespace WoWAPI {
interface CovenantData {
ID: number;
textureKit: string;
celebrationSoundKit: number;
animaChannelSelectSoundKit: number;
animaChannelActiveSoundKit: number;
animaGemsFullSoundKit: number;
animaNewGemSoundKit: number;
animaReinforceSelectSoundKit: number;
upgradeTabSelectSoundKitID: number;
reservoirFullSoundKitID: number;
beginResearchSoundKitID: number;
renownFanfareSoundKitID: number;
name: string;
soulbindIDs: number[];
}
interface CovenantAbilityInfo {
spellId: number;
type: Enum.CovenantAbilityType;
}
interface CovenantSoulbindInfo {
spellID: number;
uiTextureKit: string;
name: string;
description: string;
sortOrder: number;
}
interface CovenantFeatureInfo {
name: string;
description: string;
texture: number;
}
}
declare namespace C_Covenants {
/**
* Returns the CovenantID of the chosen covenant
* - Only applies to joining a Covenant at maximum level or during N [50] The Threads of Fate
* - Returns 0 while loading addons until info is available, before PLAYER_LOGIN and immediately after /reload
* @see https://wow.gamepedia.com/API_C_Covenants.GetActiveCovenantID
* @since 9.0.1 (2020-10-13)
*/
function GetActiveCovenantID(): Enum.CovenantType;
/**
* Needs summary
* @param covenantId
* @see https://wow.gamepedia.com/API_C_Covenants.GetCovenantData
* @since 9.0.1 (2020-10-13)
*/
function GetCovenantData(covenantId: Enum.CovenantType): WoWAPI.CovenantData | null;
/**
* Needs summary.
* @see https://wow.gamepedia.com/API_C_Covenants.GetCovenantIDs
* @since 9.0.1 (2020-10-13)
*/
function GetCovenantIDs(): Enum.CovenantType[];
}

View File

@@ -1,177 +0,0 @@
declare namespace WoWAPI {
interface DungeonEntranceMapInfo {
/**
* Possible values listed at wow.tools
*/
areaPoiID: number;
position: Vector2D;
name: string;
description: string;
/**
* AtlasID used as Texture:SetAtlas(atlasName)
*/
atlasName: string;
/**
* Possible values listed at wow.tools
*/
journalInstanceID: number;
}
interface EncounterJournalMapEncounterInfo {
encointerID: number;
mapX: number;
mapY: number;
}
interface EncounterJournalSectionInfo {
spellID: number;
/**
* Section title, e.g. "Stage One: The Final Assault", "Mutated Corruption", "Impale"
*/
title: string;
/**
* Description text, e.g. "A Mutated Corruption appears shortly after assaulting a platform"
*/
description: string | null;
/**
* Section depth, i.e. the number of ancestors it has before reaching a sibling of the root section for the encounter
* (0 for the root section and its siblings, 1 for their children, 2 for their children's children...).
*/
headerType: number;
/**
* Path to a texture to display as an icon next to the section title, or "" if no static icon should be shown.
*/
abilityIcon: number;
/**
* Model ID to display as an icon next to the section title, or 0 if no model-based icon should be shown
*/
creatureDisplayID: number;
uiModelSceneID: number;
/**
* Section ID of the next section on the same depth as this one, nil if none
*/
siblingSectionID: number | null;
/**
* Section ID of the first child section of this section, nil if none
*/
firstChildSectionID: number | null;
/**
* true if this section should be hidden because it does not apply to the current DifficultyID}, false otherwise.
*/
filteredByDifficulty: boolean;
/**
* hyperlink to this section, e.g. " |cff66bbff|Hjournal:2:4102:4|h[Cataclysm]|h|r"
*/
link: Hyperlink;
/**
* True if the section should be expanded by default, false if it should be collapsed by default
*/
startsOpen: boolean;
}
type ENCOUNTER_JOURNAL_FLAG_TANK_ALERT = 0;
type ENCOUNTER_JOURNAL_FLAG_DAMAGE_DEALER_ALERT = 1;
type ENCOUNTER_JOURNAL_FLAG_HEALER_ALERT = 2;
type ENCOUNTER_JOURNAL_FLAG_HEROIC_DIFFICULTY = 3;
type ENCOUNTER_JOURNAL_FLAG_DEADLY = 4;
type ENCOUNTER_JOURNAL_FLAG_IMPORTANT = 5;
type ENCOUNTER_JOURNAL_FLAG_INTERUPTIBLE = 6;
type ENCOUNTER_JOURNAL_FLAG_MAGIC_EFFECT = 7;
type ENCOUNTER_JOURNAL_FLAG_CURSE_EFFECT = 8;
type ENCOUNTER_JOURNAL_FLAG_POISON_EFFECT = 9;
type ENCOUNTER_JOURNAL_FLAG_DISEASE_EFFECT = 10;
type ENCOUNTER_JOURNAL_FLAG_ENRAGE = 11;
type ENCOUNTER_JOURNAL_FLAG_MYTHIC_DIFFICULTY = 12;
type ENCOUNTER_JOURNAL_FLAG =
ENCOUNTER_JOURNAL_FLAG_TANK_ALERT
| ENCOUNTER_JOURNAL_FLAG_DAMAGE_DEALER_ALERT
| ENCOUNTER_JOURNAL_FLAG_HEALER_ALERT
|
ENCOUNTER_JOURNAL_FLAG_HEROIC_DIFFICULTY
| ENCOUNTER_JOURNAL_FLAG_DEADLY
| ENCOUNTER_JOURNAL_FLAG_IMPORTANT
| ENCOUNTER_JOURNAL_FLAG_INTERUPTIBLE
|
ENCOUNTER_JOURNAL_FLAG_MAGIC_EFFECT
| ENCOUNTER_JOURNAL_FLAG_CURSE_EFFECT
| ENCOUNTER_JOURNAL_FLAG_POISON_EFFECT
| ENCOUNTER_JOURNAL_FLAG_DISEASE_EFFECT
|
ENCOUNTER_JOURNAL_FLAG_ENRAGE
| ENCOUNTER_JOURNAL_FLAG_MYTHIC_DIFFICULTY;
}
declare namespace C_EncounterJournal {
/**
* Returns the instance entrances for a map
* @param uiMapId
* @see https://wow.gamepedia.com/API_C_EncounterJournal.GetDungeonEntrancesForMap
* @since 8.0.1 (2018-07-17)
*/
function GetDungeonEntrancesForMap(uiMapId: number): WoWAPI.DungeonEntranceMapInfo[];
/**
* Returns boss pin locations for an instance map
* @param uiMapId
* @see https://wow.gamepedia.com/API_C_EncounterJournal.GetEncountersOnMap
* @since 8.0.1 (2018-07-17)
*/
function GetEncountersOnMap(uiMapId: number): WoWAPI.EncounterJournalMapEncounterInfo[];
/**
* Returns the icon flags for a section, such as Magic Effect and Heroic Difficulty
* @param sectionID
* @returns Flag IDs to display for this section.
* - Refer to the ENCOUNTER_JOURNAL_SECTION_FLAG globals for the flag titles.
* - For convenience there is EncounterJournal_SetFlagIcon() which sets the texture coords for interface/encounterjournal/ui-ej-icons.blp
* @see https://wow.gamepedia.com/API_C_EncounterJournal.GetSectionIconFlags
* @since 7.3.5 (2018-01-16)
*/
function GetSectionIconFlags(sectionID: number): WoWAPI.ENCOUNTER_JOURNAL_FLAG[];
/**
* Returns information about an entry in the Abilities section of the Encounter Journal
* @param sectionId
* @returns encounterJournalSectionInfo
* @see https://wow.gamepedia.com/API_C_EncounterJournal.GetSectionInfo
* @since 7.3.5 (2018-01-16)
*/
function GetSectionInfo(sectionId: number): WoWAPI.EncounterJournalSectionInfo;
/**
* Returns whether an instance has a loot table in the journal
* @param instanceId if omitted, uses the currently selected instance per EJ_SelectInstance
* @see https://wow.gamepedia.com/API_C_EncounterJournal.InstanceHasLoot
* @since 8.1.0 (2018-12-11)
*/
function InstanceHasLoot(instanceId?: number): boolean;
/**
* Returns if a boss encounter has been completed
* @param journalEncounterID
* @see https://wow.gamepedia.com/API_C_EncounterJournal.IsEncounterComplete
* @since 8.1.5 (2019-03-12)
*/
function IsEncounterComplete(journalEncounterID: number): boolean;
/**
* Needs summary
* @param level
* @see https://wow.gamepedia.com/API_C_EncounterJournal.SetPreviewMythicPlusLevel
* @since 8.2.0 (2019-06-25)
*/
function SetPreviewMythicPlusLevel(level: number): void;
/**
* Needs summary
* @param tier
* @see https://wow.gamepedia.com/API_C_EncounterJournal.SetPreviewPvpTier
* @since 8.2.0 (2019-06-25)
*/
function SetPreviewPvpTier(tier: number): void;
}

View File

@@ -1,244 +0,0 @@
declare namespace C_Item {
/**
* Needs summary
* @param item
* @see https://wow.gamepedia.com/API_C_Item.IsItemConduit
* @since 9.0.2 (2020-11-17)
*/
function IsItemConduit(item: ItemLocation.ItemLocationMixin): boolean;
/**
* Needs summary
* @param itemInfo
* @see https://wow.gamepedia.com/API_C_Item.IsAnimaItemByID
* @since 9.0.2 (2020-11-17)
*/
function IsAnimaItemByID(itemInfo: string): boolean;
/**
* Needs summary
* @param item
* @see https://wow.gamepedia.com/API_C_Item.CanViewItemPowers
* @since 8.1.0 (2018-12-11)
*/
function CanViewItemPowers(item: ItemLocation.ItemLocationMixin): boolean;
/**
* Needs summary
* @param item
* @see https://wow.gamepedia.com/API_C_Item.DoesItemExist
* @since 8.0.1 (2018-07-17)
*/
function DoesItemExist(item: ItemLocation.ItemLocationMixin): boolean;
/**
* Needs summary
* @param itemInfo
* @see https://wow.gamepedia.com/API_C_Item.DoesItemExistByID
* @since 8.0.1 (2018-07-17)
*/
function DoesItemExistByID(itemInfo: WoWAPI.Hyperlink | string | number): boolean;
/**
* Needs summary
* @param item
* @see https://wow.gamepedia.com/API_C_Item.DoesItemMatchBonusTreeReplacement
* @since 9.0.1 (2020-10-13)
*/
function DoesItemMatchBonusTreeReplacement(item: ItemLocation.ItemLocationMixin): boolean;
/**
* Needs summary
* @param item
* @see https://wow.gamepedia.com/API_C_Item.GetCurrentItemLevel
* @since 9.0.1 (2020-10-13)
*/
function GetCurrentItemLevel(item: ItemLocation.ItemLocationMixin): number | null;
/**
* Needs summary
* @param item
* @see https://wow.gamepedia.com/API_C_Item.GetItemGUID
* @since 8.0.1 (2018-07-17)
*/
function GetItemGUID(item: ItemLocation.ItemLocationMixin): string;
/**
* Needs summary
* @param item
* @see https://wow.gamepedia.com/API_C_Item.GetItemIcon
* @since 8.0.1 (2018-07-17)
*/
function GetItemIcon(item: ItemLocation.ItemLocationMixin): number | null;
/**
* Needs summary
* @param itemInfo
* @see https://wow.gamepedia.com/API_C_Item.GetItemIconByID
* @since 8.0.1 (2018-07-17)
*/
function GetItemIconByID(itemInfo: WoWAPI.Hyperlink | string | number): number | null;
/**
* Needs summary
* @param item
* @see https://wow.gamepedia.com/API_C_Item.GetItemID
* @since 8.0.1 (2018-07-17)
*/
function GetItemID(item: ItemLocation.ItemLocationMixin): number;
/**
* Needs summary
* @param item
* @see https://wow.gamepedia.com/API_C_Item.GetItemInventoryType
* @since 8.0.1 (2018-07-17)
*/
function GetItemInventoryType(item: ItemLocation.ItemLocationMixin): Enum.InventoryType | null;
/**
* Needs summary
* @param itemInfo
* @see https://wow.gamepedia.com/API_C_Item.GetItemInventoryTypeByID
* @since 8.0.1 (2018-07-17)
*/
function GetItemInventoryTypeByID(itemInfo: WoWAPI.Hyperlink | string | number): Enum.InventoryType | null;
/**
* Needs summary
* @param item
* @see https://wow.gamepedia.com/API_C_Item.GetItemLink
* @since 8.0.1 (2018-07-17)
*/
function GetItemLink(item: ItemLocation.ItemLocationMixin): WoWAPI.Hyperlink | null;
/**
* Needs summary
* @param item
* @see https://wow.gamepedia.com/API_C_Item.GetItemName
* @since 8.0.1 (2018-07-17)
*/
function GetItemName(item: ItemLocation.ItemLocationMixin): string | null;
/**
* Needs summary
* @param itemInfo
* @see https://wow.gamepedia.com/API_C_Item.GetItemNameByID
* @since 8.0.1 (2018-07-17)
*/
function GetItemNameByID(itemInfo: WoWAPI.Hyperlink | string | number): string | null;
/**
* Needs summary
* @param item
* @see https://wow.gamepedia.com/API_C_Item.GetItemQuality
* @since 8.0.1 (2018-07-17)
*/
function GetItemQuality(item: ItemLocation.ItemLocationMixin): Enum.ItemQuality | null;
/**
* Needs summary
* @param itemInfo
* @see https://wow.gamepedia.com/API_C_Item.GetItemQualityByID
* @since 8.0.1 (2018-07-17)
*/
function GetItemQualityByID(itemInfo: WoWAPI.Hyperlink | string | number): Enum.ItemQuality | null;
/**
* Needs summary
* @param item
* @see https://wow.gamepedia.com/API_C_Item.GetStackCount
* @since 8.3.0 (2020-01-14)
*/
function GetStackCount(item: ItemLocation.ItemLocationMixin): number;
/**
* Needs summary
* @param item
* @returns Whether or not the item is soul- or accountbound
* @see https://wow.gamepedia.com/API_C_Item.IsBound
* @since 8.0.1 (2018-07-17)
*/
function IsBound(item: ItemLocation.ItemLocationMixin): boolean;
/**
* Needs summary
* @param item
* @see https://wow.gamepedia.com/API_C_Item.IsItemDataCached
* @since 8.0.1 (2018-07-17)
*/
function IsItemDataCached(item: ItemLocation.ItemLocationMixin): boolean;
/**
* Needs summary
* @param itemInfo
* @see https://wow.gamepedia.com/API_C_Item.IsItemDataCachedByID
* @since 8.0.1 (2018-07-17)
*/
function IsItemDataCachedByID(itemInfo: WoWAPI.Hyperlink | string | number): boolean;
/**
* Needs summary
* @param itemInfo
* @see https://wow.gamepedia.com/API_C_Item.IsItemKeystoneByID
* @since 9.0.1 (2020-10-13)
*/
function IsItemKeystoneByID(itemInfo: WoWAPI.Hyperlink | string | number): boolean;
/**
* Needs summary
* @param item
* @see https://wow.gamepedia.com/API_C_Item.IsItemDataCached
* @since 8.0.1 (2018-07-17)
*/
function IsLocked(item: ItemLocation.ItemLocationMixin): boolean;
/**
* Needs summary
* @param item
* @see https://wow.gamepedia.com/API_C_Item.IsLocked
* @since 8.0.1 (2018-07-17)
*/
function LockItem(item: ItemLocation.ItemLocationMixin): void;
/**
* Needs summary
* @param itemGuid
* @see https://wow.gamepedia.com/API_C_Item.LockItemByGUID
* @since 8.0.1 (2018-07-17)
*/
function LockItemByGUID(itemGuid: string): void;
/**
* Needs summary
* @param item
* @see https://wow.gamepedia.com/API_C_Item.RequestLoadItemData
* @since 8.0.1 (2018-07-17)
*/
function RequestLoadItemData(item: ItemLocation.ItemLocationMixin): void;
/**
* Needs summary
* @param itemInfo
* @see https://wow.gamepedia.com/API_C_Item.RequestLoadItemDataByID
* @since 8.0.1 (2018-07-17)
*/
function RequestLoadItemDataByID(itemInfo: WoWAPI.Hyperlink | string | number): void;
/**
* Needs summary
* @param item
* @see https://wow.gamepedia.com/API_C_Item.UnlockItem
* @since 8.0.1 (2018-07-17)
*/
function UnlockItem(item: ItemLocation.ItemLocationMixin): void;
/**
* Needs summary
* @param itemGuid
* @see https://wow.gamepedia.com/API_C_Item.UnlockItemByGUID
* @since 8.3.0 (2020-01-14)
*/
function UnlockItemByGUID(itemGuid: string): void;
}

View File

@@ -1,78 +0,0 @@
declare namespace WoWAPI {
interface ItemInteractionFrameInfo {
textureKit: string;
openSoundKitID: number;
closeSoundKitID: number;
titleText: string;
tutorialText: string;
buttonText: string;
frameType: Enum.ItemInteractionFrameType;
description: string | null;
cost: number | null;
currencyTypeId: number | null;
dropInSlotSoundKitId: number | null;
}
}
declare namespace C_ItemInteraction {
/**
* Needs summary
* @see https://wow.gamepedia.com/API_C_ItemInteraction.ClearPendingItem
* @since 8.3.0 (2020-01-14)
*/
function ClearPendingItem(): void;
/**
* Needs summary
* @see https://wow.gamepedia.com/API_C_ItemInteraction.CloseUI
* @since 8.3.0 (2020-01-14)
*/
function CloseUI(): void;
/**
* Needs summary
* @see https://wow.gamepedia.com/API_C_ItemInteraction.GetItemInteractionInfo
* @since 8.3.0 (2020-01-14)
*/
function GetItemInteractionInfo(): WoWAPI.ItemInteractionFrameInfo | null;
/**
* Needs summary
* @see https://wow.gamepedia.com/API_C_ItemInteraction.GetItemInteractionSpellId
* @since 8.3.0 (2020-01-14)
*/
function GetItemInteractionSpellId(): number;
/**
* Needs summary
* @see https://wow.gamepedia.com/API_C_ItemInteraction.InitializeFrame
* @since 8.3.0 (2020-01-14)
*/
function InitializeFrame(): void;
/**
* Needs summary
* @see https://wow.gamepedia.com/API_C_ItemInteraction.PerformItemInteraction
* @since 8.3.0 (2020-01-14)
*/
function PerformItemInteraction(): void;
/**
* Needs summary
* @see https://wow.gamepedia.com/API_C_ItemInteraction.Reset
* @since 8.3.0 (2020-01-14)
*/
function Reset(): void;
/**
* Needs summary
* @returns success
* @see https://wow.gamepedia.com/API_C_ItemInteraction.SetPendingItem
* @since 8.3.0 (2020-01-14)
*/
function SetPendingItem(item?: ItemLocation.ItemLocationMixin): boolean;
}

View File

@@ -1,10 +0,0 @@
declare namespace C_ItemUpgrade {
/**
* Returns an itemLink of the anticipated result from applying item upgrading using the ItemUpgradeFrame
* @returns the item hyperlink
* @see https://wow.gamepedia.com/API_C_ItemUpgrade.GetItemHyperlink
* @since 8.2.0 (2019-06-25)
*/
function GetItemHyperlink(): WoWAPI.Hyperlink;
}

View File

@@ -1,199 +0,0 @@
declare namespace C_LegendaryCrafting {
/**
* Needs summary
* @see https://wow.gamepedia.com/API_C_LegendaryCrafting.CloseRuneforgeInteraction
* @since 9.0.1 (2020-10-13)
*/
function CloseRuneforgeInteraction(): void;
/**
* Needs summary
* @param unknown
* @see https://wow.gamepedia.com/API_C_LegendaryCrafting.CraftRuneforgeLegendary
* @since 9.0.1 (2020-10-13)
*/
function CraftRuneforgeLegendary(...unknown: WoWAPI.UnknownTable[]): WoWAPI.Unknown;
/**
* Needs summary
* @param baseItem
* @see https://wow.gamepedia.com/API_C_LegendaryCrafting.GetRuneforgeItemPreviewInfo
* @since 9.0.1 (2020-10-13)
*/
function GetRuneforgeItemPreviewInfo(baseItem: ItemLocation.ItemLocationMixin): WoWAPI.Unknown;
/**
* Needs summary
* @param baseItem
* @param runeforgePowerID
* @param modifiers
* @see https://wow.gamepedia.com/API_C_LegendaryCrafting.GetRuneforgeItemPreviewInfo
* @since 9.0.1 (2020-10-13)
*/
function GetRuneforgeItemPreviewInfo(baseItem: ItemLocation.ItemLocationMixin, runeforgePowerID: number, modifiers: number[]): WoWAPI.Unknown;
/**
* Needs summary
* @param baseItem
* @see https://wow.gamepedia.com/API_C_LegendaryCrafting.GetRuneforgeLegendaryCost
* @since 9.0.1 (2020-10-13)
*/
function GetRuneforgeLegendaryCost(baseItem: ItemLocation.ItemLocationMixin): WoWAPI.Unknown;
/**
* Needs summary
* @returns spellId
* @see https://wow.gamepedia.com/API_C_LegendaryCrafting.GetRuneforgeLegendaryCraftSpellID
* @since 9.0.1 (2020-10-13)
*/
function GetRuneforgeLegendaryCraftSpellID(): number;
/**
* Needs summary
* @returns currencies
* @see https://wow.gamepedia.com/API_C_LegendaryCrafting.GetRuneforgeLegendaryCurrencies
* @since 9.0.1 (2020-10-13)
*/
function GetRuneforgeLegendaryCurrencies(): number[];
/**
* Needs summary
* @param runeforgeLegendary
* @param upgradeItem
* @see https://wow.gamepedia.com/API_C_LegendaryCrafting.GetRuneforgeLegendaryUpgradeCost
* @since 9.0.1 (2020-10-13)
*/
function GetRuneforgeLegendaryUpgradeCost(runeforgeLegendary: ItemLocation.ItemLocationMixin, upgradeItem: ItemLocation.ItemLocationMixin): WoWAPI.Unknown;
/**
* Needs summary
* @param baseItem
* @param powerId
* @param addedModifierIndex
* @param modifiers
* @returns name and description
* @see https://wow.gamepedia.com/API_C_LegendaryCrafting.GetRuneforgeModifierInfo
* @since 9.0.1 (2020-10-13)
*/
function GetRuneforgeModifierInfo(
baseItem: ItemLocation.ItemLocationMixin,
powerId: number | null,
addedModifierIndex: number,
modifiers: number[]
): [string, string];
/**
* Needs summary
* @returns modifiedReagentItemIDs
* @see https://wow.gamepedia.com/API_C_LegendaryCrafting.GetRuneforgeModifiers
* @since 9.0.1 (2020-10-13)
*/
function GetRuneforgeModifiers(): number[];
/**
* Needs summary
* @returns runeforgePowerINfo
* @see https://wow.gamepedia.com/API_C_LegendaryCrafting.GetRuneforgePowerInfo
* @since 9.0.1 (2020-10-13)
*/
function GetRuneforgePowerInfo(runeforgePowerID: number): WoWAPI.Unknown;
/**
* Needs summary
* @returns specRuneforgePowerIDs and otherSpecRuneforgePowerIDs
* @see https://wow.gamepedia.com/API_C_LegendaryCrafting.GetRuneforgePowers
* @since 9.0.1 (2020-10-13)
*/
function GetRuneforgePowers(): [number[], number[]];
/**
* Needs summary
* @param baseItem
* @param filter
* @returns specRuneforgePowerIDs and otherSpecRuneforgePowerIDs
* @see https://wow.gamepedia.com/API_C_LegendaryCrafting.GetRuneforgePowers
* @since 9.0.1 (2020-10-13)
*/
function GetRuneforgePowers(baseItem: ItemLocation.ItemLocationMixin, filter: Enum.RuneforgePowerFilter): [number[], number[]];
/**
* Needs summary
* @returns runeforgePowerIDs
* @see https://wow.gamepedia.com/API_C_LegendaryCrafting.GetRuneforgePowersByClassAndSpec
* @since 9.0.1 (2020-10-13)
*/
function GetRuneforgePowersByClassAndSpec(): number[];
/**
* Needs summary
* @param classID
* @param specId
* @param filter
* @returns runeforgePowerIDs
* @see https://wow.gamepedia.com/API_C_LegendaryCrafting.GetRuneforgePowersByClassAndSpec
* @since 9.0.1 (2020-10-13)
*/
function GetRuneforgePowersByClassAndSpec(classID: WoWAPI.CLASS_ID, specId: number, filter: Enum.RuneforgePowerFilter): number[];
/**
* Needs summary
* @param runeforgePowerID
* @see https://wow.gamepedia.com/API_C_LegendaryCrafting.GetRuneforgePowerSlots
* @since 9.0.1 (2020-10-13)
*/
function GetRuneforgePowerSlots(runeforgePowerID: number): string[];
/**
* Needs summary
* @param item
* @see https://wow.gamepedia.com/API_C_LegendaryCrafting.IsRuneforgeLegendary
* @since 9.0.1 (2020-10-13)
*/
function IsRuneforgeLegendary(item: ItemLocation.ItemLocationMixin): boolean;
/**
* Needs summary
* @param runeforgeLegendary
* @see https://wow.gamepedia.com/API_C_LegendaryCrafting.IsRuneforgeLegendaryMaxLevel
* @since 9.0.1 (2020-10-13)
*/
function IsRuneforgeLegendaryMaxLevel(runeforgeLegendary: ItemLocation.ItemLocationMixin): boolean;
/**
* Needs summary
* @param runeforgeLegendary
* @param upgradeItem
* @see https://wow.gamepedia.com/API_C_LegendaryCrafting.IsUpgradeItemValidForRuneforgeLegendary
* @since 9.0.1 (2020-10-13)
*/
function IsUpgradeItemValidForRuneforgeLegendary(runeforgeLegendary: ItemLocation.ItemLocationMixin, upgradeItem: ItemLocation.ItemLocationMixin): boolean;
/**
* Needs summary
* @param baseItem
* @see https://wow.gamepedia.com/API_C_LegendaryCrafting.IsValidRuneforgeBaseItem
* @since 9.0.1 (2020-10-13)
*/
function IsValidRuneforgeBaseItem(baseItem: ItemLocation.ItemLocationMixin): boolean;
/**
* Needs summary
* @param baseItem
* @param runeforgePowerId
* @param modifiers
* @returns runeforgeLegendaryCraftDescription
* @see https://wow.gamepedia.com/API_C_LegendaryCrafting.MakeRuneforgeCraftDescription
* @since 9.0.1 (2020-10-13)
*/
function MakeRuneforgeCraftDescription(baseItem: ItemLocation.ItemLocationMixin, runeforgePowerId: number, modifiers: number[]): WoWAPI.Unknown;
/**
* Needs summary.
* @param runeforgeLegendary
* @param upgradeItem
* @see https://wow.gamepedia.com/API_C_LegendaryCrafting.UpgradeRuneforgeLegendary
* @since 9.0.1 (2020-10-13)
*/
function UpgradeRuneforgeLegendary(runeforgeLegendary: ItemLocation.ItemLocationMixin, upgradeItem: ItemLocation.ItemLocationMixin): void;
}

View File

@@ -1,9 +0,0 @@
declare namespace C_Loot {
/**
* Needs summary
* @see https://wow.gamepedia.com/API_C_Loot.IsLegacyLootModeEnabled
* @since 8.1.0 (2018-12-11)
*/
function IsLegacyLootModeEnabled(): boolean;
}

View File

@@ -1,70 +0,0 @@
declare namespace C_Map {
/**
* Needs summary
* @see https://wow.gamepedia.com/API_C_Map.CloseWorldMapInteraction
* @since 8.3.0 (2020-01-14)
*/
function CloseWorldMapInteraction(): void;
/**
* Returns a map subzone name
* @param areaId areaTableID.
* @returns name
* @see https://wow.gamepedia.com/API_C_Map.GetAreaInfo
* @see https://wow.gamepedia.com/AreaTableID
* @since 8.0.1 (2018-07-17)
*/
function GetAreaInfo(areaId: number): string;
/**
* Returns the current UI map for the given unit. Only works for the player and party members
* @param unitToken unitId
* @returns uiMapID Returns the "lowest" UiMapID the unit is on. For example, if a unit is in
* a microdungeon it will return that instead of the zone or continent map
* @see https://wow.gamepedia.com/API_C_Map.GetBestMapForUnit
* @since 8.0.1 (2018-07-17)
*/
function GetBestMapForUnit(unitToken: WoWAPI.UnitId): number | null;
/**
* Returns the maps for a bounty
* @param bountySetID from BountySet.db2
* @returns mapIDs
* @see https://wow.gamepedia.com/API_C_Map.GetBountySetMaps
* @see https://wow.tools/dbc/?dbc=bountyset
* @see https://wow.gamepedia.com/UiMapID
* @since 8.1.0 (2018-12-11)
*/
function GetBountySetMaps(bountySetID: number): number[];
/**
* Returns the world map id
* @see https://wow.gamepedia.com/API_C_Map.GetFallbackWorldMapID
* @since 8.0.1 (2018-07-17)
*/
function GetFallbackWorldMapID(): number;
/**
* Returns the background atlas for a map
* @see https://wow.gamepedia.com/API_C_Map.GetMapArtBackgroundAtlas
* @since 8.0.1 (2018-07-17)
*/
function GetFallbackWorldMapID(uiMapID: number): WoWAPI.AtlasID;
/**
* Returns the position for the "Click to Zoom In" hint text on flight maps
* @see https://wow.gamepedia.com/API_C_Map.GetMapArtHelpTextPosition
* @since 8.0.1 (2018-07-17)
*/
function GetMapArtHelpTextPosition(uiMapID: number): Enum.MapCanvasPosition;
/**
* Returns the art for a (phased) map
* @see https://wow.gamepedia.com/API_C_Map.GetMapArtID
* @since 8.0.1 (2018-07-17)
*/
function GetMapArtID(uiMapID: number): number;
// next todo: GetMapArtLayers
}

View File

@@ -1,28 +0,0 @@
declare namespace C_NewItems {
/**
* Clears the new item flag on all items in the player's inventory
* @see https://wow.gamepedia.com/API_C_NewItems.ClearAll
* @since 5.4.0 (2013-09-10)
*/
function GetItemHyperlink(): void;
/**
* Returns whether an inventory slot holds a newly-acquired item
* @param bagId BagID of the container
* @param slotIndex ID of the inventory slot within the container
* @returns Returns true if the inventory slot holds a newly-acquired item; otherwise false (empty slot or a non-new item).
* @see https://wow.gamepedia.com/API_C_NewItems.IsNewItem
* @since 5.4.0 (2013-09-10)
*/
function IsNewItem(bagId: WoWAPI.CONTAINER_ID, slotIndex: number): boolean;
/**
* Clears the "new item" flag
* @param bagId container slot id
* @param slotIndex slot within the bag to clear the "new item" flag for
* @see https://wow.gamepedia.com/API_C_NewItems.RemoveNewItem
* @since 5.4.0 (2013-09-10)
*/
function RemoveNewItem(bagId: WoWAPI.CONTAINER_ID, slotIndex: number): void;
}

View File

@@ -1,12 +0,0 @@
declare namespace C_RaidLocks {
/**
* Needs summary
* @param mapId
* @param encounterId
* @param difficultyId
* @see https://wow.gamepedia.com/API_C_RaidLocks.IsEncounterComplete
* @since 8.2.0 (2019-06-25)
*/
function IsEncounterComplete(mapId: number, encounterId: number, difficultyId?: number): boolean;
}

View File

@@ -1,424 +0,0 @@
declare namespace WoWAPI {
interface ConduitCollectionData {
conduitID: number;
conduitRank: number;
conduitItemLevel: number;
conduitType: Enum.SoulbindConduitType;
conduitSpecSetID: number;
conduitSpecIDs: number[];
conduitSpecName: string | null;
covenantID: Enum.CovenantType;
conduitItemID: number;
}
interface SoulbindNode {
ID: number;
row: number;
column: number;
icon: number;
spellID: number;
playerConditionReason: string | null;
conduitID: number;
conduitRank: number;
state: Enum.SoulbindNodeState;
conduitType: Enum.SoulbindConduitType;
parentNodeIDs: number[];
failureRenownRequirement: number | null;
}
interface SoulbindData {
ID: number;
covenantID: Enum.CovenantType;
name: string;
description: string;
textureKit: string;
unlocked: boolean;
cvarIndex: number;
tree: SoulbindTree;
modelSceneData: SoulbindModelSceneData;
activationSoundKitID: number;
}
interface SoulbindTree {
editable: boolean;
nodes: SoulbindNode[];
}
interface SoulbindModelSceneData {
creatureDisplayInfoID: number;
modelSceneActorID: number;
}
}
/**
* Relates to Soulbinding and Conduits
* @see https://wow.gamepedia.com/Soulbinding
*/
declare namespace C_Soulbinds {
/**
* Needs summary
* @param soulbindID
* @see https://wow.gamepedia.com/API_C_Soulbinds.ActivateSoulbind
* @since 9.0.1 (2020-10-13)
*/
function ActivateSoulbind(soulbindID: number): void;
/**
* Needs summary
* @param soulbindID
* @returns result and errorDescription
* @see https://wow.gamepedia.com/API_C_Soulbinds.CanActivateSoulbind
* @since 9.0.1 (2020-10-13)
*/
function CanActivateSoulbind(soulbindID: number): [boolean, string?];
/**
* Needs summary
* @see https://wow.gamepedia.com/API_C_Soulbinds.CanModifySoulbind
* @since 9.0.1 (2020-10-13)
*/
function CanModifySoulbind(): boolean;
/**
* Needs summary
* @param soulbindID
* @returns result and errorDescription
* @see https://wow.gamepedia.com/API_C_Soulbinds.CanResetConduitsInSoulbind
* @since 9.0.1 (2020-10-13)
*/
function CanResetConduitsInSoulbind(soulbindID: number): [boolean, string?];
/**
* Needs summary
* @see https://wow.gamepedia.com/API_C_Soulbinds.CanSwitchActiveSoulbindTreeBranch
* @since 9.0.2 (2020-11-17)
*/
function CanSwitchActiveSoulbindTreeBranch(): boolean;
/**
* Needs summary
* @see https://wow.gamepedia.com/API_C_Soulbinds.CloseUI
* @since 9.0.1 (2020-10-13)
*/
function CloseUI(): boolean;
/**
* Needs summary
* @param soulbindID
* @see https://wow.gamepedia.com/API_C_Soulbinds.CommitPendingConduitsInSoulbind
* @since 9.0.1 (2020-10-13)
*/
function CommitPendingConduitsInSoulbind(soulbindID: number): void;
/**
* Needs summary
* @param soulbindID
* @param conduitID
* @returns nodeId
* @see https://wow.gamepedia.com/API_C_Soulbinds.FindNodeIDActuallyInstalled
* @since 9.0.2 (2020-11-17)
*/
function FindNodeIDActuallyInstalled(soulbindID: number, conduitID: number): number;
/**
* Needs summary
* @param soulbindID
* @param conduitID
* @returns nodeId
* @see https://wow.gamepedia.com/API_C_Soulbinds.FindNodeIDPendingInstall
* @since 9.0.2 (2020-11-17)
*/
function FindNodeIDAppearingInstalled(soulbindID: number, conduitID: number): number;
/**
* Needs summary
* @param soulbindID
* @param conduitID
* @returns nodeId
* @see https://wow.gamepedia.com/API_C_Soulbinds.FindNodeIDAppearingInstalled
* @since 9.0.2 (2020-11-17)
*/
function FindNodeIDPendingInstall(soulbindID: number, conduitID: number): number;
/**
* Needs summary
* @param soulbindID
* @param conduitID
* @returns nodeId
* @see https://wow.gamepedia.com/API_C_Soulbinds.FindNodeIDPendingUninstall
* @since 9.0.2 (2020-11-17)
*/
function FindNodeIDPendingUninstall(soulbindID: number, conduitID: number): number;
/**
* Needs summary
* @returns soulbindID
* @see https://wow.gamepedia.com/API_C_Soulbinds.GetActiveSoulbindID
* @since 9.0.1 (2020-10-13)
*/
function GetActiveSoulbindID(): number;
/**
* Needs summary
* @returns charges
* @see https://wow.gamepedia.com/API_C_Soulbinds.GetConduitCharges
* @since 9.0.2 (2020-11-17)
*/
function GetConduitCharges(): number;
/**
* Needs summary
* @returns charges
* @see https://wow.gamepedia.com/API_C_Soulbinds.GetConduitChargesCapacity
* @since 9.0.2 (2020-11-17)
*/
function GetConduitChargesCapacity(): number;
/**
* Needs summary
* @see https://wow.gamepedia.com/API_C_Soulbinds.GetConduitCollection
* @since 9.0.1 (2020-10-13)
*/
function GetConduitCollection(): WoWAPI.ConduitCollectionData[];
/**
* Needs summary
* @returns charges
* @see https://wow.gamepedia.com/API_C_Soulbinds.GetConduitCollectionCount
* @since 9.0.2 (2020-11-17)
*/
function GetConduitCollectionCount(): number;
/**
* Needs summary
* @param conduitID
* @see https://wow.gamepedia.com/API_C_Soulbinds.GetConduitCollectionData
* @since 9.0.1 (2020-10-13)
*/
function GetConduitCollectionData(conduitID: number): WoWAPI.ConduitCollectionData | null;
/**
* Needs summary
* @see https://wow.gamepedia.com/API_C_Soulbinds.GetConduitCollectionDataAtCursor
* @since 9.0.1 (2020-10-13)
*/
function GetConduitCollectionDataAtCursor(): WoWAPI.ConduitCollectionData | null;
/**
* Needs summary
* @see https://wow.gamepedia.com/API_C_Soulbinds.GetConduitCollectionDataByVirtualID
* @since 9.0.2 (2020-11-17)
*/
function GetConduitCollectionDataByVirtualID(virtualID: number): WoWAPI.ConduitCollectionData | null;
/**
* Needs summary
* @param nodeId
* @see https://wow.gamepedia.com/API_C_Soulbinds.GetConduitDisplayed
* @since 9.0.2 (2020-11-17)
*/
function GetConduitDisplayed(nodeId: number): number;
/**
* Needs summary
* @param conduitId
* @param rank Returned from C_Soulbinds.GetConduitRankFromCollection()
* @see https://wow.gamepedia.com/API_C_Soulbinds.GetConduitHyperlink
* @since 9.0.1 (2020-10-13)
*/
function GetConduitHyperlink(conduitId: number, rank: number): WoWAPI.Hyperlink;
/**
* Needs summary
* @param nodeId
* @returns conduitID
* @see https://wow.gamepedia.com/API_C_Soulbinds.GetConduitIDPendingInstall
* @since 9.0.2 (2020-11-17)
*/
function GetConduitIDPendingInstall(nodeId: number): number;
/**
* Needs summary
* @param conduitId
* @param rank Returned from C_Soulbinds.GetConduitRankFromCollection()
* @returns itemLevel
* @see https://wow.gamepedia.com/API_C_Soulbinds.GetConduitItemLevel
* @since 9.0.1 (2020-10-13)
*/
function GetConduitItemLevel(conduitId: number, rank: number): number;
/**
* Needs summary
* @param conduitId
* @param rank Returned from C_Soulbinds.GetConduitRankFromCollection()
* @returns itemLevel
* @see https://wow.gamepedia.com/API_C_Soulbinds.GetConduitQuality
* @since 9.0.1 (2020-10-13)
*/
function GetConduitItemLevel(conduitId: number, rank: number): WoWAPI.ITEM_QUALITY;
/**
* Needs summary
* @param conduitID
* @returns conduitRank
* @see https://wow.gamepedia.com/API_C_Soulbinds.GetConduitRankFromCollection
* @since 9.0.2 (2020-11-17)
*/
function GetConduitRankFromCollection(conduitID: number): number;
/**
* Needs summary
* @param conduitId
* @param rank Returned from C_Soulbinds.GetConduitRankFromCollection()
* @returns spellId
* @see https://wow.gamepedia.com/API_C_Soulbinds.GetConduitSpellID
* @since 9.0.1 (2020-10-13)
*/
function GetConduitSpellID(conduitId: number, rank: number): number;
/**
* Needs summary
* @param nodeId
* @returns conduitID
* @see https://wow.gamepedia.com/API_C_Soulbinds.GetInstalledConduitID
* @since 9.0.2 (2020-11-17)
*/
function GetInstalledConduitID(nodeId: number): number;
/**
* Needs summary
* @param nodeId
* @returns conduitID
* @see https://wow.gamepedia.com/API_C_Soulbinds.GetNode
* @since 9.0.1 (2020-10-13)
*/
function GetNode(nodeId: number): WoWAPI.SoulbindNode;
/**
* Needs summary
* @param soulbindID
* @see https://wow.gamepedia.com/API_C_Soulbinds.GetSoulbindData
* @since 9.0.1 (2020-10-13)
*/
function GetSoulbindData(soulbindID: number): WoWAPI.SoulbindData;
/**
* Needs summary
* @returns count
* @see https://wow.gamepedia.com/API_C_Soulbinds.GetTotalConduitChargesPending
* @since 9.0.2 (2020-11-17)
*/
function GetTotalConduitChargesPending(): number;
/**
* Needs summary
* @param soulbindID
* @returns count
* @see https://wow.gamepedia.com/API_C_Soulbinds.GetTotalConduitChargesPendingInSoulbind
* @since 9.0.2 (2020-11-17)
*/
function GetTotalConduitChargesPendingInSoulbind(soulbindID: number): number;
/**
* Needs summary
* @param treeId
* @see https://wow.gamepedia.com/API_C_Soulbinds.GetTree
* @since 9.0.1 (2020-10-13)
*/
function GetTree(treeId: number): WoWAPI.SoulbindTree;
/**
* Needs summary
* @param soulbindID
* @see https://wow.gamepedia.com/API_C_Soulbinds.HasAnyInstalledConduitInSoulbind
* @since 9.0.1 (2020-10-13)
*/
function HasAnyInstalledConduitInSoulbind(soulbindID: number): boolean;
/**
* Needs summary
* @see https://wow.gamepedia.com/API_C_Soulbinds.HasAnyPendingConduits
* @since 9.0.1 (2020-10-13)
*/
function HasAnyPendingConduits(): boolean;
/**
* Needs summary
* @param soulbindID
* @see https://wow.gamepedia.com/API_C_Soulbinds.HasPendingConduitsInSoulbind
* @since 9.0.1 (2020-10-13)
*/
function HasPendingConduitsInSoulbind(soulbindID: number): boolean;
/**
* Needs summary
* @param nodeId
* @see https://wow.gamepedia.com/API_C_Soulbinds.IsConduitInstalled
* @since 9.0.1 (2020-10-13)
*/
function IsConduitInstalled(nodeId: number): boolean;
/**
* Needs summary
* @param soulbindID
* @param conduitID
* @see https://wow.gamepedia.com/API_C_Soulbinds.IsConduitInstalledInSoulbind
* @since 9.0.1 (2020-10-13)
*/
function IsConduitInstalledInSoulbind(soulbindID: number, conduitID: number): boolean;
/**
* Needs summary
* @param itemInfo
* @see https://wow.gamepedia.com/API_C_Soulbinds.IsItemConduitByItemInfo
* @since 9.0.1 (2020-10-13)
*/
function IsItemConduitByItemInfo(itemInfo: string): boolean;
/**
* Needs summary
* @param nodeId
* @see https://wow.gamepedia.com/API_C_Soulbinds.IsNodePendingModify
* @since 9.0.2 (2020-11-17)
*/
function IsNodePendingModify(nodeId: number): boolean;
/**
* Needs summary
* @param soulbindID
* @see https://wow.gamepedia.com/API_C_Soulbinds.IsUnselectedConduitPendingInSoulbind
* @since 9.0.1 (2020-10-13)
*/
function IsUnselectedConduitPendingInSoulbind(soulbindID: number): boolean;
/**
* Needs summary
* @param nodeId
* @param conduitId
* @param type
* @see https://wow.gamepedia.com/API_C_Soulbinds.ModifyNode
* @since 9.0.2 (2020-11-17)
*/
function ModifyNode(nodeId: number, conduitId: number, type: Enum.SoulbindConduitTransactionType): WoWAPI.Unknown;
/**
* Needs summary
* @param nodeID
* @see https://wow.gamepedia.com/API_C_Soulbinds.SelectNode
* @since 9.0.1 (2020-10-13)
*/
function SelectNode(nodeID: number): void;
/**
* Needs summary
* @param nodeID
* @see https://wow.gamepedia.com/API_C_Soulbinds.UnmodifyNode
* @since 9.0.2 (2020-11-17)
*/
function UnmodifyNode(nodeID: number): void;
}

View File

@@ -1,38 +0,0 @@
/// <reference path="../atlas.d.ts" />
declare namespace C_Spell {
/**
* unknown behaviour
* @param spellId
* @returns rarityBorderAtlas
* @see https://wow.gamepedia.com/API_C_Spell.GetMawPowerBorderAtlasBySpellID
* @since 9.0.2 (2020-11-17)
*/
function GetMawPowerBorderAtlasBySpellID(spellId: number): WoWAPI.AtlasID;
/**
* Needs summary
* @param spellId
* @see https://wow.gamepedia.com/API_C_Spell.DoesSpellExist
* @since 8.0.1 (2018-07-17)
*/
function DoesSpellExist(spellId: number): boolean;
/**
* Needs summary
* @param spellId
* @see https://wow.gamepedia.com/API_C_Spell.IsSpellDataCached
* @since 8.0.1 (2018-07-17)
*/
function IsSpellDataCached(spellId: number): boolean;
/**
* Asynchronously downloads spell information to the game client, making the full details available for subsequent calls to GetSpellInfo(spellId).
* @param spellId
* @fires SPELL_DATA_LOAD_RESULT
* @see https://wow.gamepedia.com/API_C_Spell.RequestLoadSpellData
* @since 8.0.1 (2018-07-17)
*/
function RequestLoadSpellData(spellId: number): boolean;
}

View File

@@ -1,25 +0,0 @@
declare namespace C_SpellBook {
/**
* Needs summary
* @see https://wow.gamepedia.com/API_C_SpellBook.ContainsAnyDisenchantSpell
* @since 8.2.0 (2019-06-25)
*/
function ContainsAnyDisenchantSpell(): boolean;
/**
* Needs summary
* @param skillLineId
* @see https://wow.gamepedia.com/API_C_SpellBook.GetSkillLineIndexByID
* @since 9.0.1 (2020-10-13)
*/
function GetSkillLineIndexByID(skillLineId: number): number | undefined;
/**
* Needs summary
* @param spellId
* @see https://wow.gamepedia.com/API_C_SpellBook.IsSpellDisabled
* @since 8.2.5 (2019-09-24)
*/
function IsSpellDisabled(spellId: number): boolean;
}

View File

@@ -1,20 +0,0 @@
import "./C_AchivementInfo";
import "./C_AdventureJournal";
import "./C_AnimaDiversion";
import "./C_ArdenwealdGardening";
import "./C_CovenantCallings";
import "./C_CovenantPreview";
import "./C_Covenants";
import "./C_CovenantSanctumUI";
import "./C_EncounterJournal";
import "./C_Item";
import "./C_ItemInteraction";
import "./C_ItemUpgrade";
import "./C_LegendaryCrafting";
import "./C_Loot";
import "./C_Map";
import "./C_NewItems";
import "./C_RaidLocks";
import "./C_Soulbinds";
import "./C_Spell";
import "./C_SpellBook";

View File

@@ -1,59 +1,59 @@
/** @noSelfInFile */
declare namespace WoWAPI {
type EmoteToken = "AGREE" | "AMAZE" | "ANGRY" | "APOLOGIZE" | "APPLAUD" | "ATTACKMYTARGET" | "BARK" | "BASHFUL" | "BECKON" |
"BEG" | "BURP" | "BITE" | "BLEED" | "BLINK" | "KISS" | "BLUSH" | "BOGGLE" | "BONK" | "BORED" | "BOUNCE" | "BOW" | "BRB" | "BYE" | "CACKLE" |
"CALM" | "SCRATCH" | "CHARGE" | "CHEER" | "EAT" | "CHICKEN" | "CHUCKLE" | "CLAP" | "COLD" | "COMFORT" | "COMMEND" | "CONFUSED" |
"CONGRATULATE" | "COUGH" | "COWER" | "CRACK" | "CRINGE" | "CRY" | "CUDDLE" | "CURIOUS" | "CURTSEY" | "DANCE" | "FROWN" | "BONK" |
"THREATEN" | "DRINK" | "DROOL" | "DUCK" | "EAT" | "TALKEX" | "EYE" | "FART" | "FIDGET" | "FLEE" | "FLEX" | "FLIRT" | "FLOP" | "FOLLOW" |
"HUNGRY" | "GASP" | "GAZE" | "GIGGLE" | "HAPPY" | "GLARE" | "GLOAT" | "GOLFCAP" | "GREET" | "GRIN" | "GROAN" | "GROVEL" | "GROWL" |
"GUFFAW" | "HAIL" | "HEALME" | "HELLO" | "HELPME" | "HUG" | "INCOMING" | "INSULT" | "INTRODUCE" | "JK" | "KNEEL" | "LAUGH" | "PRAISE" |
"LAYDOWN" | "LICK" | "LISTEN" | "LOST" | "LOVE" | "MASSAGE" | "MOAN" | "MOCK" | "MOO" | "MOON" | "MOURN" | "NO" | "NOD" | "NOSEPICK" |
"OOM" | "OPENFIRE" | "PANIC" | "PAT" | "PEER" | "SHOO" | "PITY" | "PLEAD" | "POINT" | "POKE" | "PONDER" | "POUNCE" | "PRAY" | "PURR" |
"PUZZLE" | "TALKQ" | "RAISE" | "RASP" | "READY" | "SHAKE" | "ROAR" | "ROFL" | "RUDE" | "SALUTE" | "SCARED" | "SCRATCH" | "SEXY" | "SHAKE" |
"SHIMMY" | "SHIVER" | "SHRUG" | "SHY" | "SIGH" | "JOKE" | "SLAP" | "SLEEP" | "STINK" | "SMILE" | "SMIRK" | "SNARL" | "SNICKER" | "SNIFF" |
"SNUB" | "SOOTHE" | "SPIT" | "STARE" | "STAND" | "SURPRISED" | "SURRENDER" | "TAP" | "TALK" | "TAUNT" | "TEASE" | "THANK" | "THIRSTY" |
"TICKLE" | "TIRED" | "TRAIN" | "VETO" | "VICTORY" | "VIOLIN" | "WAIT" | "WAVE" | "WELCOME" | "WHINE" | "WHISTLE" | "WINK" | "WORK" | "YAWN";
}
/**
* Executes one of the emotes based on the given token, including vocal emotes and animations. The list of currently valid emotes is
* given in ChatFrame.lua, defined as one of the EMOTEx_TOKEN constants. x starts at 1 and goes up to ChatFrame.lua's local variable
* MAXEMOTEINDEX (which is 452 in WotLK 3.3.0).
* @param emote the token that describes which emote is being used. See Emotes Tokens
* @param target UnitId of who the emote will be performed on. If nil, then it performs the emote on your current target, or yourself
* if you don't have a target. If the specified target does not exist or is out of range, then it performs the emote on yourself.
* @see https://wow.gamepedia.com/API_DoEmote
*/
declare function DoEmote(emote: WoWAPI.EmoteToken, target?: WoWAPI.UnitId): void;
/**
* Returns the Language used by the indicated Player
* @param unit unit whose default language you wish to query
* @returns the default language of the indicated object, usually the faction's common language (i.e. "Common" and "Orcish").
* @see https://wow.gamepedia.com/API_GetDefaultLanguage
*/
declare function GetDefaultLanguage(unit: WoWAPI.UnitId): string;
/**
* Returns the language specified by the index that your character can speak
* @param index The index starting at 1.
* @returns Returns the LanguageID
* @see https://wow.gamepedia.com/API_GetLanguageByIndex
*/
declare function GetLanguageByIndex(index: number): WoWAPI.ChannelLanguageId;
/**
* Returns the number of languages your character can speak
* @returns Returns the number of languages your character can speak
* @see https://wow.gamepedia.com/API_GetNumLanguages
*/
declare function GetNumLanguages(): number;
/**
* Performs a random roll between two numbers
* @param low lowest number (default 1)
* @param high highest number (default 100)
* @see https://wow.gamepedia.com/API_RandomRoll
*/
declare function RandomRoll(low?: number, high?: number): void;
/** @noSelfInFile */
declare namespace WoWAPI {
type EmoteToken = "AGREE" | "AMAZE" | "ANGRY" | "APOLOGIZE" | "APPLAUD" | "ATTACKMYTARGET" | "BARK" | "BASHFUL" | "BECKON" |
"BEG" | "BURP" | "BITE" | "BLEED" | "BLINK" | "KISS" | "BLUSH" | "BOGGLE" | "BONK" | "BORED" | "BOUNCE" | "BOW" | "BRB" | "BYE" | "CACKLE" |
"CALM" | "SCRATCH" | "CHARGE" | "CHEER" | "EAT" | "CHICKEN" | "CHUCKLE" | "CLAP" | "COLD" | "COMFORT" | "COMMEND" | "CONFUSED" |
"CONGRATULATE" | "COUGH" | "COWER" | "CRACK" | "CRINGE" | "CRY" | "CUDDLE" | "CURIOUS" | "CURTSEY" | "DANCE" | "FROWN" | "BONK" |
"THREATEN" | "DRINK" | "DROOL" | "DUCK" | "EAT" | "TALKEX" | "EYE" | "FART" | "FIDGET" | "FLEE" | "FLEX" | "FLIRT" | "FLOP" | "FOLLOW" |
"HUNGRY" | "GASP" | "GAZE" | "GIGGLE" | "HAPPY" | "GLARE" | "GLOAT" | "GOLFCAP" | "GREET" | "GRIN" | "GROAN" | "GROVEL" | "GROWL" |
"GUFFAW" | "HAIL" | "HEALME" | "HELLO" | "HELPME" | "HUG" | "INCOMING" | "INSULT" | "INTRODUCE" | "JK" | "KNEEL" | "LAUGH" | "PRAISE" |
"LAYDOWN" | "LICK" | "LISTEN" | "LOST" | "LOVE" | "MASSAGE" | "MOAN" | "MOCK" | "MOO" | "MOON" | "MOURN" | "NO" | "NOD" | "NOSEPICK" |
"OOM" | "OPENFIRE" | "PANIC" | "PAT" | "PEER" | "SHOO" | "PITY" | "PLEAD" | "POINT" | "POKE" | "PONDER" | "POUNCE" | "PRAY" | "PURR" |
"PUZZLE" | "TALKQ" | "RAISE" | "RASP" | "READY" | "SHAKE" | "ROAR" | "ROFL" | "RUDE" | "SALUTE" | "SCARED" | "SCRATCH" | "SEXY" | "SHAKE" |
"SHIMMY" | "SHIVER" | "SHRUG" | "SHY" | "SIGH" | "JOKE" | "SLAP" | "SLEEP" | "STINK" | "SMILE" | "SMIRK" | "SNARL" | "SNICKER" | "SNIFF" |
"SNUB" | "SOOTHE" | "SPIT" | "STARE" | "STAND" | "SURPRISED" | "SURRENDER" | "TAP" | "TALK" | "TAUNT" | "TEASE" | "THANK" | "THIRSTY" |
"TICKLE" | "TIRED" | "TRAIN" | "VETO" | "VICTORY" | "VIOLIN" | "WAIT" | "WAVE" | "WELCOME" | "WHINE" | "WHISTLE" | "WINK" | "WORK" | "YAWN";
}
/**
* Executes one of the emotes based on the given token, including vocal emotes and animations. The list of currently valid emotes is
* given in ChatFrame.lua, defined as one of the EMOTEx_TOKEN constants. x starts at 1 and goes up to ChatFrame.lua's local variable
* MAXEMOTEINDEX (which is 452 in WotLK 3.3.0).
* @param emote the token that describes which emote is being used. See Emotes Tokens
* @param target UnitId of who the emote will be performed on. If nil, then it performs the emote on your current target, or yourself
* if you don't have a target. If the specified target does not exist or is out of range, then it performs the emote on yourself.
* @see https://wow.gamepedia.com/API_DoEmote
*/
declare function DoEmote(emote: WoWAPI.EmoteToken, target?: WoWAPI.UnitId): void;
/**
* Returns the Language used by the indicated Player
* @param unit unit whose default language you wish to query
* @returns the default language of the indicated object, usually the faction's common language (i.e. "Common" and "Orcish").
* @see https://wow.gamepedia.com/API_GetDefaultLanguage
*/
declare function GetDefaultLanguage(unit: WoWAPI.UnitId): string;
/**
* Returns the language specified by the index that your character can speak
* @param index The index starting at 1.
* @returns Returns the LanguageID
* @see https://wow.gamepedia.com/API_GetLanguageByIndex
*/
declare function GetLanguageByIndex(index: number): WoWAPI.ChannelLanguageId;
/**
* Returns the number of languages your character can speak
* @returns Returns the number of languages your character can speak
* @see https://wow.gamepedia.com/API_GetNumLanguages
*/
declare function GetNumLanguages(): number;
/**
* Performs a random roll between two numbers
* @param low lowest number (default 1)
* @param high highest number (default 100)
* @see https://wow.gamepedia.com/API_RandomRoll
*/
declare function RandomRoll(low?: number, high?: number): void;

View File

@@ -1,76 +1,76 @@
/** @noSelfInFile */
declare namespace WoWAPI {
type CompanionType = "CRITTER" | "MOUNT";
type MountType = 0x1 | 0x2 | 0x4 | 0x8 | 0x10;
}
/**
* Summons the specified companion
* @param type The type of companion to summon or dismiss: "CRITTER" or "MOUNT"
* @param id The companion index to summon or dismiss, ascending from 1
* @see https://wow.gamepedia.com/API_CallCompanion
* @since 3.0.2
*/
declare function CallCompanion(type: WoWAPI.CompanionType, companionIndex: number): void;
/**
* Dismisses a currently-summoned mount or non-combat pet
* @param type type of companion to dismiss, either "MOUNT" or "CRITTER".
* @see https://wow.gamepedia.com/API_DismissCompanion
* @since 3.0.2
*/
declare function DismissCompanion(type: WoWAPI.CompanionType): void;
/**
* Returns information about the companions you have
* @param type Companion type to query: "CRITTER" or "MOUNT".
* @param companionIndex Index of the slot to query. Starting at 1 and going up to GetNumCompanions("type").
* @returns **
* - **creatureID**: The NPC ID of the companion
* - **creatureName**: The name of the companion
* - **creatureSpellID**: The spell ID to cast the companion. This is not passed to CallCompanion, but can be used with, e.g., GetSpellInfo
* - **icon**: The texture of the icon for the companion
* - **issummoned**: 1 if the companion is summoned, nil if it's not
* - **mountType**: Bitfield for air/ground/water mounts
* - 0x1: Ground
* - 0x2: Can fly
* - 0x4: ? (set for most mounts)
* - 0x8: Underwater
* - 0x10: Can jump (turtles cannot)
* @deprecated use C_MountJournal.GetMountInfoByID()
* @see https://wow.gamepedia.com/API_GetCompanionInfo
* @since 3.0.2
* @tupleReturn
*/
// tslint:disable-next-line max-line-length
declare function GetCompanionInfo(type: WoWAPI.CompanionType, companionIndex: number): [number, string, number, WoWAPI.TexturePath, WoWAPI.Flag, WoWAPI.MountType];
/**
* Returns the number of companions you have
* @param type Type of companions to count: "CRITTER", or "MOUNT".
* @returns The number of companions of a specific type
* @see https://wow.gamepedia.com/API_GetNumCompanions
* @since 3.0.2
*/
declare function GetNumCompanions(type: WoWAPI.CompanionType): number;
/**
* Places a companion onto the mouse cursor
* @param type companion type, either "MOUNT" or "CRITTER"
* @param companionIndex index of the companion of the specified type to place on the cursor, ascending from 1.
* @protected NOCOMBAT
* @see https://wow.gamepedia.com/API_PickupCompanion
* @since 3.0.2
*/
declare function PickupCompanion(type: WoWAPI.CompanionType, companionIndex: number): void;
/**
* Summons a random non-combat pet companion
* @description This function is part of the companions API that was deprecated for battle-pets with the introduction of the Pet Journal.
* Calling it will result in UI_ERROR_MESSAGE being fired
* @deprecated Use C_PetJournal.SummonRandomPet instead
* @since 3.3.3
* @see https://wow.gamepedia.com/API_SummonRandomCritter
*/
declare function SummonRandomCritter(): void;
/** @noSelfInFile */
declare namespace WoWAPI {
type CompanionType = "CRITTER" | "MOUNT";
type MountType = 0x1 | 0x2 | 0x4 | 0x8 | 0x10;
}
/**
* Summons the specified companion
* @param type The type of companion to summon or dismiss: "CRITTER" or "MOUNT"
* @param id The companion index to summon or dismiss, ascending from 1
* @see https://wow.gamepedia.com/API_CallCompanion
* @since 3.0.2
*/
declare function CallCompanion(type: WoWAPI.CompanionType, companionIndex: number): void;
/**
* Dismisses a currently-summoned mount or non-combat pet
* @param type type of companion to dismiss, either "MOUNT" or "CRITTER".
* @see https://wow.gamepedia.com/API_DismissCompanion
* @since 3.0.2
*/
declare function DismissCompanion(type: WoWAPI.CompanionType): void;
/**
* Returns information about the companions you have
* @param type Companion type to query: "CRITTER" or "MOUNT".
* @param companionIndex Index of the slot to query. Starting at 1 and going up to GetNumCompanions("type").
* @returns **
* - **creatureID**: The NPC ID of the companion
* - **creatureName**: The name of the companion
* - **creatureSpellID**: The spell ID to cast the companion. This is not passed to CallCompanion, but can be used with, e.g., GetSpellInfo
* - **icon**: The texture of the icon for the companion
* - **issummoned**: 1 if the companion is summoned, nil if it's not
* - **mountType**: Bitfield for air/ground/water mounts
* - 0x1: Ground
* - 0x2: Can fly
* - 0x4: ? (set for most mounts)
* - 0x8: Underwater
* - 0x10: Can jump (turtles cannot)
* @deprecated use C_MountJournal.GetMountInfoByID()
* @see https://wow.gamepedia.com/API_GetCompanionInfo
* @since 3.0.2
* @tupleReturn
*/
// tslint:disable-next-line max-line-length
declare function GetCompanionInfo(type: WoWAPI.CompanionType, companionIndex: number): [number, string, number, WoWAPI.TexturePath, WoWAPI.Flag, WoWAPI.MountType];
/**
* Returns the number of companions you have
* @param type Type of companions to count: "CRITTER", or "MOUNT".
* @returns The number of companions of a specific type
* @see https://wow.gamepedia.com/API_GetNumCompanions
* @since 3.0.2
*/
declare function GetNumCompanions(type: WoWAPI.CompanionType): number;
/**
* Places a companion onto the mouse cursor
* @param type companion type, either "MOUNT" or "CRITTER"
* @param companionIndex index of the companion of the specified type to place on the cursor, ascending from 1.
* @protected NOCOMBAT
* @see https://wow.gamepedia.com/API_PickupCompanion
* @since 3.0.2
*/
declare function PickupCompanion(type: WoWAPI.CompanionType, companionIndex: number): void;
/**
* Summons a random non-combat pet companion
* @description This function is part of the companions API that was deprecated for battle-pets with the introduction of the Pet Journal.
* Calling it will result in UI_ERROR_MESSAGE being fired
* @deprecated Use C_PetJournal.SummonRandomPet instead
* @since 3.3.3
* @see https://wow.gamepedia.com/API_SummonRandomCritter
*/
declare function SummonRandomCritter(): void;

View File

@@ -1,174 +1,168 @@
/** @noSelfInFile */
declare const MAX_PLAYER_LEVEL_TABLE: {
LE_EXPANSION_CLASSIC: 60,
LE_EXPANSION_BURNING_CRUSADE: 70,
LE_EXPANSION_WRATH_OF_THE_LICH_KING: 80,
LE_EXPANSION_CATACLYSM: 85,
LE_EXPANSION_MISTS_OF_PANDARIA: 90,
LE_EXPANSION_WARLORDS_OF_DRAENOR: 100,
LE_EXPANSION_LEGION: 110,
LE_EXPANSION_BATTLE_FOR_AZEROTH: 120,
LE_EXPANSION_9_0: 120,
LE_EXPANSION_10_0: 120,
LE_EXPANSION_11_0: 120
};
declare const NPE_TUTORIAL_COMPLETE_LEVEL = 10;
declare const NORMAL_FONT_COLOR_CODE = "|cffffd200";
declare const HIGHLIGHT_FONT_COLOR_CODE = "|cffffffff";
declare const RED_FONT_COLOR_CODE = "|cffff2020";
declare const GREEN_FONT_COLOR_CODE = "|cff20ff20";
declare const GRAY_FONT_COLOR_CODE = "|cff808080";
declare const YELLOW_FONT_COLOR_CODE = "|cffffff00";
declare const LIGHTYELLOW_FONT_COLOR_CODE = "|cffffff9a";
declare const ORANGE_FONT_COLOR_CODE = "|cffff7f3f";
declare const ACHIEVEMENT_COLOR_CODE = "|cffffff00";
declare const BATTLENET_FONT_COLOR_CODE = "|cff82c5ff";
declare const DISABLED_FONT_COLOR_CODE = "|cff7f7f7f";
declare const FONT_COLOR_CODE_CLOSE = "|r";
declare const FACTION_BAR_COLORS: {
1: { r: .8, g: .3, b: .22 },
2: { r: .8, g: .3, b: .22 },
3: { r: .75, g: .27, b: 0 },
4: { r: .9, g: .7, b: 0 },
5: { r: 0, g: .6, b: .1 },
6: { r: 0, g: .7, b: .1 },
7: { r: 0, g: .7, b: .1 },
8: { r: 0, g: .7, b: .1 }
};
declare const WORLD_QUEST_ICONS_BY_PROFESSION: {
129: "worldquest-icon-firstaid",
164: "worldquest-icon-blacksmithing",
165: "worldquest-icon-leatherworking",
171: "worldquest-icon-alchemy",
182: "worldquest-icon-herbalism",
186: "worldquest-icon-mining",
202: "worldquest-icon-engineering",
333: "worldquest-icon-enchanting",
755: "worldquest-icon-jewelcrafting",
773: "worldquest-icon-inscription",
794: "worldquest-icon-archaeology",
356: "worldquest-icon-fishing",
185: "worldquest-icon-cooking",
197: "worldquest-icon-tailoring",
393: "worldquest-icon-skinning"
};
declare const CHAT_FONT_HEIGHTS: {
1: 12,
2: 14,
3: 16,
4: 18
};
declare const MATERIAL_TEXT_COLOR_TABLE: {
"Default": [.18, .12, .06],
"Stone": [1, 1, 1],
"Parchment": [.18, .12, .06],
"Marble": [0, 0, 0],
"Silver": [.12, .12, .12],
"Bronze": [.18, .12, .06],
"ParchmentLarge": [.141, 0, 0]
};
declare const MATERIAL_TITLETEXT_COLOR_TABLE: {
"Default": [0, 0, 0],
"Stone": [.93, .82, 0],
"Parchment": [0, 0, 0],
"Marble": [.93, .82, 0],
"Silver": [.93, .82, 0],
"Bronze": [.93, .82, 0],
"ParchmentLarge": [.208, 0, 0]
};
declare const CLASS_SORT_ORDER: [
"WARRIOR", "DEATHKNIGHT", "PALADIN", "MONK", "PRIEST", "SHAMAN", "DRUID",
"ROGUE", "MAGE", "WARLOCK", "HUNTER", "DEMONHUNTER"
];
declare const SCHOOL_MASK_NONE = 0x00;
declare const SCHOOL_MASK_PHYSICAL = 0x01;
declare const SCHOOL_MASK_HOLY = 0x02;
declare const SCHOOL_MASK_FIRE = 0x04;
declare const SCHOOL_MASK_NATURE = 0x08;
declare const SCHOOL_MASK_FROST = 0x10;
declare const SCHOOL_MASK_SHADOW = 0x20;
declare const SCHOOL_MASK_ARCANE = 0x40;
declare const LOOT_ROLL_TYPE_PASS = 0;
declare const LOOT_ROLL_TYPE_NEED = 1;
declare const LOOT_ROLL_TYPE_GREED = 2;
declare const LOOT_ROLL_TYPE_DISENCHANT = 3;
declare const INVSLOT_AMMO = 0;
declare type INVSLOT_AMMO = 0;
declare const INVSLOT_HEAD = 1;
declare type INVSLOT_HEAD = 1;
declare const INVSLOT_NECK = 2;
declare type INVSLOT_NECK = 2;
declare const INVSLOT_SHOULDER = 3;
declare type INVSLOT_SHOULDER = 3;
declare const INVSLOT_BODY = 4;
declare type INVSLOT_BODY = 4;
declare const INVSLOT_CHEST = 5;
declare type INVSLOT_CHEST = 5;
declare const INVSLOT_WAIST = 6;
declare type INVSLOT_WAIST = 6;
declare const INVSLOT_LEGS = 7;
declare type INVSLOT_LEGS = 7;
declare const INVSLOT_FEET = 8;
declare type INVSLOT_FEET = 8;
declare const INVSLOT_WRIST = 9;
declare type INVSLOT_WRIST = 9;
declare const INVSLOT_HAND = 10;
declare type INVSLOT_HAND = 10;
declare const INVSLOT_FINGER1 = 11;
declare type INVSLOT_FINGER1 = 11;
declare const INVSLOT_FINGER2 = 12;
declare type INVSLOT_FINGER2 = 12;
declare const INVSLOT_TRINKET1 = 13;
declare type INVSLOT_TRINKET1 = 13;
declare const INVSLOT_TRINKET2 = 14;
declare type INVSLOT_TRINKET2 = 14;
declare const INVSLOT_BACK = 15;
declare type INVSLOT_BACK = 15;
declare const INVSLOT_MAINHAND = 16;
declare type INVSLOT_MAINHAND = 16;
declare const INVSLOT_OFFHAND = 17;
declare type INVSLOT_OFFHAND = 17;
declare const INVSLOT_RANGED = 18;
declare type INVSLOT_RANGED = 18;
declare const INVSLOT_TABARD = 19;
declare type INVSLOT_TABARD = 19;
declare const DIFFICULTY_DUNGEON_NORMAL = 1;
declare const DIFFICULTY_DUNGEON_HEROIC = 2;
declare const DIFFICULTY_RAID10_NORMAL = 3;
declare const DIFFICULTY_RAID25_NORMAL = 4;
declare const DIFFICULTY_RAID10_HEROIC = 5;
declare const DIFFICULTY_RAID25_HEROIC = 6;
declare const DIFFICULTY_RAID_LFR = 7;
declare const DIFFICULTY_DUNGEON_CHALLENGE = 8;
declare const DIFFICULTY_RAID40 = 9;
declare const DIFFICULTY_PRIMARYRAID_NORMAL = 14;
declare const DIFFICULTY_PRIMARYRAID_HEROIC = 15;
declare const DIFFICULTY_PRIMARYRAID_MYTHIC = 16;
declare const DIFFICULTY_PRIMARYRAID_LFR = 17;
declare const NUM_CHAT_WINDOWS: number;
declare namespace WoWAPI {
type InventoryId = INVSLOT_AMMO | INVSLOT_HEAD | INVSLOT_NECK | INVSLOT_SHOULDER | INVSLOT_BODY | INVSLOT_CHEST |
INVSLOT_WAIST | INVSLOT_LEGS | INVSLOT_FEET | INVSLOT_WRIST | INVSLOT_HAND | INVSLOT_FINGER1 | INVSLOT_FINGER2 | INVSLOT_TRINKET1 |
INVSLOT_TRINKET2 | INVSLOT_BACK | INVSLOT_MAINHAND | INVSLOT_OFFHAND | INVSLOT_RANGED | INVSLOT_TABARD;
/**
* Global object used to register and assign handler functions to for slash commands.
* @see https://wowpedia.fandom.com/wiki/Creating_a_slash_command
*/
const SlashCmdList: { [key: string]: (this: void, msg: string, editBox: EditBox) => void };
}
/** @noSelfInFile */
declare const MAX_PLAYER_LEVEL_TABLE: {
LE_EXPANSION_CLASSIC: 60,
LE_EXPANSION_BURNING_CRUSADE: 70,
LE_EXPANSION_WRATH_OF_THE_LICH_KING: 80,
LE_EXPANSION_CATACLYSM: 85,
LE_EXPANSION_MISTS_OF_PANDARIA: 90,
LE_EXPANSION_WARLORDS_OF_DRAENOR: 100,
LE_EXPANSION_LEGION: 110,
LE_EXPANSION_BATTLE_FOR_AZEROTH: 120,
LE_EXPANSION_9_0: 120,
LE_EXPANSION_10_0: 120,
LE_EXPANSION_11_0: 120
};
declare const NPE_TUTORIAL_COMPLETE_LEVEL = 10;
declare const NORMAL_FONT_COLOR_CODE = "|cffffd200";
declare const HIGHLIGHT_FONT_COLOR_CODE = "|cffffffff";
declare const RED_FONT_COLOR_CODE = "|cffff2020";
declare const GREEN_FONT_COLOR_CODE = "|cff20ff20";
declare const GRAY_FONT_COLOR_CODE = "|cff808080";
declare const YELLOW_FONT_COLOR_CODE = "|cffffff00";
declare const LIGHTYELLOW_FONT_COLOR_CODE = "|cffffff9a";
declare const ORANGE_FONT_COLOR_CODE = "|cffff7f3f";
declare const ACHIEVEMENT_COLOR_CODE = "|cffffff00";
declare const BATTLENET_FONT_COLOR_CODE = "|cff82c5ff";
declare const DISABLED_FONT_COLOR_CODE = "|cff7f7f7f";
declare const FONT_COLOR_CODE_CLOSE = "|r";
declare const FACTION_BAR_COLORS: {
1: { r: .8, g: .3, b: .22 },
2: { r: .8, g: .3, b: .22 },
3: { r: .75, g: .27, b: 0 },
4: { r: .9, g: .7, b: 0 },
5: { r: 0, g: .6, b: .1 },
6: { r: 0, g: .7, b: .1 },
7: { r: 0, g: .7, b: .1 },
8: { r: 0, g: .7, b: .1 }
};
declare const WORLD_QUEST_ICONS_BY_PROFESSION: {
129: "worldquest-icon-firstaid",
164: "worldquest-icon-blacksmithing",
165: "worldquest-icon-leatherworking",
171: "worldquest-icon-alchemy",
182: "worldquest-icon-herbalism",
186: "worldquest-icon-mining",
202: "worldquest-icon-engineering",
333: "worldquest-icon-enchanting",
755: "worldquest-icon-jewelcrafting",
773: "worldquest-icon-inscription",
794: "worldquest-icon-archaeology",
356: "worldquest-icon-fishing",
185: "worldquest-icon-cooking",
197: "worldquest-icon-tailoring",
393: "worldquest-icon-skinning"
};
declare const CHAT_FONT_HEIGHTS: {
1: 12,
2: 14,
3: 16,
4: 18
};
declare const MATERIAL_TEXT_COLOR_TABLE: {
"Default": [.18, .12, .06],
"Stone": [1, 1, 1],
"Parchment": [.18, .12, .06],
"Marble": [0, 0, 0],
"Silver": [.12, .12, .12],
"Bronze": [.18, .12, .06],
"ParchmentLarge": [.141, 0, 0]
};
declare const MATERIAL_TITLETEXT_COLOR_TABLE: {
"Default": [0, 0, 0],
"Stone": [.93, .82, 0],
"Parchment": [0, 0, 0],
"Marble": [.93, .82, 0],
"Silver": [.93, .82, 0],
"Bronze": [.93, .82, 0],
"ParchmentLarge": [.208, 0, 0]
};
declare const CLASS_SORT_ORDER: [
"WARRIOR", "DEATHKNIGHT", "PALADIN", "MONK", "PRIEST", "SHAMAN", "DRUID",
"ROGUE", "MAGE", "WARLOCK", "HUNTER", "DEMONHUNTER"
];
declare const SCHOOL_MASK_NONE = 0x00;
declare const SCHOOL_MASK_PHYSICAL = 0x01;
declare const SCHOOL_MASK_HOLY = 0x02;
declare const SCHOOL_MASK_FIRE = 0x04;
declare const SCHOOL_MASK_NATURE = 0x08;
declare const SCHOOL_MASK_FROST = 0x10;
declare const SCHOOL_MASK_SHADOW = 0x20;
declare const SCHOOL_MASK_ARCANE = 0x40;
declare const LOOT_ROLL_TYPE_PASS = 0;
declare const LOOT_ROLL_TYPE_NEED = 1;
declare const LOOT_ROLL_TYPE_GREED = 2;
declare const LOOT_ROLL_TYPE_DISENCHANT = 3;
declare const INVSLOT_AMMO = 0;
declare type INVSLOT_AMMO = 0;
declare const INVSLOT_HEAD = 1;
declare type INVSLOT_HEAD = 1;
declare const INVSLOT_NECK = 2;
declare type INVSLOT_NECK = 2;
declare const INVSLOT_SHOULDER = 3;
declare type INVSLOT_SHOULDER = 3;
declare const INVSLOT_BODY = 4;
declare type INVSLOT_BODY = 4;
declare const INVSLOT_CHEST = 5;
declare type INVSLOT_CHEST = 5;
declare const INVSLOT_WAIST = 6;
declare type INVSLOT_WAIST = 6;
declare const INVSLOT_LEGS = 7;
declare type INVSLOT_LEGS = 7;
declare const INVSLOT_FEET = 8;
declare type INVSLOT_FEET = 8;
declare const INVSLOT_WRIST = 9;
declare type INVSLOT_WRIST = 9;
declare const INVSLOT_HAND = 10;
declare type INVSLOT_HAND = 10;
declare const INVSLOT_FINGER1 = 11;
declare type INVSLOT_FINGER1 = 11;
declare const INVSLOT_FINGER2 = 12;
declare type INVSLOT_FINGER2 = 12;
declare const INVSLOT_TRINKET1 = 13;
declare type INVSLOT_TRINKET1 = 13;
declare const INVSLOT_TRINKET2 = 14;
declare type INVSLOT_TRINKET2 = 14;
declare const INVSLOT_BACK = 15;
declare type INVSLOT_BACK = 15;
declare const INVSLOT_MAINHAND = 16;
declare type INVSLOT_MAINHAND = 16;
declare const INVSLOT_OFFHAND = 17;
declare type INVSLOT_OFFHAND = 17;
declare const INVSLOT_RANGED = 18;
declare type INVSLOT_RANGED = 18;
declare const INVSLOT_TABARD = 19;
declare type INVSLOT_TABARD = 19;
declare const DIFFICULTY_DUNGEON_NORMAL = 1;
declare const DIFFICULTY_DUNGEON_HEROIC = 2;
declare const DIFFICULTY_RAID10_NORMAL = 3;
declare const DIFFICULTY_RAID25_NORMAL = 4;
declare const DIFFICULTY_RAID10_HEROIC = 5;
declare const DIFFICULTY_RAID25_HEROIC = 6;
declare const DIFFICULTY_RAID_LFR = 7;
declare const DIFFICULTY_DUNGEON_CHALLENGE = 8;
declare const DIFFICULTY_RAID40 = 9;
declare const DIFFICULTY_PRIMARYRAID_NORMAL = 14;
declare const DIFFICULTY_PRIMARYRAID_HEROIC = 15;
declare const DIFFICULTY_PRIMARYRAID_MYTHIC = 16;
declare const DIFFICULTY_PRIMARYRAID_LFR = 17;
declare const NUM_CHAT_WINDOWS: number;
declare namespace WoWAPI {
type InventoryId = INVSLOT_AMMO | INVSLOT_HEAD | INVSLOT_NECK | INVSLOT_SHOULDER | INVSLOT_BODY | INVSLOT_CHEST |
INVSLOT_WAIST | INVSLOT_LEGS | INVSLOT_FEET | INVSLOT_WRIST | INVSLOT_HAND | INVSLOT_FINGER1 | INVSLOT_FINGER2 | INVSLOT_TRINKET1 |
INVSLOT_TRINKET2 | INVSLOT_BACK | INVSLOT_MAINHAND | INVSLOT_OFFHAND | INVSLOT_RANGED | INVSLOT_TABARD;
}

View File

@@ -1,269 +1,269 @@
/** @noSelfInFile */
/// <reference path="global.d.ts" />
/// <reference path="item.d.ts" />
/// <reference path="ui/ui.d.ts" />
/// <reference path="unit.d.ts" />
declare namespace WoWAPI {
type CONTAINER_ID_BACKPACK = 0;
type CONTAINER_ID_BAG_1 = 1;
type CONTAINER_ID_BAG_2 = 2;
type CONTAINER_ID_BAG_3 = 3;
type CONTAINER_ID_BAG_4 = 4;
type CONTAINER_ID_BANK_GLOBAL = -1;
type CONTAINER_ID_BANK_BAG_1 = 5;
type CONTAINER_ID_BANK_BAG_2 = 6;
type CONTAINER_ID_BANK_BAG_3 = 7;
type CONTAINER_ID_BANK_BAG_4 = 8;
type CONTAINER_ID_BANK_BAG_5 = 9;
type CONTAINER_ID_BANK_BAG_6 = 10;
type CONTAINER_ID_BANK_BAG_7 = 11;
type CONTAINER_ID_REAGENTBANK = -3;
type CONTAINER_ID_BANK_BAG_WRAPPER = -4;
type CONTAINER_ID_BANK = CONTAINER_ID_BANK_GLOBAL | CONTAINER_ID_BANK_BAG_1 | CONTAINER_ID_BANK_BAG_2 | CONTAINER_ID_BANK_BAG_3 |
CONTAINER_ID_BANK_BAG_4 | CONTAINER_ID_BANK_BAG_5 | CONTAINER_ID_BANK_BAG_6 | CONTAINER_ID_BANK_BAG_7 | CONTAINER_ID_REAGENTBANK |
CONTAINER_ID_BANK_BAG_WRAPPER;
type CONTAINER_ID_BAG = CONTAINER_ID_BACKPACK | CONTAINER_ID_BAG_1 | CONTAINER_ID_BAG_2 | CONTAINER_ID_BAG_3 |
CONTAINER_ID_BAG_4;
type CONTAINER_ID = CONTAINER_ID_BAG | CONTAINER_ID_BANK;
type BAG_TYPE_UNSPECIFIED = 0;
type BAG_TYPE_QUIVER = 1;
type BAG_TYPE_AMMO_POUCH = 2;
type BAG_TYPE_SOUL_BAG = 4;
type BAG_TYPE_LEATHERWORKING_BAG = 8;
type BAG_TYPE_INSCRIPTION_BAG = 16;
type BAG_TYPE_HERB_BAG = 32;
type BAG_TYPE_ENCHANTING_BAG = 64;
type BAG_TYPE_ENGINEERING_BAG = 128;
type BAG_TYPE_KEYRING = 256;
type BAG_TYPE_GEM_BAG = 512;
type BAG_TYPE_MINING = 1024;
type BAG_TYPE_UNKNOWN = 2048;
type BAG_TYPE_VANTY_PETS = 4096;
type INVENTORY_SLOT_CONTAINER_1 = 20;
type INVENTORY_SLOT_CONTAINER_2 = 21;
type INVENTORY_SLOT_CONTAINER_3 = 22;
type INVENTORY_SLOT_CONTAINER_4 = 23;
type INVENTORY_SLOT_CONTAINER = INVENTORY_SLOT_CONTAINER_1 | INVENTORY_SLOT_CONTAINER_2 |
INVENTORY_SLOT_CONTAINER_3 | INVENTORY_SLOT_CONTAINER_4;
type INVENTORY_SLOT_ID_CONTAINERS = INVENTORY_SLOT_CONTAINER_1 | INVENTORY_SLOT_CONTAINER_2 |
INVENTORY_SLOT_CONTAINER_3 | INVENTORY_SLOT_CONTAINER_4;
type INVENTORY_SLOT_ID = INVSLOT_AMMO | INVSLOT_HEAD | INVSLOT_NECK | INVSLOT_SHOULDER | INVSLOT_BODY | INVSLOT_CHEST |
INVSLOT_WAIST | INVSLOT_LEGS | INVSLOT_FEET | INVSLOT_WRIST | INVSLOT_HAND | INVSLOT_FINGER1 | INVSLOT_FINGER2 |
INVSLOT_TRINKET1 | INVSLOT_TRINKET2 | INVSLOT_BACK | INVSLOT_MAINHAND | INVSLOT_OFFHAND | INVSLOT_RANGED | INVSLOT_TABARD |
INVENTORY_SLOT_ID_CONTAINERS;
/**
* all currently known bag types
*/
type BAG_TYPE = BAG_TYPE_UNSPECIFIED | BAG_TYPE_QUIVER | BAG_TYPE_AMMO_POUCH | BAG_TYPE_SOUL_BAG | BAG_TYPE_LEATHERWORKING_BAG |
BAG_TYPE_INSCRIPTION_BAG | BAG_TYPE_HERB_BAG | BAG_TYPE_ENCHANTING_BAG | BAG_TYPE_ENGINEERING_BAG | BAG_TYPE_KEYRING | BAG_TYPE_GEM_BAG |
BAG_TYPE_MINING | BAG_TYPE_UNKNOWN | BAG_TYPE_VANTY_PETS;
}
/**
* convert a bagId to an inventoryId
*
* @param bagId number of the bag ( between 1 and NUM_BAG_SLOTS + NUM_BANKBAGSLOTS ) to get the inventoryID for
* @returns the bag's inventory ID used in functions like PutItemInBag(inventoryId) and GetInventoryWowItemLink("player",inventoryId)
* @see https://wow.gamepedia.com/API_ContainerIDToInventoryID
*/
declare function ContainerIDToInventoryID(bagId: WoWAPI.CONTAINER_ID): number;
/**
* bagName will contain the name of the specified bag if the bag number is 0-4 otherwise it will be nil, unless when the bank is opened,
* in which case GetBagName(-1) (for the bank) is nil and GetBagName(6) will give the name of the first bank bag, GetBagName(7) the name of
* the second bank bag, etc ...
*
* @param bagId number of the bag the item is in, 0 is your backpack, 1-4 are the four additional bags, numbered right to left.
* Actually, for this method, this parameter is valid as API_ContainerIDToInventoryID
* @returns the name of the specified bag (example "Green Woolen Bag")
* @see https://wow.gamepedia.com/API_GetBagName
*/
declare function GetBagName(bagId: WoWAPI.CONTAINER_ID): string;
/**
* Returns cooldown information for an item in your inventory
*
* @param bagId number of the bag the item is in, 0 is your backpack, 1-4 are the four additional bags
* @param slot slot number of the bag item you want the info for
* @returns startTime, duration, isEnabled
* @see https://wow.gamepedia.com/API_GetContainerItemCooldown
* @tupleReturn
*/
declare function GetContainerItemCooldown(bagId: WoWAPI.CONTAINER_ID, slot: number): [number, number, WoWAPI.Flag];
/**
* Returns current and maximum durability of an item in the character's bags
*
* @param bagId Index of the bag slot the bag storing the item is in
* @param slot Index of the bag slot containing the item to query durability of
* @returns current, maximum
* @see https://wow.gamepedia.com/API_GetContainerItemDurability
* @tupleReturn
*/
declare function GetContainerItemDurability(bagId: WoWAPI.CONTAINER_ID, slot: number): [number, number];
/**
* Returns the item id of the item in a particular container slot.
*
* @param bagId Index of the bag to query
* @param slot Index of the slot within the bag to query; ascending from 1.
* @returns item ID of the item held in the container slot, nil if there is no item in the container slot
* @see https://wow.gamepedia.com/API_GetContainerItemID
*/
declare function GetContainerItemID(bagId: WoWAPI.CONTAINER_ID, slot: number): number | null;
/**
* Get information about a specific item in your container
*
* @param bagId number of the bag the item is in, e.g. 0 for your backpack
* @param slot index of the slot inside the bag to look up
* @returns texture, itemCount, locked, quality, readable, lootable, itemLink, isFiltered, noValue, itemID
* @see https://wow.gamepedia.com/API_GetContainerItemInfo
* @tupleReturn
*/
// tslint:disable-next-line max-line-length
declare function GetContainerItemInfo(bagId: WoWAPI.CONTAINER_ID, slot: number): [WoWAPI.TexturePath, number, boolean, WoWAPI.ITEM_QUALITY, boolean, boolean, WoWAPI.ItemLink, boolean, boolean, number];
/**
* Returns a link of the object located in the specified slot of a specified bag
*
* @param bagId number of the bag the item is in, e.g. 0 for your backpack
* @param slot Slot index within the specified bag, ascending from 1. Slot 1 is typically the leftmost topmost slot
* @returns a chat link for the object in the specified bag slot; nil if there is no such object. This is typically, but not always an WoWAPI.ItemLink.
* @see https://wow.gamepedia.com/API_GetContainerWowItemLink
*/
declare function GetContainerWowItemLink(bagId: WoWAPI.CONTAINER_ID, slot: number): WoWAPI.ItemLink;
/**
* Returns the total number of slots in the bag specified by the index
*
* @param bagId the slot containing the bag, e.g. 0 for backpack, etc
* @returns the number of slots in the specified bag, or 0 if there is no bag in the given slot
* @see https://wow.gamepedia.com/API_GetContainerNumSlots
*/
declare function GetContainerNumSlots(bagId: WoWAPI.CONTAINER_ID): number;
/**
* Returns whether the item in the slot is a quest item
*
* @param bagId Index of the bag to query
* @param slot Index of the slot within the bag (ascending from 1) to query
* @returns isQuestItem, questId, isActive
* @see https://wow.gamepedia.com/API_GetContainerItemQuestInfo
* @tupleReturn
*/
declare function GetContainerItemQuestInfo(bagId: WoWAPI.CONTAINER_ID, slot: number): [WoWAPI.Flag, number | null, WoWAPI.Flag];
/**
* Returns the total number of free slots in the bag an the type of items that can go into it specified by the index
*
* @param bagId the slot containing the bag, e.g. 0 for backpack, etc.
* @returns numberOfFreeSlots, BagType
* @see https://wow.gamepedia.com/API_GetContainerNumFreeSlots
* @tupleReturn
*/
declare function GetContainerNumFreeSlots(bagId: WoWAPI.CONTAINER_ID): [number, WoWAPI.BAG_TYPE];
/**
* Open all bag frames
*
* @param frame The frame that is responsible for opening the bags. Doesn't affect the operation of this function but sets an internal
* variable that affects other container frame functions. Can be nil
* @see https://wow.gamepedia.com/API_OpenAllBags
*/
declare function OpenAllBags(frame?: WoWAPI.Frame): void;
/**
* Closes all open bags
*
* @see https://wow.gamepedia.com/API_CloseAllBags
*/
declare function CloseAllBags(): void;
/**
* Picks up the bag from the specified slot, placing it in the cursor
*
* @param inventorySlotId the slot containing the bag.
* @see https://wow.gamepedia.com/API_PickupBagFromSlot
*/
declare function PickupBagFromSlot(inventorySlotId: WoWAPI.INVENTORY_SLOT_ID_CONTAINERS): void;
/**
* The function behaves differently depending on what is currently on the cursor:
* - If the cursor currently has nothing, calling this will pick up an item from your backpack.
* - If the cursor currently contains an item (check with CursorHasItem()), calling this will place the item currently on the cursor
* into the specified bag slot. If there is already an item in that bag slot, the two items will be exchanged.
* - If the cursor is set to a spell (typically enchanting and poisons, check with SpellIsTargeting()), calling this specifies that
* you want to cast the spell on the item in that bag slot.
*
* @param bagId id of the bag the slot is located in.
* @param slot slot inside the bag (top left slot is 1, slot to the right of it is 2).
* @event ITEM_LOCK_CHANGED
* @see https://wow.gamepedia.com/API_PickupContainerItem
*/
declare function PickupContainerItem(bagId: WoWAPI.CONTAINER_ID, slot: number): void;
/**
* Places the item currently on the cursor into the player's backpack otherwise it has no effect. If there is already a partial stack of
* the item in the backpack, it will attempt to stack them together
*
* @see https://wow.gamepedia.com/API_PutItemInBackpack
*/
declare function PutItemInBackpack(): void;
/**
* Puts the item on the cursor into the specified bag slot on the main bar, if it's a bag. Otherwise, attempts to place the item inside the
* bag in that slot. Note that to place an item in the backpack, you must use PutItemInBackpack.
*
* @param inventorySlotId Inventory slot id containing the bag in which you wish to put the item. Values 20 to 23 correspond to the player's
* bag slots, right-to-left from the first bag after the backpack
* @see https://wow.gamepedia.com/API_PutItemInBag
*/
declare function PutItemInBag(inventorySlotId: WoWAPI.INVENTORY_SLOT_ID_CONTAINERS): void;
/**
* Picks up part of a stack of items from a container, placing them on the cursor
*
* @param bagId id of the bag the slot is located in
* @param slot slot inside the bag (top left slot is 1, slot to the right of it is 2).
* @param count Quantity to pick up
* @see https://wow.gamepedia.com/API_SplitContainerItem
*/
declare function SplitContainerItem(bagId: WoWAPI.CONTAINER_ID, slot: number, count: number): void;
/**
* Toggles your backpage open/closed
*
* @see https://wow.gamepedia.com/API_ToggleBackpack
*/
declare function ToggleBackpack(): void;
/**
* Opens or closes the specified bag
*
* @param bagId the bagId you want to toggle open or close
*/
declare function ToggleBag(bagId: WoWAPI.CONTAINER_ID): void;
/**
* Use an item from a container. If Merchant window is open, this will sell the item
*
* @param bagId The bag id, where the item to use is located
* @param slot The slot in the bag, where the item to use is located
* @param target unit the item should be used on. If omitted, defaults to "target" if a the item must target someone.
* @param reagentBankAccessible This indicates, for cases where no target is given, if the item reagent bank is accessible (so bank frame
* is shown and switched to the reagent bank tab).
* @see https://wow.gamepedia.com/API_UseContainerItem
* @protected PROTECTED (situational)
*/
declare function UseContainerItem(bagId: WoWAPI.CONTAINER_ID, slot: number, target?: WoWAPI.UnitId, reagentBankAccessible?: boolean): void;
/** @noSelfInFile */
/// <reference path="global.d.ts" />
/// <reference path="item.d.ts" />
/// <reference path="ui/ui.d.ts" />
/// <reference path="unit.d.ts" />
declare namespace WoWAPI {
type CONTAINER_ID_BACKPACK = 0;
type CONTAINER_ID_BAG_1 = 1;
type CONTAINER_ID_BAG_2 = 2;
type CONTAINER_ID_BAG_3 = 3;
type CONTAINER_ID_BAG_4 = 4;
type CONTAINER_ID_BANK_GLOBAL = -1;
type CONTAINER_ID_BANK_BAG_1 = 5;
type CONTAINER_ID_BANK_BAG_2 = 6;
type CONTAINER_ID_BANK_BAG_3 = 7;
type CONTAINER_ID_BANK_BAG_4 = 8;
type CONTAINER_ID_BANK_BAG_5 = 9;
type CONTAINER_ID_BANK_BAG_6 = 10;
type CONTAINER_ID_BANK_BAG_7 = 11;
type CONTAINER_ID_REAGENTBANK = -3;
type CONTAINER_ID_BANK_BAG_WRAPPER = -4;
type CONTAINER_ID_BANK = CONTAINER_ID_BANK_GLOBAL | CONTAINER_ID_BANK_BAG_1 | CONTAINER_ID_BANK_BAG_2 | CONTAINER_ID_BANK_BAG_3 |
CONTAINER_ID_BANK_BAG_4 | CONTAINER_ID_BANK_BAG_5 | CONTAINER_ID_BANK_BAG_6 | CONTAINER_ID_BANK_BAG_7 | CONTAINER_ID_REAGENTBANK |
CONTAINER_ID_BANK_BAG_WRAPPER;
type CONTAINER_ID_BAG = CONTAINER_ID_BACKPACK | CONTAINER_ID_BAG_1 | CONTAINER_ID_BAG_2 | CONTAINER_ID_BAG_3 |
CONTAINER_ID_BAG_4;
type CONTAINER_ID = CONTAINER_ID_BAG | CONTAINER_ID_BANK;
type BAG_TYPE_UNSPECIFIED = 0;
type BAG_TYPE_QUIVER = 1;
type BAG_TYPE_AMMO_POUCH = 2;
type BAG_TYPE_SOUL_BAG = 4;
type BAG_TYPE_LEATHERWORKING_BAG = 8;
type BAG_TYPE_INSCRIPTION_BAG = 16;
type BAG_TYPE_HERB_BAG = 32;
type BAG_TYPE_ENCHANTING_BAG = 64;
type BAG_TYPE_ENGINEERING_BAG = 128;
type BAG_TYPE_KEYRING = 256;
type BAG_TYPE_GEM_BAG = 512;
type BAG_TYPE_MINING = 1024;
type BAG_TYPE_UNKNOWN = 2048;
type BAG_TYPE_VANTY_PETS = 4096;
type INVENTORY_SLOT_CONTAINER_1 = 20;
type INVENTORY_SLOT_CONTAINER_2 = 21;
type INVENTORY_SLOT_CONTAINER_3 = 22;
type INVENTORY_SLOT_CONTAINER_4 = 23;
type INVENTORY_SLOT_CONTAINER = INVENTORY_SLOT_CONTAINER_1 | INVENTORY_SLOT_CONTAINER_2 |
INVENTORY_SLOT_CONTAINER_3 | INVENTORY_SLOT_CONTAINER_4;
type INVENTORY_SLOT_ID_CONTAINERS = INVENTORY_SLOT_CONTAINER_1 | INVENTORY_SLOT_CONTAINER_2 |
INVENTORY_SLOT_CONTAINER_3 | INVENTORY_SLOT_CONTAINER_4;
type INVENTORY_SLOT_ID = INVSLOT_AMMO | INVSLOT_HEAD | INVSLOT_NECK | INVSLOT_SHOULDER | INVSLOT_BODY | INVSLOT_CHEST |
INVSLOT_WAIST | INVSLOT_LEGS | INVSLOT_FEET | INVSLOT_WRIST | INVSLOT_HAND | INVSLOT_FINGER1 | INVSLOT_FINGER2 |
INVSLOT_TRINKET1 | INVSLOT_TRINKET2 | INVSLOT_BACK | INVSLOT_MAINHAND | INVSLOT_OFFHAND | INVSLOT_RANGED | INVSLOT_TABARD |
INVENTORY_SLOT_ID_CONTAINERS;
/**
* all currently known bag types
*/
type BAG_TYPE = BAG_TYPE_UNSPECIFIED | BAG_TYPE_QUIVER | BAG_TYPE_AMMO_POUCH | BAG_TYPE_SOUL_BAG | BAG_TYPE_LEATHERWORKING_BAG |
BAG_TYPE_INSCRIPTION_BAG | BAG_TYPE_HERB_BAG | BAG_TYPE_ENCHANTING_BAG | BAG_TYPE_ENGINEERING_BAG | BAG_TYPE_KEYRING | BAG_TYPE_GEM_BAG |
BAG_TYPE_MINING | BAG_TYPE_UNKNOWN | BAG_TYPE_VANTY_PETS;
}
/**
* convert a bagId to an inventoryId
*
* @param bagId number of the bag ( between 1 and NUM_BAG_SLOTS + NUM_BANKBAGSLOTS ) to get the inventoryID for
* @returns the bag's inventory ID used in functions like PutItemInBag(inventoryId) and GetInventoryWowItemLink("player",inventoryId)
* @see https://wow.gamepedia.com/API_ContainerIDToInventoryID
*/
declare function ContainerIDToInventoryID(bagId: WoWAPI.CONTAINER_ID): number;
/**
* bagName will contain the name of the specified bag if the bag number is 0-4 otherwise it will be nil, unless when the bank is opened,
* in which case GetBagName(-1) (for the bank) is nil and GetBagName(6) will give the name of the first bank bag, GetBagName(7) the name of
* the second bank bag, etc ...
*
* @param bagId number of the bag the item is in, 0 is your backpack, 1-4 are the four additional bags, numbered right to left.
* Actually, for this method, this parameter is valid as API_ContainerIDToInventoryID
* @returns the name of the specified bag (example "Green Woolen Bag")
* @see https://wow.gamepedia.com/API_GetBagName
*/
declare function GetBagName(bagId: WoWAPI.CONTAINER_ID): string;
/**
* Returns cooldown information for an item in your inventory
*
* @param bagId number of the bag the item is in, 0 is your backpack, 1-4 are the four additional bags
* @param slot slot number of the bag item you want the info for
* @returns startTime, duration, isEnabled
* @see https://wow.gamepedia.com/API_GetContainerItemCooldown
* @tupleReturn
*/
declare function GetContainerItemCooldown(bagId: WoWAPI.CONTAINER_ID, slot: number): [number, number, WoWAPI.Flag];
/**
* Returns current and maximum durability of an item in the character's bags
*
* @param bagId Index of the bag slot the bag storing the item is in
* @param slot Index of the bag slot containing the item to query durability of
* @returns current, maximum
* @see https://wow.gamepedia.com/API_GetContainerItemDurability
* @tupleReturn
*/
declare function GetContainerItemDurability(bagId: WoWAPI.CONTAINER_ID, slot: number): [number, number];
/**
* Returns the item id of the item in a particular container slot.
*
* @param bagId Index of the bag to query
* @param slot Index of the slot within the bag to query; ascending from 1.
* @returns item ID of the item held in the container slot, nil if there is no item in the container slot
* @see https://wow.gamepedia.com/API_GetContainerItemID
*/
declare function GetContainerItemID(bagId: WoWAPI.CONTAINER_ID, slot: number): number | null;
/**
* Get information about a specific item in your container
*
* @param bagId number of the bag the item is in, e.g. 0 for your backpack
* @param slot index of the slot inside the bag to look up
* @returns texture, itemCount, locked, quality, readable, lootable, itemLink, isFiltered, noValue, itemID
* @see https://wow.gamepedia.com/API_GetContainerItemInfo
* @tupleReturn
*/
// tslint:disable-next-line max-line-length
declare function GetContainerItemInfo(bagId: WoWAPI.CONTAINER_ID, slot: number): [WoWAPI.TexturePath, number, boolean, WoWAPI.ITEM_QUALITY, boolean, boolean, WoWAPI.ItemLink, boolean, boolean, number];
/**
* Returns a link of the object located in the specified slot of a specified bag
*
* @param bagId number of the bag the item is in, e.g. 0 for your backpack
* @param slot Slot index within the specified bag, ascending from 1. Slot 1 is typically the leftmost topmost slot
* @returns a chat link for the object in the specified bag slot; nil if there is no such object. This is typically, but not always an WoWAPI.ItemLink.
* @see https://wow.gamepedia.com/API_GetContainerWowItemLink
*/
declare function GetContainerWowItemLink(bagId: WoWAPI.CONTAINER_ID, slot: number): WoWAPI.ItemLink;
/**
* Returns the total number of slots in the bag specified by the index
*
* @param bagId the slot containing the bag, e.g. 0 for backpack, etc
* @returns the number of slots in the specified bag, or 0 if there is no bag in the given slot
* @see https://wow.gamepedia.com/API_GetContainerNumSlots
*/
declare function GetContainerNumSlots(bagId: WoWAPI.CONTAINER_ID): number;
/**
* Returns whether the item in the slot is a quest item
*
* @param bagId Index of the bag to query
* @param slot Index of the slot within the bag (ascending from 1) to query
* @returns isQuestItem, questId, isActive
* @see https://wow.gamepedia.com/API_GetContainerItemQuestInfo
* @tupleReturn
*/
declare function GetContainerItemQuestInfo(bagId: WoWAPI.CONTAINER_ID, slot: number): [WoWAPI.Flag, number | null, WoWAPI.Flag];
/**
* Returns the total number of free slots in the bag an the type of items that can go into it specified by the index
*
* @param bagId the slot containing the bag, e.g. 0 for backpack, etc.
* @returns numberOfFreeSlots, BagType
* @see https://wow.gamepedia.com/API_GetContainerNumFreeSlots
* @tupleReturn
*/
declare function GetContainerNumFreeSlots(bagId: WoWAPI.CONTAINER_ID): [number, WoWAPI.BAG_TYPE];
/**
* Open all bag frames
*
* @param frame The frame that is responsible for opening the bags. Doesn't affect the operation of this function but sets an internal
* variable that affects other container frame functions. Can be nil
* @see https://wow.gamepedia.com/API_OpenAllBags
*/
declare function OpenAllBags(frame?: WoWAPI.Frame): void;
/**
* Closes all open bags
*
* @see https://wow.gamepedia.com/API_CloseAllBags
*/
declare function CloseAllBags(): void;
/**
* Picks up the bag from the specified slot, placing it in the cursor
*
* @param inventorySlotId the slot containing the bag.
* @see https://wow.gamepedia.com/API_PickupBagFromSlot
*/
declare function PickupBagFromSlot(inventorySlotId: WoWAPI.INVENTORY_SLOT_ID_CONTAINERS): void;
/**
* The function behaves differently depending on what is currently on the cursor:
* - If the cursor currently has nothing, calling this will pick up an item from your backpack.
* - If the cursor currently contains an item (check with CursorHasItem()), calling this will place the item currently on the cursor
* into the specified bag slot. If there is already an item in that bag slot, the two items will be exchanged.
* - If the cursor is set to a spell (typically enchanting and poisons, check with SpellIsTargeting()), calling this specifies that
* you want to cast the spell on the item in that bag slot.
*
* @param bagId id of the bag the slot is located in.
* @param slot slot inside the bag (top left slot is 1, slot to the right of it is 2).
* @event ITEM_LOCK_CHANGED
* @see https://wow.gamepedia.com/API_PickupContainerItem
*/
declare function PickupContainerItem(bagId: WoWAPI.CONTAINER_ID, slot: number): void;
/**
* Places the item currently on the cursor into the player's backpack otherwise it has no effect. If there is already a partial stack of
* the item in the backpack, it will attempt to stack them together
*
* @see https://wow.gamepedia.com/API_PutItemInBackpack
*/
declare function PutItemInBackpack(): void;
/**
* Puts the item on the cursor into the specified bag slot on the main bar, if it's a bag. Otherwise, attempts to place the item inside the
* bag in that slot. Note that to place an item in the backpack, you must use PutItemInBackpack.
*
* @param inventorySlotId Inventory slot id containing the bag in which you wish to put the item. Values 20 to 23 correspond to the player's
* bag slots, right-to-left from the first bag after the backpack
* @see https://wow.gamepedia.com/API_PutItemInBag
*/
declare function PutItemInBag(inventorySlotId: WoWAPI.INVENTORY_SLOT_ID_CONTAINERS): void;
/**
* Picks up part of a stack of items from a container, placing them on the cursor
*
* @param bagId id of the bag the slot is located in
* @param slot slot inside the bag (top left slot is 1, slot to the right of it is 2).
* @param count Quantity to pick up
* @see https://wow.gamepedia.com/API_SplitContainerItem
*/
declare function SplitContainerItem(bagId: WoWAPI.CONTAINER_ID, slot: number, count: number): void;
/**
* Toggles your backpage open/closed
*
* @see https://wow.gamepedia.com/API_ToggleBackpack
*/
declare function ToggleBackpack(): void;
/**
* Opens or closes the specified bag
*
* @param bagId the bagId you want to toggle open or close
*/
declare function ToggleBag(bagId: WoWAPI.CONTAINER_ID): void;
/**
* Use an item from a container. If Merchant window is open, this will sell the item
*
* @param bagId The bag id, where the item to use is located
* @param slot The slot in the bag, where the item to use is located
* @param target unit the item should be used on. If omitted, defaults to "target" if a the item must target someone.
* @param reagentBankAccessible This indicates, for cases where no target is given, if the item reagent bank is accessible (so bank frame
* is shown and switched to the reagent bank tab).
* @see https://wow.gamepedia.com/API_UseContainerItem
* @protected PROTECTED (situational)
*/
declare function UseContainerItem(bagId: WoWAPI.CONTAINER_ID, slot: number, target?: WoWAPI.UnitId, reagentBankAccessible?: boolean): void;

View File

@@ -1,134 +1,134 @@
/** @noSelfInFile */
declare namespace WoWAPI {
type CurrencyLink = Hyperlink;
}
/**
* Breaks down an amount of money into gold/silver/copper, inserts separator strings, and returns the resulting string
*
* @param amount the amount of money in copper (for example, the return value from GetMoney)
* @param separator a string to insert between the formatted amounts of currency, if there is more than one type
* @returns a (presumably localized) string suitable for printing or displaying
* @see https://wow.gamepedia.com/API_GetCoinText
* @since 3.0.2
*/
declare function GetCoinText(amount: number, separator: string): string;
/**
* Breaks down an amount of money into gold/silver/copper, inserts appropriate "|T" texture strings for coin icons, and returns the resulting string
*
* @param amount the amount of money in copper (for example, the return value from GetMoney)
* @param fontHeight the height of the coin icon; if not specified, defaults to 14
* @returns a string suitable for printing or displaying
* @see https://wow.gamepedia.com/API_GetCoinTextureString
* @since 3.0.2
*/
declare function GetCoinTextureString(amount: number, fontHeight?: number): string;
/**
* Retrieve Information about a currency at index including it's amount
*
* @param currencyId ID of the currency to retrieve
* @returns name, currentAmount, texture, earnedThisWeek, weeklyMax, totalMax, isDiscovered, rarity
* @see https://wow.gamepedia.com/API_GetCurrencyInfo
* @since 3.0.2
* @tupleReturn
*/
declare function GetCurrencyInfo(currencyId: number): [string, number, WoWAPI.TexturePath, number, number, number, boolean, WoWAPI.ITEM_QUALITY];
/**
* Retrieve Information about a currency at index including it's amount
*
* @param currencyId The full currencyLink as found with GetCurrencyLink() or GetCurrencyListLink(). OR A fragment of the currencyLink string
* for the item, e.g. "currency:396" for Valor Points.
* @returns name, currentAmount, texture, earnedThisWeek, weeklyMax, totalMax, isDiscovered, rarity
* @see https://wow.gamepedia.com/API_GetCurrencyInfo
* @since 3.0.2
* @tupleReturn
*/
// tslint:disable-next-line unified-signatures max-line-length
declare function GetCurrencyInfo(currencyLinkOrString: WoWAPI.CurrencyLink | string): [string, number, WoWAPI.TexturePath, number, number, number, boolean, WoWAPI.ITEM_QUALITY];
/**
* Get the currencyLink for the specified currencyID
*
* @param currencyId currency index - see table at GetCurrencyInfo for a list
* @param currencyAmount currency amount
* @returns The currency link (similar to itemLink) for the specified index (e.g. "|cffa335ee|Hcurrency:396:0|h[Valor Points]|h|r" for Valor
* Points) or nil if the index is for a header
* @see https://wow.gamepedia.com/API_GetCurrencyLink
* @since 3.0.2
*/
declare function GetCurrencyLink(currencyId: number, currencyAmount: number): WoWAPI.CurrencyLink;
/**
* Returns the number of entries in the currency list.
*
* @returns number of entries in the player's currency list
* @see https://wow.gamepedia.com/API_GetCurrencyListSize
* @since 3.0.2
*/
declare function GetCurrencyListSize(): number;
/**
* Returns information about an entry in the currency list
*
* @param currencyIndex index, ascending from 1 to GetCurrencyListSize().
* @returns name, isHeader, isExpanded, isUnused, isWatched, count, icon, maximum, hasWeeklyLimit, currentWeeklyAmount, unknown, itemID
* @see https://wow.gamepedia.com/API_GetCurrencyListInfo
* @since 3.0.2
* @tupleReturn
*/
// tslint:disable-next-line max-line-length
declare function GetCurrencyListInfo(currencyIndex: number): [string, boolean, boolean, boolean, boolean, number, WoWAPI.TexturePath, number, number, number, WoWAPI.Unknown, number];
/**
* Alters the expanded state of a currency list header.
*
* @param currencyHeaderIndex Index of the header in the currency list to expand/collapse.
* @param expanded 0 to set to collapsed state; 1 to set to expanded state
* @see https://wow.gamepedia.com/API_ExpandCurrencyList
* @since 3.0.2
*/
declare function ExpandCurrencyList(currencyHeaderIndex: number, expanded: WoWAPI.Flag): void;
/**
* Marks/unmarks a currency as unused
*
* @param currencyIndex Index of the currency in the currency list to alter unused status of.
* @param unused 1 to mark the currency as unused; 0 to mark the currency as used
* @see https://wow.gamepedia.com/API_SetCurrencyUnused
* @since 3.0.2
*/
declare function SetCurrencyUnused(currencyIndex: number, unused: WoWAPI.Flag): void;
/**
* Returns the number of currencies currently watched on the player's backpack
*
* @returns the number of watched currencies
* @see https://wow.gamepedia.com/API_GetNumWatchedTokens
* @since 3.0.2
*/
declare function GetNumWatchedTokens(): number;
/**
* Returns information about a currency item currently being shown as part of the backpack
*
* @param watchedIndex Index, ascending from 1 to GetNumWatchedTokens().
* @returns name, count, icon, currencyID
* @see https://wow.gamepedia.com/API_GetBackpackCurrencyInfo
* @since 3.0.2
* @tupleReturn
*/
declare function GetBackpackCurrencyInfo(watchedIndex: number): [string, number, WoWAPI.TexturePath, number];
/**
* Alters the backpack tracking state of a currency
*
* @param currencyIndex Index of the currency in the currency list to alter tracking of
* @param track 1 to track; 0 to clear tracking
* @see https://wow.gamepedia.com/API_SetCurrencyBackpack
* @since 3.0.2
*/
declare function SetCurrencyBackpack(currencyIndex: number, track: WoWAPI.Flag): void;
/** @noSelfInFile */
declare namespace WoWAPI {
type CurrencyLink = Hyperlink;
}
/**
* Breaks down an amount of money into gold/silver/copper, inserts separator strings, and returns the resulting string
*
* @param amount the amount of money in copper (for example, the return value from GetMoney)
* @param separator a string to insert between the formatted amounts of currency, if there is more than one type
* @returns a (presumably localized) string suitable for printing or displaying
* @see https://wow.gamepedia.com/API_GetCoinText
* @since 3.0.2
*/
declare function GetCoinText(amount: number, separator: string): string;
/**
* Breaks down an amount of money into gold/silver/copper, inserts appropriate "|T" texture strings for coin icons, and returns the resulting string
*
* @param amount the amount of money in copper (for example, the return value from GetMoney)
* @param fontHeight the height of the coin icon; if not specified, defaults to 14
* @returns a string suitable for printing or displaying
* @see https://wow.gamepedia.com/API_GetCoinTextureString
* @since 3.0.2
*/
declare function GetCoinTextureString(amount: number, fontHeight?: number): string;
/**
* Retrieve Information about a currency at index including it's amount
*
* @param currencyId ID of the currency to retrieve
* @returns name, currentAmount, texture, earnedThisWeek, weeklyMax, totalMax, isDiscovered, rarity
* @see https://wow.gamepedia.com/API_GetCurrencyInfo
* @since 3.0.2
* @tupleReturn
*/
declare function GetCurrencyInfo(currencyId: number): [string, number, WoWAPI.TexturePath, number, number, number, boolean, WoWAPI.ITEM_QUALITY];
/**
* Retrieve Information about a currency at index including it's amount
*
* @param currencyId The full currencyLink as found with GetCurrencyLink() or GetCurrencyListLink(). OR A fragment of the currencyLink string
* for the item, e.g. "currency:396" for Valor Points.
* @returns name, currentAmount, texture, earnedThisWeek, weeklyMax, totalMax, isDiscovered, rarity
* @see https://wow.gamepedia.com/API_GetCurrencyInfo
* @since 3.0.2
* @tupleReturn
*/
// tslint:disable-next-line unified-signatures max-line-length
declare function GetCurrencyInfo(currencyLinkOrString: WoWAPI.CurrencyLink | string): [string, number, WoWAPI.TexturePath, number, number, number, boolean, WoWAPI.ITEM_QUALITY];
/**
* Get the currencyLink for the specified currencyID
*
* @param currencyId currency index - see table at GetCurrencyInfo for a list
* @param currencyAmount currency amount
* @returns The currency link (similar to itemLink) for the specified index (e.g. "|cffa335ee|Hcurrency:396:0|h[Valor Points]|h|r" for Valor
* Points) or nil if the index is for a header
* @see https://wow.gamepedia.com/API_GetCurrencyLink
* @since 3.0.2
*/
declare function GetCurrencyLink(currencyId: number, currencyAmount: number): WoWAPI.CurrencyLink;
/**
* Returns the number of entries in the currency list.
*
* @returns number of entries in the player's currency list
* @see https://wow.gamepedia.com/API_GetCurrencyListSize
* @since 3.0.2
*/
declare function GetCurrencyListSize(): number;
/**
* Returns information about an entry in the currency list
*
* @param currencyIndex index, ascending from 1 to GetCurrencyListSize().
* @returns name, isHeader, isExpanded, isUnused, isWatched, count, icon, maximum, hasWeeklyLimit, currentWeeklyAmount, unknown, itemID
* @see https://wow.gamepedia.com/API_GetCurrencyListInfo
* @since 3.0.2
* @tupleReturn
*/
// tslint:disable-next-line max-line-length
declare function GetCurrencyListInfo(currencyIndex: number): [string, boolean, boolean, boolean, boolean, number, WoWAPI.TexturePath, number, number, number, WoWAPI.Unknown, number];
/**
* Alters the expanded state of a currency list header.
*
* @param currencyHeaderIndex Index of the header in the currency list to expand/collapse.
* @param expanded 0 to set to collapsed state; 1 to set to expanded state
* @see https://wow.gamepedia.com/API_ExpandCurrencyList
* @since 3.0.2
*/
declare function ExpandCurrencyList(currencyHeaderIndex: number, expanded: WoWAPI.Flag): void;
/**
* Marks/unmarks a currency as unused
*
* @param currencyIndex Index of the currency in the currency list to alter unused status of.
* @param unused 1 to mark the currency as unused; 0 to mark the currency as used
* @see https://wow.gamepedia.com/API_SetCurrencyUnused
* @since 3.0.2
*/
declare function SetCurrencyUnused(currencyIndex: number, unused: WoWAPI.Flag): void;
/**
* Returns the number of currencies currently watched on the player's backpack
*
* @returns the number of watched currencies
* @see https://wow.gamepedia.com/API_GetNumWatchedTokens
* @since 3.0.2
*/
declare function GetNumWatchedTokens(): number;
/**
* Returns information about a currency item currently being shown as part of the backpack
*
* @param watchedIndex Index, ascending from 1 to GetNumWatchedTokens().
* @returns name, count, icon, currencyID
* @see https://wow.gamepedia.com/API_GetBackpackCurrencyInfo
* @since 3.0.2
* @tupleReturn
*/
declare function GetBackpackCurrencyInfo(watchedIndex: number): [string, number, WoWAPI.TexturePath, number];
/**
* Alters the backpack tracking state of a currency
*
* @param currencyIndex Index of the currency in the currency list to alter tracking of
* @param track 1 to track; 0 to clear tracking
* @see https://wow.gamepedia.com/API_SetCurrencyBackpack
* @since 3.0.2
*/
declare function SetCurrencyBackpack(currencyIndex: number, track: WoWAPI.Flag): void;

View File

@@ -1,362 +1,362 @@
/** @noSelfInFile */
declare namespace WoWAPI {
type CursorInfoType = "item" | "spell" | "macro" | "mount" | "money" | "merchant" | "battlepet";
}
/**
* Automatically equips the item currently held on the cursor
* @see https://wow.gamepedia.com/API_AutoEquipCursorItem
*/
declare function AutoEquipCursorItem(): void;
/**
* Clears the in-game cursor, returning the object held to its original position (equivalent to right-clicking while holding something on the cursor).
* @see https://wow.gamepedia.com/API_ClearCursor
*/
declare function ClearCursor(): void;
/**
* Determines if the item in the cursor can be equipped in the specified inventory slot. Always returns 1 for bank bag slots
* @param inventorySlot Inventory slot to query
* @returns 1 if the thing currently on the cursor can go into the specified slot, nil otherwise
* @see https://wow.gamepedia.com/API_CursorCanGoInSlot
*/
declare function CursorCanGoInSlot(inventorySlot: WoWAPI.INVENTORY_SLOT_ID): WoWAPI.Flag;
/**
* Returns 1 if the cursor currently holds an item, nil otherwise
* @see https://wow.gamepedia.com/API_CursorHasItem
*/
declare function CursorHasItem(): boolean;
/**
* Returns true if the cursor currently holds money
*/
declare function CursorHasMoney(): boolean;
/**
* Returns true if the cursor currently holds a spell.
*/
declare function CursorHasSpell(): boolean;
/**
* Destroys the item currently held by the cursor
* @description This does not deselect the item, this destroys it. Use ClearCursor to drop an item from the cursor without destroying it.
* @see https://wow.gamepedia.com/API_DeleteCursorItem
*/
declare function DeleteCursorItem(): void;
/**
* Drops the money currently attached to your cursor back into your bag
* @see https://wow.gamepedia.com/API_DropCursorMoney
*/
declare function DropCursorMoney(): void;
/**
* Drops an item from the cursor onto the specified target. Can be used to initiate a trade session (though see Trade functions) or feeding pets
* @param unit Unit to which you want to give the item on the cursor
* @see https://wow.gamepedia.com/API_DropItemOnUnit
*/
declare function DropItemOnUnit(unit: WoWAPI.UnitId): void;
/**
* Equips the currently picked up item to a specific inventory slot
* @param inventorySlot The slot ID to place the item into. Use GetInventorySlotInfo(slotname) to resolve an inventory slot name to its ID
* @see https://wow.gamepedia.com/API_EquipCursorItem
*/
declare function EquipCursorItem(inventorySlot: WoWAPI.INVENTORY_SLOT_ID): void;
/**
* Returns information about what the mouse cursor is holding
* @see https://wow.gamepedia.com/API_GetCursorInfo
* @tupleReturn
*/
declare function GetCursorInfo(): [WoWAPI.CursorInfoType, ...WoWAPI.Unknown[]];
/**
* @returns **item**
* - **itemId**: Item ID of the item on the cursor
* - **itemLink**: ItemLink of the item on the cursor
* @tupleReturn
*/
declare function GetCursorInfo(): ["item", number, WoWAPI.ItemLink];
/**
* @returns **spell**
* - **spellIndex**: The index of the spell in the spell book
* - **bookType**: The spell book id. Only works for player spells, so this always returns BOOKTYPE_SPELL
* - **spellId**: Spell ID of the spell on the cursor
* @tupleReturn
*/
declare function GetCursorInfo(): ["spell", number, string, number];
/**
* @returns **macro**
* - **index**: The index of the macro on the cursor
* @tupleReturn
*/
declare function GetCursorInfo(): ["macro", number];
/**
* @returns **money**
* - **amount**: The amount of money in copper
* @tupleReturn
*/
declare function GetCursorInfo(): ["money", number];
/**
* @returns **mount**
* - **useless_index**: this index is not useful since no other API receives it as a parameter
* - **C_MountJournal index**: index in the C_MountJournal (used by C_MountJournal API functions). These indexes varies with game locale
* @tupleReturn
*/
declare function GetCursorInfo(): ["mount", number, number];
/**
* @returns **merchant**
* - **index**: The index of the merchant item
* @tupleReturn
*/
declare function GetCursorInfo(): ["merchant", number];
/**
* @returns **battlepet**
* - **petGUID**: GUID of a battle pet in your collection
* @tupleReturn
*/
declare function GetCursorInfo(): ["battlepet", WoWAPI.Guid];
/**
* Returns the amount of copper held on the cursor
* @see https://wow.gamepedia.com/API_GetCursorMoney
* @tupleReturn
*/
declare function GetCursorMoney(): number;
/**
* Returns the cursor's position on the screen
* @returns **position**
* - x coordinate unaffected by UI scale; 0 at the left edge of the screen.
* - y coordinate unaffected by UI scale; 0 at the bottom edge of the screen.
* @description Returns scale-independent coordinates similar to Cursor:GetCenter() if 'Cursor' was a valid frame not affected by scaling.
* Assuming UIParent spans the entire screen, you can convert these coordinates to UIParent offsets by dividing by its effective scale.
* The following snippet positions a small texture at the cursor's location.
* @see https://wow.gamepedia.com/API_GetCursorPosition
* @tupleReturn
*/
declare function GetCursorPosition(): [number, number];
/**
* Takes the cursor out of repair mode
* @see https://wow.gamepedia.com/API_HideRepairCursor
*/
declare function HideRepairCursor(): void;
/**
* Lets you know if your cursor is in repair mode. When your cursor is in repair mode, you can click on equipped items as well as items in your
* inventory to repair them
* @see https://wow.gamepedia.com/API_InRepairMode
*/
declare function InRepairMode(): boolean;
/**
* Pick up an action for drag-and-drop
* @param actionSlot The action slot to pick the action up from
* @description If the slot is empty, nothing happens, otherwise the action from the slot is placed on the cursor, and the slot is filled with
* whatever action was currently being drag-and-dropped (The slot is emptied if the cursor was empty). If you wish to empty the cursor without
* putting the item into another slot, try ClearCursor.
* @requires NO_COMBAT
* @see https://wow.gamepedia.com/API_PickupAction
*/
declare function PickupAction(actionSlot: ActionBarSlotId): void;
/**
* Picks up the bag from the specified slot, placing it in the cursor
* @param inventorySlot the slot containing the bag
* @description Valid slot numbers are 20-23, numbered from left to right starting after the backpack. inventoryID ,the result of
* ContainerIDtoInventoryID(BagID), can help to compute the slot number and bag numbers can be viewed in the InventorySlotID page
* @see https://wow.gamepedia.com/API_PickupBagFromSlot
*/
declare function PickupBagFromSlot(inventorySlot: WoWAPI.INVENTORY_SLOT_CONTAINER): void;
/**
* Wildcard function usually called when a player left clicks on a slot in their bags. Functionality includes picking up the item from a specific
* bag slot, putting the item into a specific bag slot, and applying enchants (including poisons and sharpening stones) to the item in a specific
* bag slot, except if one of the Modifier Keys is pressed
* @param bagId id of the bag the slot is located in
* @param slot slot inside the bag (top left slot is 1, slot to the right of it is 2)
* @description The function behaves differently depending on what is currently on the cursor
* - If the cursor currently has nothing, calling this will pick up an item from your backpack
* - If the cursor currently contains an item (check with CursorHasItem()), calling this will place the item currently on the cursor into the
* specified bag slot. If there is already an item in that bag slot, the two items will be exchanged
* - If the cursor is set to a spell (typically enchanting and poisons, check with SpellIsTargeting()), calling this specifies that you want to
* cast the spell on the item in that bag slot
* - Trying to pickup the same item twice in the same "time tick" does not work (client seems to flag the item as "locked" and waits for the server
* to sync). This is only a problem if you might move a single item multiple times (i.e., if you are changing your character's equipped armor, you
* are not likely to move a single piece of armor more than once). If you might move an object multiple times in rapid succession, you can check the
* item's 'locked' flag by calling GetContainerItemInfo. If you want to do this, you should leverage OnUpdate to help you. Avoid constantly checking
* the lock status inside a tight loop. If you do, you risk getting into a race condition. Once the repeat loop starts running, the client will not
* get any communication from the server until it finishes. However, it will not finish until the server tells it that the item is unlocked.
* Here is some sample code that illustrates the problem
* @see https://wow.gamepedia.com/API_PickupContainerItem
*/
declare function PickupContainerItem(bagId: WoWAPI.CONTAINER_ID, slot: number): void;
/**
* "Picks up" an item from the player's worn inventory. This appears to be a kind of catch-all "pick up/activate" function
* @param inventorySlot the slot ID of the worn inventory slot
* @description
* - If the cursor is empty, then it will attempt to pick up the item in the slotId
* - If the cursor has an item, then it will attempt to equip the item to the slotId and place the previous slotId item (if any) where the
* item on cursor orginated
* - If the cursor is in repair or spell-casting mode, it will attempt the action on the slotId
* - You can use GetInventorySlotInfo to get the slotId
*/
declare function PickupInventoryItem(inventorySlot: WoWAPI.INVENTORY_SLOT_ID): void;
/**
* Place the item on the cursor
* @param itemIdentifier
* - **itemId**: The numeric ID of the item. ie. 12345
* - **itemString**: The full item ID in string format, e.g. "item:12345:0:0:0:0:0:0:0"
* - **itemName**: The Name of the Item, ex: "Hearthstone"
* - **itemLink**: The itemLink, when Shift-Clicking items
* @see https://wow.gamepedia.com/API_PickupItem
*/
declare function PickupItem(itemIdentifier: number | string | WoWAPI.ItemLink): void;
/**
* Pick up a macro from the macro frame and place it on the cursor
* @param macroNameOrId the name of the macro or the position of the macro in the macro frame
* @requires NO_COMBAT
* @see https://wow.gamepedia.com/API_PickupMacro
*/
declare function PickupMacro(macroNameOrId: number | string): void;
/**
* Places the specified merchant item on the cursor
* @param merchantIndex The index of the item in the merchant's inventory
* @description Interesting thing is this function can be used to drop an item to the merchant as well. This will happen if the cursor
* already holds an item from player's bag
* @see https://wow.gamepedia.com/API_PickupMerchantItem
*/
declare function PickupMerchantItem(merchantIndex: number): void;
/**
* Pick up a pet action for drag-and-drop
* @param petActionSlot The pet action slot to pick the action up from (1-10).
* @description If the slot is empty, nothing happens, otherwise the action from the slot is placed on the cursor, and the slot is filled with
* whatever action was currently being drag-and-dropped (The slot is emptied if the cursor was empty). Be very careful about picking up the pet
* control actions (Attack/Follow/Stay/Aggressive/Defensive/Passive), because if you lose them, there's no way to get them back
* @requires NO_COMBAT
* @see https://wow.gamepedia.com/API_PickupPetAction
*/
declare function PickupPetAction(petActionSlot: number): void;
/**
* Picks up an amount of money from the player's bags, placing it on the cursor
* @param copper The amount of money, in copper, to place on the cursor
* @see https://wow.gamepedia.com/API_PickupPlayerMoney
*/
declare function PickupPlayerMoney(copper: number): void;
/**
* Puts the specified spell onto the mouse cursor
* @param spell ID of the spell to pick up
* @requires NO_COMBAT
* @see https://wow.gamepedia.com/API_PickupSpell
*/
declare function PickupSpell(spellId: number): void;
/**
* Attaches a pet in your stable to your cursor. 1 for the pet in the slot on the left, and 2 for the pet in the slot on the right
* @param slotDirection 1 for left, 2 for right
* @see https://wow.gamepedia.com/API_PickupStablePet
*/
declare function PickupStablePet(slotDirection: 1 | 2): void;
/**
* Picks up an amount of money from the player's trading offer, placing it on the cursor
* @param copper amount of money, in copper, to pick up
* @see https://wow.gamepedia.com/API_PickupTradeMoney
*/
declare function PickupTradeMoney(copper: number): void;
/**
* Place the drag-and-drop item as an action
* @param actionSlot The action slot to place the action into.
* @see https://wow.gamepedia.com/API_PlaceAction
*/
declare function PlaceAction(actionSlot: number): void;
/**
* Places the item currently on the cursor into the player's backpack otherwise it has no effect. If there is already a partial stack of the
* item in the backpack, it will attempt to stack them together
* @see https://wow.gamepedia.com/API_PutItemInBackpack
*/
declare function PutItemInBackpack(): void;
/**
* Puts the item on the cursor into the specified bag slot on the main bar, if it's a bag. Otherwise, attempts to place the item inside the bag
* in that slot. Note that to place an item in the backpack, you must use PutItemInBackpack
* @param slotId Inventory slot id containing the bag in which you wish to put the item. Values 20 to 23 correspond to the player's bag slots,
* right-to-left from the first bag after the backpack
* @see https://wow.gamepedia.com/API_PutItemInBag
*/
declare function PutItemInBag(slotId: number): void;
/**
* Resets mouse cursor
* @description Function resets mouse cursor into its default shape, if it has been previously altered by SetCursor(cursor).
* Calling ResetCursor() is equivalent to calling SetCursor(nil)
* @see https://wow.gamepedia.com/API_ResetCursor
*/
declare function ResetCursor(): void;
/**
* Changes the current cursor graphic
* @param cursor cursor to switch to; either a built-in cursor identifier (like "ATTACK_CURSOR"), path to a cursor texture
* (e.g. "Interface/Cursor/Taxi"), or nil to reset to a default cursor
* @description If the cursor is hovering over WorldFrame, the SetCursor function will have no effect - cursor is locked to reflect what
* the player is currently pointing at. If called with an invalid argument, the cursor is replaced by a black square
* @see https://wow.gamepedia.com/API_SetCursor
*/
declare function SetCursor(cursor: string | WoWAPI.TexturePath | null): boolean;
/**
* unknown
* @param index unknown
* @param slot unknown
*/
declare function ShowContainerSellCursor(index: number, slot: number): WoWAPI.Unknown;
/**
* Change the cursor to the magnifying glass inventory inspection cursor
* @see https://wow.gamepedia.com/API_ShowInspectCursor
*/
declare function ShowInspectCursor(): void;
/**
* unknown
* @param args unknown
*/
declare function ShowInventorySellCursor(...args: WoWAPI.Unknown[]): WoWAPI.Unknown;
/**
* Puts the cursor in repair mode
* @see https://wow.gamepedia.com/API_ShowRepairCursor
*/
declare function ShowRepairCursor(): void;
/**
* Picks up part of a stack of items from a container, placing them on the cursor
* @param bagId id of the bag the slot is located in
* @param slot slot inside the bag (top left slot is 1, slot to the right of it is 2)
* @param count Quantity to pick up
* @description This function always puts the requested item(s) on the cursor (unlike PickupContainerItem() which can pick up items,
* place items, or cast spells on items based on what's already on the cursor). Passing a larger count than is in the requested bag and slot
* will pick up nothing
* @see https://wow.gamepedia.com/API_SplitContainerItem
*/
declare function SplitContainerItem(bagId: WoWAPI.CONTAINER_ID, slot: number, count: number): void;
/** @noSelfInFile */
declare namespace WoWAPI {
type CursorInfoType = "item" | "spell" | "macro" | "mount" | "money" | "merchant" | "battlepet";
}
/**
* Automatically equips the item currently held on the cursor
* @see https://wow.gamepedia.com/API_AutoEquipCursorItem
*/
declare function AutoEquipCursorItem(): void;
/**
* Clears the in-game cursor, returning the object held to its original position (equivalent to right-clicking while holding something on the cursor).
* @see https://wow.gamepedia.com/API_ClearCursor
*/
declare function ClearCursor(): void;
/**
* Determines if the item in the cursor can be equipped in the specified inventory slot. Always returns 1 for bank bag slots
* @param inventorySlot Inventory slot to query
* @returns 1 if the thing currently on the cursor can go into the specified slot, nil otherwise
* @see https://wow.gamepedia.com/API_CursorCanGoInSlot
*/
declare function CursorCanGoInSlot(inventorySlot: WoWAPI.INVENTORY_SLOT_ID): WoWAPI.Flag;
/**
* Returns 1 if the cursor currently holds an item, nil otherwise
* @see https://wow.gamepedia.com/API_CursorHasItem
*/
declare function CursorHasItem(): boolean;
/**
* Returns true if the cursor currently holds money
*/
declare function CursorHasMoney(): boolean;
/**
* Returns true if the cursor currently holds a spell.
*/
declare function CursorHasSpell(): boolean;
/**
* Destroys the item currently held by the cursor
* @description This does not deselect the item, this destroys it. Use ClearCursor to drop an item from the cursor without destroying it.
* @see https://wow.gamepedia.com/API_DeleteCursorItem
*/
declare function DeleteCursorItem(): void;
/**
* Drops the money currently attached to your cursor back into your bag
* @see https://wow.gamepedia.com/API_DropCursorMoney
*/
declare function DropCursorMoney(): void;
/**
* Drops an item from the cursor onto the specified target. Can be used to initiate a trade session (though see Trade functions) or feeding pets
* @param unit Unit to which you want to give the item on the cursor
* @see https://wow.gamepedia.com/API_DropItemOnUnit
*/
declare function DropItemOnUnit(unit: WoWAPI.UnitId): void;
/**
* Equips the currently picked up item to a specific inventory slot
* @param inventorySlot The slot ID to place the item into. Use GetInventorySlotInfo(slotname) to resolve an inventory slot name to its ID
* @see https://wow.gamepedia.com/API_EquipCursorItem
*/
declare function EquipCursorItem(inventorySlot: WoWAPI.INVENTORY_SLOT_ID): void;
/**
* Returns information about what the mouse cursor is holding
* @see https://wow.gamepedia.com/API_GetCursorInfo
* @tupleReturn
*/
declare function GetCursorInfo(): LuaMultiReturn<[WoWAPI.CursorInfoType, ...WoWAPI.Unknown[]]>;
/**
* @returns **item**
* - **itemId**: Item ID of the item on the cursor
* - **itemLink**: ItemLink of the item on the cursor
* @tupleReturn
*/
declare function GetCursorInfo(): LuaMultiReturn<["item", number, WoWAPI.ItemLink]>;
/**
* @returns **spell**
* - **spellIndex**: The index of the spell in the spell book
* - **bookType**: The spell book id. Only works for player spells, so this always returns BOOKTYPE_SPELL
* - **spellId**: Spell ID of the spell on the cursor
* @tupleReturn
*/
declare function GetCursorInfo(): LuaMultiReturn<["spell", number, string, number]>;
/**
* @returns **macro**
* - **index**: The index of the macro on the cursor
* @tupleReturn
*/
declare function GetCursorInfo(): LuaMultiReturn<["macro", number]>;
/**
* @returns **money**
* - **amount**: The amount of money in copper
* @tupleReturn
*/
declare function GetCursorInfo(): LuaMultiReturn<["money", number]>;
/**
* @returns **mount**
* - **useless_index**: this index is not useful since no other API receives it as a parameter
* - **C_MountJournal index**: index in the C_MountJournal (used by C_MountJournal API functions). These indexes varies with game locale
* @tupleReturn
*/
declare function GetCursorInfo(): LuaMultiReturn<["mount", number, number]>;
/**
* @returns **merchant**
* - **index**: The index of the merchant item
* @tupleReturn
*/
declare function GetCursorInfo(): LuaMultiReturn<["merchant", number]>;
/**
* @returns **battlepet**
* - **petGUID**: GUID of a battle pet in your collection
* @tupleReturn
*/
declare function GetCursorInfo(): LuaMultiReturn<["battlepet", WoWAPI.Guid]>;
/**
* Returns the amount of copper held on the cursor
* @see https://wow.gamepedia.com/API_GetCursorMoney
* @tupleReturn
*/
declare function GetCursorMoney(): number;
/**
* Returns the cursor's position on the screen
* @returns **position**
* - x coordinate unaffected by UI scale; 0 at the left edge of the screen.
* - y coordinate unaffected by UI scale; 0 at the bottom edge of the screen.
* @description Returns scale-independent coordinates similar to Cursor:GetCenter() if 'Cursor' was a valid frame not affected by scaling.
* Assuming UIParent spans the entire screen, you can convert these coordinates to UIParent offsets by dividing by its effective scale.
* The following snippet positions a small texture at the cursor's location.
* @see https://wow.gamepedia.com/API_GetCursorPosition
* @tupleReturn
*/
declare function GetCursorPosition(): LuaMultiReturn<[number, number]>;
/**
* Takes the cursor out of repair mode
* @see https://wow.gamepedia.com/API_HideRepairCursor
*/
declare function HideRepairCursor(): void;
/**
* Lets you know if your cursor is in repair mode. When your cursor is in repair mode, you can click on equipped items as well as items in your
* inventory to repair them
* @see https://wow.gamepedia.com/API_InRepairMode
*/
declare function InRepairMode(): boolean;
/**
* Pick up an action for drag-and-drop
* @param actionSlot The action slot to pick the action up from
* @description If the slot is empty, nothing happens, otherwise the action from the slot is placed on the cursor, and the slot is filled with
* whatever action was currently being drag-and-dropped (The slot is emptied if the cursor was empty). If you wish to empty the cursor without
* putting the item into another slot, try ClearCursor.
* @requires NO_COMBAT
* @see https://wow.gamepedia.com/API_PickupAction
*/
declare function PickupAction(actionSlot: ActionBarSlotId): void;
/**
* Picks up the bag from the specified slot, placing it in the cursor
* @param inventorySlot the slot containing the bag
* @description Valid slot numbers are 20-23, numbered from left to right starting after the backpack. inventoryID ,the result of
* ContainerIDtoInventoryID(BagID), can help to compute the slot number and bag numbers can be viewed in the InventorySlotID page
* @see https://wow.gamepedia.com/API_PickupBagFromSlot
*/
declare function PickupBagFromSlot(inventorySlot: WoWAPI.INVENTORY_SLOT_CONTAINER): void;
/**
* Wildcard function usually called when a player left clicks on a slot in their bags. Functionality includes picking up the item from a specific
* bag slot, putting the item into a specific bag slot, and applying enchants (including poisons and sharpening stones) to the item in a specific
* bag slot, except if one of the Modifier Keys is pressed
* @param bagId id of the bag the slot is located in
* @param slot slot inside the bag (top left slot is 1, slot to the right of it is 2)
* @description The function behaves differently depending on what is currently on the cursor
* - If the cursor currently has nothing, calling this will pick up an item from your backpack
* - If the cursor currently contains an item (check with CursorHasItem()), calling this will place the item currently on the cursor into the
* specified bag slot. If there is already an item in that bag slot, the two items will be exchanged
* - If the cursor is set to a spell (typically enchanting and poisons, check with SpellIsTargeting()), calling this specifies that you want to
* cast the spell on the item in that bag slot
* - Trying to pickup the same item twice in the same "time tick" does not work (client seems to flag the item as "locked" and waits for the server
* to sync). This is only a problem if you might move a single item multiple times (i.e., if you are changing your character's equipped armor, you
* are not likely to move a single piece of armor more than once). If you might move an object multiple times in rapid succession, you can check the
* item's 'locked' flag by calling GetContainerItemInfo. If you want to do this, you should leverage OnUpdate to help you. Avoid constantly checking
* the lock status inside a tight loop. If you do, you risk getting into a race condition. Once the repeat loop starts running, the client will not
* get any communication from the server until it finishes. However, it will not finish until the server tells it that the item is unlocked.
* Here is some sample code that illustrates the problem
* @see https://wow.gamepedia.com/API_PickupContainerItem
*/
declare function PickupContainerItem(bagId: WoWAPI.CONTAINER_ID, slot: number): void;
/**
* "Picks up" an item from the player's worn inventory. This appears to be a kind of catch-all "pick up/activate" function
* @param inventorySlot the slot ID of the worn inventory slot
* @description
* - If the cursor is empty, then it will attempt to pick up the item in the slotId
* - If the cursor has an item, then it will attempt to equip the item to the slotId and place the previous slotId item (if any) where the
* item on cursor orginated
* - If the cursor is in repair or spell-casting mode, it will attempt the action on the slotId
* - You can use GetInventorySlotInfo to get the slotId
*/
declare function PickupInventoryItem(inventorySlot: WoWAPI.INVENTORY_SLOT_ID): void;
/**
* Place the item on the cursor
* @param itemIdentifier
* - **itemId**: The numeric ID of the item. ie. 12345
* - **itemString**: The full item ID in string format, e.g. "item:12345:0:0:0:0:0:0:0"
* - **itemName**: The Name of the Item, ex: "Hearthstone"
* - **itemLink**: The itemLink, when Shift-Clicking items
* @see https://wow.gamepedia.com/API_PickupItem
*/
declare function PickupItem(itemIdentifier: number | string | WoWAPI.ItemLink): void;
/**
* Pick up a macro from the macro frame and place it on the cursor
* @param macroNameOrId the name of the macro or the position of the macro in the macro frame
* @requires NO_COMBAT
* @see https://wow.gamepedia.com/API_PickupMacro
*/
declare function PickupMacro(macroNameOrId: number | string): void;
/**
* Places the specified merchant item on the cursor
* @param merchantIndex The index of the item in the merchant's inventory
* @description Interesting thing is this function can be used to drop an item to the merchant as well. This will happen if the cursor
* already holds an item from player's bag
* @see https://wow.gamepedia.com/API_PickupMerchantItem
*/
declare function PickupMerchantItem(merchantIndex: number): void;
/**
* Pick up a pet action for drag-and-drop
* @param petActionSlot The pet action slot to pick the action up from (1-10).
* @description If the slot is empty, nothing happens, otherwise the action from the slot is placed on the cursor, and the slot is filled with
* whatever action was currently being drag-and-dropped (The slot is emptied if the cursor was empty). Be very careful about picking up the pet
* control actions (Attack/Follow/Stay/Aggressive/Defensive/Passive), because if you lose them, there's no way to get them back
* @requires NO_COMBAT
* @see https://wow.gamepedia.com/API_PickupPetAction
*/
declare function PickupPetAction(petActionSlot: number): void;
/**
* Picks up an amount of money from the player's bags, placing it on the cursor
* @param copper The amount of money, in copper, to place on the cursor
* @see https://wow.gamepedia.com/API_PickupPlayerMoney
*/
declare function PickupPlayerMoney(copper: number): void;
/**
* Puts the specified spell onto the mouse cursor
* @param spell ID of the spell to pick up
* @requires NO_COMBAT
* @see https://wow.gamepedia.com/API_PickupSpell
*/
declare function PickupSpell(spellId: number): void;
/**
* Attaches a pet in your stable to your cursor. 1 for the pet in the slot on the left, and 2 for the pet in the slot on the right
* @param slotDirection 1 for left, 2 for right
* @see https://wow.gamepedia.com/API_PickupStablePet
*/
declare function PickupStablePet(slotDirection: 1 | 2): void;
/**
* Picks up an amount of money from the player's trading offer, placing it on the cursor
* @param copper amount of money, in copper, to pick up
* @see https://wow.gamepedia.com/API_PickupTradeMoney
*/
declare function PickupTradeMoney(copper: number): void;
/**
* Place the drag-and-drop item as an action
* @param actionSlot The action slot to place the action into.
* @see https://wow.gamepedia.com/API_PlaceAction
*/
declare function PlaceAction(actionSlot: number): void;
/**
* Places the item currently on the cursor into the player's backpack otherwise it has no effect. If there is already a partial stack of the
* item in the backpack, it will attempt to stack them together
* @see https://wow.gamepedia.com/API_PutItemInBackpack
*/
declare function PutItemInBackpack(): void;
/**
* Puts the item on the cursor into the specified bag slot on the main bar, if it's a bag. Otherwise, attempts to place the item inside the bag
* in that slot. Note that to place an item in the backpack, you must use PutItemInBackpack
* @param slotId Inventory slot id containing the bag in which you wish to put the item. Values 20 to 23 correspond to the player's bag slots,
* right-to-left from the first bag after the backpack
* @see https://wow.gamepedia.com/API_PutItemInBag
*/
declare function PutItemInBag(slotId: number): void;
/**
* Resets mouse cursor
* @description Function resets mouse cursor into its default shape, if it has been previously altered by SetCursor(cursor).
* Calling ResetCursor() is equivalent to calling SetCursor(nil)
* @see https://wow.gamepedia.com/API_ResetCursor
*/
declare function ResetCursor(): void;
/**
* Changes the current cursor graphic
* @param cursor cursor to switch to; either a built-in cursor identifier (like "ATTACK_CURSOR"), path to a cursor texture
* (e.g. "Interface/Cursor/Taxi"), or nil to reset to a default cursor
* @description If the cursor is hovering over WorldFrame, the SetCursor function will have no effect - cursor is locked to reflect what
* the player is currently pointing at. If called with an invalid argument, the cursor is replaced by a black square
* @see https://wow.gamepedia.com/API_SetCursor
*/
declare function SetCursor(cursor: string | WoWAPI.TexturePath | null): boolean;
/**
* unknown
* @param index unknown
* @param slot unknown
*/
declare function ShowContainerSellCursor(index: number, slot: number): WoWAPI.Unknown;
/**
* Change the cursor to the magnifying glass inventory inspection cursor
* @see https://wow.gamepedia.com/API_ShowInspectCursor
*/
declare function ShowInspectCursor(): void;
/**
* unknown
* @param args unknown
*/
declare function ShowInventorySellCursor(...args: WoWAPI.Unknown[]): WoWAPI.Unknown;
/**
* Puts the cursor in repair mode
* @see https://wow.gamepedia.com/API_ShowRepairCursor
*/
declare function ShowRepairCursor(): void;
/**
* Picks up part of a stack of items from a container, placing them on the cursor
* @param bagId id of the bag the slot is located in
* @param slot slot inside the bag (top left slot is 1, slot to the right of it is 2)
* @param count Quantity to pick up
* @description This function always puts the requested item(s) on the cursor (unlike PickupContainerItem() which can pick up items,
* place items, or cast spells on items based on what's already on the cursor). Passing a larger count than is in the requested bag and slot
* will pick up nothing
* @see https://wow.gamepedia.com/API_SplitContainerItem
*/
declare function SplitContainerItem(bagId: WoWAPI.CONTAINER_ID, slot: number, count: number): void;

View File

@@ -1,34 +1,34 @@
/** @noSelfInFile */
/**
* Passes its arguments to the current print output handler. By default, this will output them all to the default chat frame
*
* @param args any number of any type of values
* @see https://wow.gamepedia.com/API_print
*/
declare function print(...args: any[]): void;
/**
* Returns the function currently handling print() output
*
* @returns Current function responsible for outputting values passed to the print() function
* @see https://wow.gamepedia.com/API_getprinthandler
*/
declare function getprinthandler(): (...args: any[]) => any;
/**
* Sets a new print() output handler function
*
* @param handler The function that will be called with all of print(...)'s arguments when print(...) is called.
* This function is responsible for converting the values into a form it can present to the user
* @see https://wow.gamepedia.com/API_setprinthandler
*/
declare function setprinthandler(handler: (...args: any[]) => any): void;
/**
* Wipes a table of all contents
*
* @param table The table to be cleared
* @see https://wow.gamepedia.com/API_wipe
*/
declare function wipe<T extends object>(table: T): T;
/** @noSelfInFile */
/**
* Passes its arguments to the current print output handler. By default, this will output them all to the default chat frame
*
* @param args any number of any type of values
* @see https://wow.gamepedia.com/API_print
*/
declare function print(...args: any[]): void;
/**
* Returns the function currently handling print() output
*
* @returns Current function responsible for outputting values passed to the print() function
* @see https://wow.gamepedia.com/API_getprinthandler
*/
declare function getprinthandler(): (...args: any[]) => any;
/**
* Sets a new print() output handler function
*
* @param handler The function that will be called with all of print(...)'s arguments when print(...) is called.
* This function is responsible for converting the values into a form it can present to the user
* @see https://wow.gamepedia.com/API_setprinthandler
*/
declare function setprinthandler(handler: (...args: any[]) => any): void;
/**
* Wipes a table of all contents
*
* @param table The table to be cleared
* @see https://wow.gamepedia.com/API_wipe
*/
declare function wipe<T extends object>(table: T): T;

View File

@@ -1,67 +0,0 @@
/**
* Clears the encounter journal search results
* @see https://wow.gamepedia.com/API_EJ_ClearSearch
* @since 4.2.0 (2011-06-28)
*/
declare function EJ_ClearSearch(): void;
/**
* Ends any active encounter journal search and clears any results from EJ_GetSearchResult
* @see https://wow.gamepedia.com/API_EJ_EndSearch
* @since 7.0.3 (2016-07-19)
*/
declare function EJ_EndSearch(): void;
/**
* Returns the currently selected content tuning ID for BFA instances per EJ_SelectInstance.
* Used in the FrameXML for GameTooltip:SetHyperlink when hovering over inline spell hyperlinks in the overview tab
* @see https://wow.gamepedia.com/API_EJ_GetContentTuningID
* @since 8.0.1 (2018-07-17)
*/
declare function EJ_GetContentTuningID(): number;
/**
* Returns encounter boss info
* @param index creature index, up to nine for encounters with multiple bosses
* @param encounterId if omitted this will default to the currently viewed encounter
* @returns id, name, description, displayInfo, iconImage, uiModelSceneID
* @see https://wow.gamepedia.com/API_EJ_GetCreatureInfo
* @since 4.2.0 (2011-06-28)
*/
declare function EJ_GetCreatureInfo(index: number, encounterId?: number): [number, string, string, number, number, number];
/**
* Returns the currently active encounter journal tier index
* @returns index the current tier index
* @see https://wow.gamepedia.com/API_EJ_GetCurrentTier
* @since 5.0.4 (2012-08-28)
*/
declare function EJ_GetCurrentTier(): number;
/**
* Returns the currently viewed difficulty in the journal
* @see https://wow.gamepedia.com/API_EJ_GetDifficulty
* @since 4.3.0 (2011-11-29)
*/
declare function EJ_GetDifficulty(): number;
/**
* Returns encounter info from the journal
* @param encounterID
* @returns name, description, bossId, rootSectionId, link, journalInstanceId, dungeonEncounterId, instanceId
* @see https://wow.gamepedia.com/API_EJ_GetEncounterInfo
* @since 4.2.0 (2011-06-28)
*/
declare function EJ_GetEncounterInfo(encounterID: number): [string, string, number, number, WoWAPI.Hyperlink, number, number, number];
/**
* Returns encounter info from the journal
* @param index
* @param instanceId if omitted, this will default to the currently selected instance per EJ_SelectInstance
* @returns name, description, bossId, rootSectionId, link, journalInstanceId, dungeonEncounterId, instanceId
* @see https://wow.gamepedia.com/API_EJ_GetEncounterInfoByIndex
* @since 4.2.0 (2011-06-28)
*/
declare function EJ_GetEncounterInfoByIndex(index: number, instanceId?: number): [string, string, number, number, string, number, number, number];
// next todo: EJ_GetInstanceByIndex

View File

@@ -1,119 +0,0 @@
declare namespace Enum {
enum SubscriptionInterstitialResponseType {
Clicked = 0,
Closed = 1,
WebRedirect = 2,
}
enum AnimaDiversionNodeState {
Unavailable = 0,
Available = 1,
SelectedTemporary = 2,
SelectedPermanent = 3,
Cooldown = 4,
}
enum CovenantType {
None = 0,
Kyrian = 1,
Venthyr = 2,
NightFae = 3,
Necrolord = 4,
}
enum CovenantAbilityType {
Class = 0,
Signature = 1,
Soulbind = 2,
}
enum GarrTalentFeatureSubtype {
Generic = 0,
Bastion = 1,
Revendreth = 2,
Ardenweald = 3,
Maldraxxus = 4,
}
enum RuneforgePowerFilter {
All = 0,
Available = 1,
Unavailable = 2
}
enum SoulbindConduitType {
Finesse = 0,
Potency = 1,
Endurance = 2,
Flex = 3,
}
enum SoulbindNodeState {
Unavailable = 0,
Unselected = 1,
Selectable = 2,
Selected = 3,
}
enum SoulbindConduitTransactionType {
Install = 0,
Uninstall = 1
}
enum InventoryType {
IndexNonEquipType = 0,
IndexHeadType = 1,
IndexNeckType = 1,
IndexShoulderType = 3,
IndexBodyType = 4,
IndexChestType = 5,
IndexWaistType = 6,
IndexLegsType = 7,
IndexFeetType = 8,
IndexWristType = 9,
IndexHandType = 10,
IndexFingerType = 11,
IndexTrinketType = 12,
IndexWeaponType = 13,
IndexShieldType = 14,
IndexRangedType = 15,
IndexCloakType = 16,
Index2HWeaponType = 17,
IndexBagType = 18,
IndexTabardType = 19,
IndexRobeType = 20,
IndexWeaponmainhandType = 21,
IndexWeaponoffhandType = 22,
IndexHoldableType = 23,
IndexAmmoType = 24,
IndexThrownType = 25,
IndexRangedrightType = 26,
IndexQuiverType = 27,
IndexRelicType = 28,
}
enum ItemQuality {
Poor = 0,
Common = 1,
Uncommon = 2,
Rare = 3,
Epic = 4,
Legendary = 5,
Artifact06,
Heirloom = 7,
WoWToken = 8,
}
enum ItemInteractionFrameType {
CleanseCorruption = 0
}
enum MapCanvasPosition {
None = 0,
BottomLeft = 1,
BottomRight = 2,
TopLeft = 3,
TopRight = 4
}
}

13390
declarations/event.d.ts vendored

File diff suppressed because it is too large Load Diff

View File

@@ -1,76 +1,75 @@
/** @noSelfInFile */
declare type EXPANSION_CLASSIC = 0;
declare type EXPANSION_BURNING_CRUSADE = 1;
declare type EXPANSION_WRATH_OF_THE_LICH_KING = 2;
declare type EXPANSION_CATACLYSM = 3;
declare type EXPANSION_MISTS_OF_PANDARIA = 4;
declare type EXPANSION_WARLORDS_OF_DRAENOR = 5;
declare type EXPANSION_LEGION = 6;
declare type EXPANSION_BATTLE_FOR_AZEROTH = 7;
declare namespace WoWAPI {
type Unknown = any;
type UnknownStringKeyTable = { [anyKey: string]: any };
type UnknownNumberKeyTable = { [anyKey: number]: any };
type UnknownTable = UnknownStringKeyTable | UnknownNumberKeyTable;
type Flag = 0 | 1;
/**
* a texture can be a path to a blp file or a number as fileID
*/
type TexturePath = string | number;
/**
* the base type for all clickable ingame links in the chat
*/
type Hyperlink = string;
/**
* TYPES THAT SHOULD BE STORED SEPERATLY!!!!
*/
type CombatTextType = "DAMAGE" | "SPELL_DAMAGE" | "DAMAGE_CRIT" | "HEAL" | "PERIODIC_HEAL" | "HEAL_CRIT" | "MISS" |
"DODGE" | "PARRY" | "BLOCK" | "RESIST" | "SPELL_RESISTED" | "ABSORB" | "SPELL_ABSORBED" | "MANA" | "ENERGY" | "RAGE" | "FOCUS" |
"SPELL_ACTIVE" | "COMBO_POINTS" | "AURA_START" | "AURA_END" | "AURA_START_HARMFUL" | "AURA_END_HARMFUL" | "HONOR_GAINED" | "FACTION";
type CombatCriticalIndicator = "CRITICAL" | "CRUSHING" | "GLANCING";
type CombatDamageType = 1 | 2 | 4 | 8 | 16 | 32 | 64;
type DisenchantRollType = 1 | 2 | 3;
type Difficulty = 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22
| 23 | 24 | 25 | 26 | 27 | 28 | 29 | 30 | 31 | 32 | 33 | 34;
type StreamingState = 0 | 1 | 2 | 3;
type VehicleType = "Natural" | "Mechanical" | "VehicleMount" | "VehicleMount_Organic" | "";
type UnitPowerType = "MANA" | "RAGE" | "ENERGY" | "FOCUS" | "HAPPINESS" | "RUNIC_POWER" | "HOLY_POWER";
type SpellTreeId = 1 | 2 | 3 | 4 | 5 | 6 | 7;
}
declare type ActionBarPage1 = 1;
declare type ActionBarPage2 = 2;
declare type ActionBarPage3 = 3;
declare type ActionBarPage4 = 4;
declare type ActionBarPage5 = 5;
declare type ActionBarPage6 = 6;
declare type ActionBarPage = ActionBarPage1 | ActionBarPage2 | ActionBarPage3 | ActionBarPage4 | ActionBarPage5 | ActionBarPage6;
declare type SlotActionBarPet = 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10;
declare type SlotActionBarPage1 = 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12;
declare type SlotActionBarPage2 = 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24;
declare type SlotActionBarPage3 = 25 | 26 | 27 | 28 | 29 | 30 | 31 | 32 | 33 | 34 | 35 | 36;
declare type SlotActionBarPage4 = 37 | 38 | 39 | 40 | 41 | 42 | 43 | 44 | 45 | 46 | 47 | 48;
declare type SlotActionBarPage5 = 49 | 50 | 51 | 52 | 53 | 54 | 55 | 56 | 57 | 58 | 59 | 60;
declare type SlotActionBarPage6 = 61 | 62 | 63 | 64 | 65 | 66 | 67 | 68 | 69 | 70 | 71 | 72;
declare type SlotActionBarMisc = 73 | 74 | 75 | 76 | 77 | 78 | 79 | 80 | 81 | 82 | 83 | 84 | 85 | 86 | 87 | 88 | 89 | 90 |
91 | 92 | 93 | 94 | 95 | 96 | 97 | 98 | 99 | 100 | 101 | 102 | 103 | 104 | 105 | 106 | 107 | 108 | 109 | 110 | 111 |
112 | 113 | 114 | 115 | 116 | 117 | 118 | 119 | 120;
declare type SlotActionBarPossess = 121 | 122 | 123 | 124 | 125 | 126 | 127 | 128 | 129 | 130 | 131 | 132;
declare type ActionBarSlotId = SlotActionBarPage1 | SlotActionBarPage2 | SlotActionBarPage3 | SlotActionBarPage4 |
SlotActionBarPage5 | SlotActionBarPage6 | SlotActionBarMisc | SlotActionBarPossess;
/** @noSelfInFile */
declare type EXPANSION_CLASSIC = 0;
declare type EXPANSION_BURNING_CRUSADE = 1;
declare type EXPANSION_WRATH_OF_THE_LICH_KING = 2;
declare type EXPANSION_CATACLYSM = 3;
declare type EXPANSION_MISTS_OF_PANDARIA = 4;
declare type EXPANSION_WARLORDS_OF_DRAENOR = 5;
declare type EXPANSION_LEGION = 6;
declare type EXPANSION_BATTLE_FOR_AZEROTH = 7;
declare namespace WoWAPI {
type Unknown = any;
type UnknownStringKeyTable = { [anyKey: string]: any };
type UnknownNumberKeyTable = { [anyKey: number]: any };
type Flag = 0 | 1;
/**
* a texture can be a path to a blp file or a number as fileID
*/
type TexturePath = string | number;
/**
* the base type for all clickable ingame links in the chat
*/
type Hyperlink = string;
/**
* TYPES THAT SHOULD BE STORED SEPERATLY!!!!
*/
type CombatTextType = "DAMAGE" | "SPELL_DAMAGE" | "DAMAGE_CRIT" | "HEAL" | "PERIODIC_HEAL" | "HEAL_CRIT" | "MISS" |
"DODGE" | "PARRY" | "BLOCK" | "RESIST" | "SPELL_RESISTED" | "ABSORB" | "SPELL_ABSORBED" | "MANA" | "ENERGY" | "RAGE" | "FOCUS" |
"SPELL_ACTIVE" | "COMBO_POINTS" | "AURA_START" | "AURA_END" | "AURA_START_HARMFUL" | "AURA_END_HARMFUL" | "HONOR_GAINED" | "FACTION";
type CombatCriticalIndicator = "CRITICAL" | "CRUSHING" | "GLANCING";
type CombatDamageType = 1 | 2 | 4 | 8 | 16 | 32 | 64;
type DisenchantRollType = 1 | 2 | 3;
type Difficulty = 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22
| 23 | 24 | 25 | 26 | 27 | 28 | 29 | 30 | 31 | 32 | 33 | 34;
type StreamingState = 0 | 1 | 2 | 3;
type VehicleType = "Natural" | "Mechanical" | "VehicleMount" | "VehicleMount_Organic" | "";
type UnitPowerType = "MANA" | "RAGE" | "ENERGY" | "FOCUS" | "HAPPINESS" | "RUNIC_POWER" | "HOLY_POWER";
type SpellTreeId = 1 | 2 | 3 | 4 | 5 | 6 | 7;
}
declare type ActionBarPage1 = 1;
declare type ActionBarPage2 = 2;
declare type ActionBarPage3 = 3;
declare type ActionBarPage4 = 4;
declare type ActionBarPage5 = 5;
declare type ActionBarPage6 = 6;
declare type ActionBarPage = ActionBarPage1 | ActionBarPage2 | ActionBarPage3 | ActionBarPage4 | ActionBarPage5 | ActionBarPage6;
declare type SlotActionBarPet = 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10;
declare type SlotActionBarPage1 = 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12;
declare type SlotActionBarPage2 = 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24;
declare type SlotActionBarPage3 = 25 | 26 | 27 | 28 | 29 | 30 | 31 | 32 | 33 | 34 | 35 | 36;
declare type SlotActionBarPage4 = 37 | 38 | 39 | 40 | 41 | 42 | 43 | 44 | 45 | 46 | 47 | 48;
declare type SlotActionBarPage5 = 49 | 50 | 51 | 52 | 53 | 54 | 55 | 56 | 57 | 58 | 59 | 60;
declare type SlotActionBarPage6 = 61 | 62 | 63 | 64 | 65 | 66 | 67 | 68 | 69 | 70 | 71 | 72;
declare type SlotActionBarMisc = 73 | 74 | 75 | 76 | 77 | 78 | 79 | 80 | 81 | 82 | 83 | 84 | 85 | 86 | 87 | 88 | 89 | 90 |
91 | 92 | 93 | 94 | 95 | 96 | 97 | 98 | 99 | 100 | 101 | 102 | 103 | 104 | 105 | 106 | 107 | 108 | 109 | 110 | 111 |
112 | 113 | 114 | 115 | 116 | 117 | 118 | 119 | 120;
declare type SlotActionBarPossess = 121 | 122 | 123 | 124 | 125 | 126 | 127 | 128 | 129 | 130 | 131 | 132;
declare type ActionBarSlotId = SlotActionBarPage1 | SlotActionBarPage2 | SlotActionBarPage3 | SlotActionBarPage4 |
SlotActionBarPage5 | SlotActionBarPage6 | SlotActionBarMisc | SlotActionBarPossess;

View File

@@ -1,130 +1,130 @@
/** @noSelfInFile */
declare type QUEST_FREQUENCY_NORMAL = 1;
declare type QUEST_FREQUENCY_DAILY = 2;
declare type QUEST_FREQUENCY_WEEKLY = 3;
declare type QUEST_FREQUENCY = QUEST_FREQUENCY_NORMAL | QUEST_FREQUENCY_DAILY | QUEST_FREQUENCY_WEEKLY;
declare type GOSSIP_TYPE_BANKER = "banker";
declare type GOSSIP_TYPE_BATTLEMASTER = "battlemaster";
declare type GOSSIP_TYPE_BINDER = "binder";
declare type GOSSIP_TYPE_GOSSIP = "gossip";
declare type GOSSIP_TYPE_HEALER = "healer";
declare type GOSSIP_TYPE_PETITION = "petition";
declare type GOSSIP_TYPE_TABARD = "tabard";
declare type GOSSIP_TYPE_TAXI = "taxi";
declare type GOSSIP_TYPE_TRAINER = "trainer";
declare type GOSSIP_TYPE_UNLEARN = "unlearn";
declare type GOSSIP_TYPE_VENDOR = "vendor";
declare type GOSSIP_TYPE_WORKORDER = "workorder";
/**
* all currently known gossip types
*/
declare type GOSSIP_TYPE = GOSSIP_TYPE_BANKER | GOSSIP_TYPE_BATTLEMASTER | GOSSIP_TYPE_BINDER | GOSSIP_TYPE_GOSSIP | GOSSIP_TYPE_HEALER |
GOSSIP_TYPE_PETITION | GOSSIP_TYPE_TABARD | GOSSIP_TYPE_TAXI | GOSSIP_TYPE_TRAINER | GOSSIP_TYPE_UNLEARN | GOSSIP_TYPE_VENDOR |
GOSSIP_TYPE_WORKORDER;
/**
* Dismiss the gossip dialog
*
* @see https://wow.gamepedia.com/API_CloseGossip
*/
declare function CloseGossip(): void;
/**
* Returns whether the gossip text must be displayed
*
* @returns 1 if the client should display the gossip text for this NPC, nil if it is okay to skip directly to the only interaction option available
* @see https://wow.gamepedia.com/API_ForceGossip
*/
declare function ForceGossip(): WoWAPI.Flag;
/**
* Get the list of active quests from an NPC.
*
* @returns title1, level1, isLowLevel1, isComplete1, isLegendary1, isIgnored1, title2, level2, isLowLevel2, isComplete2, isLegendary2, isIgnored2
* @see https://wow.gamepedia.com/API_GetGossipActiveQuests
* @description The number of returned values per quest has increased again to 6
* @tupleReturn
*/
declare function GetGossipActiveQuests(): [string, string, boolean, boolean, boolean];
/**
* Returns a list of available quests from an NPC
*
* @returns title1, level1, isTrivial1, frequency1, isRepeatable1, isLegendary1, isIgnored1 ...
* @see https://wow.gamepedia.com/API_GetGossipAvailableQuests
* @tupleReturn
*/
declare function GetGossipAvailableQuests(): [string, number, boolean, QUEST_FREQUENCY, boolean, boolean, boolean];
/**
* Get the available gossip items on an NPC (possibly stuff like the BWL and MC orbs too).
*
* @returns title1, gossip1, ...
* @see https://wow.gamepedia.com/API_GetGossipOptions
* @tupleReturn
*/
declare function GetGossipOptions(): [string, GOSSIP_TYPE];
/**
* Get the gossip text
*
* @returns The text of the gossip
* @see https://wow.gamepedia.com/API_GetGossipText
*/
declare function GetGossipText(): string;
/**
* Returns the number of active quests that you should eventually turn in to this NPC
*
* @returns Number of quests you're on that should be turned in to the NPC you're gossiping with
* @see https://wow.gamepedia.com/API_GetNumGossipActiveQuests
*/
declare function GetNumGossipActiveQuests(): number;
/**
* Returns the number of quests (that you are not already on) offered by this NPC
*
* @returns Number of quests you can pick up from this NPC
* @see https://wow.gamepedia.com/API_GetNumGossipAvailableQuests
*/
declare function GetNumGossipAvailableQuests(): number;
/**
* Returns the number of conversation options available with this NPC
*
* @returns Number of conversation options you can select
* @see https://wow.gamepedia.com/API_GetNumGossipOptions
*/
declare function GetNumGossipOptions(): number;
/**
* Selects an active quest from a gossip list
*
* @param gossipIndex Index of the active quest to select, from 1 to GetNumGossipActiveQuests(); order corresponds to the order of return
* values from GetGossipActiveQuests().
* @event QUEST_PROGRESS
* @see https://wow.gamepedia.com/API_SelectGossipActiveQuest
*/
declare function SelectGossipActiveQuest(gossipIndex: number): void;
/**
* Selects an available quest from a gossip list.
*
* @param gossipIndex Index of the available quest to select, from 1 to GetNumGossipAvailableQuests(); order corresponds to the order of return
* values from GetGossipAvailableQuests().
* @event QUEST_PROGRESS
* @see https://wow.gamepedia.com/API_SelectGossipAvailableQuest
*/
declare function SelectGossipAvailableQuest(gossipIndex: number): void;
/**
* Selects a gossip (conversation) option
*
* @param gossipIndex Index of the gossip option to select, from 1 to GetNumGossipOptions(); order corresponds to the order of return values from
* GetGossipOptions().
* @see https://wow.gamepedia.com/API_SelectGossipOption
*/
declare function SelectGossipOption(gossipIndex: number): void;
/** @noSelfInFile */
declare type QUEST_FREQUENCY_NORMAL = 1;
declare type QUEST_FREQUENCY_DAILY = 2;
declare type QUEST_FREQUENCY_WEEKLY = 3;
declare type QUEST_FREQUENCY = QUEST_FREQUENCY_NORMAL | QUEST_FREQUENCY_DAILY | QUEST_FREQUENCY_WEEKLY;
declare type GOSSIP_TYPE_BANKER = "banker";
declare type GOSSIP_TYPE_BATTLEMASTER = "battlemaster";
declare type GOSSIP_TYPE_BINDER = "binder";
declare type GOSSIP_TYPE_GOSSIP = "gossip";
declare type GOSSIP_TYPE_HEALER = "healer";
declare type GOSSIP_TYPE_PETITION = "petition";
declare type GOSSIP_TYPE_TABARD = "tabard";
declare type GOSSIP_TYPE_TAXI = "taxi";
declare type GOSSIP_TYPE_TRAINER = "trainer";
declare type GOSSIP_TYPE_UNLEARN = "unlearn";
declare type GOSSIP_TYPE_VENDOR = "vendor";
declare type GOSSIP_TYPE_WORKORDER = "workorder";
/**
* all currently known gossip types
*/
declare type GOSSIP_TYPE = GOSSIP_TYPE_BANKER | GOSSIP_TYPE_BATTLEMASTER | GOSSIP_TYPE_BINDER | GOSSIP_TYPE_GOSSIP | GOSSIP_TYPE_HEALER |
GOSSIP_TYPE_PETITION | GOSSIP_TYPE_TABARD | GOSSIP_TYPE_TAXI | GOSSIP_TYPE_TRAINER | GOSSIP_TYPE_UNLEARN | GOSSIP_TYPE_VENDOR |
GOSSIP_TYPE_WORKORDER;
/**
* Dismiss the gossip dialog
*
* @see https://wow.gamepedia.com/API_CloseGossip
*/
declare function CloseGossip(): void;
/**
* Returns whether the gossip text must be displayed
*
* @returns 1 if the client should display the gossip text for this NPC, nil if it is okay to skip directly to the only interaction option available
* @see https://wow.gamepedia.com/API_ForceGossip
*/
declare function ForceGossip(): WoWAPI.Flag;
/**
* Get the list of active quests from an NPC.
*
* @returns title1, level1, isLowLevel1, isComplete1, isLegendary1, isIgnored1, title2, level2, isLowLevel2, isComplete2, isLegendary2, isIgnored2
* @see https://wow.gamepedia.com/API_GetGossipActiveQuests
* @description The number of returned values per quest has increased again to 6
* @tupleReturn
*/
declare function GetGossipActiveQuests(): [string, string, boolean, boolean, boolean];
/**
* Returns a list of available quests from an NPC
*
* @returns title1, level1, isTrivial1, frequency1, isRepeatable1, isLegendary1, isIgnored1 ...
* @see https://wow.gamepedia.com/API_GetGossipAvailableQuests
* @tupleReturn
*/
declare function GetGossipAvailableQuests(): [string, number, boolean, QUEST_FREQUENCY, boolean, boolean, boolean];
/**
* Get the available gossip items on an NPC (possibly stuff like the BWL and MC orbs too).
*
* @returns title1, gossip1, ...
* @see https://wow.gamepedia.com/API_GetGossipOptions
* @tupleReturn
*/
declare function GetGossipOptions(): [string, GOSSIP_TYPE];
/**
* Get the gossip text
*
* @returns The text of the gossip
* @see https://wow.gamepedia.com/API_GetGossipText
*/
declare function GetGossipText(): string;
/**
* Returns the number of active quests that you should eventually turn in to this NPC
*
* @returns Number of quests you're on that should be turned in to the NPC you're gossiping with
* @see https://wow.gamepedia.com/API_GetNumGossipActiveQuests
*/
declare function GetNumGossipActiveQuests(): number;
/**
* Returns the number of quests (that you are not already on) offered by this NPC
*
* @returns Number of quests you can pick up from this NPC
* @see https://wow.gamepedia.com/API_GetNumGossipAvailableQuests
*/
declare function GetNumGossipAvailableQuests(): number;
/**
* Returns the number of conversation options available with this NPC
*
* @returns Number of conversation options you can select
* @see https://wow.gamepedia.com/API_GetNumGossipOptions
*/
declare function GetNumGossipOptions(): number;
/**
* Selects an active quest from a gossip list
*
* @param gossipIndex Index of the active quest to select, from 1 to GetNumGossipActiveQuests(); order corresponds to the order of return
* values from GetGossipActiveQuests().
* @event QUEST_PROGRESS
* @see https://wow.gamepedia.com/API_SelectGossipActiveQuest
*/
declare function SelectGossipActiveQuest(gossipIndex: number): void;
/**
* Selects an available quest from a gossip list.
*
* @param gossipIndex Index of the available quest to select, from 1 to GetNumGossipAvailableQuests(); order corresponds to the order of return
* values from GetGossipAvailableQuests().
* @event QUEST_PROGRESS
* @see https://wow.gamepedia.com/API_SelectGossipAvailableQuest
*/
declare function SelectGossipAvailableQuest(gossipIndex: number): void;
/**
* Selects a gossip (conversation) option
*
* @param gossipIndex Index of the gossip option to select, from 1 to GetNumGossipOptions(); order corresponds to the order of return values from
* GetGossipOptions().
* @see https://wow.gamepedia.com/API_SelectGossipOption
*/
declare function SelectGossipOption(gossipIndex: number): void;

View File

@@ -1,7 +1,7 @@
/**
* Indicates whether the player is in a raid group
* @returns true if the player is currently in a raid group false otherwise
* @see https://wow.gamepedia.com/API_IsInRaid
* @since 5.0.4
*/
declare function IsInRaid(): boolean;
/**
* Indicates whether the player is in a raid group
* @returns true if the player is currently in a raid group false otherwise
* @see https://wow.gamepedia.com/API_IsInRaid
* @since 5.0.4
*/
declare function IsInRaid(): boolean;

View File

@@ -1,66 +1,55 @@
// global and constants
import "./constants";
import "./global";
// A
import "./account";
import "./achievement";
import "./action";
import "./activity";
import "./addon";
import "./archaeology";
import "./arena";
import "./atlas";
// B
import "./bank";
import "./barber";
import "./battlefield";
import "./binding";
import "./blackMarket";
import "./buff";
// C
import "./calendar";
import "./camera";
import "./channel";
import "./character";
import "./characterStatistics";
import "./chatInfo";
import "./chatWindow";
import "./class";
import "./communication";
import "./companion";
import "./container";
import "./currency";
import "./cursor";
// D
import "./debug";
// E
import "./encounterJournal";
import "./enums";
import "./event";
// G
import "./gossip";
import "./groups";
// I
import "./inventory";
import "./item";
import "./itemLocation";
// Q
import "./quest";
// S
import "./security";
import "./spell";
import "./system";
// U
import "./ui/tooltip";
import "./ui/ui";
import "./unit";
// V
import "./vector";
// C_* classes
import "./classes";
export = WoWAPI;
export as namespace WoWAPI;
// global and constants
import "./constants";
import "./global";
// A
import "./account";
import "./achievement";
import "./action";
import "./activity";
import "./addon";
import "./archaeology";
import "./arena";
// B
import "./bank";
import "./barber";
import "./battlefield";
import "./binding";
import "./blackMarket";
import "./buff";
// C
import "./calendar";
import "./camera";
import "./channel";
import "./character";
import "./characterStatistics";
import "./chatInfo";
import "./chatWindow";
import "./class";
import "./communication";
import "./companion";
import "./container";
import "./currency";
import "./cursor";
// D
import "./debug";
// E
import "./event";
// G
import "./gossip";
import "./groups";
// I
import "./inventory";
// Q
import "./quest";
// S
import "./security";
import "./spell";
import "./system";
import "./ui/tooltip";
// U
import "./ui/ui";
import "./unit";
export = WoWAPI;
export as namespace WoWAPI;

View File

@@ -1,27 +1,27 @@
/** @noSelfInFile */
/**
* Get cooldown information for an inventory item.
*
* @see https://wow.gamepedia.com/API_GetInventoryItemCooldown
* @returns start, duration, isEnabled
* @tupleReturn
*/
declare function GetInventoryItemCooldown(unit: WoWAPI.UnitId, slotId: number): [number, number, WoWAPI.Flag];
/**
* Return the texture for an inventory item.
*
* @see https://wow.gamepedia.com/API_GetInventoryItemTexture
* @returns The texture path for the item in the specified slot, or nil if the slot is empty.
*/
declare function GetInventoryItemTexture(unit: WoWAPI.UnitId, slotId: number): WoWAPI.TexturePath;
/**
* Return information about a specific inventory slot
*
* @see https://wow.gamepedia.com/API_GetInventorySlotInfo
* @returns slotId, textureName
* @tupleReturn
*/
declare function GetInventorySlotInfo(slotName: string): [number, WoWAPI.TexturePath];
/** @noSelfInFile */
/**
* Get cooldown information for an inventory item.
*
* @see https://wow.gamepedia.com/API_GetInventoryItemCooldown
* @returns start, duration, isEnabled
* @tupleReturn
*/
declare function GetInventoryItemCooldown(unit: WoWAPI.UnitId, slotId: number): [number, number, WoWAPI.Flag];
/**
* Return the texture for an inventory item.
*
* @see https://wow.gamepedia.com/API_GetInventoryItemTexture
* @returns The texture path for the item in the specified slot, or nil if the slot is empty.
*/
declare function GetInventoryItemTexture(unit: WoWAPI.UnitId, slotId: number): WoWAPI.TexturePath;
/**
* Return information about a specific inventory slot
*
* @see https://wow.gamepedia.com/API_GetInventorySlotInfo
* @returns slotId, textureName
* @tupleReturn
*/
declare function GetInventorySlotInfo(slotName: string): [number, WoWAPI.TexturePath];

942
declarations/item.d.ts vendored
View File

@@ -1,471 +1,471 @@
/** @noSelfInFile */
/// <reference path="auction.d.ts" />
declare namespace WoWAPI {
type ITEM_QUALITY_GENERIC = -1;
type ITEM_QUALITY_POOR = 0;
type ITEM_QUALITY_COMMON = 1;
type ITEM_QUALITY_UNCOMMON = 2;
type ITEM_QUALITY_RARE = 3;
type ITEM_QUALITY_EPIC = 4;
type ITEM_QUALITY_LEGENDARY = 5;
type ITEM_QUALITY_ARTIFACT = 6;
type ITEM_QUALITY_HEIRLOOM = 7;
type ITEM_QUALITY_WOW_TOKEN = 8;
/**
* all currently known item qualities
*/
type ITEM_QUALITY = ITEM_QUALITY_GENERIC | ITEM_QUALITY_POOR | ITEM_QUALITY_COMMON | ITEM_QUALITY_UNCOMMON |
ITEM_QUALITY_RARE | ITEM_QUALITY_EPIC | ITEM_QUALITY_LEGENDARY | ITEM_QUALITY_ARTIFACT | ITEM_QUALITY_HEIRLOOM | ITEM_QUALITY_WOW_TOKEN;
type BIND_TYPE_NONE = 0;
type BIND_TYPE_PICKUP = 1;
type BIND_TYPE_EQUIP = 2;
type BIND_TYPE_USE = 3;
type BIND_TYPE_QUEST = 4;
/**
* all currently known bind types
*/
type BIND_TYPE = BIND_TYPE_NONE | BIND_TYPE_PICKUP | BIND_TYPE_EQUIP | BIND_TYPE_USE | BIND_TYPE_QUEST;
type EquippableItemType = "Miscellaneous" | "Cloth" | "Leather" | "Mail" | "Plate" | "Shields" | "Librams" | "Idols" | "Totems" | "Sigils";
/**
* a clickable ingame item link
*/
type ItemLink = Hyperlink;
interface CorruptionEffectInfo {
name: string;
description: string;
minCorruption: number;
}
interface ItemLocationMixin {
bagID: number | null;
slotIndex: number | null;
equipmentSlotIndex: number | null;
IsValid: boolean;
Clear(): void;
GetBagAndSlot(): [number | null, number | null];
SetEquipmentSlot(equipmentSlotIndex: number | null): void;
GetEquipmentSlot(): number | null;
IsEquipmentSlot(): boolean;
IsBagAndSlot(): boolean;
HasAnyLocation(): boolean;
IsEqualToBagAndSlot(otherBagID: number, otherSlotIndex: number): boolean;
IsEqualToEquipmentSlot(otherEquipmentSlotIndex: number): boolean;
IsEqualTo(otherItemLocation: ItemLocationMixin): boolean;
}
/**
* Output table for the AuctionHouse system.
*/
interface ItemKey {
itemID: number;
itemLevel: number;
itemSuffix: number;
battlePetSpeciesID: number;
}
interface ItemKeyInfo {
itemName: string;
battlePetLink: string | null;
quality: ITEM_QUALITY;
iconFileID: number; // FileID
isPet: boolean;
isCommodity: boolean;
isEquipment: boolean;
}
interface C_AzeriteItem {
/**
* @see https://wow.gamepedia.com/API_C_AzeriteItem.FindActiveAzeriteItem
*/
FindActiveAzeriteItem(): ItemLocationMixin;
/**
*
* @param azeriteItemLocation
* @returns
* - **xp**
* - **totalLevelXP**
* @see https://wow.gamepedia.com/API_C_AzeriteItem.GetAzeriteItemXPInfo
*/
GetAzeriteItemXPInfo(azeriteItemLocation: ItemLocationMixin): [number, number];
/**
*
* @param azeriteItemLocation
* @see https://wow.gamepedia.com/API_C_AzeriteItem.GetPowerLevel
*/
GetPowerLevel(azeriteItemLocation: ItemLocationMixin): number;
/**
*
* @param azeriteItemLocation
* @see https://wow.gamepedia.com/API_C_AzeriteItem.GetUnlimitedPowerLevel
*/
GetUnlimitedPowerLevel(azeriteItemLocation: ItemLocationMixin): number;
/**
* @see https://wow.gamepedia.com/API_C_AzeriteItem.HasActiveAzeriteItem
*/
HasActiveAzeriteItem(): boolean;
/**
*
* @param itemLocation
* @see https://wow.gamepedia.com/API_C_AzeriteItem.IsAzeriteItem
*/
IsAzeriteItem(itemLocation: ItemLocationMixin): boolean;
/**
* @see https://wow.gamepedia.com/API_C_AzeriteItem.IsAzeriteItemAtMaxLevel
*/
IsAzeriteItemAtMaxLevel(): boolean;
/**
*
* @param itemInfo
* @see https://wow.gamepedia.com/API_C_AzeriteItem.IsAzeriteItemByID
*/
IsAzeriteItemByID(itemInfo: string): boolean;
}
}
declare const C_AzeriteItem: WoWAPI.C_AzeriteItem;
/**
* Equips an item, optionally into a specified slot
* @param itemIdentifier itemId or "itemName" or "itemLink"
* - **itemId**: The numeric ID of the item. ie. 12345
* - **itemName**: The name of the item, ie "Worn Dagger". Partial names are valid inputs as well, ie "Worn". If several items with same piece
* of name exists, the first one found will be equipped
* - **itemLink**: The itemLink, when Shift-Clicking items
* @param slot The inventory slot to put the item in, obtained via GetInventorySlotInfo().
* @description When in combat this function now "picks up" the item instead of equipping it, similar to PickupInventoryItem. Out of combat, the
* function behaves as expected. This change was made to address the issue of rogues using "poison swapping" addons to increase their DPS
* @see https://wow.gamepedia.com/API_EquipItemByName
*/
declare function EquipItemByName(itemIdentifier: string | number | WoWAPI.ItemLink, slot?: WoWAPI.INVENTORY_SLOT_ID): void;
/**
* Returns a link of the object located in the specified slot of a specified bag.
* @param bagId Bag index (bagID). Valid indices are integers -2 through 11. 0 is the backpack
* @param slotIndex Slot index within the specified bag, ascending from 1. Slot 1 is typically the leftmost topmost slot
* @returns a chat link for the object in the specified bag slot; nil if there is no such object. This is typically, but not always an ItemLink
* @see https://wow.gamepedia.com/API_GetContainerItemLink
*/
declare function GetContainerItemLink(bagId: WoWAPI.CONTAINER_ID, slotIndex: number): WoWAPI.ItemLink | null;
/**
* Tracks the extent to which a player is wearing items touched by N'Zoth's influence.
* @returns the amount of corruption independent of any resistances
* @see https://wow.gamepedia.com/API_GetCorruption
*/
declare function GetCorruption(): number;
/**
* Tracks how much the player has offset their exposure to dangers that result from wearing items touched by N'Zoth's influence.
* @returns Amount of corruption resistance, independent of how much corruption is actually present
* @see https://wow.gamepedia.com/API_GetCorruptionResistance
*/
declare function GetCorruptionResistance(): number;
/**
* Returns detailed item level information about a given item
* @param itemIdentifier One of the following four ways to specify which item to query
* - **itemId**: Numeric ID of the item. e.g. 30234 for [Nordrassil Wrath-Kilt],
* - **itemName**: Name of an item owned by the player at some point during this play session, e.g. "Nordrassil Wrath-Kilt"
* - **itemString**: A fragment of the itemString for the item, e.g. "item:30234:0:0:0:0:0:0:0" or "item:30234"
* - **itemLink**: The full itemLink
* @returns **
* - **effectiveILvl**: same as in tooltip
* - **isPreview**: True means it would have a + in the tooltip, a minimal level for item used in loot preview in encounter journal
* - **baseLevel**: base item level
* @since 7.1.0
* @see https://wow.gamepedia.com/API_GetDetailedItemLevelInfo
* @tupleReturn
*/
declare function GetDetailedItemLevelInfo(itemIdentifier: string | number | WoWAPI.ItemLink): [number, boolean, number];
/**
* Returns cooldown information for the item
* @param itemId The numeric ID of the item. ie. 12345
* @returns **startTime, duration, enable**
* - **startTime**: The time when the cooldown started (as returned by GetTime()) or zero if no cooldown
* - **duration**: The number of seconds the cooldown will last, or zero if no cooldown
* - **enable**: 1 if the item is ready or on cooldown, 0 if the item is used, but the cooldown didn't start yet (e.g. potion in combat)
* @see https://wow.gamepedia.com/API_GetItemCooldown
* @tupleReturn
*/
declare function GetItemCooldown(itemId: number): [number, number, WoWAPI.Flag];
/**
* Returns count information for the item
* @param itemIdentifier Number/String/String - Numeric ID of the item, name of the item, or itemLink of the item to query
* @param includeBank count includes bank items
* @param includeCharges count is charges if any, otherwise number of items
* @returns The number of items in your possesion, or charges if includeCharges is true and the item has charges
* @see https://wow.gamepedia.com/API_GetItemCount
*/
declare function GetItemCount(itemIdentifier: string | number | WoWAPI.ItemLink, includeBank?: boolean, includeCharges?: boolean): number;
/**
* Gets the bitfield of what types of bags an item can go into or contain
* @param itemIdentifier Number/String/String - Numeric ID of the item, name of the item, or itemLink of the item to query
* @returns What type of bags an item can go into or if the item is a container what it can contain
* @see https://wow.gamepedia.com/API_GetItemFamily
*/
declare function GetItemFamily(itemIdentifier: string | number | WoWAPI.ItemLink): WoWAPI.BAG_TYPE;
/**
* Returns an item's icon texture
* @param itemId The numeric ID of the item to query e.g. 23405 for [Farstrider's Tunic].
* @returns Icon texture used by the item
* @see https://wow.gamepedia.com/API_GetItemIcon
*/
declare function GetItemIcon(itemId: number): WoWAPI.TexturePath;
/**
* Return information about a specific item
* @param itemIdentifier Number/String/String - Numeric ID of the item, name of the item, or itemLink of the item to query
* @returns
* - **itemName**: The localized name of the item
* - **itemLink**: The localized item link of the item
* - **itemRarity**: The quality of the item. The value is 0 to 7, which represents Poor to Heirloom. This appears to include gains from upgrades/bonuses
* - **itemLevel**: The base item level of this item, not including item levels gained from upgrades. Use GetDetailedItemLevelInfo to get the
* actual current level of the item
* - **itemMinLevel**: The minimum level required to use the item, 0 meaning no level requirement
* - **itemType**: The localized type of the item: Armor, Weapon, Quest, Key, etc
* - **itemSubType**: The localized sub-type of the item: Enchanting, Cloth, Sword, etc. See itemType
* - **itemStackCount**: How many of the item per stack: 20 for Runecloth, 1 for weapon, 100 for Alterac Ram Hide, etc
* - **itemEquipLocation**: The type of inventory equipment location in which the item may be equipped, or "" if it can't be equippable. The
* string returned is also the name of a global string variable e.g. if "INVTYPE_WEAPONMAINHAND" is returned, _G["INVTYPE_WEAPONMAINHAND"] will
* be the localized, displayable name of the location
* - **itemIcon**: The icon texture for the item
* - **itemSellPrice**: The price, in copper, a vendor is willing to pay for this item, 0 for items that cannot be sold
* - **itemClassId**: This is the numerical value that determines the string to display for 'itemType'
* - **itemSubClassId**: This is the numerical value that determines the string to display for 'itemSubType'
* - **bindType**: Item binding type: 0 - none; 1 - on pickup; 2 - on equip; 3 - on use; 4 - quest
* - **expactId**: unknown
* - **itemSetId**: unknown
* - **isCraftingReagent**: unknown
* @see https://wow.gamepedia.com/API_GetItemInfo
* @tupleReturn
*/
// tslint:disable-next-line max-line-length
declare function GetItemInfo(itemIdentifier: string | number | WoWAPI.ItemLink): [string, WoWAPI.ItemLink, WoWAPI.ITEM_QUALITY, number, number, string, string, number, WoWAPI.INVENTORY_SLOT_ID, WoWAPI.TexturePath, number, number, number, WoWAPI.BIND_TYPE, number, number, boolean];
/**
* Returns instantly-available information about a specific item
* @param itemIdentifier Number/String/String - Numeric ID of the item, name of the item, or itemLink of the item to query
* @returns
* - **itemId**: ID of the item
* - **itemType**: The localized type of the item: Armor, Weapon, Quest, Key, etc
* - **itemSubType**: The localized sub-type of the item: Enchanting, Cloth, Sword, etc. See itemType
* - **itemEquipLocation**: The type of inventory equipment location in which the item may be equipped, or "" if it can't be equippable. The
* string returned is also the name of a global string variable e.g. if "INVTYPE_WEAPONMAINHAND" is returned, _G["INVTYPE_WEAPONMAINHAND"] will be
* the localized, displayable name of the location
* - **itemIcon**: The icon texture for the item
* - **itemClassId**: This is the numerical value that determines the string to display for 'itemType'
* - **itemSubClassId**: This is the numerical value that determines the string to display for 'itemSubType'
* @description Though it is not documented, this function apparently returns info available directly in client files. Because of that it returns
* less data, but have several advantages over GetItemInfo: it always return data, when GetItemInfo can return nil for valid, but not loaded items
* and it never initiates requests to server, that could be subject to throttling or forced disconnection.
* @see https://wow.gamepedia.com/API_GetItemInfoInstant
* @since 7.0.3
* @tupleReturn
*/
// tslint:disable-next-line max-line-length
declare function GetItemInfoInstant(itemIdentifier: string | number | WoWAPI.ItemLink): [number, string, string, WoWAPI.INVENTORY_SLOT_ID, WoWAPI.TexturePath, number, number];
/**
* Returns RGB color codes for an item quality
* @param quality The numeric ID of the quality from 0 (Poor) to 7 (Heirloom)
* @returns
* - **red**: The Red component of the color (0 to 1, inclusive)
* - **green**: The Green component of the color (0 to 1, inclusive)
* - **blue**: The Blue component of the color (0 to 1, inclusive)
* - **hex**: The UI escape sequence for this color, without the leading "|c".
* @see https://wow.gamepedia.com/API_GetItemQualityColor
* @tupleReturn
*/
declare function GetItemQualityColor(quality: WoWAPI.ITEM_QUALITY): [number, number, number, string];
/**
* Return spell information about a specific item
* @param itemIdentifier Number/String/String - Numeric ID of the item, name of the item, or itemLink of the item to query
* @returns
* - **spellName**: The name of the spell
* - **spellRank**: The secondary text of the spell, displayed in the top right-hand corner of the spell's tooltip
* - **spellId**: The spell's unique identifier
* @see https://wow.gamepedia.com/API_GetItemSpell
*/
declare function GetItemSpell(itemIdentifier: string | number | WoWAPI.ItemLink): [string, string, number];
/**
* Returns a table of stats for an item
* @param itemLink An item link for which to get stats
* @param statTable An optional, empty table that will be filled with stats and returned. If this parameter is omitted, a new table is returned
* @see https://wow.gamepedia.com/API_GetItemStats
*/
declare function GetItemStats(itemLink: WoWAPI.ItemLink, statTable?: {}): { [index: string]: number };
/**
* Returns a link to the indexed item in the merchant's inventory
* @param merchantIndex The index of the item in the merchant's inventory
* @returns returns a string that will show as a clickable link to the item
* @see https://wow.gamepedia.com/API_GetMerchantWoWAPI.ItemLink
*/
declare function GetMerchantItemLink(merchantIndex: number): WoWAPI.ItemLink;
/**
* @see https://wow.gamepedia.com/API_GetNegativeCorruptionEffectInfo
*/
declare function GetNegativeCorruptionEffectInfo(): WoWAPI.CorruptionEffectInfo[];
/**
* Returns link to the quest item
* @param type "required", "reward" or "choice"
* @param index Quest reward item index
* @returns The link to the quest item specified
* @see https://wow.gamepedia.com/API_GetQuestWoWAPI.ItemLink
*/
declare function GetQuestItemLink(type: WoWAPI.QuestType, index: number): WoWAPI.ItemLink;
/**
* Returns link to the quest item
* @param type "required", "reward" or "choice"
* @param index Quest reward item index (starts with 1)
* @returns The link to the quest item specified or nil, if the type and/or index is invalid, there is no active quest at the moment or if the
* server did not transmit the item information until the timeout (which can happen, if the item is not in the local item cache yet)
* @see https://wow.gamepedia.com/API_GetQuestLogWoWAPI.ItemLink
*/
declare function GetQuestLogItemLink(type: WoWAPI.QuestType, index: number): WoWAPI.ItemLink;
/**
* Returns a single value: chat-ready item link
* @param tradeSlotIndex index value of the "player's" (your character) trade slots (starts at 1 and proceeds to 6. 7 may be used for the
* will-not-be-traded-slot.)
* @returns a string that can be used to link items in the chat log
* @see https://wow.gamepedia.com/API_GetTradePlayerWoWAPI.ItemLink
*/
declare function GetTradePlayerItemLink(tradeSlotIndex: number): WoWAPI.ItemLink;
/**
* Gets the link string for a trade skill item
* @param skillId The Id specifying which trade skill's link to get. Trade Skill window must be open for this to work. Indexes start at 1 which
* is the general category of the tradeskill, if you have selected a sub-group of trade skills then 1 will be the name of that sub-group
* @see https://wow.gamepedia.com/API_GetTradeSkillWoWAPI.ItemLink
*/
declare function GetTradeSkillItemLink(skillId: number): WoWAPI.ItemLink;
/**
* Gets the link string for a trade skill reagent
* @param skillId The Id specifying which trade skill's reagent to link
* @param reagentId The Id specifying which of the skill's reagents to link
* @see https://wow.gamepedia.com/API_GetTradeSkillReagentWoWAPI.ItemLink
*/
declare function GetTradeSkillReagentItemLink(skillId: number, reagentId: number): WoWAPI.ItemLink;
/**
* Simply view, except this function is for your trading partner, ie, the other side of the trade window
* @param tradeIndex index value of the "player's" (your character) trade slots (starts at 1 and proceeds to 6. 7 may be used for the will-not-be-traded-slot.)
* @see https://wow.gamepedia.com/API_GetTradeTargetWoWAPI.ItemLink
*/
declare function GetTradeTargetItemLink(tradeIndex: number): WoWAPI.ItemLink;
/**
* Returns usable, noMana
* @param itemIdentifier Number/String/String - Numeric ID of the item, name of the item, or itemLink of the item to query
*/
declare function IsUsableItem(itemIdentifier: string | number | WoWAPI.ItemLink): [boolean, boolean];
/**
* Returns whether an item is consumed when used
* @param itemIdentifier An item ID (number), item link or item name (string) to query
* @returns 1 if the item is consumed when used, nil otherwise
* @see https://wow.gamepedia.com/API_IsConsumableItem
*/
declare function IsConsumableItem(itemIdentifier: string | number | WoWAPI.ItemLink): WoWAPI.Flag;
/**
*
* @param itemIdentifier An item ID (number), item link or item name (string) to query
* @see https://wow.gamepedia.com/API_IsCorruptedItem
*/
declare function IsCorruptedItem(itemIdentifier: string | number | WoWAPI.ItemLink): boolean;
/**
* unknown
* @param itemIdentifier An item ID (number), item link or item name (string) to query
*/
declare function IsCurrentItem(itemIdentifier: string | number | WoWAPI.ItemLink): WoWAPI.Flag;
/**
* Determines if an item is equipped
* @param itemIdentifier Number/String/String - Numeric ID of the item, name of the item, or itemLink of the item to query
* @see https://wow.gamepedia.com/API_IsEquippedItem
*/
declare function IsEquippedItem(itemIdentifier: string | number | WoWAPI.ItemLink): boolean;
/**
* Returns 1 if item is an equip-able one at all, your character notwithstanding, or nil if not
* @param itemIdentifier Number/String/String - Numeric ID of the item, name of the item, or itemLink of the item to query
* @see https://wow.gamepedia.com/API_IsEquippableItem
*/
declare function IsEquippableItem(itemIdentifier: string | number | WoWAPI.ItemLink): boolean;
/**
* Determines if an item of a given type is equipped
* @param itemType any valid inventory type, item class, or item subclass
* @see https://wow.gamepedia.com/API_IsEquippedItemType
*/
declare function IsEquippedItemType(itemType: WoWAPI.EquippableItemType): boolean;
/**
* Returns if you are in range of the specified unit to use the specified item
* @param itemIdentifier Number/String/String - Numeric ID of the item, name of the item, or itemLink of the item to query
* @param unit which unit the range should be checked to
* @returns
* - If the item is not in range, false; if the item is in range, true; if the query is invalid, nil
* - If the item is not in range, 0; if the item is in range, 1; if the query is invalid, nil
* @see https://wow.gamepedia.com/API_IsItemInRange
*/
declare function IsItemInRange(itemIdentifier: string | number | WoWAPI.ItemLink, unit?: WoWAPI.UnitId): [boolean, WoWAPI.Flag];
/**
* unknown
* @param itemIdentifier Number/String/String - Numeric ID of the item, name of the item, or itemLink of the item to query
*/
declare function ItemHasRange(itemIdentifier: string | number | WoWAPI.ItemLink): boolean;
/**
* Called to handle clicks on Blizzard hyperlinks in chat
* @param link Link to Use, (eg 'item:3577:0:0:0:0:0:0:276308480' is a [Gold Bar], 'player:Kaso' is [Kaso]).
* @param text The Text of the link, including Text Colour Infomation and itemlinks (eg The previous two examples
* : '|cff1eff00|Hitem:3577:0:0:0:0:0:0:276308480|h[Gold Bar]|h|r' '|Hplayer:Kaso|h[Kaso]|h'
* @param button The button used to click the notes 'LeftButton' or 'RightButton' Apparently, See Notes
* @description
* - Do not insecurely hook this function to add your own link types; hook ChatFrame_OnHyperlinkShow(frame, link, text, button) instead.
* Hooking this function insecurely will end up tainting Blizzard's combat log, which will taint UIParent's update routines and result in
* "action has been blocked" messages
* - This function is affected by Shift and Ctrl keys, and depends on what is being clicked, according to the below table
* @see https://wow.gamepedia.com/API_SetItemRef
*/
declare function SetItemRef(link: WoWAPI.ItemLink, text: string, button: WoWAPI.MouseButton): void;
/**
* Uses an item, optionally on a specified target
* @param itemName name of the item to use
* @param target unit to use the item on, defaults to "target" for items that can be used on others
* @protected
* @see https://wow.gamepedia.com/API_UseItemByName
*/
declare function UseItemByName(itemName: string, target?: WoWAPI.UnitId): void;
/** @noSelfInFile */
/// <reference path="auction.d.ts" />
declare namespace WoWAPI {
type ITEM_QUALITY_GENERIC = -1;
type ITEM_QUALITY_POOR = 0;
type ITEM_QUALITY_COMMON = 1;
type ITEM_QUALITY_UNCOMMON = 2;
type ITEM_QUALITY_RARE = 3;
type ITEM_QUALITY_EPIC = 4;
type ITEM_QUALITY_LEGENDARY = 5;
type ITEM_QUALITY_ARTIFACT = 6;
type ITEM_QUALITY_HEIRLOOM = 7;
type ITEM_QUALITY_WOW_TOKEN = 8;
/**
* all currently known item qualities
*/
type ITEM_QUALITY = ITEM_QUALITY_GENERIC | ITEM_QUALITY_POOR | ITEM_QUALITY_COMMON | ITEM_QUALITY_UNCOMMON |
ITEM_QUALITY_RARE | ITEM_QUALITY_EPIC | ITEM_QUALITY_LEGENDARY | ITEM_QUALITY_ARTIFACT | ITEM_QUALITY_HEIRLOOM | ITEM_QUALITY_WOW_TOKEN;
type BIND_TYPE_NONE = 0;
type BIND_TYPE_PICKUP = 1;
type BIND_TYPE_EQUIP = 2;
type BIND_TYPE_USE = 3;
type BIND_TYPE_QUEST = 4;
/**
* all currently known bind types
*/
type BIND_TYPE = BIND_TYPE_NONE | BIND_TYPE_PICKUP | BIND_TYPE_EQUIP | BIND_TYPE_USE | BIND_TYPE_QUEST;
type EquippableItemType = "Miscellaneous" | "Cloth" | "Leather" | "Mail" | "Plate" | "Shields" | "Librams" | "Idols" | "Totems" | "Sigils";
/**
* a clickable ingame item link
*/
type ItemLink = Hyperlink;
interface CorruptionEffectInfo {
name: string;
description: string;
minCorruption: number;
}
interface ItemLocationMixin {
bagID: number | null;
slotIndex: number | null;
equipmentSlotIndex: number | null;
IsValid: boolean;
Clear(): void;
GetBagAndSlot(): [number | null, number | null];
SetEquipmentSlot(equipmentSlotIndex: number | null): void;
GetEquipmentSlot(): number | null;
IsEquipmentSlot(): boolean;
IsBagAndSlot(): boolean;
HasAnyLocation(): boolean;
IsEqualToBagAndSlot(otherBagID: number, otherSlotIndex: number): boolean;
IsEqualToEquipmentSlot(otherEquipmentSlotIndex: number): boolean;
IsEqualTo(otherItemLocation: ItemLocationMixin): boolean;
}
/**
* Output table for the AuctionHouse system.
*/
interface ItemKey {
itemID: number;
itemLevel: number;
itemSuffix: number;
battlePetSpeciesID: number;
}
interface ItemKeyInfo {
itemName: string;
battlePetLink: string | null;
quality: ITEM_QUALITY;
iconFileID: number; // FileID
isPet: boolean;
isCommodity: boolean;
isEquipment: boolean;
}
interface C_AzeriteItem {
/**
* @see https://wow.gamepedia.com/API_C_AzeriteItem.FindActiveAzeriteItem
*/
FindActiveAzeriteItem(): ItemLocationMixin;
/**
*
* @param azeriteItemLocation
* @returns
* - **xp**
* - **totalLevelXP**
* @see https://wow.gamepedia.com/API_C_AzeriteItem.GetAzeriteItemXPInfo
*/
GetAzeriteItemXPInfo(azeriteItemLocation: ItemLocationMixin): [number, number];
/**
*
* @param azeriteItemLocation
* @see https://wow.gamepedia.com/API_C_AzeriteItem.GetPowerLevel
*/
GetPowerLevel(azeriteItemLocation: ItemLocationMixin): number;
/**
*
* @param azeriteItemLocation
* @see https://wow.gamepedia.com/API_C_AzeriteItem.GetUnlimitedPowerLevel
*/
GetUnlimitedPowerLevel(azeriteItemLocation: ItemLocationMixin): number;
/**
* @see https://wow.gamepedia.com/API_C_AzeriteItem.HasActiveAzeriteItem
*/
HasActiveAzeriteItem(): boolean;
/**
*
* @param itemLocation
* @see https://wow.gamepedia.com/API_C_AzeriteItem.IsAzeriteItem
*/
IsAzeriteItem(itemLocation: ItemLocationMixin): boolean;
/**
* @see https://wow.gamepedia.com/API_C_AzeriteItem.IsAzeriteItemAtMaxLevel
*/
IsAzeriteItemAtMaxLevel(): boolean;
/**
*
* @param itemInfo
* @see https://wow.gamepedia.com/API_C_AzeriteItem.IsAzeriteItemByID
*/
IsAzeriteItemByID(itemInfo: string): boolean;
}
}
declare const C_AzeriteItem: WoWAPI.C_AzeriteItem;
/**
* Equips an item, optionally into a specified slot
* @param itemIdentifier itemId or "itemName" or "itemLink"
* - **itemId**: The numeric ID of the item. ie. 12345
* - **itemName**: The name of the item, ie "Worn Dagger". Partial names are valid inputs as well, ie "Worn". If several items with same piece
* of name exists, the first one found will be equipped
* - **itemLink**: The itemLink, when Shift-Clicking items
* @param slot The inventory slot to put the item in, obtained via GetInventorySlotInfo().
* @description When in combat this function now "picks up" the item instead of equipping it, similar to PickupInventoryItem. Out of combat, the
* function behaves as expected. This change was made to address the issue of rogues using "poison swapping" addons to increase their DPS
* @see https://wow.gamepedia.com/API_EquipItemByName
*/
declare function EquipItemByName(itemIdentifier: string | number | WoWAPI.ItemLink, slot?: WoWAPI.INVENTORY_SLOT_ID): void;
/**
* Returns a link of the object located in the specified slot of a specified bag.
* @param bagId Bag index (bagID). Valid indices are integers -2 through 11. 0 is the backpack
* @param slotIndex Slot index within the specified bag, ascending from 1. Slot 1 is typically the leftmost topmost slot
* @returns a chat link for the object in the specified bag slot; nil if there is no such object. This is typically, but not always an ItemLink
* @see https://wow.gamepedia.com/API_GetContainerItemLink
*/
declare function GetContainerItemLink(bagId: WoWAPI.CONTAINER_ID, slotIndex: number): WoWAPI.ItemLink | null;
/**
* Tracks the extent to which a player is wearing items touched by N'Zoth's influence.
* @returns the amount of corruption independent of any resistances
* @see https://wow.gamepedia.com/API_GetCorruption
*/
declare function GetCorruption(): number;
/**
* Tracks how much the player has offset their exposure to dangers that result from wearing items touched by N'Zoth's influence.
* @returns Amount of corruption resistance, independent of how much corruption is actually present
* @see https://wow.gamepedia.com/API_GetCorruptionResistance
*/
declare function GetCorruptionResistance(): number;
/**
* Returns detailed item level information about a given item
* @param itemIdentifier One of the following four ways to specify which item to query
* - **itemId**: Numeric ID of the item. e.g. 30234 for [Nordrassil Wrath-Kilt],
* - **itemName**: Name of an item owned by the player at some point during this play session, e.g. "Nordrassil Wrath-Kilt"
* - **itemString**: A fragment of the itemString for the item, e.g. "item:30234:0:0:0:0:0:0:0" or "item:30234"
* - **itemLink**: The full itemLink
* @returns **
* - **effectiveILvl**: same as in tooltip
* - **isPreview**: True means it would have a + in the tooltip, a minimal level for item used in loot preview in encounter journal
* - **baseLevel**: base item level
* @since 7.1.0
* @see https://wow.gamepedia.com/API_GetDetailedItemLevelInfo
* @tupleReturn
*/
declare function GetDetailedItemLevelInfo(itemIdentifier: string | number | WoWAPI.ItemLink): [number, boolean, number];
/**
* Returns cooldown information for the item
* @param itemId The numeric ID of the item. ie. 12345
* @returns **startTime, duration, enable**
* - **startTime**: The time when the cooldown started (as returned by GetTime()) or zero if no cooldown
* - **duration**: The number of seconds the cooldown will last, or zero if no cooldown
* - **enable**: 1 if the item is ready or on cooldown, 0 if the item is used, but the cooldown didn't start yet (e.g. potion in combat)
* @see https://wow.gamepedia.com/API_GetItemCooldown
* @tupleReturn
*/
declare function GetItemCooldown(itemId: number): [number, number, WoWAPI.Flag];
/**
* Returns count information for the item
* @param itemIdentifier Number/String/String - Numeric ID of the item, name of the item, or itemLink of the item to query
* @param includeBank count includes bank items
* @param includeCharges count is charges if any, otherwise number of items
* @returns The number of items in your possesion, or charges if includeCharges is true and the item has charges
* @see https://wow.gamepedia.com/API_GetItemCount
*/
declare function GetItemCount(itemIdentifier: string | number | WoWAPI.ItemLink, includeBank?: boolean, includeCharges?: boolean): number;
/**
* Gets the bitfield of what types of bags an item can go into or contain
* @param itemIdentifier Number/String/String - Numeric ID of the item, name of the item, or itemLink of the item to query
* @returns What type of bags an item can go into or if the item is a container what it can contain
* @see https://wow.gamepedia.com/API_GetItemFamily
*/
declare function GetItemFamily(itemIdentifier: string | number | WoWAPI.ItemLink): WoWAPI.BAG_TYPE;
/**
* Returns an item's icon texture
* @param itemId The numeric ID of the item to query e.g. 23405 for [Farstrider's Tunic].
* @returns Icon texture used by the item
* @see https://wow.gamepedia.com/API_GetItemIcon
*/
declare function GetItemIcon(itemId: number): WoWAPI.TexturePath;
/**
* Return information about a specific item
* @param itemIdentifier Number/String/String - Numeric ID of the item, name of the item, or itemLink of the item to query
* @returns
* - **itemName**: The localized name of the item
* - **itemLink**: The localized item link of the item
* - **itemRarity**: The quality of the item. The value is 0 to 7, which represents Poor to Heirloom. This appears to include gains from upgrades/bonuses
* - **itemLevel**: The base item level of this item, not including item levels gained from upgrades. Use GetDetailedItemLevelInfo to get the
* actual current level of the item
* - **itemMinLevel**: The minimum level required to use the item, 0 meaning no level requirement
* - **itemType**: The localized type of the item: Armor, Weapon, Quest, Key, etc
* - **itemSubType**: The localized sub-type of the item: Enchanting, Cloth, Sword, etc. See itemType
* - **itemStackCount**: How many of the item per stack: 20 for Runecloth, 1 for weapon, 100 for Alterac Ram Hide, etc
* - **itemEquipLocation**: The type of inventory equipment location in which the item may be equipped, or "" if it can't be equippable. The
* string returned is also the name of a global string variable e.g. if "INVTYPE_WEAPONMAINHAND" is returned, _G["INVTYPE_WEAPONMAINHAND"] will
* be the localized, displayable name of the location
* - **itemIcon**: The icon texture for the item
* - **itemSellPrice**: The price, in copper, a vendor is willing to pay for this item, 0 for items that cannot be sold
* - **itemClassId**: This is the numerical value that determines the string to display for 'itemType'
* - **itemSubClassId**: This is the numerical value that determines the string to display for 'itemSubType'
* - **bindType**: Item binding type: 0 - none; 1 - on pickup; 2 - on equip; 3 - on use; 4 - quest
* - **expactId**: unknown
* - **itemSetId**: unknown
* - **isCraftingReagent**: unknown
* @see https://wow.gamepedia.com/API_GetItemInfo
* @tupleReturn
*/
// tslint:disable-next-line max-line-length
declare function GetItemInfo(itemIdentifier: string | number | WoWAPI.ItemLink): [string, WoWAPI.ItemLink, WoWAPI.ITEM_QUALITY, number, number, string, string, number, WoWAPI.INVENTORY_SLOT_ID, WoWAPI.TexturePath, number, number, number, WoWAPI.BIND_TYPE, number, number, boolean];
/**
* Returns instantly-available information about a specific item
* @param itemIdentifier Number/String/String - Numeric ID of the item, name of the item, or itemLink of the item to query
* @returns
* - **itemId**: ID of the item
* - **itemType**: The localized type of the item: Armor, Weapon, Quest, Key, etc
* - **itemSubType**: The localized sub-type of the item: Enchanting, Cloth, Sword, etc. See itemType
* - **itemEquipLocation**: The type of inventory equipment location in which the item may be equipped, or "" if it can't be equippable. The
* string returned is also the name of a global string variable e.g. if "INVTYPE_WEAPONMAINHAND" is returned, _G["INVTYPE_WEAPONMAINHAND"] will be
* the localized, displayable name of the location
* - **itemIcon**: The icon texture for the item
* - **itemClassId**: This is the numerical value that determines the string to display for 'itemType'
* - **itemSubClassId**: This is the numerical value that determines the string to display for 'itemSubType'
* @description Though it is not documented, this function apparently returns info available directly in client files. Because of that it returns
* less data, but have several advantages over GetItemInfo: it always return data, when GetItemInfo can return nil for valid, but not loaded items
* and it never initiates requests to server, that could be subject to throttling or forced disconnection.
* @see https://wow.gamepedia.com/API_GetItemInfoInstant
* @since 7.0.3
* @tupleReturn
*/
// tslint:disable-next-line max-line-length
declare function GetItemInfoInstant(itemIdentifier: string | number | WoWAPI.ItemLink): [number, string, string, WoWAPI.INVENTORY_SLOT_ID, WoWAPI.TexturePath, number, number];
/**
* Returns RGB color codes for an item quality
* @param quality The numeric ID of the quality from 0 (Poor) to 7 (Heirloom)
* @returns
* - **red**: The Red component of the color (0 to 1, inclusive)
* - **green**: The Green component of the color (0 to 1, inclusive)
* - **blue**: The Blue component of the color (0 to 1, inclusive)
* - **hex**: The UI escape sequence for this color, without the leading "|c".
* @see https://wow.gamepedia.com/API_GetItemQualityColor
* @tupleReturn
*/
declare function GetItemQualityColor(quality: WoWAPI.ITEM_QUALITY): [number, number, number, string];
/**
* Return spell information about a specific item
* @param itemIdentifier Number/String/String - Numeric ID of the item, name of the item, or itemLink of the item to query
* @returns
* - **spellName**: The name of the spell
* - **spellRank**: The secondary text of the spell, displayed in the top right-hand corner of the spell's tooltip
* - **spellId**: The spell's unique identifier
* @see https://wow.gamepedia.com/API_GetItemSpell
*/
declare function GetItemSpell(itemIdentifier: string | number | WoWAPI.ItemLink): [string, string, number];
/**
* Returns a table of stats for an item
* @param itemLink An item link for which to get stats
* @param statTable An optional, empty table that will be filled with stats and returned. If this parameter is omitted, a new table is returned
* @see https://wow.gamepedia.com/API_GetItemStats
*/
declare function GetItemStats(itemLink: WoWAPI.ItemLink, statTable?: {}): { [index: string]: number };
/**
* Returns a link to the indexed item in the merchant's inventory
* @param merchantIndex The index of the item in the merchant's inventory
* @returns returns a string that will show as a clickable link to the item
* @see https://wow.gamepedia.com/API_GetMerchantWoWAPI.ItemLink
*/
declare function GetMerchantItemLink(merchantIndex: number): WoWAPI.ItemLink;
/**
* @see https://wow.gamepedia.com/API_GetNegativeCorruptionEffectInfo
*/
declare function GetNegativeCorruptionEffectInfo(): WoWAPI.CorruptionEffectInfo[];
/**
* Returns link to the quest item
* @param type "required", "reward" or "choice"
* @param index Quest reward item index
* @returns The link to the quest item specified
* @see https://wow.gamepedia.com/API_GetQuestWoWAPI.ItemLink
*/
declare function GetQuestItemLink(type: WoWAPI.QuestType, index: number): WoWAPI.ItemLink;
/**
* Returns link to the quest item
* @param type "required", "reward" or "choice"
* @param index Quest reward item index (starts with 1)
* @returns The link to the quest item specified or nil, if the type and/or index is invalid, there is no active quest at the moment or if the
* server did not transmit the item information until the timeout (which can happen, if the item is not in the local item cache yet)
* @see https://wow.gamepedia.com/API_GetQuestLogWoWAPI.ItemLink
*/
declare function GetQuestLogItemLink(type: WoWAPI.QuestType, index: number): WoWAPI.ItemLink;
/**
* Returns a single value: chat-ready item link
* @param tradeSlotIndex index value of the "player's" (your character) trade slots (starts at 1 and proceeds to 6. 7 may be used for the
* will-not-be-traded-slot.)
* @returns a string that can be used to link items in the chat log
* @see https://wow.gamepedia.com/API_GetTradePlayerWoWAPI.ItemLink
*/
declare function GetTradePlayerItemLink(tradeSlotIndex: number): WoWAPI.ItemLink;
/**
* Gets the link string for a trade skill item
* @param skillId The Id specifying which trade skill's link to get. Trade Skill window must be open for this to work. Indexes start at 1 which
* is the general category of the tradeskill, if you have selected a sub-group of trade skills then 1 will be the name of that sub-group
* @see https://wow.gamepedia.com/API_GetTradeSkillWoWAPI.ItemLink
*/
declare function GetTradeSkillItemLink(skillId: number): WoWAPI.ItemLink;
/**
* Gets the link string for a trade skill reagent
* @param skillId The Id specifying which trade skill's reagent to link
* @param reagentId The Id specifying which of the skill's reagents to link
* @see https://wow.gamepedia.com/API_GetTradeSkillReagentWoWAPI.ItemLink
*/
declare function GetTradeSkillReagentItemLink(skillId: number, reagentId: number): WoWAPI.ItemLink;
/**
* Simply view, except this function is for your trading partner, ie, the other side of the trade window
* @param tradeIndex index value of the "player's" (your character) trade slots (starts at 1 and proceeds to 6. 7 may be used for the will-not-be-traded-slot.)
* @see https://wow.gamepedia.com/API_GetTradeTargetWoWAPI.ItemLink
*/
declare function GetTradeTargetItemLink(tradeIndex: number): WoWAPI.ItemLink;
/**
* Returns usable, noMana
* @param itemIdentifier Number/String/String - Numeric ID of the item, name of the item, or itemLink of the item to query
*/
declare function IsUsableItem(itemIdentifier: string | number | WoWAPI.ItemLink): [boolean, boolean];
/**
* Returns whether an item is consumed when used
* @param itemIdentifier An item ID (number), item link or item name (string) to query
* @returns 1 if the item is consumed when used, nil otherwise
* @see https://wow.gamepedia.com/API_IsConsumableItem
*/
declare function IsConsumableItem(itemIdentifier: string | number | WoWAPI.ItemLink): WoWAPI.Flag;
/**
*
* @param itemIdentifier An item ID (number), item link or item name (string) to query
* @see https://wow.gamepedia.com/API_IsCorruptedItem
*/
declare function IsCorruptedItem(itemIdentifier: string | number | WoWAPI.ItemLink): boolean;
/**
* unknown
* @param itemIdentifier An item ID (number), item link or item name (string) to query
*/
declare function IsCurrentItem(itemIdentifier: string | number | WoWAPI.ItemLink): WoWAPI.Flag;
/**
* Determines if an item is equipped
* @param itemIdentifier Number/String/String - Numeric ID of the item, name of the item, or itemLink of the item to query
* @see https://wow.gamepedia.com/API_IsEquippedItem
*/
declare function IsEquippedItem(itemIdentifier: string | number | WoWAPI.ItemLink): boolean;
/**
* Returns 1 if item is an equip-able one at all, your character notwithstanding, or nil if not
* @param itemIdentifier Number/String/String - Numeric ID of the item, name of the item, or itemLink of the item to query
* @see https://wow.gamepedia.com/API_IsEquippableItem
*/
declare function IsEquippableItem(itemIdentifier: string | number | WoWAPI.ItemLink): boolean;
/**
* Determines if an item of a given type is equipped
* @param itemType any valid inventory type, item class, or item subclass
* @see https://wow.gamepedia.com/API_IsEquippedItemType
*/
declare function IsEquippedItemType(itemType: WoWAPI.EquippableItemType): boolean;
/**
* Returns if you are in range of the specified unit to use the specified item
* @param itemIdentifier Number/String/String - Numeric ID of the item, name of the item, or itemLink of the item to query
* @param unit which unit the range should be checked to
* @returns
* - If the item is not in range, false; if the item is in range, true; if the query is invalid, nil
* - If the item is not in range, 0; if the item is in range, 1; if the query is invalid, nil
* @see https://wow.gamepedia.com/API_IsItemInRange
*/
declare function IsItemInRange(itemIdentifier: string | number | WoWAPI.ItemLink, unit?: WoWAPI.UnitId): [boolean, WoWAPI.Flag];
/**
* unknown
* @param itemIdentifier Number/String/String - Numeric ID of the item, name of the item, or itemLink of the item to query
*/
declare function ItemHasRange(itemIdentifier: string | number | WoWAPI.ItemLink): boolean;
/**
* Called to handle clicks on Blizzard hyperlinks in chat
* @param link Link to Use, (eg 'item:3577:0:0:0:0:0:0:276308480' is a [Gold Bar], 'player:Kaso' is [Kaso]).
* @param text The Text of the link, including Text Colour Infomation and itemlinks (eg The previous two examples
* : '|cff1eff00|Hitem:3577:0:0:0:0:0:0:276308480|h[Gold Bar]|h|r' '|Hplayer:Kaso|h[Kaso]|h'
* @param button The button used to click the notes 'LeftButton' or 'RightButton' Apparently, See Notes
* @description
* - Do not insecurely hook this function to add your own link types; hook ChatFrame_OnHyperlinkShow(frame, link, text, button) instead.
* Hooking this function insecurely will end up tainting Blizzard's combat log, which will taint UIParent's update routines and result in
* "action has been blocked" messages
* - This function is affected by Shift and Ctrl keys, and depends on what is being clicked, according to the below table
* @see https://wow.gamepedia.com/API_SetItemRef
*/
declare function SetItemRef(link: WoWAPI.ItemLink, text: string, button: WoWAPI.MouseButton): void;
/**
* Uses an item, optionally on a specified target
* @param itemName name of the item to use
* @param target unit to use the item on, defaults to "target" for items that can be used on others
* @protected
* @see https://wow.gamepedia.com/API_UseItemByName
*/
declare function UseItemByName(itemName: string, target?: WoWAPI.UnitId): void;

View File

@@ -1,125 +0,0 @@
declare namespace ItemLocation {
/**
* ItemLocationMixin objects can only be created for items in your equipment or inventory
* @see https://wow.gamepedia.com/ItemLocationMixin
* @since 8.0.1 (2018-07-17)
*/
interface ItemLocationMixin {
/**
* clears the slot into
* @see https://www.townlong-yak.com/framexml/live/go/ItemLocationMixin:Clear
* @since 8.0.1 (2018-07-17)
*/
Clear(): void;
/**
* updates bag and slot id with new values
* @param bagId bag there the item is located in
* @param slotIndex slot index where the item is located
* @see https://www.townlong-yak.com/framexml/live/go/ItemLocationMixin:SetBagAndSlot
* @since 8.0.1 (2018-07-17)
*/
SetBagAndSlot(bagId: WoWAPI.CONTAINER_ID_BAG, slotIndex: number): void;
/**
* gets bag and slot id
* @see https://www.townlong-yak.com/framexml/live/go/ItemLocationMixin:GetBagAndSlot
* @since 8.0.1 (2018-07-17)
*/
GetBagAndSlot(): [WoWAPI.CONTAINER_ID_BAG, number];
/**
* updates slot indexes by given equpiment slot index
* @param equipmentSlotIndex equipment slot index where the item is located in
* @see https://www.townlong-yak.com/framexml/live/go/ItemLocationMixin:SetEquipmentSlot
* @since 8.0.1 (2018-07-17)
*/
SetEquipmentSlot(equipmentSlotIndex: WoWAPI.INVENTORY_SLOT_ID): void;
/**
* gets the equipment slot representation of the bag and slot index
* @see https://www.townlong-yak.com/framexml/live/go/ItemLocationMixin:GetEquipmentSlot
* @since 8.0.1 (2018-07-17)
*/
GetEquipmentSlot(): WoWAPI.INVENTORY_SLOT_ID;
/**
* tests if the contents of this item location is an equipment slot
* @see https://www.townlong-yak.com/framexml/live/go/ItemLocationMixin:IsEquipmentSlot
* @since 8.0.1 (2018-07-17)
*/
IsEquipmentSlot(): boolean;
/**
* tests if the contents of this item location is bagId and slotIndex
* @see https://www.townlong-yak.com/framexml/live/go/ItemLocationMixin:IsBagAndSlot
* @since 8.0.1 (2018-07-17)
*/
IsBagAndSlot(): boolean;
/**
* tests if the contents are not empty
* @see https://www.townlong-yak.com/framexml/live/go/ItemLocationMixin:HasAnyLocation
* @since 8.0.1 (2018-07-17)
*/
HasAnyLocation(): boolean;
/**
* unknown
* @see https://www.townlong-yak.com/framexml/live/go/ItemLocationMixin:IsValid
* @since 8.0.1 (2018-07-17)
*/
IsValid(): boolean;
/**
* tests if the contents are equal to the given bagId and slotIndex
* @param badId
* @param slotIndex
* @see https://www.townlong-yak.com/framexml/live/go/ItemLocationMixin:IsEqualToBagAndSlot
* @since 8.0.1 (2018-07-17)
*/
IsEqualToBagAndSlot(badId: WoWAPI.CONTAINER_ID_BAG, slotIndex: number): boolean;
/**
* tests if the contents are equal to the given equipment slot
* @param equipmentSlot
* @see https://www.townlong-yak.com/framexml/live/go/ItemLocationMixin:IsEqualToEquipmentSlot
* @since 8.0.1 (2018-07-17)
*/
IsEqualToEquipmentSlot(equipmentSlot: WoWAPI.INVENTORY_SLOT_ID): boolean;
/**
* tests if this item location is equal to the given other item location
* @param other
* @see https://www.townlong-yak.com/framexml/live/go/ItemLocationMixin:IsEqualTo
* @since 8.0.1 (2018-07-17)
*/
IsEqualTo(other: ItemLocationMixin): boolean;
}
/**
* Creates an empty object
* @see https://www.townlong-yak.com/framexml/9.0.1/ObjectAPI/ItemLocation.lua#4
* @since 8.0.1 (2018-07-17)
*/
function CreateEmpty(): ItemLocationMixin;
/**
* Creates an object from a bagID and slotIndex
* @param bagId bag there the item is located in
* @param slotIndex slot index where the item is located
* @see https://www.townlong-yak.com/framexml/9.0.1/ObjectAPI/ItemLocation.lua#9
* @since 8.0.1 (2018-07-17)
*/
function CreateFromBagAndSlot(bagId: WoWAPI.CONTAINER_ID_BAG, slotIndex: number): ItemLocationMixin;
/**
* Creates an object from an inventorySlotId
* @param equipmentSlotIndex equipment slot index where the item is located in
* @see https://www.townlong-yak.com/framexml/9.0.1/ObjectAPI/ItemLocation.lua#15
* @since 8.0.1 (2018-07-17)
*/
function CreateFromEquipmentSlot(equipmentSlotIndex: WoWAPI.INVENTORY_SLOT_ID): ItemLocationMixin;
}

View File

@@ -1,135 +1,135 @@
/** @noSelfInFile */
declare namespace WoWAPI {
type QuestType = "required" | "reward" | "choice";
type QuestState = "OFFER" | "COMPLETE";
}
/**
* Abandons the quest specified by SetAbandonQuest
* @see https://wow.gamepedia.com/API_AbandonQuest
*/
declare function AbandonQuest(): void;
/**
* Accepts the currently offered quest
* @description You can call this function once the QUEST_DETAIL event fires
* @see https://wow.gamepedia.com/API_AcceptQuest
*/
declare function AcceptQuest(): void;
/**
* Acknowledges that the currently-offered auto-accept quest has been accepted by the player
* - Quests flagged for auto-accept are forced into the player's quest log immediately, rendering accepting the quest a mere formality
* - Calling this function allows the server to keep track of whether it should keep trying to get you to accept the quest via autoquest popups
* - You'll acknowledge the last quest for which the QUEST_DETAIL event fired
* @since 5.0.4
* @see https://wow.gamepedia.com/API_AcknowledgeAutoAcceptQuest
*/
declare function AcknowledgeAutoAcceptQuest(): void;
/**
* Adds a popup notification to the objectives tracker, showing that a quest is available or completed
* @param questId the quest id
* @param type popup type, one of "OFFER" or "COMPLETE"
* @see https://wow.gamepedia.com/API_AddAutoQuestPopUp
*/
declare function AddAutoQuestPopUp(questId: number, type: WoWAPI.QuestState): void;
/**
* Adds a quest to the list of quests being watched with an optional time to watch it
* @param questIndex The index of the quest in the quest log
* @param watchTime The amount of time to watch the quest in seconds
* @see https://wow.gamepedia.com/API_AddQuestWatch
*/
declare function AddQuestWatch(questIndex: number, watchTime: number): void;
/**
* Unknown
* @param questId the quest id
*/
declare function AddWorldQuestWatch(questId: number): WoWAPI.Unknown;
/**
* Returns whether the player can abandon a specific quest
* @param questId quest ID of the quest to query, e.g. 5944 for N [60G] In Dreams
* @returns 1 if the player is currently on the specified quest and can abandon it, nil otherwise
* @see https://wow.gamepedia.com/API_CanAbandonQuest
*/
declare function CanAbandonQuest(questId: number): WoWAPI.Flag;
/**
* Unknown
*/
declare function ClearAutoAcceptQuestSound(): WoWAPI.Unknown;
/**
* Closes the shown quest
*/
declare function CloseQuest(): WoWAPI.Unknown;
/**
* Collapses the quest header
* @param questId The quest ID of the header you wish to collapse - 0 to collapse all quest headers
* @see https://wow.gamepedia.com/API_CollapseQuestHeader
*/
declare function CollapseQuestHeader(questId: number): void;
/**
* Advances the quest completion dialog to the reward selection step
* - Unlike the name would suggest, this does not finalize the completion of a quest. Instead it is called when you press the continue button,
* and is used to continue from the progress dialog to the completion dialog
* - If you're interested in hooking the function called when completing a quest, check out QuestRewardCompleteButton_OnClick
* (in FrameXML\QuestFrame.lua) instead
* @see https://wow.gamepedia.com/API_CompleteQuest
*/
declare function CompleteQuest(): void;
/**
* Accept an escort quest being started by a player nearby
* - Can be used after the QUEST_ACCEPT_CONFIRM event has fired
* @see https://wow.gamepedia.com/API_ConfirmAcceptQuest
*/
declare function ConfirmAcceptQuest(): void;
/**
* Declines the currently offered quest.
* - You can call this function once the QUEST_DETAIL event fires
* @see https://wow.gamepedia.com/API_DeclineQuest
*/
declare function DeclineQuest(): void;
/**
* Expands the quest header
* - Expands the first quest header (questID = 1 is always yields a header if you have quests) if it was collapsed; if not, does nothing.
* Also fires a QUEST_LOG_UPDATE event so be careful when calling this while processing a QUEST_LOG_UPDATE event
* @param questId The index of the header you wish to expand. - 0 to expand all quest headers
* @see https://wow.gamepedia.com/API_ExpandQuestHeader
*/
declare function ExpandQuestHeader(questId: number): void;
/**
* Unknown
*/
declare function GetAbandonQuestItems(): WoWAPI.Unknown;
/**
* Returns the name of a quest that will be abandoned if AbandonQuest is called
* - The FrameXML-provided quest log calls SetAbandonQuest whenever a quest entry is selected, so this function will usually return the name of
* the currently selected quest
* @returns Name of the quest that will be abandoned
* @see https://wow.gamepedia.com/API_GetAbandonQuestName
*/
declare function GetAbandonQuestName(): string;
/**
* Returns true if a quest is possible to complete
* @see https://wow.gamepedia.com/API_IsQuestCompletable
*/
declare function IsQuestCompletable(): boolean;
/**
* Returns the number of items nessecary to complete a particular quest
* @see https://wow.gamepedia.com/API_GetNumQuestItems
*/
declare function GetNumQuestItems(): number;
/** @noSelfInFile */
declare namespace WoWAPI {
type QuestType = "required" | "reward" | "choice";
type QuestState = "OFFER" | "COMPLETE";
}
/**
* Abandons the quest specified by SetAbandonQuest
* @see https://wow.gamepedia.com/API_AbandonQuest
*/
declare function AbandonQuest(): void;
/**
* Accepts the currently offered quest
* @description You can call this function once the QUEST_DETAIL event fires
* @see https://wow.gamepedia.com/API_AcceptQuest
*/
declare function AcceptQuest(): void;
/**
* Acknowledges that the currently-offered auto-accept quest has been accepted by the player
* - Quests flagged for auto-accept are forced into the player's quest log immediately, rendering accepting the quest a mere formality
* - Calling this function allows the server to keep track of whether it should keep trying to get you to accept the quest via autoquest popups
* - You'll acknowledge the last quest for which the QUEST_DETAIL event fired
* @since 5.0.4
* @see https://wow.gamepedia.com/API_AcknowledgeAutoAcceptQuest
*/
declare function AcknowledgeAutoAcceptQuest(): void;
/**
* Adds a popup notification to the objectives tracker, showing that a quest is available or completed
* @param questId the quest id
* @param type popup type, one of "OFFER" or "COMPLETE"
* @see https://wow.gamepedia.com/API_AddAutoQuestPopUp
*/
declare function AddAutoQuestPopUp(questId: number, type: WoWAPI.QuestState): void;
/**
* Adds a quest to the list of quests being watched with an optional time to watch it
* @param questIndex The index of the quest in the quest log
* @param watchTime The amount of time to watch the quest in seconds
* @see https://wow.gamepedia.com/API_AddQuestWatch
*/
declare function AddQuestWatch(questIndex: number, watchTime: number): void;
/**
* Unknown
* @param questId the quest id
*/
declare function AddWorldQuestWatch(questId: number): WoWAPI.Unknown;
/**
* Returns whether the player can abandon a specific quest
* @param questId quest ID of the quest to query, e.g. 5944 for N [60G] In Dreams
* @returns 1 if the player is currently on the specified quest and can abandon it, nil otherwise
* @see https://wow.gamepedia.com/API_CanAbandonQuest
*/
declare function CanAbandonQuest(questId: number): WoWAPI.Flag;
/**
* Unknown
*/
declare function ClearAutoAcceptQuestSound(): WoWAPI.Unknown;
/**
* Closes the shown quest
*/
declare function CloseQuest(): WoWAPI.Unknown;
/**
* Collapses the quest header
* @param questId The quest ID of the header you wish to collapse - 0 to collapse all quest headers
* @see https://wow.gamepedia.com/API_CollapseQuestHeader
*/
declare function CollapseQuestHeader(questId: number): void;
/**
* Advances the quest completion dialog to the reward selection step
* - Unlike the name would suggest, this does not finalize the completion of a quest. Instead it is called when you press the continue button,
* and is used to continue from the progress dialog to the completion dialog
* - If you're interested in hooking the function called when completing a quest, check out QuestRewardCompleteButton_OnClick
* (in FrameXML\QuestFrame.lua) instead
* @see https://wow.gamepedia.com/API_CompleteQuest
*/
declare function CompleteQuest(): void;
/**
* Accept an escort quest being started by a player nearby
* - Can be used after the QUEST_ACCEPT_CONFIRM event has fired
* @see https://wow.gamepedia.com/API_ConfirmAcceptQuest
*/
declare function ConfirmAcceptQuest(): void;
/**
* Declines the currently offered quest.
* - You can call this function once the QUEST_DETAIL event fires
* @see https://wow.gamepedia.com/API_DeclineQuest
*/
declare function DeclineQuest(): void;
/**
* Expands the quest header
* - Expands the first quest header (questID = 1 is always yields a header if you have quests) if it was collapsed; if not, does nothing.
* Also fires a QUEST_LOG_UPDATE event so be careful when calling this while processing a QUEST_LOG_UPDATE event
* @param questId The index of the header you wish to expand. - 0 to expand all quest headers
* @see https://wow.gamepedia.com/API_ExpandQuestHeader
*/
declare function ExpandQuestHeader(questId: number): void;
/**
* Unknown
*/
declare function GetAbandonQuestItems(): WoWAPI.Unknown;
/**
* Returns the name of a quest that will be abandoned if AbandonQuest is called
* - The FrameXML-provided quest log calls SetAbandonQuest whenever a quest entry is selected, so this function will usually return the name of
* the currently selected quest
* @returns Name of the quest that will be abandoned
* @see https://wow.gamepedia.com/API_GetAbandonQuestName
*/
declare function GetAbandonQuestName(): string;
/**
* Returns true if a quest is possible to complete
* @see https://wow.gamepedia.com/API_IsQuestCompletable
*/
declare function IsQuestCompletable(): boolean;
/**
* Returns the number of items nessecary to complete a particular quest
* @see https://wow.gamepedia.com/API_GetNumQuestItems
*/
declare function GetNumQuestItems(): number;

View File

@@ -1,58 +1,58 @@
/** @noSelfInFile */
/// <reference path="global.d.ts" />
/**
* Determines whether the current execution path is secure
*
* @returns 1 if the current path is secure (and able to call protected functions), nil otherwise.
* @see https://wow.gamepedia.com/API_issecure
*/
declare function issecure(): WoWAPI.Flag;
/**
* Taints the current execution path.
*
* @see https://wow.gamepedia.com/API_forceinsecure
* @since 3.0.2
*/
declare function forceinsecure(): void;
/**
* Determines whether the given table key is secure
*
* @param table table to check the the key in; if omitted, defaults to the globals table (_G).
* @param variableName string key to check the taint of. Numbers will be converted to a string; other types will throw an error
* @returns isSecure, taint
* @see https://wow.gamepedia.com/API_issecurevariable
* @tupleReturn
*/
declare function issecurevariable(table?: object, variableName?: string): [boolean, string];
/**
* Calls the specified function without propagating taint to the caller
*
* @param call function to call, either a direct reference or a string used as a key into _G.
* @param args any number of arguments to pass the function
* @returns the function's return values
* @see https://wow.gamepedia.com/API_securecall
*/
declare function securecall(call: string | ((...args: any[]) => any), ...args: any[]): any;
/**
* Creates a secure "post hook" for the specified function. Your hook will be called with the same arguments after the original call is performed
*
* @param table Table to hook the functionName key in; if omitted, defaults to the global table (_G).
* @param functionName name of the function being hooked
* @param handler your hook function
* @see https://wow.gamepedia.com/API_hooksecurefunc
*/
declare function hooksecurefunc(table?: object, functionName?: string, handler?: (...args: any[]) => any): void;
/**
* Determines whether in-combat lockdown restrictions are active
*
* @returns true if lockdown restrictions are currently in effect, false otherwise
* @see https://wow.gamepedia.com/API_InCombatLockdown
*/
declare function InCombatLockdown(): boolean;
/** @noSelfInFile */
/// <reference path="global.d.ts" />
/**
* Determines whether the current execution path is secure
*
* @returns 1 if the current path is secure (and able to call protected functions), nil otherwise.
* @see https://wow.gamepedia.com/API_issecure
*/
declare function issecure(): WoWAPI.Flag;
/**
* Taints the current execution path.
*
* @see https://wow.gamepedia.com/API_forceinsecure
* @since 3.0.2
*/
declare function forceinsecure(): void;
/**
* Determines whether the given table key is secure
*
* @param table table to check the the key in; if omitted, defaults to the globals table (_G).
* @param variableName string key to check the taint of. Numbers will be converted to a string; other types will throw an error
* @returns isSecure, taint
* @see https://wow.gamepedia.com/API_issecurevariable
* @tupleReturn
*/
declare function issecurevariable(table?: object, variableName?: string): [boolean, string];
/**
* Calls the specified function without propagating taint to the caller
*
* @param call function to call, either a direct reference or a string used as a key into _G.
* @param args any number of arguments to pass the function
* @returns the function's return values
* @see https://wow.gamepedia.com/API_securecall
*/
declare function securecall(call: string | ((...args: any[]) => any), ...args: any[]): any;
/**
* Creates a secure "post hook" for the specified function. Your hook will be called with the same arguments after the original call is performed
*
* @param table Table to hook the functionName key in; if omitted, defaults to the global table (_G).
* @param functionName name of the function being hooked
* @param handler your hook function
* @see https://wow.gamepedia.com/API_hooksecurefunc
*/
declare function hooksecurefunc(table?: object, functionName?: string, handler?: (...args: any[]) => any): void;
/**
* Determines whether in-combat lockdown restrictions are active
*
* @returns true if lockdown restrictions are currently in effect, false otherwise
* @see https://wow.gamepedia.com/API_InCombatLockdown
*/
declare function InCombatLockdown(): boolean;

View File

@@ -1,34 +1,34 @@
/** @noSelfInFile */
declare const BOOKTYPE_SPELL = "spell";
declare const BOOKTYPE_PET = "pet";
declare namespace WoWAPI {
type BookType = typeof BOOKTYPE_SPELL | typeof BOOKTYPE_PET;
}
/**
* Retrieves the spell name and spell rank for a spell in the player's spell book.
*
* @see https://wow.gamepedia.com/API_GetSpellBookItemName
* @since 4.0.1
* @returns spellName, spellSubName
* @tupleReturn
*/
declare function GetSpellBookItemName(spellId: number, type: WoWAPI.BookType): [string, string];
/**
* Retrieves the cooldown data of the spell specified.
*
* @see https://wow.gamepedia.com/API_GetSpellCooldown
* @returns start, duration, enabled, modRate
* @tupleReturn
*/
declare function GetSpellCooldown(spellId: number, type: WoWAPI.BookType): [number, number, WoWAPI.Flag, number];
/**
* Returns the icon of the specified spell.
*
* @see https://wow.gamepedia.com/API_GetSpellTexture
*/
declare function GetSpellTexture(spellId: number, type: WoWAPI.BookType): WoWAPI.TexturePath;
/** @noSelfInFile */
declare const BOOKTYPE_SPELL = "spell";
declare const BOOKTYPE_PET = "pet";
declare namespace WoWAPI {
type BookType = typeof BOOKTYPE_SPELL | typeof BOOKTYPE_PET;
}
/**
* Retrieves the spell name and spell rank for a spell in the player's spell book.
*
* @see https://wow.gamepedia.com/API_GetSpellBookItemName
* @since 4.0.1
* @returns spellName, spellSubName
* @tupleReturn
*/
declare function GetSpellBookItemName(spellId: number, type: WoWAPI.BookType): [string, string];
/**
* Retrieves the cooldown data of the spell specified.
*
* @see https://wow.gamepedia.com/API_GetSpellCooldown
* @returns start, duration, enabled, modRate
* @tupleReturn
*/
declare function GetSpellCooldown(spellId: number, type: WoWAPI.BookType): [number, number, WoWAPI.Flag, number];
/**
* Returns the icon of the specified spell.
*
* @see https://wow.gamepedia.com/API_GetSpellTexture
*/
declare function GetSpellTexture(spellId: number, type: WoWAPI.BookType): WoWAPI.TexturePath;

View File

@@ -1,85 +1,85 @@
/** @noSelfInFile */
/**
* Execute a console command
*
* @param command The console command to execute
* @see https://wow.gamepedia.com/API_ConsoleExec
*/
declare function ConsoleExec(command: string): WoWAPI.Unknown;
/**
* Attempts to detect the world of warcraft MMO mouse.
*
* @see https://wow.gamepedia.com/API_DetectWowMouse
*/
declare function DetectWowMouse(): WoWAPI.Unknown;
/**
* Returns information about current client build
*
* @returns version, build, date, tocversion
* @see https://wow.gamepedia.com/API_GetBuildInfo
* @tupleReturn
*/
declare function GetBuildInfo(): [string, string, string, number];
/**
* Returns the currently set error handler
*
* @returns Unknown
* @see https://wow.gamepedia.com/API_geterrorhandler
*/
declare function geterrorhandler(): (...args: any[]) => any | null;
/**
* Retrieve the current framerate (frames / second).
*
* @returns The current framerate in frames per second
* @see https://wow.gamepedia.com/API_GetFramerate
*/
declare function GetFramerate(): number;
/**
* Returns the current server time in hours and minutes
*
* @returns hours, minutes
* @see https://wow.gamepedia.com/API_GetGameTime
* @tupleReturn
*/
declare function GetGameTime(): [number, number];
/**
* Returns the system uptime of your computer in seconds, with millisecond
* precision.
*
* @returns hours, minutes
* @see https://wow.gamepedia.com/API_GetTime
*/
declare function GetTime(): number;
/**
* Returns information about the client locale
*
* @returns
* - deDE: German (Germany)
* - enGB: English (United Kingdom)
* - enGB clients return enUS
* - enUS: English (United States)
* - esES: Spanish (Spain)
* - esMX: Spanish (Mexico)
* - frFR: French (France)
* - itIT: Italian (Italy)
* - koKR: Korean (Korea)
* - ptBR: Portuguese (Brazil)
* - ruRU: Russian (Russia) - UI AddOn
* - zhCN: Chinese (Simplified, PRC)
* - zhTW: Chinese (Traditional, Taiwan)
*/
declare function GetLocale(): string;
/**
* Returns the name of the character's realm
* @see https://wow.gamepedia.com/API_GetRealmName
*/
declare function GetRealmName(): string;
/** @noSelfInFile */
/**
* Execute a console command
*
* @param command The console command to execute
* @see https://wow.gamepedia.com/API_ConsoleExec
*/
declare function ConsoleExec(command: string): WoWAPI.Unknown;
/**
* Attempts to detect the world of warcraft MMO mouse.
*
* @see https://wow.gamepedia.com/API_DetectWowMouse
*/
declare function DetectWowMouse(): WoWAPI.Unknown;
/**
* Returns information about current client build
*
* @returns version, build, date, tocversion
* @see https://wow.gamepedia.com/API_GetBuildInfo
* @tupleReturn
*/
declare function GetBuildInfo(): [string, string, string, number];
/**
* Returns the currently set error handler
*
* @returns Unknown
* @see https://wow.gamepedia.com/API_geterrorhandler
*/
declare function geterrorhandler(): (...args: any[]) => any | null;
/**
* Retrieve the current framerate (frames / second).
*
* @returns The current framerate in frames per second
* @see https://wow.gamepedia.com/API_GetFramerate
*/
declare function GetFramerate(): number;
/**
* Returns the current server time in hours and minutes
*
* @returns hours, minutes
* @see https://wow.gamepedia.com/API_GetGameTime
* @tupleReturn
*/
declare function GetGameTime(): [number, number];
/**
* Returns the system uptime of your computer in seconds, with millisecond
* precision.
*
* @returns hours, minutes
* @see https://wow.gamepedia.com/API_GetTime
*/
declare function GetTime(): number;
/**
* Returns information about the client locale
*
* @returns
* - deDE: German (Germany)
* - enGB: English (United Kingdom)
* - enGB clients return enUS
* - enUS: English (United States)
* - esES: Spanish (Spain)
* - esMX: Spanish (Mexico)
* - frFR: French (France)
* - itIT: Italian (Italy)
* - koKR: Korean (Korea)
* - ptBR: Portuguese (Brazil)
* - ruRU: Russian (Russia) - UI AddOn
* - zhCN: Chinese (Simplified, PRC)
* - zhTW: Chinese (Traditional, Taiwan)
*/
declare function GetLocale(): string;
/**
* Returns the name of the character's realm
* @see https://wow.gamepedia.com/API_GetRealmName
*/
declare function GetRealmName(): string;

View File

@@ -1,427 +1,427 @@
/// <reference path="ui.d.ts" />
/// <reference path="../auction.d.ts" />
declare namespace WoWAPI {
interface GameTooltip {
/**
* Adds Line to tooltip with textLeft on left side of line and textRight on right side
* @param textLeft string which will show on left
* @param textRight string which will show on right
* @param textLeftRed range 0 to 1 - red color value for left string
* @param textLeftGreen range 0 to 1 - green color value for left string
* @param textLeftBlue range 0 to 1 - blue color value for left string
* @param textRightRed range 0 to 1 - red color value for right string
* @param textRightGreen range 0 to 1 - green color value for right string
* @param textRightBlue range 0 to 1 - blue color value for right string
* @see http://wowwiki.wikia.com/wiki/API_GameTooltip_AddDoubleLine
*/
// tslint:disable-next-line max-line-length
AddDoubleLine(textLeft: string, textRight: string, textLeftRed: number, textLeftGreen: number, textLeftBlue: number, textRightRed: number, textRightGreen: number, textRightBlue: number): void;
/**
* Dynamically expands the size of a tooltip
* @param leftString unknown
* @param rightString unknown
*/
AddFontStrings(leftString: Unknown, rightString: Unknown): Unknown;
/**
* Appends a line of text to tooltip
* @param text text which will appear in new tooltip line
* @param red range 0 to 1 - red color value for text string
* @param green range 0 to 1 - green color value for text string
* @param blue range 0 to 1 - blue color value for text string
* @param wrapText 'true' to wrap text
* @see http://wowwiki.wikia.com/wiki/API_GameTooltip_AddLine
*/
AddLine(text: string, red?: number, green?: number, blue?: number, wrapText?: boolean): void;
/**
* Adds a texture (icon) to the beginning of the last line added by AddLine(), AddDoubleLine(), etc
* @param texturePath the texture to add
* @description There is a limit of 10 textures per tooltip (as seen in GameTooltipTemplate.xml)
* @see http://wowwiki.wikia.com/wiki/API_GameTooltip_AddTexture
*/
AddTexture(texturePath: TexturePath): void;
/**
* Append text to the end of the first line of the tooltip
* @param text the text to add
*/
AppendText(text: string): void;
/**
* Clear all 30 lines of tooltip (both left and right ones)
* @see http://wowwiki.wikia.com/wiki/API_GameTooltip_ClearLines
*/
ClearLines(): void;
/**
* Initiates fading out of the GameTooltip over the next few seconds
* @see http://wowwiki.wikia.com/wiki/API_GameTooltip_FadeOut
*/
FadeOut(): void;
/**
* Returns the current anchoring type
*/
GetAnchorType(): Point;
/**
* Returns the name and link of the item displayed on a GameTooltip
* @returns **itemName, ItemLink**
* - **itemName**: Plain text item name (e.g. "Broken Fang")
* - **itemLink**: Formatted item link (e.g. "|cff9d9d9d|Hitem:7073:0:0:0:0:0:0:0|h[Broken Fang]|h|r")
* @see http://wowwiki.wikia.com/wiki/API_GameTooltip_GetItem
* @tupleReturn
*/
GetItem(): [string, ItemLink];
/**
* unknown
*/
GetMinimumWidth(): Unknown;
/**
* Returns the name and link of the spell displayed on a GameTooltip
* @returns **itemName, spellId**
* - **spellName**: Plain text spell name (e.g. "Explosive Shot")
* - **spellId**: Integer spell ID (e.g. "60053")
* @see http://wowwiki.wikia.com/wiki/API_GameTooltip_GetSpell
* @tupleReturn
*/
GetSpell(): [string, number];
/**
* Returns owner frame, anchor
*
* @tupleReturn
*/
GetOwner(): [UIObject, Point];
/**
* Returns unit name, unit id
*
* @tupleReturn
*/
GetUnit(): [string, UnitId];
/**
* unknown
* @param unit unknown
*/
IsUnit(unit: UnitId): boolean;
/**
* Return the number of text lines which comprise a tooltip object
* @see http://wowwiki.wikia.com/wiki/API_GameTooltip_NumLines
*/
NumLines(): number;
/**
* Shows the tooltip for the specified action button
* @param slot id of the action button to load the tooltip for
* @see http://wowwiki.wikia.com/wiki/API_GameTooltip_SetAction
*/
SetAction(slot: ActionBarSlotId): void;
/**
* unknown
* @param type unknown
* @param index unknown
* @param offset unknown
*/
SetAuctionCompareItem(type: AUCTION_TYPE, index: number, offset: number): Unknown;
/**
* unknown
* @param id unknown
*/
SetBackpackToken(id: Unknown): Unknown;
/**
* Sets the GameTooltip to contain text information about the specified item,
* as well as returning whether the item is "cooling down" and the cost to repair the item (which may be 0 (or nil?) if non-applicable).
* @param bag the ID of the bag
* @param slot the ID of the slot
* @returns **hasCooldown, repairCost**
* - **hasCooldown**: if the item currently has a cooldown
* - **repairCost**: the cost to repair the item, may be 0 or nil if the item cannot be repaired
* @see http://wowwiki.wikia.com/wiki/API_GameTooltip_SetBagItem
* @tupleReturn
*/
SetBagItem(bag: WoWAPI.CONTAINER_ID, slot: number): [boolean, number];
/**
* unknown
*/
SetBuybackItem(): Unknown;
/**
* Shows the tooltip for the specified token type
* @param tokenId id of the token type to load the tooltip for
* @see http://wowwiki.wikia.com/wiki/API_GameTooltip_SetCurrencyToken
*/
SetCurrencyToken(tokenId: number): void;
/**
* Displays the frame stack of the mouse cursor's current position on the tooltip.
* This is not intended to be used in typical addons, but is part of the Blizzard_DebugTools "builtin addon" inspired by DevTools
* @param showHidden If true, includes in the display those frames which are currently hidden
* @see http://wowwiki.wikia.com/wiki/API_GameTooltip_SetFrameStack
*/
SetFrameStack(showHidden?: boolean): void;
/**
* unknown
* @param glyphId unknown
*/
SetGlyph(glyphId: Unknown): Unknown;
/**
* Shows the tooltip for the specified guild bank item
* @param tabId the tab id
* @param slot the slot id
*/
SetGuildBankItem(tabId: WoWAPI.CONTAINER_ID_BANK, slot: number): void;
/**
* Changes the item which is displayed in the tooltip according to the passed argument
* @param itemIdentifier Representing an in-game item, enchant or spell or A clickable string of an in-game item
* @see http://wowwiki.wikia.com/wiki/API_GameTooltip_SetHyperlink
*/
SetHyperlink(itemIdentifier: string | ItemLink): void;
/**
* unknown
* @param args unknown
*/
SetHyperlinkCompareItem(...args: Unknown[]): Unknown;
/**
* Shows the tooltip for the specified mail inbox item
* @param index The index of the message to get information from
* @param attachmentIndex The index of the attachment to get information from. In the range of [1,ATTACHMENTS_MAX_RECEIVE(16)]
* @see http://wowwiki.wikia.com/wiki/API_GameTooltip_SetInboxItem
*/
SetInboxItem(index: number, attachmentIndex: number): Unknown;
/**
* This function sets a tooltip widget to display information for the given unit's given inventory slot
* @param unit the unit whose inventory should be searched
* @param slot the inventory slot number to search
* @param nameOnly unknown argument
* @returns **hasItem, hasCooldown, repairCost**
* - **hasItem**: is there an item at the given slot
* - **hasCooldown**: unknown
* - **repairCost**: cost of repairing item
* @see http://wowwiki.wikia.com/wiki/API_GameTooltip_SetInventoryItem
* @tupleReturn
*/
SetInventoryItem(unit: UnitId, slot: number, nameOnly?: Unknown): [boolean, boolean, number];
/**
* Shows an ItemKey in a tooltip.
* @param itemID
* @param itemLevel
* @param itemSuffix
*/
SetItemKey(itemID: number, itemLevel: number, itemSuffix: number): void;
/**
* Sets the GameTooltip to show a loot item
* @param lootIndex The index of the loot item to show (from 1 to GetNumLootItems())
* @see http://wowwiki.wikia.com/wiki/API_GameTooltip_SetLootItem
*/
SetLootItem(lootIndex: number): void;
/**
* Shows the tooltip for the specified loot roll item
* @param rollId the roll id for the item
*/
SetLootRollItem(rollId: number): void;
/**
* unknown
* @param slot unknown
* @param offset unknown
*/
SetMerchantCompareItem(slot: number, offset?: number): Unknown;
/**
* unknown
* @param args unknown
*/
SetMerchantItem(...args: Unknown[]): Unknown;
/**
* unknown
* @param width unknown
*/
SetMinimumWidth(width: number): void;
/**
* Moves the game tooltip to a location based on the "owner" frame
* @param owner Owner frame, which defines the element where the tooltip is centered on.
* A pointer to the frame is required, not the frame name itself (use _G['MyFrame'] to get the pointer from the frame name)
* @param anchor a string that describes the anchor point as it would be set via the SetPoint() function
* @param offsetX offset horizontal
* @param offsetY offset vertical
* @description This will set the owner for tooltip:IsOwned(frame). For instance, first call GameTooltip:SetOwner(UIParent).
* Then GameTooltip:IsOwned(UIParent) will return 1.
* @see http://wowwiki.wikia.com/wiki/API_GameTooltip_SetOwner
*/
SetOwner(owner: UIObject, anchor: Point, offsetX?: number, offsetY?: number): void;
/**
* Sets the amount of padding on the righthand side of the GameTooltip
* @param amount The amount of padding (black space) to put on the right hand side of the tooltip
* @see http://wowwiki.wikia.com/wiki/API_GameTooltip_SetPadding
*/
SetPadding(amount: number): void;
/**
* Shows the tooltip for the specified pet action
* @param slot the pet action slot id
*/
SetPetAction(slot: number): Unknown;
/**
* unknown
* @param args unknown
*/
SetQuestItem(...args: Unknown[]): Unknown;
/**
* unknown
* @param args unknown
*/
SetQuestLogItem(...args: Unknown[]): Unknown;
/**
* Shows the tooltip for the spell reward of the currently selected quest
* @param args unknown
*/
SetQuestLogRewardSpell(...args: Unknown[]): Unknown;
/**
* unknown
* @param args unknown
*/
SetQuestRewardSpell(...args: Unknown[]): Unknown;
/**
* unknown
* @param args unknown
*/
SetSendMailItem(...args: Unknown[]): Unknown;
/**
* Shows the tooltip for the specified shapeshift form
* @param slot the slot id
*/
SetShapeshift(slot: number): Unknown;
/**
* Shows the tooltip for the specified spell
* @param spellBookId the id of the spell on the tab from the spellbook - not the same as SpellId
* @param bookType Either BOOKTYPE_SPELL ("spell") or BOOKTYPE_PET ("pet")
* @see http://wowwiki.wikia.com/wiki/API_GameTooltip_SetSpell
*/
SetSpell(spellBookId: number, bookType: "pet" | "spell"): void;
/**
* Shows the tooltip for the specified talent
* @param tabIndex the index of the talent tab
* @param talentIndex the index of the talent on the tab
* @see http://wowwiki.wikia.com/wiki/API_GameTooltip_SetTalent
*/
SetTalent(tabIndex: number, talentIndex: number): Unknown;
/**
* Sets the text of the tooltip
* @param text The text of the new tooltip. Variable can be used inplace of a string
* @param red number range 0 to 1 - red color value for text string
* @param green number range 0 to 1 - green color value for text string
* @param blue number range 0 to 1 - blue color value for text string
* @param alpha number range 0 to 1 - specifies the opacity of text. Default is 1
* @param textWrap 'true' to wrap the text string to fit the tooltip box. Default is 'false'
* @see http://wowwiki.wikia.com/wiki/API_GameTooltip_SetText
*/
SetText(text: string, red?: number, green?: number, blue?: number, alpha?: number, textWrap?: boolean): void;
/**
* unknown
* @param args unknown
*/
SetTracking(...args: Unknown[]): Unknown;
/**
* unknown
* @param args unknown
*/
SetTradePlayerItem(...args: Unknown[]): Unknown;
/**
* This method opens the tooltip window when you hover over objects in the tradeskill window
* @param tradeItemIndex The index of the selected item in the recipe list
* @param reagentIndex Index of the selected reagent
* @see http://wowwiki.wikia.com/wiki/API_GameTooltip_SetTradeSkillItem
*/
SetTradeSkillItem(tradeItemIndex: number, reagentIndex?: number): void;
/**
* unknown
* @param args unknown
*/
SetTradeTargetItem(...args: Unknown[]): Unknown;
/**
* unknown
* @param args unknown
*/
SetTrainerService(...args: Unknown[]): Unknown;
/**
* Sets the UnitID for the tooltip
* @param unitId the unit id
* @see http://wowwiki.wikia.com/wiki/API_GameTooltip_SetUnit
*/
SetUnit(unitId: UnitId): void;
/**
* shows the tooltip for a unit's aura
* @param unitId the unitId of the unit whose aura is to be shown
* @param auraIndex the index of the aura to be shown
* @param filter same as UnitAura(...) "HARMFUL" for debuffs, "HELP" for buffs, "RAID" for raid specific, etc
* @see http://wowwiki.wikia.com/wiki/API_GameTooltip_SetUnitAura
*/
SetUnitAura(unitId: UnitId, auraIndex: number, filter?: BuffFilterType): Unknown;
/**
* Shows the tooltip for a unit's buff
* @param unitId the unitId of the unit whose buff is to be shown
* @param buffIndex the index of the buff to be shown
* @param filter same as UnitAura(...) "HARMFUL" for debuffs, "HELP" for buffs, "RAID" for raid specific, etc
* @see http://wowwiki.wikia.com/wiki/API_GameTooltip_SetUnitBuff
*/
SetUnitBuff(unitId: UnitId, buffIndex: number, filter?: BuffFilterType): Unknown;
/**
* shows the tooltip for a unit's debuff
* @param unitId the unitId of the unit whose debuff is to be shown
* @param buffIndex the index of the debuff to be shown
* @param filter same as UnitAura(...) "HARMFUL" for debuffs, "HELP" for buffs, "RAID" for raid specific, etc
* @see http://wowwiki.wikia.com/wiki/API_GameTooltip_SetUnitAura
*/
SetUnitDebuff(unitId: UnitId, buffIndex: number, filter?: BuffFilterType): Unknown;
/**
* shows the configured tooltip
*/
Show(): void;
}
}
declare const GameTooltip: WoWAPI.GameTooltip;
/// <reference path="ui.d.ts" />
/// <reference path="../auction.d.ts" />
declare namespace WoWAPI {
interface GameTooltip {
/**
* Adds Line to tooltip with textLeft on left side of line and textRight on right side
* @param textLeft string which will show on left
* @param textRight string which will show on right
* @param textLeftRed range 0 to 1 - red color value for left string
* @param textLeftGreen range 0 to 1 - green color value for left string
* @param textLeftBlue range 0 to 1 - blue color value for left string
* @param textRightRed range 0 to 1 - red color value for right string
* @param textRightGreen range 0 to 1 - green color value for right string
* @param textRightBlue range 0 to 1 - blue color value for right string
* @see http://wowwiki.wikia.com/wiki/API_GameTooltip_AddDoubleLine
*/
// tslint:disable-next-line max-line-length
AddDoubleLine(textLeft: string, textRight: string, textLeftRed: number, textLeftGreen: number, textLeftBlue: number, textRightRed: number, textRightGreen: number, textRightBlue: number): void;
/**
* Dynamically expands the size of a tooltip
* @param leftString unknown
* @param rightString unknown
*/
AddFontStrings(leftString: Unknown, rightString: Unknown): Unknown;
/**
* Appends a line of text to tooltip
* @param text text which will appear in new tooltip line
* @param red range 0 to 1 - red color value for text string
* @param green range 0 to 1 - green color value for text string
* @param blue range 0 to 1 - blue color value for text string
* @param wrapText 'true' to wrap text
* @see http://wowwiki.wikia.com/wiki/API_GameTooltip_AddLine
*/
AddLine(text: string, red?: number, green?: number, blue?: number, wrapText?: boolean): void;
/**
* Adds a texture (icon) to the beginning of the last line added by AddLine(), AddDoubleLine(), etc
* @param texturePath the texture to add
* @description There is a limit of 10 textures per tooltip (as seen in GameTooltipTemplate.xml)
* @see http://wowwiki.wikia.com/wiki/API_GameTooltip_AddTexture
*/
AddTexture(texturePath: TexturePath): void;
/**
* Append text to the end of the first line of the tooltip
* @param text the text to add
*/
AppendText(text: string): void;
/**
* Clear all 30 lines of tooltip (both left and right ones)
* @see http://wowwiki.wikia.com/wiki/API_GameTooltip_ClearLines
*/
ClearLines(): void;
/**
* Initiates fading out of the GameTooltip over the next few seconds
* @see http://wowwiki.wikia.com/wiki/API_GameTooltip_FadeOut
*/
FadeOut(): void;
/**
* Returns the current anchoring type
*/
GetAnchorType(): Point;
/**
* Returns the name and link of the item displayed on a GameTooltip
* @returns **itemName, ItemLink**
* - **itemName**: Plain text item name (e.g. "Broken Fang")
* - **itemLink**: Formatted item link (e.g. "|cff9d9d9d|Hitem:7073:0:0:0:0:0:0:0|h[Broken Fang]|h|r")
* @see http://wowwiki.wikia.com/wiki/API_GameTooltip_GetItem
* @tupleReturn
*/
GetItem(): [string, ItemLink];
/**
* unknown
*/
GetMinimumWidth(): Unknown;
/**
* Returns the name and link of the spell displayed on a GameTooltip
* @returns **itemName, spellId**
* - **spellName**: Plain text spell name (e.g. "Explosive Shot")
* - **spellId**: Integer spell ID (e.g. "60053")
* @see http://wowwiki.wikia.com/wiki/API_GameTooltip_GetSpell
* @tupleReturn
*/
GetSpell(): [string, number];
/**
* Returns owner frame, anchor
*
* @tupleReturn
*/
GetOwner(): [UIObject, Point];
/**
* Returns unit name, unit id
*
* @tupleReturn
*/
GetUnit(): [string, UnitId];
/**
* unknown
* @param unit unknown
*/
IsUnit(unit: UnitId): boolean;
/**
* Return the number of text lines which comprise a tooltip object
* @see http://wowwiki.wikia.com/wiki/API_GameTooltip_NumLines
*/
NumLines(): number;
/**
* Shows the tooltip for the specified action button
* @param slot id of the action button to load the tooltip for
* @see http://wowwiki.wikia.com/wiki/API_GameTooltip_SetAction
*/
SetAction(slot: ActionBarSlotId): void;
/**
* unknown
* @param type unknown
* @param index unknown
* @param offset unknown
*/
SetAuctionCompareItem(type: AUCTION_TYPE, index: number, offset: number): Unknown;
/**
* unknown
* @param id unknown
*/
SetBackpackToken(id: Unknown): Unknown;
/**
* Sets the GameTooltip to contain text information about the specified item,
* as well as returning whether the item is "cooling down" and the cost to repair the item (which may be 0 (or nil?) if non-applicable).
* @param bag the ID of the bag
* @param slot the ID of the slot
* @returns **hasCooldown, repairCost**
* - **hasCooldown**: if the item currently has a cooldown
* - **repairCost**: the cost to repair the item, may be 0 or nil if the item cannot be repaired
* @see http://wowwiki.wikia.com/wiki/API_GameTooltip_SetBagItem
* @tupleReturn
*/
SetBagItem(bag: WoWAPI.CONTAINER_ID, slot: number): [boolean, number];
/**
* unknown
*/
SetBuybackItem(): Unknown;
/**
* Shows the tooltip for the specified token type
* @param tokenId id of the token type to load the tooltip for
* @see http://wowwiki.wikia.com/wiki/API_GameTooltip_SetCurrencyToken
*/
SetCurrencyToken(tokenId: number): void;
/**
* Displays the frame stack of the mouse cursor's current position on the tooltip.
* This is not intended to be used in typical addons, but is part of the Blizzard_DebugTools "builtin addon" inspired by DevTools
* @param showHidden If true, includes in the display those frames which are currently hidden
* @see http://wowwiki.wikia.com/wiki/API_GameTooltip_SetFrameStack
*/
SetFrameStack(showHidden?: boolean): void;
/**
* unknown
* @param glyphId unknown
*/
SetGlyph(glyphId: Unknown): Unknown;
/**
* Shows the tooltip for the specified guild bank item
* @param tabId the tab id
* @param slot the slot id
*/
SetGuildBankItem(tabId: WoWAPI.CONTAINER_ID_BANK, slot: number): void;
/**
* Changes the item which is displayed in the tooltip according to the passed argument
* @param itemIdentifier Representing an in-game item, enchant or spell or A clickable string of an in-game item
* @see http://wowwiki.wikia.com/wiki/API_GameTooltip_SetHyperlink
*/
SetHyperlink(itemIdentifier: string | ItemLink): void;
/**
* unknown
* @param args unknown
*/
SetHyperlinkCompareItem(...args: Unknown[]): Unknown;
/**
* Shows the tooltip for the specified mail inbox item
* @param index The index of the message to get information from
* @param attachmentIndex The index of the attachment to get information from. In the range of [1,ATTACHMENTS_MAX_RECEIVE(16)]
* @see http://wowwiki.wikia.com/wiki/API_GameTooltip_SetInboxItem
*/
SetInboxItem(index: number, attachmentIndex: number): Unknown;
/**
* This function sets a tooltip widget to display information for the given unit's given inventory slot
* @param unit the unit whose inventory should be searched
* @param slot the inventory slot number to search
* @param nameOnly unknown argument
* @returns **hasItem, hasCooldown, repairCost**
* - **hasItem**: is there an item at the given slot
* - **hasCooldown**: unknown
* - **repairCost**: cost of repairing item
* @see http://wowwiki.wikia.com/wiki/API_GameTooltip_SetInventoryItem
* @tupleReturn
*/
SetInventoryItem(unit: UnitId, slot: number, nameOnly?: Unknown): [boolean, boolean, number];
/**
* Shows an ItemKey in a tooltip.
* @param itemID
* @param itemLevel
* @param itemSuffix
*/
SetItemKey(itemID: number, itemLevel: number, itemSuffix: number): void;
/**
* Sets the GameTooltip to show a loot item
* @param lootIndex The index of the loot item to show (from 1 to GetNumLootItems())
* @see http://wowwiki.wikia.com/wiki/API_GameTooltip_SetLootItem
*/
SetLootItem(lootIndex: number): void;
/**
* Shows the tooltip for the specified loot roll item
* @param rollId the roll id for the item
*/
SetLootRollItem(rollId: number): void;
/**
* unknown
* @param slot unknown
* @param offset unknown
*/
SetMerchantCompareItem(slot: number, offset?: number): Unknown;
/**
* unknown
* @param args unknown
*/
SetMerchantItem(...args: Unknown[]): Unknown;
/**
* unknown
* @param width unknown
*/
SetMinimumWidth(width: number): void;
/**
* Moves the game tooltip to a location based on the "owner" frame
* @param owner Owner frame, which defines the element where the tooltip is centered on.
* A pointer to the frame is required, not the frame name itself (use _G['MyFrame'] to get the pointer from the frame name)
* @param anchor a string that describes the anchor point as it would be set via the SetPoint() function
* @param offsetX offset horizontal
* @param offsetY offset vertical
* @description This will set the owner for tooltip:IsOwned(frame). For instance, first call GameTooltip:SetOwner(UIParent).
* Then GameTooltip:IsOwned(UIParent) will return 1.
* @see http://wowwiki.wikia.com/wiki/API_GameTooltip_SetOwner
*/
SetOwner(owner: UIObject, anchor: Point, offsetX?: number, offsetY?: number): void;
/**
* Sets the amount of padding on the righthand side of the GameTooltip
* @param amount The amount of padding (black space) to put on the right hand side of the tooltip
* @see http://wowwiki.wikia.com/wiki/API_GameTooltip_SetPadding
*/
SetPadding(amount: number): void;
/**
* Shows the tooltip for the specified pet action
* @param slot the pet action slot id
*/
SetPetAction(slot: number): Unknown;
/**
* unknown
* @param args unknown
*/
SetQuestItem(...args: Unknown[]): Unknown;
/**
* unknown
* @param args unknown
*/
SetQuestLogItem(...args: Unknown[]): Unknown;
/**
* Shows the tooltip for the spell reward of the currently selected quest
* @param args unknown
*/
SetQuestLogRewardSpell(...args: Unknown[]): Unknown;
/**
* unknown
* @param args unknown
*/
SetQuestRewardSpell(...args: Unknown[]): Unknown;
/**
* unknown
* @param args unknown
*/
SetSendMailItem(...args: Unknown[]): Unknown;
/**
* Shows the tooltip for the specified shapeshift form
* @param slot the slot id
*/
SetShapeshift(slot: number): Unknown;
/**
* Shows the tooltip for the specified spell
* @param spellBookId the id of the spell on the tab from the spellbook - not the same as SpellId
* @param bookType Either BOOKTYPE_SPELL ("spell") or BOOKTYPE_PET ("pet")
* @see http://wowwiki.wikia.com/wiki/API_GameTooltip_SetSpell
*/
SetSpell(spellBookId: number, bookType: "pet" | "spell"): void;
/**
* Shows the tooltip for the specified talent
* @param tabIndex the index of the talent tab
* @param talentIndex the index of the talent on the tab
* @see http://wowwiki.wikia.com/wiki/API_GameTooltip_SetTalent
*/
SetTalent(tabIndex: number, talentIndex: number): Unknown;
/**
* Sets the text of the tooltip
* @param text The text of the new tooltip. Variable can be used inplace of a string
* @param red number range 0 to 1 - red color value for text string
* @param green number range 0 to 1 - green color value for text string
* @param blue number range 0 to 1 - blue color value for text string
* @param alpha number range 0 to 1 - specifies the opacity of text. Default is 1
* @param textWrap 'true' to wrap the text string to fit the tooltip box. Default is 'false'
* @see http://wowwiki.wikia.com/wiki/API_GameTooltip_SetText
*/
SetText(text: string, red?: number, green?: number, blue?: number, alpha?: number, textWrap?: boolean): void;
/**
* unknown
* @param args unknown
*/
SetTracking(...args: Unknown[]): Unknown;
/**
* unknown
* @param args unknown
*/
SetTradePlayerItem(...args: Unknown[]): Unknown;
/**
* This method opens the tooltip window when you hover over objects in the tradeskill window
* @param tradeItemIndex The index of the selected item in the recipe list
* @param reagentIndex Index of the selected reagent
* @see http://wowwiki.wikia.com/wiki/API_GameTooltip_SetTradeSkillItem
*/
SetTradeSkillItem(tradeItemIndex: number, reagentIndex?: number): void;
/**
* unknown
* @param args unknown
*/
SetTradeTargetItem(...args: Unknown[]): Unknown;
/**
* unknown
* @param args unknown
*/
SetTrainerService(...args: Unknown[]): Unknown;
/**
* Sets the UnitID for the tooltip
* @param unitId the unit id
* @see http://wowwiki.wikia.com/wiki/API_GameTooltip_SetUnit
*/
SetUnit(unitId: UnitId): void;
/**
* shows the tooltip for a unit's aura
* @param unitId the unitId of the unit whose aura is to be shown
* @param auraIndex the index of the aura to be shown
* @param filter same as UnitAura(...) "HARMFUL" for debuffs, "HELP" for buffs, "RAID" for raid specific, etc
* @see http://wowwiki.wikia.com/wiki/API_GameTooltip_SetUnitAura
*/
SetUnitAura(unitId: UnitId, auraIndex: number, filter?: BuffFilterType): Unknown;
/**
* Shows the tooltip for a unit's buff
* @param unitId the unitId of the unit whose buff is to be shown
* @param buffIndex the index of the buff to be shown
* @param filter same as UnitAura(...) "HARMFUL" for debuffs, "HELP" for buffs, "RAID" for raid specific, etc
* @see http://wowwiki.wikia.com/wiki/API_GameTooltip_SetUnitBuff
*/
SetUnitBuff(unitId: UnitId, buffIndex: number, filter?: BuffFilterType): Unknown;
/**
* shows the tooltip for a unit's debuff
* @param unitId the unitId of the unit whose debuff is to be shown
* @param buffIndex the index of the debuff to be shown
* @param filter same as UnitAura(...) "HARMFUL" for debuffs, "HELP" for buffs, "RAID" for raid specific, etc
* @see http://wowwiki.wikia.com/wiki/API_GameTooltip_SetUnitAura
*/
SetUnitDebuff(unitId: UnitId, buffIndex: number, filter?: BuffFilterType): Unknown;
/**
* shows the configured tooltip
*/
Show(): void;
}
}
declare const GameTooltip: WoWAPI.GameTooltip;

1955
declarations/ui/ui.d.ts vendored

File diff suppressed because it is too large Load Diff

210
declarations/unit.d.ts vendored
View File

@@ -1,105 +1,105 @@
/** @noSelfInFile */
declare namespace WoWAPI {
type UnitIdArena = "arena1" | "arena2" | "arena3" | "arena4" | "arena5";
type UnitIdRaidPlayer = "raid1" | "raid2" | "raid3" | "raid4" | "raid5" | "raid6" | "raid7" | "raid8" | "raid9" |
"raid10" | "raid11" | "raid12" | "raid13" | "raid14" | "raid15" | "raid16" | "raid17" | "raid18" | "raid19" | "raid20" |
"raid21" | "raid22" | "raid23" | "raid24" | "raid25" | "raid26" | "raid27" | "raid28" | "raid29" | "raid30" | "raid31" |
"raid32" | "raid33" | "raid34" | "raid35" | "raid36" | "raid37" | "raid38" | "raid39" | "raid40";
type UnitIdRaidPlayerPet = "raidpet1" | "raidpet2" | "raidpet3" | "raidpet4" | "raidpet5" | "raidpet6" | "raidpet7" | "raidpet8" | "raidpet9" |
"raidpet10" | "raidpet11" | "raidpet12" | "raidpet13" | "raidpet14" | "raidpet15" | "raidpet16" | "raidpet17" | "raidpet18" |
"raidpet19" | "raidpet20" | "raidpet21" | "raidpet22" | "raidpet23" | "raidpet24" | "raidpet25" | "raidpet26" | "raidpet27" |
"raidpet28" | "raidpet29" | "raidpet30" | "raidpet31" | "raidpet32" | "raidpet33" | "raidpet34" | "raidpet35" | "raidpet36" |
"raidpet37" | "raidpet38" | "raidpet39" | "raidpet40";
type UnitIdParty = "party1" | "party2" | "party3" | "party4";
type UnitIdPartyPet = "partypet1" | "partypet2" | "partypet3" | "partypet4";
type UnitIdOther = "player" | "pet" | "focus" | "mouseover" | "vehicle" | "target" | "none" | "npc" | "targettarget";
type UnitId = UnitIdOther | UnitIdArena | UnitIdRaidPlayer | UnitIdRaidPlayerPet | UnitIdParty | UnitIdPartyPet;
type UnitRoleType = "TANK" | "DAMAGER" | "HEALER";
type Guid = string;
}
/**
* Returns the GUID of the specified unit
* @param unitId unit to look up the GUID of
* @see https://wow.gamepedia.com/API_UnitGUID
* @since 2.4.0
*/
declare function UnitGUID(unitId: WoWAPI.UnitId): WoWAPI.Guid;
/**
* Returns basic information about another player from their GUID
* @param unitGUID The GUID of the player you're querying about
* @see https://wow.gamepedia.com/API_GetPlayerInfoByGUID
* @since 3.2.0
* @tupleReturn
*/
declare function GetPlayerInfoByGUID(unitGUID: WoWAPI.Guid): [string, number, string, number, number, string, string];
/**
* Returns the name and realm of the specified unit
* @param unitId The UnitId to query (e.g. "player", "party2", "pet", "target" etc.)
* @see https://wow.gamepedia.com/API_GetUnitName
*/
declare function GetUnitName(unitId: WoWAPI.UnitId, showServerName: boolean): string;
/**
* Determines if the unit exists
* @param unitId The unit to query (e.g. "player", "party2", "pet", "target" etc.)
* @see https://wow.gamepedia.com/API_UnitExists
*/
declare function UnitExists(unitId: WoWAPI.UnitId): 1 | null;
/**
* Checks if a specified unit is a player
* @param unitId UnitId of the unit to check.
* @see https://wow.gamepedia.com/API_UnitIsPlayer
*/
declare function UnitIsPlayer(unitId: WoWAPI.UnitId): boolean;
/**
* Returns the unit's level
* @param unitId The unitId to get information from. (e.g. "player", "target")
* @return The unit level. Returns -1 for bosses, or players more than 10 levels above the player
* @see https://wow.gamepedia.com/API_UnitEffectiveLevel
*/
declare function UnitLevel(unitId: WoWAPI.UnitId): number;
/**
* Get the name of the faction (Horde/Alliance) a unit belongs to
* @param unitId unit you want to get the faction for
* @see https://wow.gamepedia.com/API_UnitFactionGroup
* @tupleReturn
*/
declare function UnitFactionGroup(unitId: WoWAPI.UnitId): [string, string];
/**
* Returns the class of the specified unit
* @param unitId unit to query, e.g. "player"
* @see https://wow.gamepedia.com/API_UnitClass
* @tupleReturn
*/
declare function UnitClass(unitId: WoWAPI.UnitId): [string, string, number];
/**
* Returns the current health of the specified unit
* @param unitId identifies the unit to query health for
* @see https://wow.gamepedia.com/API_UnitHealth
*/
declare function UnitHealth(unitId: WoWAPI.UnitId): number;
/**
* Returns the maximum health of the specified unit
* @param unitId the unit whose max health to query
* @see https://wow.gamepedia.com/API_UnitHealthMax
*/
declare function UnitHealthMax(unitId: WoWAPI.UnitId): number;
/**
* Returns 1 if the unit is a player in your party, nil otherwise
* @param unitId unitId who should be checked
* @see https://wow.gamepedia.com/API_UnitInParty
*/
declare function UnitInParty(unitId: WoWAPI.UnitId): boolean;
/** @noSelfInFile */
declare namespace WoWAPI {
type UnitIdArena = "arena1" | "arena2" | "arena3" | "arena4" | "arena5";
type UnitIdRaidPlayer = "raid1" | "raid2" | "raid3" | "raid4" | "raid5" | "raid6" | "raid7" | "raid8" | "raid9" |
"raid10" | "raid11" | "raid12" | "raid13" | "raid14" | "raid15" | "raid16" | "raid17" | "raid18" | "raid19" | "raid20" |
"raid21" | "raid22" | "raid23" | "raid24" | "raid25" | "raid26" | "raid27" | "raid28" | "raid29" | "raid30" | "raid31" |
"raid32" | "raid33" | "raid34" | "raid35" | "raid36" | "raid37" | "raid38" | "raid39" | "raid40";
type UnitIdRaidPlayerPet = "raidpet1" | "raidpet2" | "raidpet3" | "raidpet4" | "raidpet5" | "raidpet6" | "raidpet7" | "raidpet8" | "raidpet9" |
"raidpet10" | "raidpet11" | "raidpet12" | "raidpet13" | "raidpet14" | "raidpet15" | "raidpet16" | "raidpet17" | "raidpet18" |
"raidpet19" | "raidpet20" | "raidpet21" | "raidpet22" | "raidpet23" | "raidpet24" | "raidpet25" | "raidpet26" | "raidpet27" |
"raidpet28" | "raidpet29" | "raidpet30" | "raidpet31" | "raidpet32" | "raidpet33" | "raidpet34" | "raidpet35" | "raidpet36" |
"raidpet37" | "raidpet38" | "raidpet39" | "raidpet40";
type UnitIdParty = "party1" | "party2" | "party3" | "party4";
type UnitIdPartyPet = "partypet1" | "partypet2" | "partypet3" | "partypet4";
type UnitIdOther = "player" | "pet" | "focus" | "mouseover" | "vehicle" | "target" | "none" | "npc" | "targettarget";
type UnitId = UnitIdOther | UnitIdArena | UnitIdRaidPlayer | UnitIdRaidPlayerPet | UnitIdParty | UnitIdPartyPet;
type UnitRoleType = "TANK" | "DAMAGER" | "HEALER";
type Guid = string;
}
/**
* Returns the GUID of the specified unit
* @param unitId unit to look up the GUID of
* @see https://wow.gamepedia.com/API_UnitGUID
* @since 2.4.0
*/
declare function UnitGUID(unitId: WoWAPI.UnitId): WoWAPI.Guid;
/**
* Returns basic information about another player from their GUID
* @param unitGUID The GUID of the player you're querying about
* @see https://wow.gamepedia.com/API_GetPlayerInfoByGUID
* @since 3.2.0
* @tupleReturn
*/
declare function GetPlayerInfoByGUID(unitGUID: WoWAPI.Guid): [string, number, string, number, number, string, string];
/**
* Returns the name and realm of the specified unit
* @param unitId The UnitId to query (e.g. "player", "party2", "pet", "target" etc.)
* @see https://wow.gamepedia.com/API_GetUnitName
*/
declare function GetUnitName(unitId: WoWAPI.UnitId, showServerName: boolean): string;
/**
* Determines if the unit exists
* @param unitId The unit to query (e.g. "player", "party2", "pet", "target" etc.)
* @see https://wow.gamepedia.com/API_UnitExists
*/
declare function UnitExists(unitId: WoWAPI.UnitId): 1 | null;
/**
* Checks if a specified unit is a player
* @param unitId UnitId of the unit to check.
* @see https://wow.gamepedia.com/API_UnitIsPlayer
*/
declare function UnitIsPlayer(unitId: WoWAPI.UnitId): boolean;
/**
* Returns the unit's level
* @param unitId The unitId to get information from. (e.g. "player", "target")
* @return The unit level. Returns -1 for bosses, or players more than 10 levels above the player
* @see https://wow.gamepedia.com/API_UnitEffectiveLevel
*/
declare function UnitLevel(unitId: WoWAPI.UnitId): number;
/**
* Get the name of the faction (Horde/Alliance) a unit belongs to
* @param unitId unit you want to get the faction for
* @see https://wow.gamepedia.com/API_UnitFactionGroup
* @tupleReturn
*/
declare function UnitFactionGroup(unitId: WoWAPI.UnitId): [string, string];
/**
* Returns the class of the specified unit
* @param unitId unit to query, e.g. "player"
* @see https://wow.gamepedia.com/API_UnitClass
* @tupleReturn
*/
declare function UnitClass(unitId: WoWAPI.UnitId): [string, string, number];
/**
* Returns the current health of the specified unit
* @param unitId identifies the unit to query health for
* @see https://wow.gamepedia.com/API_UnitHealth
*/
declare function UnitHealth(unitId: WoWAPI.UnitId): number;
/**
* Returns the maximum health of the specified unit
* @param unitId the unit whose max health to query
* @see https://wow.gamepedia.com/API_UnitHealthMax
*/
declare function UnitHealthMax(unitId: WoWAPI.UnitId): number;
/**
* Returns 1 if the unit is a player in your party, nil otherwise
* @param unitId unitId who should be checked
* @see https://wow.gamepedia.com/API_UnitInParty
*/
declare function UnitInParty(unitId: WoWAPI.UnitId): boolean;

View File

@@ -1,133 +0,0 @@
declare namespace WoWAPI {
/**
* @see https://wow.gamepedia.com/Vector2DMixin
*/
interface Vector2D {
/**
* compares to vectors for equalness
* @param other
* @see https://www.townlong-yak.com/framexml/live/go/Vector2DMixin:IsEqualTo
* @since 7.2.0 (2017-03-28)
*/
IsEqualTo(other: Vector2D): boolean;
/**
* returns x and y coordinate from the vector
* @see https://www.townlong-yak.com/framexml/live/go/Vector2DMixin:GetXY
* @returns x and y
* @since 7.2.0 (2017-03-28)
*/
GetXY(): [number, number];
/**
* sets x and y coordinate
* @see https://www.townlong-yak.com/framexml/live/go/Vector2DMixin:SetXY
* @since 7.2.0 (2017-03-28)
*/
SetXY(x: number, y: number): void;
/**
* multiplies x and y by the given scale number
* @see https://www.townlong-yak.com/framexml/live/go/Vector2DMixin:ScaleBy
* @since 7.2.0 (2017-03-28)
*/
ScaleBy(scale: number): void;
/**
* divides x and y by the given number
* @see https://www.townlong-yak.com/framexml/live/go/Vector2DMixin:DivideBy
* @since 7.2.0 (2017-03-28)
*/
DivideBy(scale: number): void;
/**
* adds another vector to the current
* @see https://www.townlong-yak.com/framexml/live/go/Vector2DMixin:Add
* @since 7.2.0 (2017-03-28)
*/
Add(other: Vector2D): void;
/**
* subtracts another vector from the current
* @see https://www.townlong-yak.com/framexml/live/go/Vector2DMixin:Subtract
* @since 7.2.0 (2017-03-28)
*/
Subtract(other: Vector2D): void;
/**
* cross products the given vector into the current one
* @see https://www.townlong-yak.com/framexml/live/go/Vector2DMixin:Cross
* @since 7.2.0 (2017-03-28)
*/
Cross(other: Vector2D): void;
/**
* dot products the given vector into the current one
* @see https://www.townlong-yak.com/framexml/live/go/Vector2DMixin:Dot
* @since 7.2.0 (2017-03-28)
*/
Dot(other: Vector2D): void;
/**
* tests if the current vector is zero
* @see https://www.townlong-yak.com/framexml/live/go/Vector2DMixin:IsZero
* @since 9.0.1 (2020-10-13)
*/
IsZero(): boolean;
/**
* get the squared magnitude (length) of the vector
* @see https://www.townlong-yak.com/framexml/live/go/Vector2DMixin:GetLengthSquared
* @since 7.2.0 (2017-03-28)
*/
GetLengthSquared(): number;
/**
* get the magnitude (length) of the vector
* @see https://www.townlong-yak.com/framexml/live/go/Vector2DMixin:GetLength
* @since 7.2.0 (2017-03-28)
*/
GetLength(): number;
/**
* normalizes the current vector
* @see https://www.townlong-yak.com/framexml/live/go/Vector2DMixin:Normalize
* @since 7.2.0 (2017-03-28)
*/
Normalize(): void;
/**
* rotates the vector by the given amount of radians
* @see https://www.townlong-yak.com/framexml/live/go/Vector2DMixin:RotateDirection
* @since 8.0.1 (2018-07-17)
*/
RotateDirection(rotationRadians: number): void;
/**
* Clones this vector into a new instance
* @see https://www.townlong-yak.com/framexml/live/go/Vector2DMixin:Clone
* @since 7.2.0 (2017-03-28)
*/
Clone(): Vector2D;
}
}
/**
* creates a new two dimensional vector from the given x and y coordinates
* @param x x value
* @param y y value
* @see https://www.townlong-yak.com/framexml/live/go/CreateVector2D
* @since 7.2.0 (2017-03-28)
*/
declare function CreateVector2D(x: number, y: number): WoWAPI.Vector2D;
/**
* checks if the two given vectors are considered equal
* @param first the first vector
* @param second the second vector
* @see https://www.townlong-yak.com/framexml/live/go/AreVector2DEqual
* @since 7.2.0 (2017-03-28)
*/
declare function AreVector2DEqual(first: WoWAPI.Vector2D, second: WoWAPI.Vector2D): boolean;