├── .gitignore ├── .npmignore ├── declarations ├── artifact.d.ts ├── atlas.d.ts ├── calendar.d.ts ├── groups.d.ts ├── classes │ ├── C_Loot.d.ts │ ├── C_ItemUpgrade.d.ts │ ├── C_RaidLocks.d.ts │ ├── C_CovenantCallings.d.ts │ ├── index.d.ts │ ├── C_ArdenwealdGardening.d.ts │ ├── C_SpellBook.d.ts │ ├── C_CovenantPreview.d.ts │ ├── C_NewItems.d.ts │ ├── C_Spell.d.ts │ ├── C_AchivementInfo.d.ts │ ├── C_AdventureJournal.d.ts │ ├── C_Covenants.d.ts │ ├── C_ItemInteraction.d.ts │ ├── C_Map.d.ts │ ├── C_AnimaDiversion.d.ts │ ├── C_CovenantSanctumUI.d.ts │ ├── C_EncounterJournal.d.ts │ ├── C_LegendaryCrafting.d.ts │ └── C_Item.d.ts ├── inventory.d.ts ├── spell.d.ts ├── bank.d.ts ├── debug.d.ts ├── index.d.ts ├── class.d.ts ├── barber.d.ts ├── chatInfo.d.ts ├── security.d.ts ├── arena.d.ts ├── system.d.ts ├── account.d.ts ├── encounterJournal.d.ts ├── enums.d.ts ├── companion.d.ts ├── global.d.ts ├── blackMarket.d.ts ├── communication.d.ts ├── buff.d.ts ├── vector.d.ts ├── unit.d.ts ├── gossip.d.ts ├── itemLocation.d.ts ├── activity.d.ts ├── binding.d.ts ├── quest.d.ts ├── currency.d.ts ├── constants.d.ts ├── chatWindow.d.ts ├── addon.d.ts ├── characterStatistics.d.ts ├── archaeology.d.ts ├── character.d.ts ├── battlefield.d.ts └── camera.d.ts ├── .travis.yml ├── tsconfig.json ├── package.json ├── tslint.json ├── LICENSE └── readme.md /.gitignore: -------------------------------------------------------------------------------- 1 | .idea/ 2 | *.tgz 3 | node_modules/ 4 | -------------------------------------------------------------------------------- /.npmignore: -------------------------------------------------------------------------------- 1 | tsconfig.json 2 | *.tgz 3 | .travis.yml 4 | tslint.json -------------------------------------------------------------------------------- /declarations/artifact.d.ts: -------------------------------------------------------------------------------- 1 | /** @noSelfInFile */ 2 | 3 | // @todo: write declarations! 4 | -------------------------------------------------------------------------------- /declarations/atlas.d.ts: -------------------------------------------------------------------------------- 1 | declare namespace WoWAPI { 2 | 3 | type AtlasID = string; 4 | } 5 | -------------------------------------------------------------------------------- /declarations/calendar.d.ts: -------------------------------------------------------------------------------- 1 | /** @noSelfInFile */ 2 | 3 | declare namespace WoWAPI { 4 | type CalendarEventType = "PLAYER" | "GUILD" | "ARENA" | "HOLIDAY" | "RAID_LOCKOUT"; 5 | } 6 | -------------------------------------------------------------------------------- /.travis.yml: -------------------------------------------------------------------------------- 1 | language: node_js 2 | sudo: false 3 | 4 | os: 5 | - linux 6 | 7 | node_js: 8 | - node 9 | 10 | install: 11 | - npm install 12 | 13 | script: 14 | - npm run lint 15 | 16 | cache: 17 | directories: 18 | - node_modules -------------------------------------------------------------------------------- /declarations/groups.d.ts: -------------------------------------------------------------------------------- 1 | /** 2 | * Indicates whether the player is in a raid group 3 | * @returns true if the player is currently in a raid group false otherwise 4 | * @see https://wow.gamepedia.com/API_IsInRaid 5 | * @since 5.0.4 6 | */ 7 | declare function IsInRaid(): boolean; 8 | -------------------------------------------------------------------------------- /declarations/classes/C_Loot.d.ts: -------------------------------------------------------------------------------- 1 | declare namespace C_Loot { 2 | 3 | /** 4 | * Needs summary 5 | * @see https://wow.gamepedia.com/API_C_Loot.IsLegacyLootModeEnabled 6 | * @since 8.1.0 (2018-12-11) 7 | */ 8 | function IsLegacyLootModeEnabled(): boolean; 9 | } 10 | -------------------------------------------------------------------------------- /declarations/classes/C_ItemUpgrade.d.ts: -------------------------------------------------------------------------------- 1 | declare namespace C_ItemUpgrade { 2 | 3 | /** 4 | * Returns an itemLink of the anticipated result from applying item upgrading using the ItemUpgradeFrame 5 | * @returns the item hyperlink 6 | * @see https://wow.gamepedia.com/API_C_ItemUpgrade.GetItemHyperlink 7 | * @since 8.2.0 (2019-06-25) 8 | */ 9 | function GetItemHyperlink(): WoWAPI.Hyperlink; 10 | } 11 | -------------------------------------------------------------------------------- /declarations/classes/C_RaidLocks.d.ts: -------------------------------------------------------------------------------- 1 | declare namespace C_RaidLocks { 2 | 3 | /** 4 | * Needs summary 5 | * @param mapId 6 | * @param encounterId 7 | * @param difficultyId 8 | * @see https://wow.gamepedia.com/API_C_RaidLocks.IsEncounterComplete 9 | * @since 8.2.0 (2019-06-25) 10 | */ 11 | function IsEncounterComplete(mapId: number, encounterId: number, difficultyId?: number): boolean; 12 | } 13 | -------------------------------------------------------------------------------- /tsconfig.json: -------------------------------------------------------------------------------- 1 | { 2 | "compilerOptions": { 3 | "module": "commonjs", 4 | "noImplicitAny": true, 5 | "removeComments": false, 6 | "preserveConstEnums": true, 7 | "target": "es5", 8 | "moduleResolution": "node", 9 | "typeRoots": [ 10 | "./node_modules/@types", 11 | "./node_modules/@wartoshika/lua-declarations" 12 | ] 13 | }, 14 | "include": [ 15 | "declarations/**/*.d.ts" 16 | ] 17 | } -------------------------------------------------------------------------------- /declarations/classes/C_CovenantCallings.d.ts: -------------------------------------------------------------------------------- 1 | declare namespace C_CovenantCallings { 2 | 3 | /** 4 | * Needs summary. 5 | * @returns unlocked 6 | * @see https://wow.gamepedia.com/API_C_CovenantCallings.AreCallingsUnlocked 7 | * @since 9.0.1 (2020-10-13) 8 | */ 9 | function AreCallingsUnlocked(): boolean; 10 | 11 | /** 12 | * Needs summary 13 | * @see https://wow.gamepedia.com/API_C_CovenantCallings.RequestCallings 14 | * @since 9.0.1 (2020-10-13) 15 | */ 16 | function RequestCallings(): void; 17 | 18 | } 19 | -------------------------------------------------------------------------------- /declarations/classes/index.d.ts: -------------------------------------------------------------------------------- 1 | import "./C_AchivementInfo"; 2 | import "./C_AdventureJournal"; 3 | import "./C_AnimaDiversion"; 4 | import "./C_ArdenwealdGardening"; 5 | import "./C_CovenantCallings"; 6 | import "./C_CovenantPreview"; 7 | import "./C_Covenants"; 8 | import "./C_CovenantSanctumUI"; 9 | import "./C_EncounterJournal"; 10 | import "./C_Item"; 11 | import "./C_ItemInteraction"; 12 | import "./C_ItemUpgrade"; 13 | import "./C_LegendaryCrafting"; 14 | import "./C_Loot"; 15 | import "./C_Map"; 16 | import "./C_NewItems"; 17 | import "./C_RaidLocks"; 18 | import "./C_Soulbinds"; 19 | import "./C_Spell"; 20 | import "./C_SpellBook"; 21 | -------------------------------------------------------------------------------- /declarations/classes/C_ArdenwealdGardening.d.ts: -------------------------------------------------------------------------------- 1 | declare namespace WoWAPI { 2 | interface ArdenwealdGardenData { 3 | active: number; 4 | ready: number; 5 | remainingSeconds: number; 6 | } 7 | } 8 | 9 | declare namespace C_ArdenwealdGardening { 10 | 11 | /** 12 | * unknown behaviour 13 | * @see https://wow.gamepedia.com/API_C_ArdenwealdGardening.GetGardenData 14 | * @since 9.0.2 (2020-11-17) 15 | */ 16 | function GetGardenData(): WoWAPI.ArdenwealdGardenData; 17 | 18 | /** 19 | * unknown behaviour 20 | * @see https://wow.gamepedia.com/API_C_ArdenwealdGardening.IsGardenAccessible 21 | * @since 9.0.2 (2020-11-17) 22 | */ 23 | function IsGardenAccessible(): boolean; 24 | } 25 | -------------------------------------------------------------------------------- /declarations/classes/C_SpellBook.d.ts: -------------------------------------------------------------------------------- 1 | declare namespace C_SpellBook { 2 | 3 | /** 4 | * Needs summary 5 | * @see https://wow.gamepedia.com/API_C_SpellBook.ContainsAnyDisenchantSpell 6 | * @since 8.2.0 (2019-06-25) 7 | */ 8 | function ContainsAnyDisenchantSpell(): boolean; 9 | 10 | /** 11 | * Needs summary 12 | * @param skillLineId 13 | * @see https://wow.gamepedia.com/API_C_SpellBook.GetSkillLineIndexByID 14 | * @since 9.0.1 (2020-10-13) 15 | */ 16 | function GetSkillLineIndexByID(skillLineId: number): number | undefined; 17 | 18 | /** 19 | * Needs summary 20 | * @param spellId 21 | * @see https://wow.gamepedia.com/API_C_SpellBook.IsSpellDisabled 22 | * @since 8.2.5 (2019-09-24) 23 | */ 24 | function IsSpellDisabled(spellId: number): boolean; 25 | } 26 | -------------------------------------------------------------------------------- /package.json: -------------------------------------------------------------------------------- 1 | { 2 | "author": { 3 | "name": "wartoshika", 4 | "email": "dev@qhun.de" 5 | }, 6 | "description": "Typescript declarations for the current live World of Warcraft LUA API", 7 | "keywords": [ 8 | "wow", 9 | "lua", 10 | "wartoshika", 11 | "qhun" 12 | ], 13 | "license": "MIT", 14 | "main": "declarations/index.d.ts", 15 | "name": "@wartoshika/wow-declarations", 16 | "scripts": { 17 | "test": "echo \"Error: no test specified\" && exit 1", 18 | "postversion": "git push github --follow-tags", 19 | "lint": "tslint -c tslint.json declarations/**/*.d.ts", 20 | "lint:fix": "tslint -c tslint.json --fix declarations/**/*.d.ts" 21 | }, 22 | "types": "declarations/index.d.ts", 23 | "version": "9.0.5-release.2", 24 | "devDependencies": { 25 | "tslint": "^5.20.0", 26 | "typescript": "^3.6.3" 27 | } 28 | } 29 | -------------------------------------------------------------------------------- /tslint.json: -------------------------------------------------------------------------------- 1 | { 2 | "extends": [ 3 | "tslint:recommended" 4 | ], 5 | "rules": { 6 | "array-type": false, 7 | "arrow-parens": false, 8 | // blizzard named their object like C_BlackMarket. In order to support that, class-name must be false 9 | "class-name":false, 10 | "interface-name": false, 11 | "interface-over-type-literal": false, 12 | "max-line-length": [ 13 | true, 14 | 160 15 | ], 16 | "no-empty-interface": false, 17 | "no-namespace": [ 18 | true, 19 | "allow-declarations" 20 | ], 21 | // This is a declaration only repository, references are ok! 22 | "no-reference": false, 23 | "object-literal-sort-keys": false, 24 | "radix": false, 25 | "trailing-comma": false 26 | } 27 | } 28 | -------------------------------------------------------------------------------- /declarations/inventory.d.ts: -------------------------------------------------------------------------------- 1 | /** @noSelfInFile */ 2 | 3 | /** 4 | * Get cooldown information for an inventory item. 5 | * 6 | * @see https://wow.gamepedia.com/API_GetInventoryItemCooldown 7 | * @returns start, duration, isEnabled 8 | * @tupleReturn 9 | */ 10 | declare function GetInventoryItemCooldown(unit: WoWAPI.UnitId, slotId: number): [number, number, WoWAPI.Flag]; 11 | 12 | /** 13 | * Return the texture for an inventory item. 14 | * 15 | * @see https://wow.gamepedia.com/API_GetInventoryItemTexture 16 | * @returns The texture path for the item in the specified slot, or nil if the slot is empty. 17 | */ 18 | declare function GetInventoryItemTexture(unit: WoWAPI.UnitId, slotId: number): WoWAPI.TexturePath; 19 | 20 | /** 21 | * Return information about a specific inventory slot 22 | * 23 | * @see https://wow.gamepedia.com/API_GetInventorySlotInfo 24 | * @returns slotId, textureName 25 | * @tupleReturn 26 | */ 27 | declare function GetInventorySlotInfo(slotName: string): [number, WoWAPI.TexturePath]; 28 | -------------------------------------------------------------------------------- /LICENSE: -------------------------------------------------------------------------------- 1 | MIT License 2 | 3 | Copyright (c) 2019 Oliver Leve 4 | 5 | Permission is hereby granted, free of charge, to any person obtaining a copy 6 | of this software and associated documentation files (the "Software"), to deal 7 | in the Software without restriction, including without limitation the rights 8 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 9 | copies of the Software, and to permit persons to whom the Software is 10 | furnished to do so, subject to the following conditions: 11 | 12 | The above copyright notice and this permission notice shall be included in all 13 | copies or substantial portions of the Software. 14 | 15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 16 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 17 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 18 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 19 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 20 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 21 | SOFTWARE. 22 | -------------------------------------------------------------------------------- /declarations/spell.d.ts: -------------------------------------------------------------------------------- 1 | /** @noSelfInFile */ 2 | 3 | declare const BOOKTYPE_SPELL = "spell"; 4 | declare const BOOKTYPE_PET = "pet"; 5 | 6 | declare namespace WoWAPI { 7 | type BookType = typeof BOOKTYPE_SPELL | typeof BOOKTYPE_PET; 8 | } 9 | 10 | /** 11 | * Retrieves the spell name and spell rank for a spell in the player's spell book. 12 | * 13 | * @see https://wow.gamepedia.com/API_GetSpellBookItemName 14 | * @since 4.0.1 15 | * @returns spellName, spellSubName 16 | * @tupleReturn 17 | */ 18 | declare function GetSpellBookItemName(spellId: number, type: WoWAPI.BookType): [string, string]; 19 | 20 | /** 21 | * Retrieves the cooldown data of the spell specified. 22 | * 23 | * @see https://wow.gamepedia.com/API_GetSpellCooldown 24 | * @returns start, duration, enabled, modRate 25 | * @tupleReturn 26 | */ 27 | declare function GetSpellCooldown(spellId: number, type: WoWAPI.BookType): [number, number, WoWAPI.Flag, number]; 28 | 29 | /** 30 | * Returns the icon of the specified spell. 31 | * 32 | * @see https://wow.gamepedia.com/API_GetSpellTexture 33 | */ 34 | declare function GetSpellTexture(spellId: number, type: WoWAPI.BookType): WoWAPI.TexturePath; 35 | -------------------------------------------------------------------------------- /declarations/classes/C_CovenantPreview.d.ts: -------------------------------------------------------------------------------- 1 | declare namespace WoWAPI { 2 | 3 | interface CovenantPreviewInfo { 4 | 5 | textureKit: string; 6 | transmogSetID: number; 7 | mountID: number; 8 | covenantName: string; 9 | covenantZone: string; 10 | description: string; 11 | covenantCrest: string; 12 | covenantAbilities: CovenantAbilityInfo[]; 13 | fromPlayerChoice: boolean; 14 | covenantSoulbinds: CovenantSoulbindInfo[]; 15 | featureInfo: CovenantFeatureInfo; 16 | } 17 | } 18 | 19 | declare namespace C_CovenantPreview { 20 | 21 | /** 22 | * Needs summary 23 | * @see https://wow.gamepedia.com/API_C_CovenantPreview.CloseFromUI 24 | * @since 9.0.1 (2020-10-13) 25 | */ 26 | function CloseFromUI(): void; 27 | 28 | /** 29 | * Needs summary 30 | * @param playerChoiceResponseID 31 | * @see https://wow.gamepedia.com/API_C_CovenantPreview.GetCovenantInfoForPlayerChoiceResponseID 32 | * @since 9.0.1 (2020-10-13) 33 | */ 34 | function GetCovenantInfoForPlayerChoiceResponseID(playerChoiceResponseID: number): WoWAPI.CovenantPreviewInfo; 35 | } 36 | -------------------------------------------------------------------------------- /declarations/classes/C_NewItems.d.ts: -------------------------------------------------------------------------------- 1 | declare namespace C_NewItems { 2 | 3 | /** 4 | * Clears the new item flag on all items in the player's inventory 5 | * @see https://wow.gamepedia.com/API_C_NewItems.ClearAll 6 | * @since 5.4.0 (2013-09-10) 7 | */ 8 | function GetItemHyperlink(): void; 9 | 10 | /** 11 | * Returns whether an inventory slot holds a newly-acquired item 12 | * @param bagId BagID of the container 13 | * @param slotIndex ID of the inventory slot within the container 14 | * @returns Returns true if the inventory slot holds a newly-acquired item; otherwise false (empty slot or a non-new item). 15 | * @see https://wow.gamepedia.com/API_C_NewItems.IsNewItem 16 | * @since 5.4.0 (2013-09-10) 17 | */ 18 | function IsNewItem(bagId: WoWAPI.CONTAINER_ID, slotIndex: number): boolean; 19 | 20 | /** 21 | * Clears the "new item" flag 22 | * @param bagId container slot id 23 | * @param slotIndex slot within the bag to clear the "new item" flag for 24 | * @see https://wow.gamepedia.com/API_C_NewItems.RemoveNewItem 25 | * @since 5.4.0 (2013-09-10) 26 | */ 27 | function RemoveNewItem(bagId: WoWAPI.CONTAINER_ID, slotIndex: number): void; 28 | } 29 | -------------------------------------------------------------------------------- /declarations/bank.d.ts: -------------------------------------------------------------------------------- 1 | /** @noSelfInFile */ 2 | 3 | /** 4 | * Map a bank item button or bag to an inventory slot button for use in inventory functions 5 | * @param buttodId bank item/bag ID. 6 | * @param isBag 1 if buttonID is a bag, nil otherwise. Same result as ContainerIDToInventoryID, except this one only works for 7 | * bank bags and is more awkward to use 8 | * @see https://wow.gamepedia.com/API_BankButtonIDToInvSlotID 9 | */ 10 | declare function BankButtonIDToInvSlotID(buttodId: number, isBag: WoWAPI.Flag): WoWAPI.INVENTORY_SLOT_ID; 11 | 12 | /** 13 | * Will Close the Bank Frame if opened 14 | * @see https://wow.gamepedia.com/API_CloseBankFrame 15 | */ 16 | declare function CloseBankFrame(): void; 17 | 18 | /** 19 | * Returns the price of a particular bank slot 20 | * @param numSlot Number of slots already purchased 21 | * @return Price of the next bank slot in copper 22 | * @see https://wow.gamepedia.com/API_GetBankSlotCost 23 | */ 24 | declare function GetBankSlotCost(numSlot: number): number; 25 | 26 | /** 27 | * Returns information about the number of purchased bank bag slots 28 | * @see https://wow.gamepedia.com/API_GetNumBankSlots 29 | * @tupleReturn 30 | */ 31 | declare function GetNumBankSlots(): [number, WoWAPI.Flag]; 32 | -------------------------------------------------------------------------------- /declarations/debug.d.ts: -------------------------------------------------------------------------------- 1 | /** @noSelfInFile */ 2 | 3 | /** 4 | * Passes its arguments to the current print output handler. By default, this will output them all to the default chat frame 5 | * 6 | * @param args any number of any type of values 7 | * @see https://wow.gamepedia.com/API_print 8 | */ 9 | declare function print(...args: any[]): void; 10 | 11 | /** 12 | * Returns the function currently handling print() output 13 | * 14 | * @returns Current function responsible for outputting values passed to the print() function 15 | * @see https://wow.gamepedia.com/API_getprinthandler 16 | */ 17 | declare function getprinthandler(): (...args: any[]) => any; 18 | 19 | /** 20 | * Sets a new print() output handler function 21 | * 22 | * @param handler The function that will be called with all of print(...)'s arguments when print(...) is called. 23 | * This function is responsible for converting the values into a form it can present to the user 24 | * @see https://wow.gamepedia.com/API_setprinthandler 25 | */ 26 | declare function setprinthandler(handler: (...args: any[]) => any): void; 27 | 28 | /** 29 | * Wipes a table of all contents 30 | * 31 | * @param table The table to be cleared 32 | * @see https://wow.gamepedia.com/API_wipe 33 | */ 34 | declare function wipe(table: T): T; 35 | -------------------------------------------------------------------------------- /declarations/classes/C_Spell.d.ts: -------------------------------------------------------------------------------- 1 | /// 2 | 3 | declare namespace C_Spell { 4 | 5 | /** 6 | * unknown behaviour 7 | * @param spellId 8 | * @returns rarityBorderAtlas 9 | * @see https://wow.gamepedia.com/API_C_Spell.GetMawPowerBorderAtlasBySpellID 10 | * @since 9.0.2 (2020-11-17) 11 | */ 12 | function GetMawPowerBorderAtlasBySpellID(spellId: number): WoWAPI.AtlasID; 13 | 14 | /** 15 | * Needs summary 16 | * @param spellId 17 | * @see https://wow.gamepedia.com/API_C_Spell.DoesSpellExist 18 | * @since 8.0.1 (2018-07-17) 19 | */ 20 | function DoesSpellExist(spellId: number): boolean; 21 | 22 | /** 23 | * Needs summary 24 | * @param spellId 25 | * @see https://wow.gamepedia.com/API_C_Spell.IsSpellDataCached 26 | * @since 8.0.1 (2018-07-17) 27 | */ 28 | function IsSpellDataCached(spellId: number): boolean; 29 | 30 | /** 31 | * Asynchronously downloads spell information to the game client, making the full details available for subsequent calls to GetSpellInfo(spellId). 32 | * @param spellId 33 | * @fires SPELL_DATA_LOAD_RESULT 34 | * @see https://wow.gamepedia.com/API_C_Spell.RequestLoadSpellData 35 | * @since 8.0.1 (2018-07-17) 36 | */ 37 | function RequestLoadSpellData(spellId: number): boolean; 38 | } 39 | -------------------------------------------------------------------------------- /declarations/index.d.ts: -------------------------------------------------------------------------------- 1 | // global and constants 2 | import "./constants"; 3 | import "./global"; 4 | 5 | // A 6 | import "./account"; 7 | import "./achievement"; 8 | import "./action"; 9 | import "./activity"; 10 | import "./addon"; 11 | import "./archaeology"; 12 | import "./arena"; 13 | import "./atlas"; 14 | // B 15 | import "./bank"; 16 | import "./barber"; 17 | import "./battlefield"; 18 | import "./binding"; 19 | import "./blackMarket"; 20 | import "./buff"; 21 | // C 22 | import "./calendar"; 23 | import "./camera"; 24 | import "./channel"; 25 | import "./character"; 26 | import "./characterStatistics"; 27 | import "./chatInfo"; 28 | import "./chatWindow"; 29 | import "./class"; 30 | import "./communication"; 31 | import "./companion"; 32 | import "./container"; 33 | import "./currency"; 34 | import "./cursor"; 35 | // D 36 | import "./debug"; 37 | // E 38 | import "./encounterJournal"; 39 | import "./enums"; 40 | import "./event"; 41 | // G 42 | import "./gossip"; 43 | import "./groups"; 44 | // I 45 | import "./inventory"; 46 | import "./item"; 47 | import "./itemLocation"; 48 | // Q 49 | import "./quest"; 50 | // S 51 | import "./security"; 52 | import "./spell"; 53 | import "./system"; 54 | // U 55 | import "./ui/tooltip"; 56 | import "./ui/ui"; 57 | import "./unit"; 58 | 59 | // V 60 | import "./vector"; 61 | 62 | // C_* classes 63 | import "./classes"; 64 | 65 | export = WoWAPI; 66 | export as namespace WoWAPI; 67 | -------------------------------------------------------------------------------- /declarations/classes/C_AchivementInfo.d.ts: -------------------------------------------------------------------------------- 1 | declare namespace C_AchivementInfo { 2 | 3 | /** 4 | * Returns any reward item for an achievement 5 | * @param achivementId 6 | * @returns rewardItemID 7 | * @see https://wow.gamepedia.com/API_C_AchievementInfo.GetRewardItemID 8 | * @since 8.1.0 (2018-12-11) 9 | */ 10 | function GetRewardItemID(achivementId: number): number | null; 11 | 12 | /** 13 | * Returns the next achievement in a series 14 | * @param achivementId 15 | * @returns supercedingAchievements Only returns the next ID in a series even though it's in a table 16 | * @see https://wow.gamepedia.com/API_C_AchievementInfo.GetSupercedingAchievements 17 | * @since 8.1.0 (2018-12-11) 18 | */ 19 | function GetSupercedingAchievements(achivementId: number): number[]; 20 | 21 | /** 22 | * Needs summary 23 | * @param achivementId 24 | * @returns isValidAchievement 25 | * @see https://wow.gamepedia.com/API_C_AchievementInfo.IsValidAchievement 26 | * @since 9.0.1 (2020-10-13) 27 | */ 28 | function IsValidAchievement(achivementId: number): boolean; 29 | 30 | /** 31 | * Sets a portrait texture for the unit being achievement compared 32 | * @param textureObject 33 | * @see https://wow.gamepedia.com/API_C_AchievementInfo.IsValidAchievement 34 | * @since 8.0.1 (2018-07-17) 35 | */ 36 | function IsValidAchievement(textureObject: WoWAPI.Texture): void; 37 | } 38 | -------------------------------------------------------------------------------- /declarations/class.d.ts: -------------------------------------------------------------------------------- 1 | declare namespace WoWAPI { 2 | type CLASSES = "WARRIOR" | "DEATHKNIGHT" | "PALADIN" | "MONK" | "PRIEST" | "SHAMAN" | "DRUID" | 3 | "ROGUE" | "MAGE" | "WARLOCK" | "HUNTER" | "DEMONHUNTER"; 4 | 5 | type CLASS_WARRIOR = 1; 6 | type CLASS_PALADIN = 2; 7 | type CLASS_HUNTER = 3; 8 | type CLASS_ROGUE = 4; 9 | type CLASS_PRIEST = 5; 10 | type CLASS_DEATH_KNIGHT = 6; 11 | type CLASS_SHAMAN = 7; 12 | type CLASS_MAGE = 8; 13 | type CLASS_WARLOCK = 9; 14 | type CLASS_MONK = 10; 15 | type CLASS_DRUID = 11; 16 | type CLASS_DEMON_HUNTER = 12; 17 | 18 | type CLASS_ID = CLASS_WARRIOR | CLASS_PALADIN | CLASS_HUNTER | CLASS_ROGUE | CLASS_PRIEST | CLASS_DEATH_KNIGHT | CLASS_SHAMAN | 19 | CLASS_MAGE | CLASS_WARLOCK | CLASS_MONK | CLASS_DRUID | CLASS_DEMON_HUNTER; 20 | } 21 | 22 | /** 23 | * Returns the color value associated with a given class 24 | * @param englishClass the localization-independent name of the class, e.g., 'WARLOCK'. See ClassId for the list of acceptable arguments 25 | * @returns r,g,b,hex 26 | * - **rPerc, gPerc, bPerc**: Number - the value, between 0 and 1, associated with the red, green, and blue - respectively - coordinate in the RGB space 27 | * - **argbHex**: the ARGB hex code of the color, e.g., 'ff8788ee' for 'WARLOCK'. 28 | * @tupleReturn 29 | * @see https://wow.gamepedia.com/API_GetClassColor 30 | */ 31 | declare function GetClassColor(englishClass: WoWAPI.CLASSES): [number, number, number, string]; 32 | -------------------------------------------------------------------------------- /declarations/classes/C_AdventureJournal.d.ts: -------------------------------------------------------------------------------- 1 | /** 2 | * @see https://wow.gamepedia.com/Adventure_Guide 3 | */ 4 | declare namespace C_AdventureJournal { 5 | 6 | /** 7 | * @see https://wow.gamepedia.com/API_C_AdventureJournal.ActivateEntry 8 | * @since 6.2.0 9 | */ 10 | function ActivateEntry(index: WoWAPI.Unknown): WoWAPI.Unknown; 11 | 12 | /** 13 | * @see https://wow.gamepedia.com/API_C_AdventureJournal.CanBeShown 14 | * @since 6.2.0 15 | */ 16 | function CanBeShown(...args: WoWAPI.UnknownTable[]): WoWAPI.Unknown; 17 | 18 | /** 19 | * @see https://wow.gamepedia.com/API_C_AdventureJournal.GetNumAvailableSuggestions 20 | * @since 6.2.0 21 | */ 22 | function GetNumAvailableSuggestions(...args: WoWAPI.UnknownTable[]): WoWAPI.Unknown; 23 | 24 | /** 25 | * @see https://wow.gamepedia.com/API_C_AdventureJournal.GetPrimaryOffset 26 | * @since 6.2.0 27 | */ 28 | function GetPrimaryOffset(...args: WoWAPI.UnknownTable[]): WoWAPI.Unknown; 29 | 30 | /** 31 | * @see https://wow.gamepedia.com/API_C_AdventureJournal.GetReward 32 | * @since 6.2.0 33 | */ 34 | function GetReward(...args: WoWAPI.UnknownTable[]): WoWAPI.Unknown; 35 | 36 | /** 37 | * @see https://wow.gamepedia.com/API_C_AdventureJournal.GetSuggestions 38 | * @since 6.2.0 39 | */ 40 | function GetSuggestions(...args: WoWAPI.UnknownTable[]): WoWAPI.Unknown; 41 | 42 | /** 43 | * @see https://wow.gamepedia.com/API_C_AdventureJournal.SetPrimaryOffset 44 | * @since 6.2.0 45 | */ 46 | function SetPrimaryOffset(...args: WoWAPI.UnknownTable[]): WoWAPI.Unknown; 47 | 48 | /** 49 | * @see https://wow.gamepedia.com/API_C_AdventureJournal.UpdateSuggestions 50 | * @since 6.2.0 51 | */ 52 | function UpdateSuggestions(...args: WoWAPI.UnknownTable[]): WoWAPI.Unknown; 53 | } 54 | -------------------------------------------------------------------------------- /declarations/classes/C_Covenants.d.ts: -------------------------------------------------------------------------------- 1 | declare namespace WoWAPI { 2 | 3 | interface CovenantData { 4 | 5 | ID: number; 6 | textureKit: string; 7 | celebrationSoundKit: number; 8 | animaChannelSelectSoundKit: number; 9 | animaChannelActiveSoundKit: number; 10 | animaGemsFullSoundKit: number; 11 | animaNewGemSoundKit: number; 12 | animaReinforceSelectSoundKit: number; 13 | upgradeTabSelectSoundKitID: number; 14 | reservoirFullSoundKitID: number; 15 | beginResearchSoundKitID: number; 16 | renownFanfareSoundKitID: number; 17 | name: string; 18 | soulbindIDs: number[]; 19 | } 20 | 21 | interface CovenantAbilityInfo { 22 | 23 | spellId: number; 24 | type: Enum.CovenantAbilityType; 25 | } 26 | 27 | interface CovenantSoulbindInfo { 28 | 29 | spellID: number; 30 | uiTextureKit: string; 31 | name: string; 32 | description: string; 33 | sortOrder: number; 34 | } 35 | 36 | interface CovenantFeatureInfo { 37 | 38 | name: string; 39 | description: string; 40 | texture: number; 41 | } 42 | 43 | } 44 | 45 | declare namespace C_Covenants { 46 | 47 | /** 48 | * Returns the CovenantID of the chosen covenant 49 | * - Only applies to joining a Covenant at maximum level or during N [50] The Threads of Fate 50 | * - Returns 0 while loading addons until info is available, before PLAYER_LOGIN and immediately after /reload 51 | * @see https://wow.gamepedia.com/API_C_Covenants.GetActiveCovenantID 52 | * @since 9.0.1 (2020-10-13) 53 | */ 54 | function GetActiveCovenantID(): Enum.CovenantType; 55 | 56 | /** 57 | * Needs summary 58 | * @param covenantId 59 | * @see https://wow.gamepedia.com/API_C_Covenants.GetCovenantData 60 | * @since 9.0.1 (2020-10-13) 61 | */ 62 | function GetCovenantData(covenantId: Enum.CovenantType): WoWAPI.CovenantData | null; 63 | 64 | /** 65 | * Needs summary. 66 | * @see https://wow.gamepedia.com/API_C_Covenants.GetCovenantIDs 67 | * @since 9.0.1 (2020-10-13) 68 | */ 69 | function GetCovenantIDs(): Enum.CovenantType[]; 70 | 71 | } 72 | -------------------------------------------------------------------------------- /declarations/barber.d.ts: -------------------------------------------------------------------------------- 1 | /** @noSelfInFile */ 2 | 3 | declare namespace WoWAPI { 4 | type FacialHairCustomizationGlobalType = "EARRINGS" | "FEATURES" | "HAIR" | "HORNS" | "MARKINGS" | "NORMAL" | "PIERCINGS" | "TUSKS"; 5 | type FacialHairCustomizationType = "HORNS" | "NORMAL"; 6 | } 7 | 8 | /** 9 | * Purchases currently selected customizations from the barber shop 10 | * @see https://wow.gamepedia.com/API_ApplyBarberShopStyle 11 | */ 12 | declare function ApplyBarberShopStyle(): void; 13 | 14 | /** 15 | * Resets all customization categories to original styles 16 | * @see https://wow.gamepedia.com/API_BarberShopReset 17 | */ 18 | declare function BarberShopReset(): void; 19 | 20 | /** 21 | * Exits the barber shop without applying selected customizations 22 | * @see https://wow.gamepedia.com/API_CancelBarberShop 23 | */ 24 | declare function CancelBarberShop(): void; 25 | 26 | /** 27 | * Returns information about the current selection for a barber shop customization 28 | * @see https://wow.gamepedia.com/API_GetBarberShopStyleInfo 29 | * @tupleReturn 30 | */ 31 | declare function GetBarberShopStyleInfo(catId: number): [string, WoWAPI.Unknown, WoWAPI.Unknown, WoWAPI.Flag]; 32 | 33 | /** 34 | * Returns the total costs of the cosmetic changes 35 | * @see https://wow.gamepedia.com/API_GetBarberShopTotalCost 36 | */ 37 | declare function GetBarberShopTotalCost(): number; 38 | 39 | /** 40 | * Returns the type of facial hair customization available to the character 41 | * @see https://wow.gamepedia.com/API_GetFacialHairCustomization 42 | */ 43 | declare function GetFacialHairCustomization(): WoWAPI.FacialHairCustomizationGlobalType; 44 | 45 | /** 46 | * https://wow.gamepedia.com/API_GetHairCustomization 47 | * @see https://wow.gamepedia.com/API_GetHairCustomization 48 | */ 49 | declare function GetHairCustomization(): WoWAPI.FacialHairCustomizationType; 50 | 51 | /** 52 | * Alters style selection in a particular customization category 53 | * @param catId Ascending index of the customization category that should be changed to the next/previous style 54 | * @param reverse 1 if the selection should be changed to the previous style, nil if to the next 55 | */ 56 | declare function SetNextBarberShopStyle(catId: number, reverse?: WoWAPI.Flag): void; 57 | -------------------------------------------------------------------------------- /declarations/chatInfo.d.ts: -------------------------------------------------------------------------------- 1 | /** @noSelfInFile */ 2 | 3 | declare namespace WoWAPI { 4 | type AddonMessageType = "PARTY" | "RAID" | "GUILD" | "BATTLEGROUND" | "WHISPER" | "CHANNEL"; 5 | type ChatFlag = "AFK" | "DND" | "GM"; 6 | type ChatJoinLeftType = "YOU_JOINED" | "YOU_LEFT" | "THROTTLED"; 7 | type ChatUserNoticeType = "ANNOUNCEMENTS_OFF" | "ANNOUNCEMENTS_ON" | "BANNED" | 8 | "OWNER_CHANGED" | "INVALID_NAME" | "INVITE" | "MODERATION_OFF" | "MODERATION_ON" | 9 | "MUTED" | "NOT_MEMBER" | "NOT_MODERATED" | "SET_MODERATOR" | "UNSET_MODERATOR"; 10 | interface C_ChatInfo { 11 | 12 | /** 13 | * Registers an addon message prefix, allowing messages sent over addon channels with that prefix to be received by the client 14 | * @param prefix The message prefix to register for delivery 15 | * @see https://wow.gamepedia.com/API_RegisterAddonMessagePrefix 16 | */ 17 | RegisterAddonMessagePrefix(this: C_ChatInfo, prefix: string): void; 18 | 19 | /** 20 | * Sends a message to the hidden addon channel 21 | * @param prefix Message prefix, can be used as your addon identifier; at most 15 characters 22 | * @param text Text to send, at most 250 characters 23 | * @param type AddOn channel to send to. Valid types are "PARTY", "RAID", "GUILD", "BATTLEGROUND", "WHISPER", and "CHANNEL". 24 | * @since 1.12.0 25 | */ 26 | SendAddonMessage(this: C_ChatInfo, prefix: string, text: string, type: Exclude): void; 27 | 28 | /** 29 | * Sends a message to the hidden addon channel 30 | * @param prefix Message prefix, can be used as your addon identifier; at most 15 characters 31 | * @param text Text to send, at most 250 characters 32 | * @param type AddOn channel to send to. Valid types are "PARTY", "RAID", "GUILD", "BATTLEGROUND", "WHISPER", and "CHANNEL". 33 | * @param target sed only for "WHISPER" and "CHANNEL" communications - the player to whisper to for "WHISPER" or the channel name to 34 | * broadcast to for "CHANNEL" 35 | * @since 2.1.0 36 | */ 37 | SendAddonMessage(this: C_ChatInfo, prefix: string, text: string, type: "WHISPER" | "CHANNEL", target: string): void; 38 | } 39 | } 40 | 41 | declare const C_ChatInfo: WoWAPI.C_ChatInfo; 42 | -------------------------------------------------------------------------------- /declarations/security.d.ts: -------------------------------------------------------------------------------- 1 | /** @noSelfInFile */ 2 | 3 | /// 4 | 5 | /** 6 | * Determines whether the current execution path is secure 7 | * 8 | * @returns 1 if the current path is secure (and able to call protected functions), nil otherwise. 9 | * @see https://wow.gamepedia.com/API_issecure 10 | */ 11 | declare function issecure(): WoWAPI.Flag; 12 | 13 | /** 14 | * Taints the current execution path. 15 | * 16 | * @see https://wow.gamepedia.com/API_forceinsecure 17 | * @since 3.0.2 18 | */ 19 | declare function forceinsecure(): void; 20 | 21 | /** 22 | * Determines whether the given table key is secure 23 | * 24 | * @param table table to check the the key in; if omitted, defaults to the globals table (_G). 25 | * @param variableName string key to check the taint of. Numbers will be converted to a string; other types will throw an error 26 | * @returns isSecure, taint 27 | * @see https://wow.gamepedia.com/API_issecurevariable 28 | * @tupleReturn 29 | */ 30 | declare function issecurevariable(table?: object, variableName?: string): [boolean, string]; 31 | 32 | /** 33 | * Calls the specified function without propagating taint to the caller 34 | * 35 | * @param call function to call, either a direct reference or a string used as a key into _G. 36 | * @param args any number of arguments to pass the function 37 | * @returns the function's return values 38 | * @see https://wow.gamepedia.com/API_securecall 39 | */ 40 | declare function securecall(call: string | ((...args: any[]) => any), ...args: any[]): any; 41 | 42 | /** 43 | * Creates a secure "post hook" for the specified function. Your hook will be called with the same arguments after the original call is performed 44 | * 45 | * @param table Table to hook the functionName key in; if omitted, defaults to the global table (_G). 46 | * @param functionName name of the function being hooked 47 | * @param handler your hook function 48 | * @see https://wow.gamepedia.com/API_hooksecurefunc 49 | */ 50 | declare function hooksecurefunc(table?: object, functionName?: string, handler?: (...args: any[]) => any): void; 51 | 52 | /** 53 | * Determines whether in-combat lockdown restrictions are active 54 | * 55 | * @returns true if lockdown restrictions are currently in effect, false otherwise 56 | * @see https://wow.gamepedia.com/API_InCombatLockdown 57 | */ 58 | declare function InCombatLockdown(): boolean; 59 | -------------------------------------------------------------------------------- /declarations/arena.d.ts: -------------------------------------------------------------------------------- 1 | /** @noSelfInFile */ 2 | 3 | /// 4 | 5 | declare namespace WoWAPI { 6 | type ARENA_TEAM_GREEN = 0; 7 | type ARENA_TEAM_GOLD = 1; 8 | type ARENA_TEAM = ARENA_TEAM_GREEN | ARENA_TEAM_GOLD; 9 | 10 | type ARENA_ID_2VS2 = 4; 11 | type ARENA_ID_3VS3 = 5; 12 | type ARENA_ID = ARENA_ID_2VS2 | ARENA_ID_3VS3; 13 | } 14 | 15 | /** 16 | * Returns information regarding an Arena team 17 | * 18 | * @param index Which team to get information on, 0 is Green team and 1 is Gold Team 19 | * @returns teamName, oldTeamRating, newTeamRating, teamRating 20 | * @see https://wow.gamepedia.com/API_GetBattlefieldTeamInfo 21 | * @tupleReturn 22 | */ 23 | declare function GetBattlefieldTeamInfo(index: WoWAPI.ARENA_TEAM): [string, number, number, number]; 24 | 25 | /** 26 | * Returns the current arena season. Returns 0 when there is no active season 27 | * 28 | * @returns Current arena season 29 | * @see https://wow.gamepedia.com/API_GetCurrentArenaSeason 30 | */ 31 | declare function GetCurrentArenaSeason(): number; 32 | 33 | /** 34 | * Gets the previous Arena season 35 | * 36 | * @see https://wow.gamepedia.com/API_GetPreviousArenaSeason 37 | */ 38 | declare function GetPreviousArenaSeason(): WoWAPI.Unknown; 39 | 40 | /** 41 | * 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 42 | * 43 | * @returns isArena, isRegistered 44 | * @see https://wow.gamepedia.com/API_IsActiveBattlefieldArena 45 | * @tupleReturn 46 | */ 47 | declare function IsActiveBattlefieldArena(): [boolean, boolean]; 48 | 49 | /** 50 | * Returns a value based on whether the player is the arena team captain 51 | * 52 | * @param index The team index 53 | * @see https://wow.gamepedia.com/API_IsArenaTeamCaptain 54 | */ 55 | declare function IsArenaTeamCaptain(index: WoWAPI.ARENA_TEAM): boolean; 56 | 57 | /** 58 | * Returns true if you are a member of an arena team. 59 | * 60 | * @see https://wow.gamepedia.com/API_IsInArenaTeam 61 | */ 62 | declare function IsInArenaTeam(): boolean; 63 | 64 | /** 65 | * Queue for a arena either solo or as a group 66 | * 67 | * @param arenaId The arena id 68 | * @param joinAsGroup Unknown 69 | * @see https://wow.gamepedia.com/API_JoinSkirmish 70 | */ 71 | declare function JoinSkirmish(arenaId: WoWAPI.ARENA_ID, joinAsGroup?: boolean): void; 72 | -------------------------------------------------------------------------------- /declarations/classes/C_ItemInteraction.d.ts: -------------------------------------------------------------------------------- 1 | declare namespace WoWAPI { 2 | 3 | interface ItemInteractionFrameInfo { 4 | 5 | textureKit: string; 6 | openSoundKitID: number; 7 | closeSoundKitID: number; 8 | titleText: string; 9 | tutorialText: string; 10 | buttonText: string; 11 | frameType: Enum.ItemInteractionFrameType; 12 | description: string | null; 13 | cost: number | null; 14 | currencyTypeId: number | null; 15 | dropInSlotSoundKitId: number | null; 16 | } 17 | } 18 | 19 | declare namespace C_ItemInteraction { 20 | 21 | /** 22 | * Needs summary 23 | * @see https://wow.gamepedia.com/API_C_ItemInteraction.ClearPendingItem 24 | * @since 8.3.0 (2020-01-14) 25 | */ 26 | function ClearPendingItem(): void; 27 | 28 | /** 29 | * Needs summary 30 | * @see https://wow.gamepedia.com/API_C_ItemInteraction.CloseUI 31 | * @since 8.3.0 (2020-01-14) 32 | */ 33 | function CloseUI(): void; 34 | 35 | /** 36 | * Needs summary 37 | * @see https://wow.gamepedia.com/API_C_ItemInteraction.GetItemInteractionInfo 38 | * @since 8.3.0 (2020-01-14) 39 | */ 40 | function GetItemInteractionInfo(): WoWAPI.ItemInteractionFrameInfo | null; 41 | 42 | /** 43 | * Needs summary 44 | * @see https://wow.gamepedia.com/API_C_ItemInteraction.GetItemInteractionSpellId 45 | * @since 8.3.0 (2020-01-14) 46 | */ 47 | function GetItemInteractionSpellId(): number; 48 | 49 | /** 50 | * Needs summary 51 | * @see https://wow.gamepedia.com/API_C_ItemInteraction.InitializeFrame 52 | * @since 8.3.0 (2020-01-14) 53 | */ 54 | function InitializeFrame(): void; 55 | 56 | /** 57 | * Needs summary 58 | * @see https://wow.gamepedia.com/API_C_ItemInteraction.PerformItemInteraction 59 | * @since 8.3.0 (2020-01-14) 60 | */ 61 | function PerformItemInteraction(): void; 62 | 63 | /** 64 | * Needs summary 65 | * @see https://wow.gamepedia.com/API_C_ItemInteraction.Reset 66 | * @since 8.3.0 (2020-01-14) 67 | */ 68 | function Reset(): void; 69 | 70 | /** 71 | * Needs summary 72 | * @returns success 73 | * @see https://wow.gamepedia.com/API_C_ItemInteraction.SetPendingItem 74 | * @since 8.3.0 (2020-01-14) 75 | */ 76 | function SetPendingItem(item?: ItemLocation.ItemLocationMixin): boolean; 77 | 78 | } 79 | -------------------------------------------------------------------------------- /declarations/system.d.ts: -------------------------------------------------------------------------------- 1 | /** @noSelfInFile */ 2 | 3 | /** 4 | * Execute a console command 5 | * 6 | * @param command The console command to execute 7 | * @see https://wow.gamepedia.com/API_ConsoleExec 8 | */ 9 | declare function ConsoleExec(command: string): WoWAPI.Unknown; 10 | 11 | /** 12 | * Attempts to detect the world of warcraft MMO mouse. 13 | * 14 | * @see https://wow.gamepedia.com/API_DetectWowMouse 15 | */ 16 | declare function DetectWowMouse(): WoWAPI.Unknown; 17 | 18 | /** 19 | * Returns information about current client build 20 | * 21 | * @returns version, build, date, tocversion 22 | * @see https://wow.gamepedia.com/API_GetBuildInfo 23 | * @tupleReturn 24 | */ 25 | declare function GetBuildInfo(): [string, string, string, number]; 26 | 27 | /** 28 | * Returns the currently set error handler 29 | * 30 | * @returns Unknown 31 | * @see https://wow.gamepedia.com/API_geterrorhandler 32 | */ 33 | declare function geterrorhandler(): (...args: any[]) => any | null; 34 | 35 | /** 36 | * Retrieve the current framerate (frames / second). 37 | * 38 | * @returns The current framerate in frames per second 39 | * @see https://wow.gamepedia.com/API_GetFramerate 40 | */ 41 | declare function GetFramerate(): number; 42 | 43 | /** 44 | * Returns the current server time in hours and minutes 45 | * 46 | * @returns hours, minutes 47 | * @see https://wow.gamepedia.com/API_GetGameTime 48 | * @tupleReturn 49 | */ 50 | declare function GetGameTime(): [number, number]; 51 | 52 | /** 53 | * Returns the system uptime of your computer in seconds, with millisecond 54 | * precision. 55 | * 56 | * @returns hours, minutes 57 | * @see https://wow.gamepedia.com/API_GetTime 58 | */ 59 | declare function GetTime(): number; 60 | 61 | /** 62 | * Returns information about the client locale 63 | * 64 | * @returns 65 | * - deDE: German (Germany) 66 | * - enGB: English (United Kingdom) 67 | * - enGB clients return enUS 68 | * - enUS: English (United States) 69 | * - esES: Spanish (Spain) 70 | * - esMX: Spanish (Mexico) 71 | * - frFR: French (France) 72 | * - itIT: Italian (Italy) 73 | * - koKR: Korean (Korea) 74 | * - ptBR: Portuguese (Brazil) 75 | * - ruRU: Russian (Russia) - UI AddOn 76 | * - zhCN: Chinese (Simplified, PRC) 77 | * - zhTW: Chinese (Traditional, Taiwan) 78 | */ 79 | declare function GetLocale(): string; 80 | 81 | /** 82 | * Returns the name of the character's realm 83 | * @see https://wow.gamepedia.com/API_GetRealmName 84 | */ 85 | declare function GetRealmName(): string; 86 | -------------------------------------------------------------------------------- /declarations/classes/C_Map.d.ts: -------------------------------------------------------------------------------- 1 | declare namespace C_Map { 2 | 3 | /** 4 | * Needs summary 5 | * @see https://wow.gamepedia.com/API_C_Map.CloseWorldMapInteraction 6 | * @since 8.3.0 (2020-01-14) 7 | */ 8 | function CloseWorldMapInteraction(): void; 9 | 10 | /** 11 | * Returns a map subzone name 12 | * @param areaId areaTableID. 13 | * @returns name 14 | * @see https://wow.gamepedia.com/API_C_Map.GetAreaInfo 15 | * @see https://wow.gamepedia.com/AreaTableID 16 | * @since 8.0.1 (2018-07-17) 17 | */ 18 | function GetAreaInfo(areaId: number): string; 19 | 20 | /** 21 | * Returns the current UI map for the given unit. Only works for the player and party members 22 | * @param unitToken unitId 23 | * @returns uiMapID Returns the "lowest" UiMapID the unit is on. For example, if a unit is in 24 | * a microdungeon it will return that instead of the zone or continent map 25 | * @see https://wow.gamepedia.com/API_C_Map.GetBestMapForUnit 26 | * @since 8.0.1 (2018-07-17) 27 | */ 28 | function GetBestMapForUnit(unitToken: WoWAPI.UnitId): number | null; 29 | 30 | /** 31 | * Returns the maps for a bounty 32 | * @param bountySetID from BountySet.db2 33 | * @returns mapIDs 34 | * @see https://wow.gamepedia.com/API_C_Map.GetBountySetMaps 35 | * @see https://wow.tools/dbc/?dbc=bountyset 36 | * @see https://wow.gamepedia.com/UiMapID 37 | * @since 8.1.0 (2018-12-11) 38 | */ 39 | function GetBountySetMaps(bountySetID: number): number[]; 40 | 41 | /** 42 | * Returns the world map id 43 | * @see https://wow.gamepedia.com/API_C_Map.GetFallbackWorldMapID 44 | * @since 8.0.1 (2018-07-17) 45 | */ 46 | function GetFallbackWorldMapID(): number; 47 | 48 | /** 49 | * Returns the background atlas for a map 50 | * @see https://wow.gamepedia.com/API_C_Map.GetMapArtBackgroundAtlas 51 | * @since 8.0.1 (2018-07-17) 52 | */ 53 | function GetFallbackWorldMapID(uiMapID: number): WoWAPI.AtlasID; 54 | 55 | /** 56 | * Returns the position for the "Click to Zoom In" hint text on flight maps 57 | * @see https://wow.gamepedia.com/API_C_Map.GetMapArtHelpTextPosition 58 | * @since 8.0.1 (2018-07-17) 59 | */ 60 | function GetMapArtHelpTextPosition(uiMapID: number): Enum.MapCanvasPosition; 61 | 62 | /** 63 | * Returns the art for a (phased) map 64 | * @see https://wow.gamepedia.com/API_C_Map.GetMapArtID 65 | * @since 8.0.1 (2018-07-17) 66 | */ 67 | function GetMapArtID(uiMapID: number): number; 68 | 69 | // next todo: GetMapArtLayers 70 | } 71 | -------------------------------------------------------------------------------- /declarations/account.d.ts: -------------------------------------------------------------------------------- 1 | /** @noSelfInFile */ 2 | 3 | /// 4 | /// 5 | 6 | /** 7 | * Returns the highest expansion id the current account has been flagged for. 8 | */ 9 | declare function GetAccountExpansionLevel(): EXPANSION_CLASSIC | EXPANSION_BURNING_CRUSADE | EXPANSION_WRATH_OF_THE_LICH_KING | EXPANSION_CATACLYSM | 10 | EXPANSION_MISTS_OF_PANDARIA | EXPANSION_WARLORDS_OF_DRAENOR | EXPANSION_LEGION | EXPANSION_BATTLE_FOR_AZEROTH; 11 | 12 | /** 13 | * Returns the time spent logged in in current billing unit. This function is to limit players from playing the game for too long 14 | * @return Amount of time left in seconds to play as rested. See details below for clarification. Returns nil for EU and US accounts 15 | */ 16 | declare function GetBillingTimeRested(): number; 17 | 18 | /** 19 | * Returns whether the player is using a trial (free-to-play) account 20 | * @see https://wow.gamepedia.com/API_IsTrialAccount 21 | */ 22 | declare function IsTrialAccount(): boolean; 23 | 24 | /** 25 | * Returns the cap on trial character level, money and profession skill for Starter Edition accounts 26 | * @returns 27 | * 1. rLevel number - character level cap, currently 20 28 | * 2. rMoney number - max amount of money in copper, currently 10000000 29 | * 3. profCap number - profession level cap, currently 0 30 | * @see https://wow.gamepedia.com/API_GetRestrictedAccountData 31 | */ 32 | declare function GetRestrictedAccountData(): [number, number, number]; 33 | 34 | /** 35 | * unknown 36 | */ 37 | declare function GetSecondsUntilParentalControlsKick(): WoWAPI.Unknown; 38 | 39 | /** 40 | * Returns if the account has been secured with Blizzard Mobile Authenticator 41 | * @returns accountSecured 42 | * @since 7.3.5 (2018-01-16) 43 | */ 44 | declare function IsAccountSecured(): boolean; 45 | 46 | /** 47 | * Returns if the account has trial account restrictions 48 | */ 49 | declare function IsRestrictedAccount(): WoWAPI.Unknown; 50 | 51 | /** 52 | * unknown behaviour 53 | * @since 6.1.0 (2015-02-24) 54 | * @see https://wow.gamepedia.com/API_IsVeteranTrialAccount 55 | */ 56 | declare function IsVeteranTrialAccount(): boolean; 57 | 58 | /** 59 | * 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 60 | * @returns 1 if the account is "unhealthy", nil if not. See details below for clarification. Always returns nil outside China. 61 | * @see https://wow.gamepedia.com/API_NoPlayTime 62 | */ 63 | declare function NoPlayTime(): WoWAPI.Flag; 64 | 65 | /** 66 | * unknown behaviour 67 | * @since 9.0.1 (2020-10-13) 68 | */ 69 | declare function SendSubscriptionInterstitialResponse(): Enum.SubscriptionInterstitialResponseType; 70 | -------------------------------------------------------------------------------- /declarations/encounterJournal.d.ts: -------------------------------------------------------------------------------- 1 | /** 2 | * Clears the encounter journal search results 3 | * @see https://wow.gamepedia.com/API_EJ_ClearSearch 4 | * @since 4.2.0 (2011-06-28) 5 | */ 6 | declare function EJ_ClearSearch(): void; 7 | 8 | /** 9 | * Ends any active encounter journal search and clears any results from EJ_GetSearchResult 10 | * @see https://wow.gamepedia.com/API_EJ_EndSearch 11 | * @since 7.0.3 (2016-07-19) 12 | */ 13 | declare function EJ_EndSearch(): void; 14 | 15 | /** 16 | * Returns the currently selected content tuning ID for BFA instances per EJ_SelectInstance. 17 | * Used in the FrameXML for GameTooltip:SetHyperlink when hovering over inline spell hyperlinks in the overview tab 18 | * @see https://wow.gamepedia.com/API_EJ_GetContentTuningID 19 | * @since 8.0.1 (2018-07-17) 20 | */ 21 | declare function EJ_GetContentTuningID(): number; 22 | 23 | /** 24 | * Returns encounter boss info 25 | * @param index creature index, up to nine for encounters with multiple bosses 26 | * @param encounterId if omitted this will default to the currently viewed encounter 27 | * @returns id, name, description, displayInfo, iconImage, uiModelSceneID 28 | * @see https://wow.gamepedia.com/API_EJ_GetCreatureInfo 29 | * @since 4.2.0 (2011-06-28) 30 | */ 31 | declare function EJ_GetCreatureInfo(index: number, encounterId?: number): [number, string, string, number, number, number]; 32 | 33 | /** 34 | * Returns the currently active encounter journal tier index 35 | * @returns index the current tier index 36 | * @see https://wow.gamepedia.com/API_EJ_GetCurrentTier 37 | * @since 5.0.4 (2012-08-28) 38 | */ 39 | declare function EJ_GetCurrentTier(): number; 40 | 41 | /** 42 | * Returns the currently viewed difficulty in the journal 43 | * @see https://wow.gamepedia.com/API_EJ_GetDifficulty 44 | * @since 4.3.0 (2011-11-29) 45 | */ 46 | declare function EJ_GetDifficulty(): number; 47 | 48 | /** 49 | * Returns encounter info from the journal 50 | * @param encounterID 51 | * @returns name, description, bossId, rootSectionId, link, journalInstanceId, dungeonEncounterId, instanceId 52 | * @see https://wow.gamepedia.com/API_EJ_GetEncounterInfo 53 | * @since 4.2.0 (2011-06-28) 54 | */ 55 | declare function EJ_GetEncounterInfo(encounterID: number): [string, string, number, number, WoWAPI.Hyperlink, number, number, number]; 56 | 57 | /** 58 | * Returns encounter info from the journal 59 | * @param index 60 | * @param instanceId if omitted, this will default to the currently selected instance per EJ_SelectInstance 61 | * @returns name, description, bossId, rootSectionId, link, journalInstanceId, dungeonEncounterId, instanceId 62 | * @see https://wow.gamepedia.com/API_EJ_GetEncounterInfoByIndex 63 | * @since 4.2.0 (2011-06-28) 64 | */ 65 | declare function EJ_GetEncounterInfoByIndex(index: number, instanceId?: number): [string, string, number, number, string, number, number, number]; 66 | 67 | // next todo: EJ_GetInstanceByIndex 68 | -------------------------------------------------------------------------------- /declarations/enums.d.ts: -------------------------------------------------------------------------------- 1 | declare namespace Enum { 2 | 3 | enum SubscriptionInterstitialResponseType { 4 | Clicked = 0, 5 | Closed = 1, 6 | WebRedirect = 2, 7 | } 8 | 9 | enum AnimaDiversionNodeState { 10 | Unavailable = 0, 11 | Available = 1, 12 | SelectedTemporary = 2, 13 | SelectedPermanent = 3, 14 | Cooldown = 4, 15 | } 16 | 17 | enum CovenantType { 18 | None = 0, 19 | Kyrian = 1, 20 | Venthyr = 2, 21 | NightFae = 3, 22 | Necrolord = 4, 23 | } 24 | 25 | enum CovenantAbilityType { 26 | Class = 0, 27 | Signature = 1, 28 | Soulbind = 2, 29 | } 30 | 31 | enum GarrTalentFeatureSubtype { 32 | Generic = 0, 33 | Bastion = 1, 34 | Revendreth = 2, 35 | Ardenweald = 3, 36 | Maldraxxus = 4, 37 | } 38 | 39 | enum RuneforgePowerFilter { 40 | All = 0, 41 | Available = 1, 42 | Unavailable = 2 43 | } 44 | 45 | enum SoulbindConduitType { 46 | Finesse = 0, 47 | Potency = 1, 48 | Endurance = 2, 49 | Flex = 3, 50 | } 51 | 52 | enum SoulbindNodeState { 53 | Unavailable = 0, 54 | Unselected = 1, 55 | Selectable = 2, 56 | Selected = 3, 57 | } 58 | 59 | enum SoulbindConduitTransactionType { 60 | Install = 0, 61 | Uninstall = 1 62 | } 63 | 64 | enum InventoryType { 65 | IndexNonEquipType = 0, 66 | IndexHeadType = 1, 67 | IndexNeckType = 1, 68 | IndexShoulderType = 3, 69 | IndexBodyType = 4, 70 | IndexChestType = 5, 71 | IndexWaistType = 6, 72 | IndexLegsType = 7, 73 | IndexFeetType = 8, 74 | IndexWristType = 9, 75 | IndexHandType = 10, 76 | IndexFingerType = 11, 77 | IndexTrinketType = 12, 78 | IndexWeaponType = 13, 79 | IndexShieldType = 14, 80 | IndexRangedType = 15, 81 | IndexCloakType = 16, 82 | Index2HWeaponType = 17, 83 | IndexBagType = 18, 84 | IndexTabardType = 19, 85 | IndexRobeType = 20, 86 | IndexWeaponmainhandType = 21, 87 | IndexWeaponoffhandType = 22, 88 | IndexHoldableType = 23, 89 | IndexAmmoType = 24, 90 | IndexThrownType = 25, 91 | IndexRangedrightType = 26, 92 | IndexQuiverType = 27, 93 | IndexRelicType = 28, 94 | } 95 | 96 | enum ItemQuality { 97 | Poor = 0, 98 | Common = 1, 99 | Uncommon = 2, 100 | Rare = 3, 101 | Epic = 4, 102 | Legendary = 5, 103 | Artifact06, 104 | Heirloom = 7, 105 | WoWToken = 8, 106 | } 107 | 108 | enum ItemInteractionFrameType { 109 | CleanseCorruption = 0 110 | } 111 | 112 | enum MapCanvasPosition { 113 | None = 0, 114 | BottomLeft = 1, 115 | BottomRight = 2, 116 | TopLeft = 3, 117 | TopRight = 4 118 | } 119 | } 120 | -------------------------------------------------------------------------------- /declarations/companion.d.ts: -------------------------------------------------------------------------------- 1 | /** @noSelfInFile */ 2 | 3 | declare namespace WoWAPI { 4 | type CompanionType = "CRITTER" | "MOUNT"; 5 | type MountType = 0x1 | 0x2 | 0x4 | 0x8 | 0x10; 6 | } 7 | 8 | /** 9 | * Summons the specified companion 10 | * @param type The type of companion to summon or dismiss: "CRITTER" or "MOUNT" 11 | * @param id The companion index to summon or dismiss, ascending from 1 12 | * @see https://wow.gamepedia.com/API_CallCompanion 13 | * @since 3.0.2 14 | */ 15 | declare function CallCompanion(type: WoWAPI.CompanionType, companionIndex: number): void; 16 | 17 | /** 18 | * Dismisses a currently-summoned mount or non-combat pet 19 | * @param type type of companion to dismiss, either "MOUNT" or "CRITTER". 20 | * @see https://wow.gamepedia.com/API_DismissCompanion 21 | * @since 3.0.2 22 | */ 23 | declare function DismissCompanion(type: WoWAPI.CompanionType): void; 24 | 25 | /** 26 | * Returns information about the companions you have 27 | * @param type Companion type to query: "CRITTER" or "MOUNT". 28 | * @param companionIndex Index of the slot to query. Starting at 1 and going up to GetNumCompanions("type"). 29 | * @returns ** 30 | * - **creatureID**: The NPC ID of the companion 31 | * - **creatureName**: The name of the companion 32 | * - **creatureSpellID**: The spell ID to cast the companion. This is not passed to CallCompanion, but can be used with, e.g., GetSpellInfo 33 | * - **icon**: The texture of the icon for the companion 34 | * - **issummoned**: 1 if the companion is summoned, nil if it's not 35 | * - **mountType**: Bitfield for air/ground/water mounts 36 | * - 0x1: Ground 37 | * - 0x2: Can fly 38 | * - 0x4: ? (set for most mounts) 39 | * - 0x8: Underwater 40 | * - 0x10: Can jump (turtles cannot) 41 | * @deprecated use C_MountJournal.GetMountInfoByID() 42 | * @see https://wow.gamepedia.com/API_GetCompanionInfo 43 | * @since 3.0.2 44 | * @tupleReturn 45 | */ 46 | // tslint:disable-next-line max-line-length 47 | declare function GetCompanionInfo(type: WoWAPI.CompanionType, companionIndex: number): [number, string, number, WoWAPI.TexturePath, WoWAPI.Flag, WoWAPI.MountType]; 48 | 49 | /** 50 | * Returns the number of companions you have 51 | * @param type Type of companions to count: "CRITTER", or "MOUNT". 52 | * @returns The number of companions of a specific type 53 | * @see https://wow.gamepedia.com/API_GetNumCompanions 54 | * @since 3.0.2 55 | */ 56 | declare function GetNumCompanions(type: WoWAPI.CompanionType): number; 57 | 58 | /** 59 | * Places a companion onto the mouse cursor 60 | * @param type companion type, either "MOUNT" or "CRITTER" 61 | * @param companionIndex index of the companion of the specified type to place on the cursor, ascending from 1. 62 | * @protected NOCOMBAT 63 | * @see https://wow.gamepedia.com/API_PickupCompanion 64 | * @since 3.0.2 65 | */ 66 | declare function PickupCompanion(type: WoWAPI.CompanionType, companionIndex: number): void; 67 | 68 | /** 69 | * Summons a random non-combat pet companion 70 | * @description This function is part of the companions API that was deprecated for battle-pets with the introduction of the Pet Journal. 71 | * Calling it will result in UI_ERROR_MESSAGE being fired 72 | * @deprecated Use C_PetJournal.SummonRandomPet instead 73 | * @since 3.3.3 74 | * @see https://wow.gamepedia.com/API_SummonRandomCritter 75 | */ 76 | declare function SummonRandomCritter(): void; 77 | -------------------------------------------------------------------------------- /declarations/classes/C_AnimaDiversion.d.ts: -------------------------------------------------------------------------------- 1 | declare namespace WoWAPI { 2 | 3 | interface AnimaDiversionNodeInfo { 4 | talentId: number; 5 | name: string; 6 | description: string; 7 | costs: AnimaDiversionCostInfo[]; 8 | currencyId: number; 9 | icon: number; 10 | normalizedPosition: WoWAPI.Vector2D; 11 | state: Enum.AnimaDiversionNodeState; 12 | } 13 | 14 | interface AnimaDiversionCostInfo { 15 | currencyId: number; 16 | quantity: number; 17 | } 18 | } 19 | 20 | declare namespace C_AnimaDiversion { 21 | 22 | /** 23 | * Closes the AnimaDiversionFrame 24 | * @see https://wow.gamepedia.com/API_C_AnimaDiversion.CloseUI 25 | * @fires ANIMA_DIVERSION_CLOSE 26 | * @since 9.0.1 (2020-10-13) 27 | */ 28 | function CloseUI(): void; 29 | 30 | /** 31 | * Returns all Anima Conductor nodes for the player's Covenant 32 | * Requires interacting with an Anima Conductor at least once since logging on; otherwise, returns nil. 33 | * Subsequent calls to C_UI.Reload() will not interrupt this function 34 | * @see https://wow.gamepedia.com/API_C_AnimaDiversion.GetAnimaDiversionNodes 35 | * @since 9.0.1 (2020-10-13) 36 | */ 37 | function GetAnimaDiversionNodes(): WoWAPI.AnimaDiversionNodeInfo[]; 38 | 39 | /** 40 | * Locates an Anima Conductor 41 | * @returns An Anima Conductor's location on the continent map only while interacting with it; otherwise nil 42 | * @see https://wow.gamepedia.com/API_C_AnimaDiversion.GetOriginPosition 43 | * @since 9.0.1 (2020-10-13) 44 | */ 45 | function GetOriginPosition(): WoWAPI.Vector2D | null; 46 | 47 | /** 48 | * Needs summary 49 | * @returns progress 50 | * @see https://wow.gamepedia.com/API_C_AnimaDiversion.GetReinforceProgress 51 | * @since 9.0.1 (2020-10-13) 52 | */ 53 | function GetReinforceProgress(): number; 54 | 55 | /** 56 | * Names the texture kit applied to the AnimaDiversionFrame 57 | * @returns Name of a texture kit if the player has interacted with an Anima Conductor at least once since logging on; otherwise, returns nil 58 | * @see https://wow.gamepedia.com/API_C_AnimaDiversion.GetTextureKit 59 | * @since 9.0.1 (2020-10-13) 60 | */ 61 | function GetTextureKit(): string | null; 62 | 63 | /** 64 | * Attempts to open the AnimaDiversionFrame 65 | * - Triggers ANIMA_DIVERSION_OPEN only after interacting with an Anima Conductor at least once since logging on, regardless of subsequent 66 | * calls to C_UI.Reload(); otherwise, this function silently fails 67 | * - Despite its name, this function is not used by the native UI when interacting with an Anima Conductor 68 | * - Calling this function after walking away from the Anima Conductor results in an incomplete UI because C_AnimaDiversion.GetOriginPosition() returns nil 69 | * - However, it is possible to close and reopen the frame with full functionality if the player has remained within range 70 | * of the Anima Conductor since interacting with it 71 | * @see https://wow.gamepedia.com/API_C_AnimaDiversion.OpenAnimaDiversionUI 72 | * @fires ANIMA_DIVERSION_OPEN 73 | * @since 9.0.1 (2020-10-13) 74 | */ 75 | function OpenAnimaDiversionUI(): void; 76 | 77 | /** 78 | * Needs summary 79 | * @param talentId 80 | * @param temporary 81 | * @see https://wow.gamepedia.com/API_C_AnimaDiversion.SelectAnimaNode 82 | * @since 9.0.1 (2020-10-13) 83 | */ 84 | function SelectAnimaNode(talentId: number, temporary: boolean): void; 85 | } 86 | -------------------------------------------------------------------------------- /readme.md: -------------------------------------------------------------------------------- 1 | [![npm version](https://badge.fury.io/js/%40wartoshika%2Fwow-declarations.svg)](https://badge.fury.io/js/%40wartoshika%2Fwow-declarations) 2 | [![Build Status](https://travis-ci.org/wartoshika/wow-declarations.svg?branch=master)](https://travis-ci.org/wartoshika/wow-declarations) 3 | 4 | # Typescript declarations for the current live World of Warcraft LUA API 5 | 6 | > WoW Classic developers should use the [wow-classic-declarations](https://github.com/wartoshika/wow-classic-declarations) repository. 7 | 8 | ## Shadowland 9 | 10 | Updates for the Shadowland expansion are currently in development. You can find a partial implementation on the master branch. 11 | Once every function has been documented i will release it into a dedicated version. 12 | 13 | **Supported transpilers for LUA targets**: 14 | - qhun-transpiler ([GitHub-Page](https://github.com/wartoshika/qhun-transpiler)) 15 | - TypescriptToLua ([GitHub-Page](https://github.com/TypeScriptToLua/TypeScriptToLua)) - *Thanks to tstirrat* 16 | 17 | ## Setup 18 | 19 | Installing this dependency via 20 | 21 | - `$ npm install @wartoshika/wow-declarations@8.3.0-release.1` (npm repository installation) 22 | - `$ npm install wartoshika/wow-declarations#v8.3.0-release.1` (github repository installation) 23 | 24 | > I strongly recommend to use a version tag when using github based install. Referencing the master branch can result in installing a breaking change. Github based installations need a prefixing `v` in the version number! 25 | 26 | Please add the wow-declarations path to your `tsconfig.json` compiler options like below: 27 | 28 | ```js 29 | { 30 | "compilerOptions": { 31 | // ... 32 | "typeRoots": [ 33 | "./node_modules/@types", 34 | "./node_modules/@wartoshika/wow-declarations" 35 | ] 36 | } 37 | } 38 | ``` 39 | 40 | ## Changes 41 | 42 | ### **August 25 2022 - v9.0.5-release.2** 43 | 44 | - Merging PR #18 (Cannot find name 'AtlasID') 45 | 46 | ### **June 16 2021 - v9.0.5-release.1** 47 | 48 | - Merging PR #16 wich adds SlashCmdList 49 | - Added a bunch of Shadowland related features 50 | - Added declarations of common global tables like 51 | - C_Item 52 | - C_AdventureJournal 53 | - C_EncounterJournal 54 | - C_Loot 55 | - C_LegendaryCrafting 56 | - C_Soulbinds 57 | - C_CovenantCallings 58 | - C_AchivementInfo 59 | - C_RaidLocks 60 | - C_ItemInteraction 61 | - C_ItemUpgrade 62 | - C_Map 63 | - C_NewItems 64 | - Added common "mixin" functions like 65 | - ItemLocation 66 | 67 | ### **Sat. 08 2020 - v8.3.0-release.1** 68 | 69 | - Merging PR #11 wich add/remove functions that are present in the WoW API release 8.3. 70 | 71 | **Breaking changes for classic addons** 72 | 73 | - If you are using this dependency to develop WoW classic addons, make sure to use the dedicated repository [wow-classic-declarations](https://github.com/wartoshika/wow-classic-declarations). I think that this is a good decision since the two WoW versions may drifting apart. 74 | 75 | ### **Nov. 24 2019 - v8.2.5-release.2** 76 | 77 | **Breaking changes** - Incomtabible with version `v8.2.5-release.1` 78 | 79 | - Object declarations are now namespaced and can be imported into your file. (PR #10) 80 | - I strongly recommend using npm packages with a fix version number or referencing the version tag when installing this dependency. See [setup](#Setup). 81 | 82 | ### **Oct. 5 2019 - v8.2.5-release.1** 83 | 84 | - Version numbers now indicates wich WoW Addon api version is supported (closes #9) 85 | 86 | ## Contribution 87 | 88 | If you want to contribute, please provide a pull request and ensure that you linted your changes with `npm run lint` or try to autofix the errors with `npm run lint:fix`. I appreciate your help! 89 | -------------------------------------------------------------------------------- /declarations/global.d.ts: -------------------------------------------------------------------------------- 1 | /** @noSelfInFile */ 2 | 3 | declare type EXPANSION_CLASSIC = 0; 4 | declare type EXPANSION_BURNING_CRUSADE = 1; 5 | declare type EXPANSION_WRATH_OF_THE_LICH_KING = 2; 6 | declare type EXPANSION_CATACLYSM = 3; 7 | declare type EXPANSION_MISTS_OF_PANDARIA = 4; 8 | declare type EXPANSION_WARLORDS_OF_DRAENOR = 5; 9 | declare type EXPANSION_LEGION = 6; 10 | declare type EXPANSION_BATTLE_FOR_AZEROTH = 7; 11 | 12 | declare namespace WoWAPI { 13 | type Unknown = any; 14 | type UnknownStringKeyTable = { [anyKey: string]: any }; 15 | type UnknownNumberKeyTable = { [anyKey: number]: any }; 16 | type UnknownTable = UnknownStringKeyTable | UnknownNumberKeyTable; 17 | 18 | type Flag = 0 | 1; 19 | 20 | /** 21 | * a texture can be a path to a blp file or a number as fileID 22 | */ 23 | type TexturePath = string | number; 24 | 25 | /** 26 | * the base type for all clickable ingame links in the chat 27 | */ 28 | type Hyperlink = string; 29 | 30 | /** 31 | * TYPES THAT SHOULD BE STORED SEPERATLY!!!! 32 | */ 33 | 34 | type CombatTextType = "DAMAGE" | "SPELL_DAMAGE" | "DAMAGE_CRIT" | "HEAL" | "PERIODIC_HEAL" | "HEAL_CRIT" | "MISS" | 35 | "DODGE" | "PARRY" | "BLOCK" | "RESIST" | "SPELL_RESISTED" | "ABSORB" | "SPELL_ABSORBED" | "MANA" | "ENERGY" | "RAGE" | "FOCUS" | 36 | "SPELL_ACTIVE" | "COMBO_POINTS" | "AURA_START" | "AURA_END" | "AURA_START_HARMFUL" | "AURA_END_HARMFUL" | "HONOR_GAINED" | "FACTION"; 37 | 38 | type CombatCriticalIndicator = "CRITICAL" | "CRUSHING" | "GLANCING"; 39 | 40 | type CombatDamageType = 1 | 2 | 4 | 8 | 16 | 32 | 64; 41 | 42 | type DisenchantRollType = 1 | 2 | 3; 43 | 44 | type Difficulty = 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 45 | | 23 | 24 | 25 | 26 | 27 | 28 | 29 | 30 | 31 | 32 | 33 | 34; 46 | 47 | type StreamingState = 0 | 1 | 2 | 3; 48 | 49 | type VehicleType = "Natural" | "Mechanical" | "VehicleMount" | "VehicleMount_Organic" | ""; 50 | 51 | type UnitPowerType = "MANA" | "RAGE" | "ENERGY" | "FOCUS" | "HAPPINESS" | "RUNIC_POWER" | "HOLY_POWER"; 52 | 53 | type SpellTreeId = 1 | 2 | 3 | 4 | 5 | 6 | 7; 54 | } 55 | 56 | declare type ActionBarPage1 = 1; 57 | declare type ActionBarPage2 = 2; 58 | declare type ActionBarPage3 = 3; 59 | declare type ActionBarPage4 = 4; 60 | declare type ActionBarPage5 = 5; 61 | declare type ActionBarPage6 = 6; 62 | declare type ActionBarPage = ActionBarPage1 | ActionBarPage2 | ActionBarPage3 | ActionBarPage4 | ActionBarPage5 | ActionBarPage6; 63 | 64 | declare type SlotActionBarPet = 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10; 65 | declare type SlotActionBarPage1 = 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12; 66 | declare type SlotActionBarPage2 = 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24; 67 | declare type SlotActionBarPage3 = 25 | 26 | 27 | 28 | 29 | 30 | 31 | 32 | 33 | 34 | 35 | 36; 68 | declare type SlotActionBarPage4 = 37 | 38 | 39 | 40 | 41 | 42 | 43 | 44 | 45 | 46 | 47 | 48; 69 | declare type SlotActionBarPage5 = 49 | 50 | 51 | 52 | 53 | 54 | 55 | 56 | 57 | 58 | 59 | 60; 70 | declare type SlotActionBarPage6 = 61 | 62 | 63 | 64 | 65 | 66 | 67 | 68 | 69 | 70 | 71 | 72; 71 | declare type SlotActionBarMisc = 73 | 74 | 75 | 76 | 77 | 78 | 79 | 80 | 81 | 82 | 83 | 84 | 85 | 86 | 87 | 88 | 89 | 90 | 72 | 91 | 92 | 93 | 94 | 95 | 96 | 97 | 98 | 99 | 100 | 101 | 102 | 103 | 104 | 105 | 106 | 107 | 108 | 109 | 110 | 111 | 73 | 112 | 113 | 114 | 115 | 116 | 117 | 118 | 119 | 120; 74 | declare type SlotActionBarPossess = 121 | 122 | 123 | 124 | 125 | 126 | 127 | 128 | 129 | 130 | 131 | 132; 75 | declare type ActionBarSlotId = SlotActionBarPage1 | SlotActionBarPage2 | SlotActionBarPage3 | SlotActionBarPage4 | 76 | SlotActionBarPage5 | SlotActionBarPage6 | SlotActionBarMisc | SlotActionBarPossess; 77 | -------------------------------------------------------------------------------- /declarations/blackMarket.d.ts: -------------------------------------------------------------------------------- 1 | /** @noSelfInFile */ 2 | 3 | declare namespace WoWAPI { 4 | interface C_BlackMarket { 5 | 6 | /** 7 | * Notifies the server that the Black Market UI was closed 8 | * @event BLACK_MARKET_CLOSE 9 | * @see https://wow.gamepedia.com/API_C_BlackMarket.Close 10 | * @since 5.0.4 11 | */ 12 | Close(): void; 13 | 14 | /** 15 | * Returns information about a specific black market auction 16 | * @param marketId black market auction ID 17 | * @description These functions will only return information when the black market UI is open (according to the server, 18 | * i.e. BLACK_MARKET_OPEN has fired, and BLACK_MARKET_CLOSE has not fired since) 19 | * @since 5.0.4 20 | * @see https://wow.gamepedia.com/API_C_BlackMarket.GetItemInfoByID 21 | * @tupleReturn 22 | */ 23 | // tslint:disable-next-line max-line-length 24 | GetItemInfoByID(marketId: number): [string, TexturePath, number, string, number, string, string, number, number, number, boolean, number, number, ItemLink, number]; 25 | 26 | /** 27 | * Returns information about a specific black market auction 28 | * @description These functions will only return information when the black market UI is open (according to the server, 29 | * i.e. BLACK_MARKET_OPEN has fired, and BLACK_MARKET_CLOSE has not fired since) 30 | * @since 5.0.4 31 | * @see https://wow.gamepedia.com/API_C_BlackMarket.GetItemInfoByID 32 | * @tupleReturn 33 | */ 34 | GetHotItem(): [string, TexturePath, number, string, number, string, string, number, number, number, boolean, number, number, ItemLink, number]; 35 | 36 | /** 37 | * Returns information about a specific black market auction 38 | * @param index black market auction index, ascending from 1 to C_BlackMarket.GetNumItems() 39 | * @description These functions will only return information when the black market UI is open (according to the server, 40 | * i.e. BLACK_MARKET_OPEN has fired, and BLACK_MARKET_CLOSE has not fired since) 41 | * @since 5.0.4 42 | * @see https://wow.gamepedia.com/API_C_BlackMarket.GetItemInfoByID 43 | * @tupleReturn 44 | */ 45 | // tslint:disable-next-line max-line-length 46 | GetItemInfoByIndex(index: number): [string, TexturePath, number, string, number, string, string, number, number, number, boolean, number, number, ItemLink, number]; 47 | 48 | /** 49 | * Returns the number of auctions on the Black Market Auction House 50 | * @returns number of auctions on the black market 51 | * @since 5.0.4 52 | * @see https://wow.gamepedia.com/API_C_BlackMarket.GetNumItems 53 | */ 54 | GetNumItems(): number; 55 | 56 | /** 57 | * Places a bid on a black market auction 58 | * @param marketId black market auction ID (not line index!) to bid on. 59 | * @param bid bid amount, in copper 60 | * @since 5.0.4 61 | * @see https://wow.gamepedia.com/API_C_BlackMarket.ItemPlaceBid 62 | * @requires HARDWARE_EVENT 63 | */ 64 | ItemPlaceBid(marketId: number, bid: number): void; 65 | 66 | /** 67 | * Requests updated black market auction information from the server 68 | * @event BLACK_MARKET_ITEM_UPDATE 69 | * @description The black market UI must be open according to the server (i.e. BLACK_MARKET_OPEN has fired, and BLACK_MARKET_CLOSE 70 | * has not fired since) in order for this function to have any effect 71 | * @see https://wow.gamepedia.com/API_C_BlackMarket.RequestItems 72 | * @since 5.0.4 73 | */ 74 | RequestItems(): void; 75 | } 76 | } 77 | 78 | declare const C_BlackMarket: WoWAPI.C_BlackMarket; 79 | -------------------------------------------------------------------------------- /declarations/communication.d.ts: -------------------------------------------------------------------------------- 1 | /** @noSelfInFile */ 2 | 3 | declare namespace WoWAPI { 4 | type EmoteToken = "AGREE" | "AMAZE" | "ANGRY" | "APOLOGIZE" | "APPLAUD" | "ATTACKMYTARGET" | "BARK" | "BASHFUL" | "BECKON" | 5 | "BEG" | "BURP" | "BITE" | "BLEED" | "BLINK" | "KISS" | "BLUSH" | "BOGGLE" | "BONK" | "BORED" | "BOUNCE" | "BOW" | "BRB" | "BYE" | "CACKLE" | 6 | "CALM" | "SCRATCH" | "CHARGE" | "CHEER" | "EAT" | "CHICKEN" | "CHUCKLE" | "CLAP" | "COLD" | "COMFORT" | "COMMEND" | "CONFUSED" | 7 | "CONGRATULATE" | "COUGH" | "COWER" | "CRACK" | "CRINGE" | "CRY" | "CUDDLE" | "CURIOUS" | "CURTSEY" | "DANCE" | "FROWN" | "BONK" | 8 | "THREATEN" | "DRINK" | "DROOL" | "DUCK" | "EAT" | "TALKEX" | "EYE" | "FART" | "FIDGET" | "FLEE" | "FLEX" | "FLIRT" | "FLOP" | "FOLLOW" | 9 | "HUNGRY" | "GASP" | "GAZE" | "GIGGLE" | "HAPPY" | "GLARE" | "GLOAT" | "GOLFCAP" | "GREET" | "GRIN" | "GROAN" | "GROVEL" | "GROWL" | 10 | "GUFFAW" | "HAIL" | "HEALME" | "HELLO" | "HELPME" | "HUG" | "INCOMING" | "INSULT" | "INTRODUCE" | "JK" | "KNEEL" | "LAUGH" | "PRAISE" | 11 | "LAYDOWN" | "LICK" | "LISTEN" | "LOST" | "LOVE" | "MASSAGE" | "MOAN" | "MOCK" | "MOO" | "MOON" | "MOURN" | "NO" | "NOD" | "NOSEPICK" | 12 | "OOM" | "OPENFIRE" | "PANIC" | "PAT" | "PEER" | "SHOO" | "PITY" | "PLEAD" | "POINT" | "POKE" | "PONDER" | "POUNCE" | "PRAY" | "PURR" | 13 | "PUZZLE" | "TALKQ" | "RAISE" | "RASP" | "READY" | "SHAKE" | "ROAR" | "ROFL" | "RUDE" | "SALUTE" | "SCARED" | "SCRATCH" | "SEXY" | "SHAKE" | 14 | "SHIMMY" | "SHIVER" | "SHRUG" | "SHY" | "SIGH" | "JOKE" | "SLAP" | "SLEEP" | "STINK" | "SMILE" | "SMIRK" | "SNARL" | "SNICKER" | "SNIFF" | 15 | "SNUB" | "SOOTHE" | "SPIT" | "STARE" | "STAND" | "SURPRISED" | "SURRENDER" | "TAP" | "TALK" | "TAUNT" | "TEASE" | "THANK" | "THIRSTY" | 16 | "TICKLE" | "TIRED" | "TRAIN" | "VETO" | "VICTORY" | "VIOLIN" | "WAIT" | "WAVE" | "WELCOME" | "WHINE" | "WHISTLE" | "WINK" | "WORK" | "YAWN"; 17 | } 18 | 19 | /** 20 | * Executes one of the emotes based on the given token, including vocal emotes and animations. The list of currently valid emotes is 21 | * 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 22 | * MAXEMOTEINDEX (which is 452 in WotLK 3.3.0). 23 | * @param emote the token that describes which emote is being used. See Emotes Tokens 24 | * @param target UnitId of who the emote will be performed on. If nil, then it performs the emote on your current target, or yourself 25 | * 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. 26 | * @see https://wow.gamepedia.com/API_DoEmote 27 | */ 28 | declare function DoEmote(emote: WoWAPI.EmoteToken, target?: WoWAPI.UnitId): void; 29 | 30 | /** 31 | * Returns the Language used by the indicated Player 32 | * @param unit unit whose default language you wish to query 33 | * @returns the default language of the indicated object, usually the faction's common language (i.e. "Common" and "Orcish"). 34 | * @see https://wow.gamepedia.com/API_GetDefaultLanguage 35 | */ 36 | declare function GetDefaultLanguage(unit: WoWAPI.UnitId): string; 37 | 38 | /** 39 | * Returns the language specified by the index that your character can speak 40 | * @param index The index starting at 1. 41 | * @returns Returns the LanguageID 42 | * @see https://wow.gamepedia.com/API_GetLanguageByIndex 43 | */ 44 | declare function GetLanguageByIndex(index: number): WoWAPI.ChannelLanguageId; 45 | 46 | /** 47 | * Returns the number of languages your character can speak 48 | * @returns Returns the number of languages your character can speak 49 | * @see https://wow.gamepedia.com/API_GetNumLanguages 50 | */ 51 | declare function GetNumLanguages(): number; 52 | 53 | /** 54 | * Performs a random roll between two numbers 55 | * @param low lowest number (default 1) 56 | * @param high highest number (default 100) 57 | * @see https://wow.gamepedia.com/API_RandomRoll 58 | */ 59 | declare function RandomRoll(low?: number, high?: number): void; 60 | -------------------------------------------------------------------------------- /declarations/classes/C_CovenantSanctumUI.d.ts: -------------------------------------------------------------------------------- 1 | declare namespace WoWAPI { 2 | 3 | interface CovenantSanctumFeatureInfo { 4 | 5 | garrTalentTreeID: number; 6 | featureType: number; 7 | uiOrder: number; 8 | } 9 | 10 | interface CovenantSanctumRenownLevelInfo { 11 | 12 | level: number; 13 | locked: boolean; 14 | isMilestone: boolean; 15 | isCapstone: boolean; 16 | } 17 | 18 | interface CovenantSanctumRenownRewardInfo { 19 | uiOrder: number; 20 | itemID: number | null; 21 | spellID: number | null; 22 | mountID: number | null; 23 | transmogID: number | null; 24 | transmogSetID: number | null; 25 | titleMaskID: number | null; 26 | garrFollowerID: number | null; 27 | transmogIllusionSourceID: number | null; 28 | icon: number | null; 29 | name: string | null; 30 | description: string | null; 31 | toastDescription: string | null; 32 | } 33 | } 34 | 35 | declare namespace C_CovenantSanctumUI { 36 | 37 | /** 38 | * Needs summary 39 | * @see https://wow.gamepedia.com/API_C_CovenantSanctumUI.CanAccessReservoir 40 | * @since 9.0.2 (2020-11-17) 41 | */ 42 | function CanAccessReservoir(): boolean; 43 | 44 | /** 45 | * Needs summary 46 | * @see https://wow.gamepedia.com/API_C_CovenantSanctumUI.CanDepositAnima 47 | * @since 9.0.2 (2020-11-17) 48 | */ 49 | function CanDepositAnima(): boolean; 50 | 51 | /** 52 | * Needs summary 53 | * @see https://wow.gamepedia.com/API_C_CovenantSanctumUI.DepositAnima 54 | * @protected 55 | * @since 9.0.1 (2020-10-13) 56 | */ 57 | function DepositAnima(): boolean; 58 | 59 | /** 60 | * Needs summary. 61 | * @see https://wow.gamepedia.com/API_C_CovenantSanctumUI.EndInteraction 62 | * @since 9.0.1 (2020-10-13) 63 | */ 64 | function EndInteraction(): void; 65 | 66 | /** 67 | * Needs summary 68 | * @see https://wow.gamepedia.com/API_C_CovenantSanctumUI.GetAnimaInfo 69 | * @returns currencyId, maxDisplayableValue 70 | * @since 9.0.1 (2020-10-13) 71 | */ 72 | function GetAnimaInfo(): [number, number]; 73 | 74 | /** 75 | * Needs summary 76 | * @see https://wow.gamepedia.com/API_C_CovenantSanctumUI.GetCurrentTalentTreeID 77 | * @since 9.0.2 (2020-11-17) 78 | */ 79 | function GetCurrentTalentTreeID(): number | null; 80 | 81 | /** 82 | * Needs summary 83 | * @see https://wow.gamepedia.com/API_C_CovenantSanctumUI.GetFeatures 84 | * @since 9.0.1 (2020-10-13) 85 | */ 86 | function GetFeatures(): WoWAPI.CovenantSanctumFeatureInfo[]; 87 | 88 | /** 89 | * Needs summary 90 | * @see https://wow.gamepedia.com/API_C_CovenantSanctumUI.GetRenownLevel 91 | * @since 9.0.1 (2020-10-13) 92 | */ 93 | function GetRenownLevel(): number; 94 | 95 | /** 96 | * Needs summary 97 | * @see https://wow.gamepedia.com/API_C_CovenantSanctumUI.GetRenownLevels 98 | * @since 9.0.2 (2020-11-17) 99 | */ 100 | function GetRenownLevels(covenantId: Enum.CovenantType): WoWAPI.CovenantSanctumRenownLevelInfo[]; 101 | 102 | /** 103 | * Needs summary 104 | * @see https://wow.gamepedia.com/API_C_CovenantSanctumUI.GetRenownRewardsForLevel 105 | * @since 9.0.1 (2020-10-13) 106 | */ 107 | function GetRenownRewardsForLevel(covenantId: Enum.CovenantType, renownLevel: number): WoWAPI.CovenantSanctumRenownRewardInfo[]; 108 | 109 | /** 110 | * Needs summary 111 | * @see https://wow.gamepedia.com/API_C_CovenantSanctumUI.GetSanctumType 112 | * @since 9.0.1 (2020-10-13) 113 | */ 114 | function GetSanctumType(): Enum.GarrTalentFeatureSubtype; 115 | 116 | /** 117 | * Needs summary 118 | * @returns currencyIds 119 | * @see https://wow.gamepedia.com/API_C_CovenantSanctumUI.GetSoulCurrencies 120 | * @since 9.0.1 (2020-10-13) 121 | */ 122 | function GetSoulCurrencies(): number[]; 123 | } 124 | -------------------------------------------------------------------------------- /declarations/buff.d.ts: -------------------------------------------------------------------------------- 1 | /** @noSelfInFile */ 2 | 3 | declare namespace WoWAPI { 4 | type BuffFilterType = "HELPFUL" | "HARMFUL" | "PLAYER" | "RAID" | "CANCELABLE" | "NOT_CANCELABLE"; 5 | type BuffWeaponHandType = 1 | 2; 6 | type DebuffType = "Magic" | "Disease" | "Poison" | "Curse" | ""; 7 | } 8 | 9 | /** 10 | * Removes a specific buff from the unit 11 | * @param unitId Unit to cancel the buff from, must be under the player's control 12 | * @param spellName Name of the buff to cancel 13 | * @param spellRank Spell rank 14 | * @requires NO_COMBAT 15 | * @see https://wow.gamepedia.com/API_CancelUnitBuff 16 | */ 17 | declare function CancelUnitBuff(unitId: WoWAPI.UnitId, spellName: string, spellRank?: string): void; 18 | 19 | /** 20 | * Removes a specific buff from the unit 21 | * @param unitId Unit to cancel the buff from, must be under the player's control 22 | * @param buffIndex index of the buff to cancel, ascending from 1. 23 | * @param filter any of combination of "HELPFUL|HARMFUL|PLAYER|RAID|CANCELABLE|NOT_CANCELABLE". 24 | * @requires NO_COMBAT 25 | * @see https://wow.gamepedia.com/API_CancelUnitBuff 26 | */ 27 | declare function CancelUnitBuff(unitId: WoWAPI.UnitId, buffIndex: number, filter?: WoWAPI.BuffFilterType & string): void; 28 | 29 | /** 30 | * Cancels a druid's shapeshift buff 31 | * @deprecated 32 | * @protected 33 | * @see https://wow.gamepedia.com/API_CancelShapeshiftForm 34 | */ 35 | declare function CancelShapeshiftForm(): void; 36 | 37 | /** 38 | * Removes temporary item buffs, such as Rogue poisons, Shaman weapon buffs, and sharpening stones from either the Main Hand or Off Hand equipment slots 39 | * @param weaponHand 1 for Main Hand, 2 for Off Hand 40 | * @deprecated 41 | * @protected 42 | * @see https://wow.gamepedia.com/API_CancelItemTempEnchantment 43 | */ 44 | declare function CancelItemTempEnchantment(weaponHand: WoWAPI.BuffWeaponHandType): void; 45 | 46 | /** 47 | * Returns information about the player's current temporary enchants, such as fishing lures or sharpening stones and weightstones produced by blacksmiths 48 | * @see https://wow.gamepedia.com/API_GetWeaponEnchantInfo 49 | * @tupleReturn 50 | */ 51 | declare function GetWeaponEnchantInfo(): [boolean, number, number, number, boolean, number, number, number]; 52 | 53 | /** 54 | * Returns information about a buff or debuff on the specified unit 55 | * @param unitId unit whose auras to query 56 | * @param index index (from 1 to 40) 57 | * @param filter list of filters, separated by spaces or pipes. "HELPFUL" by default 58 | * @see https://wow.gamepedia.com/API_UnitAura 59 | * @tupleReturn 60 | */ 61 | // tslint:disable-next-line max-line-length 62 | 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]; 63 | 64 | /** 65 | * Retrieve info about a certain buff on a certain unit 66 | * @param unitId unit whose buffs to query 67 | * @param index index (from 1 to 40) 68 | * @param filter list of filters, separated by spaces or pipes ("|"). "HELPFUL" by default 69 | * @see https://wow.gamepedia.com/API_UnitBuff 70 | * @tupleReturn 71 | */ 72 | // tslint:disable-next-line max-line-length 73 | 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]; 74 | 75 | /** 76 | * Retrieve info about a specified debuff on a certain unit 77 | * @param unitId unit whose buffs to query 78 | * @param index index (from 1 to 40) 79 | * @param filter list of filters, separated by spaces or pipes ("|"). "HELPFUL" by default 80 | * @see https://wow.gamepedia.com/API_UnitBuff 81 | * @tupleReturn 82 | */ 83 | // tslint:disable-next-line max-line-length 84 | 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]; 85 | -------------------------------------------------------------------------------- /declarations/vector.d.ts: -------------------------------------------------------------------------------- 1 | declare namespace WoWAPI { 2 | 3 | /** 4 | * @see https://wow.gamepedia.com/Vector2DMixin 5 | */ 6 | interface Vector2D { 7 | 8 | /** 9 | * compares to vectors for equalness 10 | * @param other 11 | * @see https://www.townlong-yak.com/framexml/live/go/Vector2DMixin:IsEqualTo 12 | * @since 7.2.0 (2017-03-28) 13 | */ 14 | IsEqualTo(other: Vector2D): boolean; 15 | 16 | /** 17 | * returns x and y coordinate from the vector 18 | * @see https://www.townlong-yak.com/framexml/live/go/Vector2DMixin:GetXY 19 | * @returns x and y 20 | * @since 7.2.0 (2017-03-28) 21 | */ 22 | GetXY(): [number, number]; 23 | 24 | /** 25 | * sets x and y coordinate 26 | * @see https://www.townlong-yak.com/framexml/live/go/Vector2DMixin:SetXY 27 | * @since 7.2.0 (2017-03-28) 28 | */ 29 | SetXY(x: number, y: number): void; 30 | 31 | /** 32 | * multiplies x and y by the given scale number 33 | * @see https://www.townlong-yak.com/framexml/live/go/Vector2DMixin:ScaleBy 34 | * @since 7.2.0 (2017-03-28) 35 | */ 36 | ScaleBy(scale: number): void; 37 | 38 | /** 39 | * divides x and y by the given number 40 | * @see https://www.townlong-yak.com/framexml/live/go/Vector2DMixin:DivideBy 41 | * @since 7.2.0 (2017-03-28) 42 | */ 43 | DivideBy(scale: number): void; 44 | 45 | /** 46 | * adds another vector to the current 47 | * @see https://www.townlong-yak.com/framexml/live/go/Vector2DMixin:Add 48 | * @since 7.2.0 (2017-03-28) 49 | */ 50 | Add(other: Vector2D): void; 51 | 52 | /** 53 | * subtracts another vector from the current 54 | * @see https://www.townlong-yak.com/framexml/live/go/Vector2DMixin:Subtract 55 | * @since 7.2.0 (2017-03-28) 56 | */ 57 | Subtract(other: Vector2D): void; 58 | 59 | /** 60 | * cross products the given vector into the current one 61 | * @see https://www.townlong-yak.com/framexml/live/go/Vector2DMixin:Cross 62 | * @since 7.2.0 (2017-03-28) 63 | */ 64 | Cross(other: Vector2D): void; 65 | 66 | /** 67 | * dot products the given vector into the current one 68 | * @see https://www.townlong-yak.com/framexml/live/go/Vector2DMixin:Dot 69 | * @since 7.2.0 (2017-03-28) 70 | */ 71 | Dot(other: Vector2D): void; 72 | 73 | /** 74 | * tests if the current vector is zero 75 | * @see https://www.townlong-yak.com/framexml/live/go/Vector2DMixin:IsZero 76 | * @since 9.0.1 (2020-10-13) 77 | */ 78 | IsZero(): boolean; 79 | 80 | /** 81 | * get the squared magnitude (length) of the vector 82 | * @see https://www.townlong-yak.com/framexml/live/go/Vector2DMixin:GetLengthSquared 83 | * @since 7.2.0 (2017-03-28) 84 | */ 85 | GetLengthSquared(): number; 86 | 87 | /** 88 | * get the magnitude (length) of the vector 89 | * @see https://www.townlong-yak.com/framexml/live/go/Vector2DMixin:GetLength 90 | * @since 7.2.0 (2017-03-28) 91 | */ 92 | GetLength(): number; 93 | 94 | /** 95 | * normalizes the current vector 96 | * @see https://www.townlong-yak.com/framexml/live/go/Vector2DMixin:Normalize 97 | * @since 7.2.0 (2017-03-28) 98 | */ 99 | Normalize(): void; 100 | 101 | /** 102 | * rotates the vector by the given amount of radians 103 | * @see https://www.townlong-yak.com/framexml/live/go/Vector2DMixin:RotateDirection 104 | * @since 8.0.1 (2018-07-17) 105 | */ 106 | RotateDirection(rotationRadians: number): void; 107 | 108 | /** 109 | * Clones this vector into a new instance 110 | * @see https://www.townlong-yak.com/framexml/live/go/Vector2DMixin:Clone 111 | * @since 7.2.0 (2017-03-28) 112 | */ 113 | Clone(): Vector2D; 114 | } 115 | } 116 | 117 | /** 118 | * creates a new two dimensional vector from the given x and y coordinates 119 | * @param x x value 120 | * @param y y value 121 | * @see https://www.townlong-yak.com/framexml/live/go/CreateVector2D 122 | * @since 7.2.0 (2017-03-28) 123 | */ 124 | declare function CreateVector2D(x: number, y: number): WoWAPI.Vector2D; 125 | 126 | /** 127 | * checks if the two given vectors are considered equal 128 | * @param first the first vector 129 | * @param second the second vector 130 | * @see https://www.townlong-yak.com/framexml/live/go/AreVector2DEqual 131 | * @since 7.2.0 (2017-03-28) 132 | */ 133 | declare function AreVector2DEqual(first: WoWAPI.Vector2D, second: WoWAPI.Vector2D): boolean; 134 | -------------------------------------------------------------------------------- /declarations/unit.d.ts: -------------------------------------------------------------------------------- 1 | /** @noSelfInFile */ 2 | 3 | declare namespace WoWAPI { 4 | type UnitIdArena = "arena1" | "arena2" | "arena3" | "arena4" | "arena5"; 5 | type UnitIdRaidPlayer = "raid1" | "raid2" | "raid3" | "raid4" | "raid5" | "raid6" | "raid7" | "raid8" | "raid9" | 6 | "raid10" | "raid11" | "raid12" | "raid13" | "raid14" | "raid15" | "raid16" | "raid17" | "raid18" | "raid19" | "raid20" | 7 | "raid21" | "raid22" | "raid23" | "raid24" | "raid25" | "raid26" | "raid27" | "raid28" | "raid29" | "raid30" | "raid31" | 8 | "raid32" | "raid33" | "raid34" | "raid35" | "raid36" | "raid37" | "raid38" | "raid39" | "raid40"; 9 | type UnitIdRaidPlayerPet = "raidpet1" | "raidpet2" | "raidpet3" | "raidpet4" | "raidpet5" | "raidpet6" | "raidpet7" | "raidpet8" | "raidpet9" | 10 | "raidpet10" | "raidpet11" | "raidpet12" | "raidpet13" | "raidpet14" | "raidpet15" | "raidpet16" | "raidpet17" | "raidpet18" | 11 | "raidpet19" | "raidpet20" | "raidpet21" | "raidpet22" | "raidpet23" | "raidpet24" | "raidpet25" | "raidpet26" | "raidpet27" | 12 | "raidpet28" | "raidpet29" | "raidpet30" | "raidpet31" | "raidpet32" | "raidpet33" | "raidpet34" | "raidpet35" | "raidpet36" | 13 | "raidpet37" | "raidpet38" | "raidpet39" | "raidpet40"; 14 | type UnitIdParty = "party1" | "party2" | "party3" | "party4"; 15 | type UnitIdPartyPet = "partypet1" | "partypet2" | "partypet3" | "partypet4"; 16 | type UnitIdOther = "player" | "pet" | "focus" | "mouseover" | "vehicle" | "target" | "none" | "npc" | "targettarget"; 17 | type UnitId = UnitIdOther | UnitIdArena | UnitIdRaidPlayer | UnitIdRaidPlayerPet | UnitIdParty | UnitIdPartyPet; 18 | 19 | type UnitRoleType = "TANK" | "DAMAGER" | "HEALER"; 20 | 21 | type Guid = string; 22 | } 23 | 24 | /** 25 | * Returns the GUID of the specified unit 26 | * @param unitId unit to look up the GUID of 27 | * @see https://wow.gamepedia.com/API_UnitGUID 28 | * @since 2.4.0 29 | */ 30 | declare function UnitGUID(unitId: WoWAPI.UnitId): WoWAPI.Guid; 31 | 32 | /** 33 | * Returns basic information about another player from their GUID 34 | * @param unitGUID The GUID of the player you're querying about 35 | * @see https://wow.gamepedia.com/API_GetPlayerInfoByGUID 36 | * @since 3.2.0 37 | * @tupleReturn 38 | */ 39 | declare function GetPlayerInfoByGUID(unitGUID: WoWAPI.Guid): [string, number, string, number, number, string, string]; 40 | 41 | /** 42 | * Returns the name and realm of the specified unit 43 | * @param unitId The UnitId to query (e.g. "player", "party2", "pet", "target" etc.) 44 | * @see https://wow.gamepedia.com/API_GetUnitName 45 | */ 46 | declare function GetUnitName(unitId: WoWAPI.UnitId, showServerName: boolean): string; 47 | 48 | /** 49 | * Determines if the unit exists 50 | * @param unitId The unit to query (e.g. "player", "party2", "pet", "target" etc.) 51 | * @see https://wow.gamepedia.com/API_UnitExists 52 | */ 53 | declare function UnitExists(unitId: WoWAPI.UnitId): 1 | null; 54 | 55 | /** 56 | * Checks if a specified unit is a player 57 | * @param unitId UnitId of the unit to check. 58 | * @see https://wow.gamepedia.com/API_UnitIsPlayer 59 | */ 60 | declare function UnitIsPlayer(unitId: WoWAPI.UnitId): boolean; 61 | 62 | /** 63 | * Returns the unit's level 64 | * @param unitId The unitId to get information from. (e.g. "player", "target") 65 | * @return The unit level. Returns -1 for bosses, or players more than 10 levels above the player 66 | * @see https://wow.gamepedia.com/API_UnitEffectiveLevel 67 | */ 68 | declare function UnitLevel(unitId: WoWAPI.UnitId): number; 69 | 70 | /** 71 | * Get the name of the faction (Horde/Alliance) a unit belongs to 72 | * @param unitId unit you want to get the faction for 73 | * @see https://wow.gamepedia.com/API_UnitFactionGroup 74 | * @tupleReturn 75 | */ 76 | declare function UnitFactionGroup(unitId: WoWAPI.UnitId): [string, string]; 77 | 78 | /** 79 | * Returns the class of the specified unit 80 | * @param unitId unit to query, e.g. "player" 81 | * @see https://wow.gamepedia.com/API_UnitClass 82 | * @tupleReturn 83 | */ 84 | declare function UnitClass(unitId: WoWAPI.UnitId): [string, string, number]; 85 | 86 | /** 87 | * Returns the current health of the specified unit 88 | * @param unitId identifies the unit to query health for 89 | * @see https://wow.gamepedia.com/API_UnitHealth 90 | */ 91 | declare function UnitHealth(unitId: WoWAPI.UnitId): number; 92 | 93 | /** 94 | * Returns the maximum health of the specified unit 95 | * @param unitId the unit whose max health to query 96 | * @see https://wow.gamepedia.com/API_UnitHealthMax 97 | */ 98 | declare function UnitHealthMax(unitId: WoWAPI.UnitId): number; 99 | 100 | /** 101 | * Returns 1 if the unit is a player in your party, nil otherwise 102 | * @param unitId unitId who should be checked 103 | * @see https://wow.gamepedia.com/API_UnitInParty 104 | */ 105 | declare function UnitInParty(unitId: WoWAPI.UnitId): boolean; 106 | -------------------------------------------------------------------------------- /declarations/gossip.d.ts: -------------------------------------------------------------------------------- 1 | /** @noSelfInFile */ 2 | 3 | declare type QUEST_FREQUENCY_NORMAL = 1; 4 | declare type QUEST_FREQUENCY_DAILY = 2; 5 | declare type QUEST_FREQUENCY_WEEKLY = 3; 6 | declare type QUEST_FREQUENCY = QUEST_FREQUENCY_NORMAL | QUEST_FREQUENCY_DAILY | QUEST_FREQUENCY_WEEKLY; 7 | 8 | declare type GOSSIP_TYPE_BANKER = "banker"; 9 | declare type GOSSIP_TYPE_BATTLEMASTER = "battlemaster"; 10 | declare type GOSSIP_TYPE_BINDER = "binder"; 11 | declare type GOSSIP_TYPE_GOSSIP = "gossip"; 12 | declare type GOSSIP_TYPE_HEALER = "healer"; 13 | declare type GOSSIP_TYPE_PETITION = "petition"; 14 | declare type GOSSIP_TYPE_TABARD = "tabard"; 15 | declare type GOSSIP_TYPE_TAXI = "taxi"; 16 | declare type GOSSIP_TYPE_TRAINER = "trainer"; 17 | declare type GOSSIP_TYPE_UNLEARN = "unlearn"; 18 | declare type GOSSIP_TYPE_VENDOR = "vendor"; 19 | declare type GOSSIP_TYPE_WORKORDER = "workorder"; 20 | 21 | /** 22 | * all currently known gossip types 23 | */ 24 | declare type GOSSIP_TYPE = GOSSIP_TYPE_BANKER | GOSSIP_TYPE_BATTLEMASTER | GOSSIP_TYPE_BINDER | GOSSIP_TYPE_GOSSIP | GOSSIP_TYPE_HEALER | 25 | GOSSIP_TYPE_PETITION | GOSSIP_TYPE_TABARD | GOSSIP_TYPE_TAXI | GOSSIP_TYPE_TRAINER | GOSSIP_TYPE_UNLEARN | GOSSIP_TYPE_VENDOR | 26 | GOSSIP_TYPE_WORKORDER; 27 | 28 | /** 29 | * Dismiss the gossip dialog 30 | * 31 | * @see https://wow.gamepedia.com/API_CloseGossip 32 | */ 33 | declare function CloseGossip(): void; 34 | 35 | /** 36 | * Returns whether the gossip text must be displayed 37 | * 38 | * @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 39 | * @see https://wow.gamepedia.com/API_ForceGossip 40 | */ 41 | declare function ForceGossip(): WoWAPI.Flag; 42 | 43 | /** 44 | * Get the list of active quests from an NPC. 45 | * 46 | * @returns title1, level1, isLowLevel1, isComplete1, isLegendary1, isIgnored1, title2, level2, isLowLevel2, isComplete2, isLegendary2, isIgnored2 47 | * @see https://wow.gamepedia.com/API_GetGossipActiveQuests 48 | * @description The number of returned values per quest has increased again to 6 49 | * @tupleReturn 50 | */ 51 | declare function GetGossipActiveQuests(): [string, string, boolean, boolean, boolean]; 52 | 53 | /** 54 | * Returns a list of available quests from an NPC 55 | * 56 | * @returns title1, level1, isTrivial1, frequency1, isRepeatable1, isLegendary1, isIgnored1 ... 57 | * @see https://wow.gamepedia.com/API_GetGossipAvailableQuests 58 | * @tupleReturn 59 | */ 60 | declare function GetGossipAvailableQuests(): [string, number, boolean, QUEST_FREQUENCY, boolean, boolean, boolean]; 61 | 62 | /** 63 | * Get the available gossip items on an NPC (possibly stuff like the BWL and MC orbs too). 64 | * 65 | * @returns title1, gossip1, ... 66 | * @see https://wow.gamepedia.com/API_GetGossipOptions 67 | * @tupleReturn 68 | */ 69 | declare function GetGossipOptions(): [string, GOSSIP_TYPE]; 70 | 71 | /** 72 | * Get the gossip text 73 | * 74 | * @returns The text of the gossip 75 | * @see https://wow.gamepedia.com/API_GetGossipText 76 | */ 77 | declare function GetGossipText(): string; 78 | 79 | /** 80 | * Returns the number of active quests that you should eventually turn in to this NPC 81 | * 82 | * @returns Number of quests you're on that should be turned in to the NPC you're gossiping with 83 | * @see https://wow.gamepedia.com/API_GetNumGossipActiveQuests 84 | */ 85 | declare function GetNumGossipActiveQuests(): number; 86 | 87 | /** 88 | * Returns the number of quests (that you are not already on) offered by this NPC 89 | * 90 | * @returns Number of quests you can pick up from this NPC 91 | * @see https://wow.gamepedia.com/API_GetNumGossipAvailableQuests 92 | */ 93 | declare function GetNumGossipAvailableQuests(): number; 94 | 95 | /** 96 | * Returns the number of conversation options available with this NPC 97 | * 98 | * @returns Number of conversation options you can select 99 | * @see https://wow.gamepedia.com/API_GetNumGossipOptions 100 | */ 101 | declare function GetNumGossipOptions(): number; 102 | 103 | /** 104 | * Selects an active quest from a gossip list 105 | * 106 | * @param gossipIndex Index of the active quest to select, from 1 to GetNumGossipActiveQuests(); order corresponds to the order of return 107 | * values from GetGossipActiveQuests(). 108 | * @event QUEST_PROGRESS 109 | * @see https://wow.gamepedia.com/API_SelectGossipActiveQuest 110 | */ 111 | declare function SelectGossipActiveQuest(gossipIndex: number): void; 112 | 113 | /** 114 | * Selects an available quest from a gossip list. 115 | * 116 | * @param gossipIndex Index of the available quest to select, from 1 to GetNumGossipAvailableQuests(); order corresponds to the order of return 117 | * values from GetGossipAvailableQuests(). 118 | * @event QUEST_PROGRESS 119 | * @see https://wow.gamepedia.com/API_SelectGossipAvailableQuest 120 | */ 121 | declare function SelectGossipAvailableQuest(gossipIndex: number): void; 122 | 123 | /** 124 | * Selects a gossip (conversation) option 125 | * 126 | * @param gossipIndex Index of the gossip option to select, from 1 to GetNumGossipOptions(); order corresponds to the order of return values from 127 | * GetGossipOptions(). 128 | * @see https://wow.gamepedia.com/API_SelectGossipOption 129 | */ 130 | declare function SelectGossipOption(gossipIndex: number): void; 131 | -------------------------------------------------------------------------------- /declarations/itemLocation.d.ts: -------------------------------------------------------------------------------- 1 | declare namespace ItemLocation { 2 | 3 | /** 4 | * ItemLocationMixin objects can only be created for items in your equipment or inventory 5 | * @see https://wow.gamepedia.com/ItemLocationMixin 6 | * @since 8.0.1 (2018-07-17) 7 | */ 8 | interface ItemLocationMixin { 9 | 10 | /** 11 | * clears the slot into 12 | * @see https://www.townlong-yak.com/framexml/live/go/ItemLocationMixin:Clear 13 | * @since 8.0.1 (2018-07-17) 14 | */ 15 | Clear(): void; 16 | 17 | /** 18 | * updates bag and slot id with new values 19 | * @param bagId bag there the item is located in 20 | * @param slotIndex slot index where the item is located 21 | * @see https://www.townlong-yak.com/framexml/live/go/ItemLocationMixin:SetBagAndSlot 22 | * @since 8.0.1 (2018-07-17) 23 | */ 24 | SetBagAndSlot(bagId: WoWAPI.CONTAINER_ID_BAG, slotIndex: number): void; 25 | 26 | /** 27 | * gets bag and slot id 28 | * @see https://www.townlong-yak.com/framexml/live/go/ItemLocationMixin:GetBagAndSlot 29 | * @since 8.0.1 (2018-07-17) 30 | */ 31 | GetBagAndSlot(): [WoWAPI.CONTAINER_ID_BAG, number]; 32 | 33 | /** 34 | * updates slot indexes by given equpiment slot index 35 | * @param equipmentSlotIndex equipment slot index where the item is located in 36 | * @see https://www.townlong-yak.com/framexml/live/go/ItemLocationMixin:SetEquipmentSlot 37 | * @since 8.0.1 (2018-07-17) 38 | */ 39 | SetEquipmentSlot(equipmentSlotIndex: WoWAPI.INVENTORY_SLOT_ID): void; 40 | 41 | /** 42 | * gets the equipment slot representation of the bag and slot index 43 | * @see https://www.townlong-yak.com/framexml/live/go/ItemLocationMixin:GetEquipmentSlot 44 | * @since 8.0.1 (2018-07-17) 45 | */ 46 | GetEquipmentSlot(): WoWAPI.INVENTORY_SLOT_ID; 47 | 48 | /** 49 | * tests if the contents of this item location is an equipment slot 50 | * @see https://www.townlong-yak.com/framexml/live/go/ItemLocationMixin:IsEquipmentSlot 51 | * @since 8.0.1 (2018-07-17) 52 | */ 53 | IsEquipmentSlot(): boolean; 54 | 55 | /** 56 | * tests if the contents of this item location is bagId and slotIndex 57 | * @see https://www.townlong-yak.com/framexml/live/go/ItemLocationMixin:IsBagAndSlot 58 | * @since 8.0.1 (2018-07-17) 59 | */ 60 | IsBagAndSlot(): boolean; 61 | 62 | /** 63 | * tests if the contents are not empty 64 | * @see https://www.townlong-yak.com/framexml/live/go/ItemLocationMixin:HasAnyLocation 65 | * @since 8.0.1 (2018-07-17) 66 | */ 67 | HasAnyLocation(): boolean; 68 | 69 | /** 70 | * unknown 71 | * @see https://www.townlong-yak.com/framexml/live/go/ItemLocationMixin:IsValid 72 | * @since 8.0.1 (2018-07-17) 73 | */ 74 | IsValid(): boolean; 75 | 76 | /** 77 | * tests if the contents are equal to the given bagId and slotIndex 78 | * @param badId 79 | * @param slotIndex 80 | * @see https://www.townlong-yak.com/framexml/live/go/ItemLocationMixin:IsEqualToBagAndSlot 81 | * @since 8.0.1 (2018-07-17) 82 | */ 83 | IsEqualToBagAndSlot(badId: WoWAPI.CONTAINER_ID_BAG, slotIndex: number): boolean; 84 | 85 | /** 86 | * tests if the contents are equal to the given equipment slot 87 | * @param equipmentSlot 88 | * @see https://www.townlong-yak.com/framexml/live/go/ItemLocationMixin:IsEqualToEquipmentSlot 89 | * @since 8.0.1 (2018-07-17) 90 | */ 91 | IsEqualToEquipmentSlot(equipmentSlot: WoWAPI.INVENTORY_SLOT_ID): boolean; 92 | 93 | /** 94 | * tests if this item location is equal to the given other item location 95 | * @param other 96 | * @see https://www.townlong-yak.com/framexml/live/go/ItemLocationMixin:IsEqualTo 97 | * @since 8.0.1 (2018-07-17) 98 | */ 99 | IsEqualTo(other: ItemLocationMixin): boolean; 100 | } 101 | 102 | /** 103 | * Creates an empty object 104 | * @see https://www.townlong-yak.com/framexml/9.0.1/ObjectAPI/ItemLocation.lua#4 105 | * @since 8.0.1 (2018-07-17) 106 | */ 107 | function CreateEmpty(): ItemLocationMixin; 108 | 109 | /** 110 | * Creates an object from a bagID and slotIndex 111 | * @param bagId bag there the item is located in 112 | * @param slotIndex slot index where the item is located 113 | * @see https://www.townlong-yak.com/framexml/9.0.1/ObjectAPI/ItemLocation.lua#9 114 | * @since 8.0.1 (2018-07-17) 115 | */ 116 | function CreateFromBagAndSlot(bagId: WoWAPI.CONTAINER_ID_BAG, slotIndex: number): ItemLocationMixin; 117 | 118 | /** 119 | * Creates an object from an inventorySlotId 120 | * @param equipmentSlotIndex equipment slot index where the item is located in 121 | * @see https://www.townlong-yak.com/framexml/9.0.1/ObjectAPI/ItemLocation.lua#15 122 | * @since 8.0.1 (2018-07-17) 123 | */ 124 | function CreateFromEquipmentSlot(equipmentSlotIndex: WoWAPI.INVENTORY_SLOT_ID): ItemLocationMixin; 125 | } 126 | -------------------------------------------------------------------------------- /declarations/activity.d.ts: -------------------------------------------------------------------------------- 1 | /** @noSelfInFile */ 2 | 3 | /// 4 | 5 | /** 6 | * Accept the challenge to a duel. 7 | * 8 | * @see https://wow.gamepedia.com/API_AcceptDuel 9 | */ 10 | declare function AcceptDuel(): void; 11 | 12 | /** 13 | * Toggles auto-attacking of the player's current target 14 | * 15 | * @see https://wow.gamepedia.com/API_AttackTarget 16 | * @private PROTECTED 17 | */ 18 | declare function AttackTarget(): void; 19 | 20 | /** 21 | * Forfeits the current duel, or declines an invitation to duel 22 | * 23 | * @see https://wow.gamepedia.com/API_CancelDuel 24 | */ 25 | declare function CancelDuel(): void; 26 | 27 | /** 28 | * Cancels the logout timer (from camping or quitting). 29 | * 30 | * @see https://wow.gamepedia.com/API_CancelLogout 31 | * @private PROTECTED 32 | */ 33 | declare function CancelLogout(): void; 34 | 35 | /** 36 | * Rejects a summon request 37 | * 38 | * @see https://wow.gamepedia.com/API_CancelSummon 39 | */ 40 | declare function CancelSummon(): void; 41 | 42 | /** 43 | * Accepts a summon request (only works during the two minutes the summon is available). 44 | * 45 | * @see https://wow.gamepedia.com/API_ConfirmSummon 46 | */ 47 | declare function ConfirmSummon(): void; 48 | 49 | /** 50 | * The player stops descending (while flying or swimming). 51 | * 52 | * @see https://wow.gamepedia.com/API_DescendStop 53 | * @private PROTECTED 54 | */ 55 | declare function DescendStop(): void; 56 | 57 | /** 58 | * Dismounts the player if the player was mounted 59 | * 60 | * @see https://wow.gamepedia.com/API_Dismount 61 | * @since 2.0.3 62 | */ 63 | declare function Dismount(): void; 64 | 65 | /** 66 | * Instantly quits the game, bypassing the usual 20 seconds countdown 67 | * 68 | * @see https://wow.gamepedia.com/API_ForceQuit 69 | * @private PROTECTED 70 | */ 71 | declare function ForceQuit(): void; 72 | 73 | /** 74 | * Returns which type of weapon the player currently has unsheathed, if any 75 | * 76 | * @returns 1=None, 2=Melee, 3=Ranged 77 | * @see https://wow.gamepedia.com/API_GetSheathState 78 | * @since 4.3.0 79 | */ 80 | declare function GetSheathState(): 1 | 2 | 3; 81 | 82 | /** 83 | * Returns the amount of time left on your PVP flag 84 | * 85 | * @returns Amount of time (in milliseconds) until your PVP flag wears off. 86 | * @see https://wow.gamepedia.com/API_GetPVPTimer 87 | */ 88 | declare function GetPVPTimer(): number; 89 | 90 | /** 91 | * Returns the name of the area you're being summoned to 92 | * 93 | * @see https://wow.gamepedia.com/API_GetSummonConfirmAreaName 94 | */ 95 | declare function GetSummonConfirmAreaName(): WoWAPI.Unknown; 96 | 97 | /** 98 | * Get the name of the unit which initiated the players summon 99 | * 100 | * @returns Name of the player summoning you, or nil if no summon is currently pending 101 | * @see https://wow.gamepedia.com/API_GetSummonConfirmSummoner 102 | */ 103 | declare function GetSummonConfirmSummoner(): string; 104 | 105 | /** 106 | * Returns the amount of time left before the pending summon expires 107 | * 108 | * @see https://wow.gamepedia.com/API_GetSummonConfirmTimeLeft 109 | */ 110 | declare function GetSummonConfirmTimeLeft(): WoWAPI.Unknown; 111 | 112 | /** 113 | * Logs the player character out of the game. 114 | * 115 | * @see https://wow.gamepedia.com/API_Logout 116 | * @event PLAYER_CAMPING 117 | * @private PROTECTED 118 | */ 119 | declare function Logout(): void; 120 | 121 | /** 122 | * Quits the game. 123 | * 124 | * @see https://wow.gamepedia.com/API_Quit 125 | * @event PLAYER_QUITING 126 | * @private PROTECTED 127 | */ 128 | declare function Quit(): void; 129 | 130 | /** 131 | * Performs a random roll between two numbers 132 | * 133 | * @param low lowest number (default 1) 134 | * @param high highest number (default 100) 135 | * @description Yield: rolls. (1-10) 136 | * @see https://wow.gamepedia.com/API_RandomRoll 137 | */ 138 | declare function RandomRoll(low?: number, high?: number): void; 139 | 140 | /** 141 | * Used to toggle PVP on or Off 142 | * 143 | * @param flag 0 or 1; 0 Toggles PVP off, 1 Toggles PVP on. 144 | * @see https://wow.gamepedia.com/API_SetPVP 145 | */ 146 | declare function SetPVP(flag: WoWAPI.Flag | null): void; 147 | 148 | /** 149 | * The player sits, stands, or begins to descend (while swimming or flying) 150 | * 151 | * @see https://wow.gamepedia.com/API_SitStandOrDescendStart 152 | * @since 2.1.0 153 | * @private PROTECTED 154 | */ 155 | declare function SitStandOrDescendStart(): void; 156 | 157 | /** 158 | * Invites the specified player to a duel 159 | * 160 | * @param playerName The name of the player you wish to duel 161 | * @see https://wow.gamepedia.com/API_StartDuel 162 | */ 163 | declare function StartDuel(playerName: string): void; 164 | 165 | /** 166 | * Toggles PvP setting on or off 167 | * 168 | * @see https://wow.gamepedia.com/API_TogglePVP 169 | */ 170 | declare function TogglePVP(): void; 171 | 172 | /** 173 | * Toggles sheathed or unsheathed weapons 174 | * 175 | * @see https://wow.gamepedia.com/API_ToggleSheath 176 | * @event UNIT_MODEL_CHANGED 177 | */ 178 | declare function ToggleSheath(): void; 179 | 180 | /** 181 | * Use an active soulstone to resurrect yourself after death. Also works for Shamans with Reincarnation available 182 | * 183 | * @see https://wow.gamepedia.com/API_UseSoulstone 184 | */ 185 | declare function UseSoulstone(): void; 186 | -------------------------------------------------------------------------------- /declarations/binding.d.ts: -------------------------------------------------------------------------------- 1 | /** @noSelfInFile */ 2 | 3 | declare namespace WoWAPI { 4 | type CurrentBindingWhich = 1 | 2; 5 | type BindingSetType = 0 | CurrentBindingWhich; 6 | } 7 | 8 | /** 9 | * Returns the command name and all keys currently bound to the specified binding 10 | * @param bindingIndex index of the binding to query, from 1 to GetNumBindings(). 11 | * @param mode Unknown, defaults to 1 12 | * @see https://wow.gamepedia.com/API_GetBinding 13 | * @tupleReturn 14 | */ 15 | declare function GetBinding(bindingIndex: number, mode?: WoWAPI.Unknown): [string, string, string]; 16 | 17 | /** 18 | * Returns the name of the action performed by the specified binding 19 | * @param binding The name of the key (eg. "BUTTON1", "1", "CTRL-G") 20 | * @param checkOverride if true, override bindings will be checked, otherwise, only default (bindings.xml/SetBinding) bindings are consulted 21 | * @returns action command performed by the binding. If no action is bound to the key, an empty string is returned 22 | * @see https://wow.gamepedia.com/API_GetBindingAction 23 | */ 24 | declare function GetBindingAction(binding: string, checkOverride?: boolean): string; 25 | 26 | /** 27 | * Returns all keys currently bound to the command specified by command. This function is almost identical to GetBinding(index) 28 | * 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 29 | * @param command The name of the command to get key bindings for (e.g. MOVEFORWARD, TOGGLEFRIENDSTAB) 30 | * @returns The string representation(s) of all the key(s) bound to this command (e.g. W, CTRL-F) 31 | * @see https://wow.gamepedia.com/API_GetBindingKey 32 | * @tupleReturn 33 | */ 34 | declare function GetBindingKey(command: string): [...string[]]; 35 | 36 | /** 37 | * Returns the localized string value for the given key and prefix. Essentially a glorified getglobal() function 38 | * @param key The name of the key (e.g. "UP", "SHIFT-PAGEDOWN") 39 | * @param prefix The prefix of the variable name you're looking for. Usually "KEY_" or "BINDING_NAME_" 40 | * @param abbreviate Whether to return an abbreviated version of the modifier keys 41 | * @returns The value of the global variable derived from the prefix and key name you specified. For example, "UP" and "KEY_" 42 | * 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 43 | * the combination specified, it appears to just return the key name you specified. Modifier key prefixes are stripped from the input and added 44 | * back in to the output 45 | * @see https://wow.gamepedia.com/API_GetBindingText 46 | */ 47 | declare function GetBindingText(key: string, prefix: string, abbreviate?: boolean): string; 48 | 49 | /** 50 | * Returns whether account- or character-specific bindings are active. 51 | * @returns ACCOUNT_BINDINGS = 1 (indicates that account-wide bindings are currently active), CHARACTER_BINDINGS = 2 52 | * (indicates that per-character bindings are currently active) 53 | * @see https://wow.gamepedia.com/API_GetCurrentBindingSet 54 | */ 55 | declare function GetCurrentBindingSet(): WoWAPI.CurrentBindingWhich; 56 | 57 | /** 58 | * Returns the total number of key bindings listed in the key bindings window. This includes not only actions that can be bound, 59 | * but also the category headers in the window. This would generally be used in conjunction with GetBinding to loop through and set/get 60 | * all of the key bindings available 61 | * @returns The total number of key bindings (including headers) listed in the key bindings window. 62 | * @see https://wow.gamepedia.com/API_GetNumBindings 63 | */ 64 | declare function GetNumBindings(): WoWAPI.Unknown; 65 | 66 | /** 67 | * Loads a binding set into memory, activating those bindings 68 | * @param bindingSet Which binding set to load; one of the following three numeric constants: DEFAULT_BINDINGS (0), ACCOUNT_BINDINGS (1), CHARACTER_BINDINGS (2) 69 | * @event UPDATE_BINDINGS 70 | * @see https://wow.gamepedia.com/API_LoadBindings 71 | */ 72 | declare function LoadBindings(bindingSet: WoWAPI.BindingSetType): void; 73 | 74 | /** 75 | * Executes a key binding as if a key was pressed 76 | * @param command Name of the key binding to be executed 77 | * @param up if "up", the binding is run as if the key was released 78 | * @description The "command" argument must match one of the (usually capitalized) binding names in a Bindings.xml file. 79 | * 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 80 | * 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 81 | * words the keystate variable will have value "down" during the binding's execution. By specifying the optional second argument 82 | * (the actual string "up"), the binding is instead executed as if the key was released, in other words the keystate variable will have value 83 | * "up" during the binding's execution 84 | * @see https://wow.gamepedia.com/API_RunBinding 85 | */ 86 | declare function RunBinding(command: string, up?: string): void; 87 | 88 | /** 89 | * Writes the current in-memory key bindings to disk 90 | * @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 91 | * @event UPDATE_BINDINGS 92 | * @see https://wow.gamepedia.com/API_SaveBindings 93 | */ 94 | declare function SaveBindings(bindingSafeType: WoWAPI.CurrentBindingWhich): void; 95 | 96 | /** 97 | * @todo: SetBinding() ... 98 | */ 99 | -------------------------------------------------------------------------------- /declarations/quest.d.ts: -------------------------------------------------------------------------------- 1 | /** @noSelfInFile */ 2 | 3 | declare namespace WoWAPI { 4 | type QuestType = "required" | "reward" | "choice"; 5 | type QuestState = "OFFER" | "COMPLETE"; 6 | } 7 | 8 | /** 9 | * Abandons the quest specified by SetAbandonQuest 10 | * @see https://wow.gamepedia.com/API_AbandonQuest 11 | */ 12 | declare function AbandonQuest(): void; 13 | 14 | /** 15 | * Accepts the currently offered quest 16 | * @description You can call this function once the QUEST_DETAIL event fires 17 | * @see https://wow.gamepedia.com/API_AcceptQuest 18 | */ 19 | declare function AcceptQuest(): void; 20 | 21 | /** 22 | * Acknowledges that the currently-offered auto-accept quest has been accepted by the player 23 | * - Quests flagged for auto-accept are forced into the player's quest log immediately, rendering accepting the quest a mere formality 24 | * - 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 25 | * - You'll acknowledge the last quest for which the QUEST_DETAIL event fired 26 | * @since 5.0.4 27 | * @see https://wow.gamepedia.com/API_AcknowledgeAutoAcceptQuest 28 | */ 29 | declare function AcknowledgeAutoAcceptQuest(): void; 30 | 31 | /** 32 | * Adds a popup notification to the objectives tracker, showing that a quest is available or completed 33 | * @param questId the quest id 34 | * @param type popup type, one of "OFFER" or "COMPLETE" 35 | * @see https://wow.gamepedia.com/API_AddAutoQuestPopUp 36 | */ 37 | declare function AddAutoQuestPopUp(questId: number, type: WoWAPI.QuestState): void; 38 | 39 | /** 40 | * Adds a quest to the list of quests being watched with an optional time to watch it 41 | * @param questIndex The index of the quest in the quest log 42 | * @param watchTime The amount of time to watch the quest in seconds 43 | * @see https://wow.gamepedia.com/API_AddQuestWatch 44 | */ 45 | declare function AddQuestWatch(questIndex: number, watchTime: number): void; 46 | 47 | /** 48 | * Unknown 49 | * @param questId the quest id 50 | */ 51 | declare function AddWorldQuestWatch(questId: number): WoWAPI.Unknown; 52 | 53 | /** 54 | * Returns whether the player can abandon a specific quest 55 | * @param questId quest ID of the quest to query, e.g. 5944 for N [60G] In Dreams 56 | * @returns 1 if the player is currently on the specified quest and can abandon it, nil otherwise 57 | * @see https://wow.gamepedia.com/API_CanAbandonQuest 58 | */ 59 | declare function CanAbandonQuest(questId: number): WoWAPI.Flag; 60 | 61 | /** 62 | * Unknown 63 | */ 64 | declare function ClearAutoAcceptQuestSound(): WoWAPI.Unknown; 65 | 66 | /** 67 | * Closes the shown quest 68 | */ 69 | declare function CloseQuest(): WoWAPI.Unknown; 70 | 71 | /** 72 | * Collapses the quest header 73 | * @param questId The quest ID of the header you wish to collapse - 0 to collapse all quest headers 74 | * @see https://wow.gamepedia.com/API_CollapseQuestHeader 75 | */ 76 | declare function CollapseQuestHeader(questId: number): void; 77 | 78 | /** 79 | * Advances the quest completion dialog to the reward selection step 80 | * - Unlike the name would suggest, this does not finalize the completion of a quest. Instead it is called when you press the continue button, 81 | * and is used to continue from the progress dialog to the completion dialog 82 | * - If you're interested in hooking the function called when completing a quest, check out QuestRewardCompleteButton_OnClick 83 | * (in FrameXML\QuestFrame.lua) instead 84 | * @see https://wow.gamepedia.com/API_CompleteQuest 85 | */ 86 | declare function CompleteQuest(): void; 87 | 88 | /** 89 | * Accept an escort quest being started by a player nearby 90 | * - Can be used after the QUEST_ACCEPT_CONFIRM event has fired 91 | * @see https://wow.gamepedia.com/API_ConfirmAcceptQuest 92 | */ 93 | declare function ConfirmAcceptQuest(): void; 94 | 95 | /** 96 | * Declines the currently offered quest. 97 | * - You can call this function once the QUEST_DETAIL event fires 98 | * @see https://wow.gamepedia.com/API_DeclineQuest 99 | */ 100 | declare function DeclineQuest(): void; 101 | 102 | /** 103 | * Expands the quest header 104 | * - Expands the first quest header (questID = 1 is always yields a header if you have quests) if it was collapsed; if not, does nothing. 105 | * Also fires a QUEST_LOG_UPDATE event so be careful when calling this while processing a QUEST_LOG_UPDATE event 106 | * @param questId The index of the header you wish to expand. - 0 to expand all quest headers 107 | * @see https://wow.gamepedia.com/API_ExpandQuestHeader 108 | */ 109 | declare function ExpandQuestHeader(questId: number): void; 110 | 111 | /** 112 | * Unknown 113 | */ 114 | declare function GetAbandonQuestItems(): WoWAPI.Unknown; 115 | 116 | /** 117 | * Returns the name of a quest that will be abandoned if AbandonQuest is called 118 | * - The FrameXML-provided quest log calls SetAbandonQuest whenever a quest entry is selected, so this function will usually return the name of 119 | * the currently selected quest 120 | * @returns Name of the quest that will be abandoned 121 | * @see https://wow.gamepedia.com/API_GetAbandonQuestName 122 | */ 123 | declare function GetAbandonQuestName(): string; 124 | 125 | /** 126 | * Returns true if a quest is possible to complete 127 | * @see https://wow.gamepedia.com/API_IsQuestCompletable 128 | */ 129 | declare function IsQuestCompletable(): boolean; 130 | 131 | /** 132 | * Returns the number of items nessecary to complete a particular quest 133 | * @see https://wow.gamepedia.com/API_GetNumQuestItems 134 | */ 135 | declare function GetNumQuestItems(): number; 136 | -------------------------------------------------------------------------------- /declarations/currency.d.ts: -------------------------------------------------------------------------------- 1 | /** @noSelfInFile */ 2 | 3 | declare namespace WoWAPI { 4 | type CurrencyLink = Hyperlink; 5 | } 6 | 7 | /** 8 | * Breaks down an amount of money into gold/silver/copper, inserts separator strings, and returns the resulting string 9 | * 10 | * @param amount the amount of money in copper (for example, the return value from GetMoney) 11 | * @param separator a string to insert between the formatted amounts of currency, if there is more than one type 12 | * @returns a (presumably localized) string suitable for printing or displaying 13 | * @see https://wow.gamepedia.com/API_GetCoinText 14 | * @since 3.0.2 15 | */ 16 | declare function GetCoinText(amount: number, separator: string): string; 17 | 18 | /** 19 | * Breaks down an amount of money into gold/silver/copper, inserts appropriate "|T" texture strings for coin icons, and returns the resulting string 20 | * 21 | * @param amount the amount of money in copper (for example, the return value from GetMoney) 22 | * @param fontHeight the height of the coin icon; if not specified, defaults to 14 23 | * @returns a string suitable for printing or displaying 24 | * @see https://wow.gamepedia.com/API_GetCoinTextureString 25 | * @since 3.0.2 26 | */ 27 | declare function GetCoinTextureString(amount: number, fontHeight?: number): string; 28 | 29 | /** 30 | * Retrieve Information about a currency at index including it's amount 31 | * 32 | * @param currencyId ID of the currency to retrieve 33 | * @returns name, currentAmount, texture, earnedThisWeek, weeklyMax, totalMax, isDiscovered, rarity 34 | * @see https://wow.gamepedia.com/API_GetCurrencyInfo 35 | * @since 3.0.2 36 | * @tupleReturn 37 | */ 38 | declare function GetCurrencyInfo(currencyId: number): [string, number, WoWAPI.TexturePath, number, number, number, boolean, WoWAPI.ITEM_QUALITY]; 39 | 40 | /** 41 | * Retrieve Information about a currency at index including it's amount 42 | * 43 | * @param currencyId The full currencyLink as found with GetCurrencyLink() or GetCurrencyListLink(). OR A fragment of the currencyLink string 44 | * for the item, e.g. "currency:396" for Valor Points. 45 | * @returns name, currentAmount, texture, earnedThisWeek, weeklyMax, totalMax, isDiscovered, rarity 46 | * @see https://wow.gamepedia.com/API_GetCurrencyInfo 47 | * @since 3.0.2 48 | * @tupleReturn 49 | */ 50 | // tslint:disable-next-line unified-signatures max-line-length 51 | declare function GetCurrencyInfo(currencyLinkOrString: WoWAPI.CurrencyLink | string): [string, number, WoWAPI.TexturePath, number, number, number, boolean, WoWAPI.ITEM_QUALITY]; 52 | 53 | /** 54 | * Get the currencyLink for the specified currencyID 55 | * 56 | * @param currencyId currency index - see table at GetCurrencyInfo for a list 57 | * @param currencyAmount currency amount 58 | * @returns The currency link (similar to itemLink) for the specified index (e.g. "|cffa335ee|Hcurrency:396:0|h[Valor Points]|h|r" for Valor 59 | * Points) or nil if the index is for a header 60 | * @see https://wow.gamepedia.com/API_GetCurrencyLink 61 | * @since 3.0.2 62 | */ 63 | declare function GetCurrencyLink(currencyId: number, currencyAmount: number): WoWAPI.CurrencyLink; 64 | 65 | /** 66 | * Returns the number of entries in the currency list. 67 | * 68 | * @returns number of entries in the player's currency list 69 | * @see https://wow.gamepedia.com/API_GetCurrencyListSize 70 | * @since 3.0.2 71 | */ 72 | declare function GetCurrencyListSize(): number; 73 | 74 | /** 75 | * Returns information about an entry in the currency list 76 | * 77 | * @param currencyIndex index, ascending from 1 to GetCurrencyListSize(). 78 | * @returns name, isHeader, isExpanded, isUnused, isWatched, count, icon, maximum, hasWeeklyLimit, currentWeeklyAmount, unknown, itemID 79 | * @see https://wow.gamepedia.com/API_GetCurrencyListInfo 80 | * @since 3.0.2 81 | * @tupleReturn 82 | */ 83 | // tslint:disable-next-line max-line-length 84 | declare function GetCurrencyListInfo(currencyIndex: number): [string, boolean, boolean, boolean, boolean, number, WoWAPI.TexturePath, number, number, number, WoWAPI.Unknown, number]; 85 | 86 | /** 87 | * Alters the expanded state of a currency list header. 88 | * 89 | * @param currencyHeaderIndex Index of the header in the currency list to expand/collapse. 90 | * @param expanded 0 to set to collapsed state; 1 to set to expanded state 91 | * @see https://wow.gamepedia.com/API_ExpandCurrencyList 92 | * @since 3.0.2 93 | */ 94 | declare function ExpandCurrencyList(currencyHeaderIndex: number, expanded: WoWAPI.Flag): void; 95 | 96 | /** 97 | * Marks/unmarks a currency as unused 98 | * 99 | * @param currencyIndex Index of the currency in the currency list to alter unused status of. 100 | * @param unused 1 to mark the currency as unused; 0 to mark the currency as used 101 | * @see https://wow.gamepedia.com/API_SetCurrencyUnused 102 | * @since 3.0.2 103 | */ 104 | declare function SetCurrencyUnused(currencyIndex: number, unused: WoWAPI.Flag): void; 105 | 106 | /** 107 | * Returns the number of currencies currently watched on the player's backpack 108 | * 109 | * @returns the number of watched currencies 110 | * @see https://wow.gamepedia.com/API_GetNumWatchedTokens 111 | * @since 3.0.2 112 | */ 113 | declare function GetNumWatchedTokens(): number; 114 | 115 | /** 116 | * Returns information about a currency item currently being shown as part of the backpack 117 | * 118 | * @param watchedIndex Index, ascending from 1 to GetNumWatchedTokens(). 119 | * @returns name, count, icon, currencyID 120 | * @see https://wow.gamepedia.com/API_GetBackpackCurrencyInfo 121 | * @since 3.0.2 122 | * @tupleReturn 123 | */ 124 | declare function GetBackpackCurrencyInfo(watchedIndex: number): [string, number, WoWAPI.TexturePath, number]; 125 | 126 | /** 127 | * Alters the backpack tracking state of a currency 128 | * 129 | * @param currencyIndex Index of the currency in the currency list to alter tracking of 130 | * @param track 1 to track; 0 to clear tracking 131 | * @see https://wow.gamepedia.com/API_SetCurrencyBackpack 132 | * @since 3.0.2 133 | */ 134 | declare function SetCurrencyBackpack(currencyIndex: number, track: WoWAPI.Flag): void; 135 | -------------------------------------------------------------------------------- /declarations/constants.d.ts: -------------------------------------------------------------------------------- 1 | /** @noSelfInFile */ 2 | 3 | declare const MAX_PLAYER_LEVEL_TABLE: { 4 | LE_EXPANSION_CLASSIC: 60, 5 | LE_EXPANSION_BURNING_CRUSADE: 70, 6 | LE_EXPANSION_WRATH_OF_THE_LICH_KING: 80, 7 | LE_EXPANSION_CATACLYSM: 85, 8 | LE_EXPANSION_MISTS_OF_PANDARIA: 90, 9 | LE_EXPANSION_WARLORDS_OF_DRAENOR: 100, 10 | LE_EXPANSION_LEGION: 110, 11 | LE_EXPANSION_BATTLE_FOR_AZEROTH: 120, 12 | LE_EXPANSION_9_0: 120, 13 | LE_EXPANSION_10_0: 120, 14 | LE_EXPANSION_11_0: 120 15 | }; 16 | 17 | declare const NPE_TUTORIAL_COMPLETE_LEVEL = 10; 18 | 19 | declare const NORMAL_FONT_COLOR_CODE = "|cffffd200"; 20 | declare const HIGHLIGHT_FONT_COLOR_CODE = "|cffffffff"; 21 | declare const RED_FONT_COLOR_CODE = "|cffff2020"; 22 | declare const GREEN_FONT_COLOR_CODE = "|cff20ff20"; 23 | declare const GRAY_FONT_COLOR_CODE = "|cff808080"; 24 | declare const YELLOW_FONT_COLOR_CODE = "|cffffff00"; 25 | declare const LIGHTYELLOW_FONT_COLOR_CODE = "|cffffff9a"; 26 | declare const ORANGE_FONT_COLOR_CODE = "|cffff7f3f"; 27 | declare const ACHIEVEMENT_COLOR_CODE = "|cffffff00"; 28 | declare const BATTLENET_FONT_COLOR_CODE = "|cff82c5ff"; 29 | declare const DISABLED_FONT_COLOR_CODE = "|cff7f7f7f"; 30 | declare const FONT_COLOR_CODE_CLOSE = "|r"; 31 | 32 | declare const FACTION_BAR_COLORS: { 33 | 1: { r: .8, g: .3, b: .22 }, 34 | 2: { r: .8, g: .3, b: .22 }, 35 | 3: { r: .75, g: .27, b: 0 }, 36 | 4: { r: .9, g: .7, b: 0 }, 37 | 5: { r: 0, g: .6, b: .1 }, 38 | 6: { r: 0, g: .7, b: .1 }, 39 | 7: { r: 0, g: .7, b: .1 }, 40 | 8: { r: 0, g: .7, b: .1 } 41 | }; 42 | 43 | declare const WORLD_QUEST_ICONS_BY_PROFESSION: { 44 | 129: "worldquest-icon-firstaid", 45 | 164: "worldquest-icon-blacksmithing", 46 | 165: "worldquest-icon-leatherworking", 47 | 171: "worldquest-icon-alchemy", 48 | 182: "worldquest-icon-herbalism", 49 | 186: "worldquest-icon-mining", 50 | 202: "worldquest-icon-engineering", 51 | 333: "worldquest-icon-enchanting", 52 | 755: "worldquest-icon-jewelcrafting", 53 | 773: "worldquest-icon-inscription", 54 | 794: "worldquest-icon-archaeology", 55 | 356: "worldquest-icon-fishing", 56 | 185: "worldquest-icon-cooking", 57 | 197: "worldquest-icon-tailoring", 58 | 393: "worldquest-icon-skinning" 59 | }; 60 | 61 | declare const CHAT_FONT_HEIGHTS: { 62 | 1: 12, 63 | 2: 14, 64 | 3: 16, 65 | 4: 18 66 | }; 67 | 68 | declare const MATERIAL_TEXT_COLOR_TABLE: { 69 | "Default": [.18, .12, .06], 70 | "Stone": [1, 1, 1], 71 | "Parchment": [.18, .12, .06], 72 | "Marble": [0, 0, 0], 73 | "Silver": [.12, .12, .12], 74 | "Bronze": [.18, .12, .06], 75 | "ParchmentLarge": [.141, 0, 0] 76 | }; 77 | 78 | declare const MATERIAL_TITLETEXT_COLOR_TABLE: { 79 | "Default": [0, 0, 0], 80 | "Stone": [.93, .82, 0], 81 | "Parchment": [0, 0, 0], 82 | "Marble": [.93, .82, 0], 83 | "Silver": [.93, .82, 0], 84 | "Bronze": [.93, .82, 0], 85 | "ParchmentLarge": [.208, 0, 0] 86 | }; 87 | 88 | declare const CLASS_SORT_ORDER: [ 89 | "WARRIOR", "DEATHKNIGHT", "PALADIN", "MONK", "PRIEST", "SHAMAN", "DRUID", 90 | "ROGUE", "MAGE", "WARLOCK", "HUNTER", "DEMONHUNTER" 91 | ]; 92 | 93 | declare const SCHOOL_MASK_NONE = 0x00; 94 | declare const SCHOOL_MASK_PHYSICAL = 0x01; 95 | declare const SCHOOL_MASK_HOLY = 0x02; 96 | declare const SCHOOL_MASK_FIRE = 0x04; 97 | declare const SCHOOL_MASK_NATURE = 0x08; 98 | declare const SCHOOL_MASK_FROST = 0x10; 99 | declare const SCHOOL_MASK_SHADOW = 0x20; 100 | declare const SCHOOL_MASK_ARCANE = 0x40; 101 | 102 | declare const LOOT_ROLL_TYPE_PASS = 0; 103 | declare const LOOT_ROLL_TYPE_NEED = 1; 104 | declare const LOOT_ROLL_TYPE_GREED = 2; 105 | declare const LOOT_ROLL_TYPE_DISENCHANT = 3; 106 | 107 | declare const INVSLOT_AMMO = 0; 108 | declare type INVSLOT_AMMO = 0; 109 | declare const INVSLOT_HEAD = 1; 110 | declare type INVSLOT_HEAD = 1; 111 | declare const INVSLOT_NECK = 2; 112 | declare type INVSLOT_NECK = 2; 113 | declare const INVSLOT_SHOULDER = 3; 114 | declare type INVSLOT_SHOULDER = 3; 115 | declare const INVSLOT_BODY = 4; 116 | declare type INVSLOT_BODY = 4; 117 | declare const INVSLOT_CHEST = 5; 118 | declare type INVSLOT_CHEST = 5; 119 | declare const INVSLOT_WAIST = 6; 120 | declare type INVSLOT_WAIST = 6; 121 | declare const INVSLOT_LEGS = 7; 122 | declare type INVSLOT_LEGS = 7; 123 | declare const INVSLOT_FEET = 8; 124 | declare type INVSLOT_FEET = 8; 125 | declare const INVSLOT_WRIST = 9; 126 | declare type INVSLOT_WRIST = 9; 127 | declare const INVSLOT_HAND = 10; 128 | declare type INVSLOT_HAND = 10; 129 | declare const INVSLOT_FINGER1 = 11; 130 | declare type INVSLOT_FINGER1 = 11; 131 | declare const INVSLOT_FINGER2 = 12; 132 | declare type INVSLOT_FINGER2 = 12; 133 | declare const INVSLOT_TRINKET1 = 13; 134 | declare type INVSLOT_TRINKET1 = 13; 135 | declare const INVSLOT_TRINKET2 = 14; 136 | declare type INVSLOT_TRINKET2 = 14; 137 | declare const INVSLOT_BACK = 15; 138 | declare type INVSLOT_BACK = 15; 139 | declare const INVSLOT_MAINHAND = 16; 140 | declare type INVSLOT_MAINHAND = 16; 141 | declare const INVSLOT_OFFHAND = 17; 142 | declare type INVSLOT_OFFHAND = 17; 143 | declare const INVSLOT_RANGED = 18; 144 | declare type INVSLOT_RANGED = 18; 145 | declare const INVSLOT_TABARD = 19; 146 | declare type INVSLOT_TABARD = 19; 147 | 148 | declare const DIFFICULTY_DUNGEON_NORMAL = 1; 149 | declare const DIFFICULTY_DUNGEON_HEROIC = 2; 150 | declare const DIFFICULTY_RAID10_NORMAL = 3; 151 | declare const DIFFICULTY_RAID25_NORMAL = 4; 152 | declare const DIFFICULTY_RAID10_HEROIC = 5; 153 | declare const DIFFICULTY_RAID25_HEROIC = 6; 154 | declare const DIFFICULTY_RAID_LFR = 7; 155 | declare const DIFFICULTY_DUNGEON_CHALLENGE = 8; 156 | declare const DIFFICULTY_RAID40 = 9; 157 | declare const DIFFICULTY_PRIMARYRAID_NORMAL = 14; 158 | declare const DIFFICULTY_PRIMARYRAID_HEROIC = 15; 159 | declare const DIFFICULTY_PRIMARYRAID_MYTHIC = 16; 160 | declare const DIFFICULTY_PRIMARYRAID_LFR = 17; 161 | 162 | declare const NUM_CHAT_WINDOWS: number; 163 | 164 | declare namespace WoWAPI { 165 | type InventoryId = INVSLOT_AMMO | INVSLOT_HEAD | INVSLOT_NECK | INVSLOT_SHOULDER | INVSLOT_BODY | INVSLOT_CHEST | 166 | INVSLOT_WAIST | INVSLOT_LEGS | INVSLOT_FEET | INVSLOT_WRIST | INVSLOT_HAND | INVSLOT_FINGER1 | INVSLOT_FINGER2 | INVSLOT_TRINKET1 | 167 | INVSLOT_TRINKET2 | INVSLOT_BACK | INVSLOT_MAINHAND | INVSLOT_OFFHAND | INVSLOT_RANGED | INVSLOT_TABARD; 168 | 169 | /** 170 | * Global object used to register and assign handler functions to for slash commands. 171 | * @see https://wowpedia.fandom.com/wiki/Creating_a_slash_command 172 | */ 173 | const SlashCmdList: { [key: string]: (this: void, msg: string, editBox: EditBox) => void }; 174 | } 175 | -------------------------------------------------------------------------------- /declarations/classes/C_EncounterJournal.d.ts: -------------------------------------------------------------------------------- 1 | declare namespace WoWAPI { 2 | 3 | interface DungeonEntranceMapInfo { 4 | 5 | /** 6 | * Possible values listed at wow.tools 7 | */ 8 | areaPoiID: number; 9 | position: Vector2D; 10 | name: string; 11 | description: string; 12 | /** 13 | * AtlasID used as Texture:SetAtlas(atlasName) 14 | */ 15 | atlasName: string; 16 | /** 17 | * Possible values listed at wow.tools 18 | */ 19 | journalInstanceID: number; 20 | } 21 | 22 | interface EncounterJournalMapEncounterInfo { 23 | 24 | encointerID: number; 25 | mapX: number; 26 | mapY: number; 27 | } 28 | 29 | interface EncounterJournalSectionInfo { 30 | 31 | spellID: number; 32 | /** 33 | * Section title, e.g. "Stage One: The Final Assault", "Mutated Corruption", "Impale" 34 | */ 35 | title: string; 36 | /** 37 | * Description text, e.g. "A Mutated Corruption appears shortly after assaulting a platform" 38 | */ 39 | description: string | null; 40 | /** 41 | * Section depth, i.e. the number of ancestors it has before reaching a sibling of the root section for the encounter 42 | * (0 for the root section and its siblings, 1 for their children, 2 for their children's children...). 43 | */ 44 | headerType: number; 45 | /** 46 | * Path to a texture to display as an icon next to the section title, or "" if no static icon should be shown. 47 | */ 48 | abilityIcon: number; 49 | /** 50 | * Model ID to display as an icon next to the section title, or 0 if no model-based icon should be shown 51 | */ 52 | creatureDisplayID: number; 53 | uiModelSceneID: number; 54 | /** 55 | * Section ID of the next section on the same depth as this one, nil if none 56 | */ 57 | siblingSectionID: number | null; 58 | /** 59 | * Section ID of the first child section of this section, nil if none 60 | */ 61 | firstChildSectionID: number | null; 62 | /** 63 | * true if this section should be hidden because it does not apply to the current DifficultyID}, false otherwise. 64 | */ 65 | filteredByDifficulty: boolean; 66 | /** 67 | * hyperlink to this section, e.g. " |cff66bbff|Hjournal:2:4102:4|h[Cataclysm]|h|r" 68 | */ 69 | link: Hyperlink; 70 | /** 71 | * True if the section should be expanded by default, false if it should be collapsed by default 72 | */ 73 | startsOpen: boolean; 74 | } 75 | 76 | type ENCOUNTER_JOURNAL_FLAG_TANK_ALERT = 0; 77 | type ENCOUNTER_JOURNAL_FLAG_DAMAGE_DEALER_ALERT = 1; 78 | type ENCOUNTER_JOURNAL_FLAG_HEALER_ALERT = 2; 79 | type ENCOUNTER_JOURNAL_FLAG_HEROIC_DIFFICULTY = 3; 80 | type ENCOUNTER_JOURNAL_FLAG_DEADLY = 4; 81 | type ENCOUNTER_JOURNAL_FLAG_IMPORTANT = 5; 82 | type ENCOUNTER_JOURNAL_FLAG_INTERUPTIBLE = 6; 83 | type ENCOUNTER_JOURNAL_FLAG_MAGIC_EFFECT = 7; 84 | type ENCOUNTER_JOURNAL_FLAG_CURSE_EFFECT = 8; 85 | type ENCOUNTER_JOURNAL_FLAG_POISON_EFFECT = 9; 86 | type ENCOUNTER_JOURNAL_FLAG_DISEASE_EFFECT = 10; 87 | type ENCOUNTER_JOURNAL_FLAG_ENRAGE = 11; 88 | type ENCOUNTER_JOURNAL_FLAG_MYTHIC_DIFFICULTY = 12; 89 | type ENCOUNTER_JOURNAL_FLAG = 90 | ENCOUNTER_JOURNAL_FLAG_TANK_ALERT 91 | | ENCOUNTER_JOURNAL_FLAG_DAMAGE_DEALER_ALERT 92 | | ENCOUNTER_JOURNAL_FLAG_HEALER_ALERT 93 | | 94 | ENCOUNTER_JOURNAL_FLAG_HEROIC_DIFFICULTY 95 | | ENCOUNTER_JOURNAL_FLAG_DEADLY 96 | | ENCOUNTER_JOURNAL_FLAG_IMPORTANT 97 | | ENCOUNTER_JOURNAL_FLAG_INTERUPTIBLE 98 | | 99 | ENCOUNTER_JOURNAL_FLAG_MAGIC_EFFECT 100 | | ENCOUNTER_JOURNAL_FLAG_CURSE_EFFECT 101 | | ENCOUNTER_JOURNAL_FLAG_POISON_EFFECT 102 | | ENCOUNTER_JOURNAL_FLAG_DISEASE_EFFECT 103 | | 104 | ENCOUNTER_JOURNAL_FLAG_ENRAGE 105 | | ENCOUNTER_JOURNAL_FLAG_MYTHIC_DIFFICULTY; 106 | } 107 | 108 | declare namespace C_EncounterJournal { 109 | 110 | /** 111 | * Returns the instance entrances for a map 112 | * @param uiMapId 113 | * @see https://wow.gamepedia.com/API_C_EncounterJournal.GetDungeonEntrancesForMap 114 | * @since 8.0.1 (2018-07-17) 115 | */ 116 | function GetDungeonEntrancesForMap(uiMapId: number): WoWAPI.DungeonEntranceMapInfo[]; 117 | 118 | /** 119 | * Returns boss pin locations for an instance map 120 | * @param uiMapId 121 | * @see https://wow.gamepedia.com/API_C_EncounterJournal.GetEncountersOnMap 122 | * @since 8.0.1 (2018-07-17) 123 | */ 124 | function GetEncountersOnMap(uiMapId: number): WoWAPI.EncounterJournalMapEncounterInfo[]; 125 | 126 | /** 127 | * Returns the icon flags for a section, such as Magic Effect and Heroic Difficulty 128 | * @param sectionID 129 | * @returns Flag IDs to display for this section. 130 | * - Refer to the ENCOUNTER_JOURNAL_SECTION_FLAG globals for the flag titles. 131 | * - For convenience there is EncounterJournal_SetFlagIcon() which sets the texture coords for interface/encounterjournal/ui-ej-icons.blp 132 | * @see https://wow.gamepedia.com/API_C_EncounterJournal.GetSectionIconFlags 133 | * @since 7.3.5 (2018-01-16) 134 | */ 135 | function GetSectionIconFlags(sectionID: number): WoWAPI.ENCOUNTER_JOURNAL_FLAG[]; 136 | 137 | /** 138 | * Returns information about an entry in the Abilities section of the Encounter Journal 139 | * @param sectionId 140 | * @returns encounterJournalSectionInfo 141 | * @see https://wow.gamepedia.com/API_C_EncounterJournal.GetSectionInfo 142 | * @since 7.3.5 (2018-01-16) 143 | */ 144 | function GetSectionInfo(sectionId: number): WoWAPI.EncounterJournalSectionInfo; 145 | 146 | /** 147 | * Returns whether an instance has a loot table in the journal 148 | * @param instanceId if omitted, uses the currently selected instance per EJ_SelectInstance 149 | * @see https://wow.gamepedia.com/API_C_EncounterJournal.InstanceHasLoot 150 | * @since 8.1.0 (2018-12-11) 151 | */ 152 | function InstanceHasLoot(instanceId?: number): boolean; 153 | 154 | /** 155 | * Returns if a boss encounter has been completed 156 | * @param journalEncounterID 157 | * @see https://wow.gamepedia.com/API_C_EncounterJournal.IsEncounterComplete 158 | * @since 8.1.5 (2019-03-12) 159 | */ 160 | function IsEncounterComplete(journalEncounterID: number): boolean; 161 | 162 | /** 163 | * Needs summary 164 | * @param level 165 | * @see https://wow.gamepedia.com/API_C_EncounterJournal.SetPreviewMythicPlusLevel 166 | * @since 8.2.0 (2019-06-25) 167 | */ 168 | function SetPreviewMythicPlusLevel(level: number): void; 169 | 170 | /** 171 | * Needs summary 172 | * @param tier 173 | * @see https://wow.gamepedia.com/API_C_EncounterJournal.SetPreviewPvpTier 174 | * @since 8.2.0 (2019-06-25) 175 | */ 176 | function SetPreviewPvpTier(tier: number): void; 177 | } 178 | -------------------------------------------------------------------------------- /declarations/chatWindow.d.ts: -------------------------------------------------------------------------------- 1 | /** @noSelfInFile */ 2 | 3 | declare const AUTOCOMPLETE_FLAG_NONE = 0x00000000; 4 | declare const AUTOCOMPLETE_FLAG_IN_GROUP = 0x00000001; 5 | declare const AUTOCOMPLETE_FLAG_IN_GUILD = 0x00000002; 6 | declare const AUTOCOMPLETE_FLAG_FRIEND = 0x00000004; 7 | declare const AUTOCOMPLETE_FLAG_INTERACTED_WITH = 0x00000010; 8 | declare const AUTOCOMPLETE_FLAG_ONLINE = 0x00000020; 9 | declare const AUTOCOMPLETE_FLAG_ALL = 0xffffffff; 10 | 11 | declare namespace WoWAPI { 12 | type ChatTypeInfoBody = { r: number, g: number, b: number, id: string, sticky: boolean }; 13 | 14 | type ChatTypeInfo = { 15 | SYSTEM: ChatTypeInfoBody, 16 | SAY: ChatTypeInfoBody, 17 | PARTY: ChatTypeInfoBody, 18 | RAID: ChatTypeInfoBody, 19 | GUILD: ChatTypeInfoBody, 20 | OFFICER: ChatTypeInfoBody, 21 | YELL: ChatTypeInfoBody, 22 | WHISPER: ChatTypeInfoBody, 23 | WHISPER_INFORM: ChatTypeInfoBody, 24 | REPLY: ChatTypeInfoBody, 25 | EMOTE: ChatTypeInfoBody, 26 | TEXT_EMOTE: ChatTypeInfoBody, 27 | MONSTER_SAY: ChatTypeInfoBody, 28 | MONSTER_PARTY: ChatTypeInfoBody, 29 | MONSTER_YELL: ChatTypeInfoBody, 30 | MONSTER_WHISPER: ChatTypeInfoBody, 31 | MONSTER_EMOTE: ChatTypeInfoBody, 32 | CHANNEL: ChatTypeInfoBody, 33 | CHANNEL_JOIN: ChatTypeInfoBody, 34 | CHANNEL_LEAVE: ChatTypeInfoBody, 35 | CHANNEL_LIST: ChatTypeInfoBody, 36 | CHANNEL_NOTICE: ChatTypeInfoBody, 37 | CHANNEL_NOTICE_USER: ChatTypeInfoBody, 38 | AFK: ChatTypeInfoBody, 39 | DND: ChatTypeInfoBody, 40 | IGNORED: ChatTypeInfoBody, 41 | SKILL: ChatTypeInfoBody, 42 | LOOT: ChatTypeInfoBody, 43 | MONEY: ChatTypeInfoBody, 44 | OPENING: ChatTypeInfoBody, 45 | TRADESKILLS: ChatTypeInfoBody, 46 | PET_INFO: ChatTypeInfoBody, 47 | COMBAT_MISC_INFO: ChatTypeInfoBody, 48 | COMBAT_XP_GAIN: ChatTypeInfoBody, 49 | COMBAT_HONOR_GAIN: ChatTypeInfoBody, 50 | COMBAT_FACTION_CHANGE: ChatTypeInfoBody, 51 | BG_SYSTEN_NEUTRAL: ChatTypeInfoBody, 52 | BG_SYSTEM_ALLIANCE: ChatTypeInfoBody, 53 | BG_SYSTEN_HORDE: ChatTypeInfoBody, 54 | RAID_LEADER: ChatTypeInfoBody, 55 | RAID_WARNING: ChatTypeInfoBody, 56 | RAID_BOSS_WHISPER: ChatTypeInfoBody, 57 | RAID_BOSS_EMOTE: ChatTypeInfoBody, 58 | FILTERED: ChatTypeInfoBody, 59 | BATTLEGROUND: ChatTypeInfoBody, 60 | BATTLEGROUND_LEADER: ChatTypeInfoBody, 61 | RESTRICTED: ChatTypeInfoBody, 62 | CHANNEL1: ChatTypeInfoBody, 63 | CHANNEL2: ChatTypeInfoBody, 64 | CHANNEL3: ChatTypeInfoBody, 65 | CHANNEL4: ChatTypeInfoBody, 66 | CHANNEL5: ChatTypeInfoBody, 67 | CHANNEL6: ChatTypeInfoBody, 68 | CHANNEL7: ChatTypeInfoBody, 69 | CHANNEL8: ChatTypeInfoBody, 70 | CHANNEL9: ChatTypeInfoBody, 71 | CHANNEL10: ChatTypeInfoBody, 72 | ACHIVEMENT: ChatTypeInfoBody, 73 | GUILD_ACHIVEMENT: ChatTypeInfoBody 74 | }; 75 | 76 | /** 77 | * the chat frame instance 78 | */ 79 | interface ChatFrame { 80 | 81 | /** 82 | * add the given message to the frame 83 | * @param message the message to add 84 | */ 85 | AddMessage(message: string): void; 86 | } 87 | } 88 | 89 | declare const ChatTypeInfo: WoWAPI.ChatTypeInfo; 90 | 91 | /** 92 | * Retrieves configuration information about a chat window 93 | * @param frameIndex The index of the chat window to get information for (starts at 1 to NUM_CHAT_WINDOWS). 94 | * @see https://wow.gamepedia.com/API_GetChatWindowInfo 95 | * @tupleReturn 96 | */ 97 | declare function GetChatWindowInfo(frameIndex: number): [string, number, number, number, number, WoWAPI.Flag, WoWAPI.Flag, number]; 98 | 99 | /** 100 | * Get the channels received by a chat window. 101 | * @param frameIndex The frame number of the chat frame to be queried (starts at 1). 102 | * @see https://wow.gamepedia.com/API_GetChatWindowChannels 103 | * @tupleReturn 104 | */ 105 | declare function GetChatWindowChannels(frameIndex: number): [string, number, string, number, string, number]; 106 | 107 | /** 108 | * Blocks further messages from a specified chat channel from appearing in a specific chat frame 109 | * @param frameIndex index of the chat window/frame (ascending from 1) to remove the channel from 110 | * @param channelName name of the chat channel to remove from the frame 111 | * @see https://wow.gamepedia.com/API_RemoveChatWindowChannel 112 | */ 113 | declare function RemoveChatWindowChannel(frameIndex: number, channelName: string): void; 114 | 115 | /** 116 | * Returns chat types received by a chat window 117 | * @param frameIndex Chat window index, ascending from 1 118 | * @see https://wow.gamepedia.com/API_GetChatWindowMessages 119 | * @tupleReturn 120 | */ 121 | declare function GetChatWindowMessages(frameIndex: number): [...string[]]; 122 | 123 | /** 124 | * Stops the specified chat window from displaying a specified type of messages 125 | * @param frameIndex chat window index, ascending from 1. 126 | * @param messageGroup message type the chat window should no longer receive, e.g. "EMOTE", "SAY", "RAID". 127 | */ 128 | declare function RemoveChatWindowMessages(frameIndex: number, messageGroup: string): void; 129 | 130 | /** 131 | * 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 132 | * @param channelName Name of the channel as given in chat-cache.txt files 133 | * @param red red value 0-1 134 | * @param green green value 0-1 135 | * @param blue blue value 0-1 136 | * @see https://wow.gamepedia.com/API_ChangeChatColor 137 | */ 138 | declare function ChangeChatColor(channelName: string, red: number, green: number, blue: number): void; 139 | 140 | /** 141 | * Returns possible player names matching a given prefix string and specified requirements 142 | * @param text first characters of the possible names to be autocompleted 143 | * @param include bit mask of filters that the results must match at least one of 144 | * @param exclude bit mask of filters that the results must not match any of 145 | * @param maxResults number of results desired 146 | * @param cursorPosition position of the cursor within the editbox (i.e. how much of the text string should be matching) 147 | * @see https://wow.gamepedia.com/API_GetAutoCompleteResults 148 | * @tupleReturn 149 | */ 150 | declare function GetAutoCompleteResults(text: string, include: number, exclude: number, maxResults: number, cursorPosition?: number): [...string[]]; 151 | 152 | /** 153 | * Return the numeric type index for a specific chat type 154 | * @param typeCode The type code for the chat type (One of the key values of the ChatTypeInfo table) 155 | * @returns The numeric type index for that chat type, used as the ID number for coloring 156 | * @see https://wow.gamepedia.com/API_GetChatTypeIndex 157 | */ 158 | declare function GetChatTypeIndex(typeCode: keyof WoWAPI.ChatTypeInfo): number; 159 | 160 | /** 161 | * Toggles the chat logging and returns the current state 162 | * @param newState toggles chat logging 163 | * @returns current state of logging 164 | * @see https://wow.gamepedia.com/API_LoggingChat 165 | */ 166 | declare function LoggingChat(newState?: boolean): boolean; 167 | 168 | /** 169 | * Toggles logging for the combat log and returns the current state 170 | * @param newState Toggles combat logging 171 | * @returns current state of logging 172 | * @see https://wow.gamepedia.com/API_LoggingCombat 173 | */ 174 | declare function LoggingCombat(newState?: boolean): boolean; 175 | -------------------------------------------------------------------------------- /declarations/classes/C_LegendaryCrafting.d.ts: -------------------------------------------------------------------------------- 1 | declare namespace C_LegendaryCrafting { 2 | 3 | /** 4 | * Needs summary 5 | * @see https://wow.gamepedia.com/API_C_LegendaryCrafting.CloseRuneforgeInteraction 6 | * @since 9.0.1 (2020-10-13) 7 | */ 8 | function CloseRuneforgeInteraction(): void; 9 | 10 | /** 11 | * Needs summary 12 | * @param unknown 13 | * @see https://wow.gamepedia.com/API_C_LegendaryCrafting.CraftRuneforgeLegendary 14 | * @since 9.0.1 (2020-10-13) 15 | */ 16 | function CraftRuneforgeLegendary(...unknown: WoWAPI.UnknownTable[]): WoWAPI.Unknown; 17 | 18 | /** 19 | * Needs summary 20 | * @param baseItem 21 | * @see https://wow.gamepedia.com/API_C_LegendaryCrafting.GetRuneforgeItemPreviewInfo 22 | * @since 9.0.1 (2020-10-13) 23 | */ 24 | function GetRuneforgeItemPreviewInfo(baseItem: ItemLocation.ItemLocationMixin): WoWAPI.Unknown; 25 | 26 | /** 27 | * Needs summary 28 | * @param baseItem 29 | * @param runeforgePowerID 30 | * @param modifiers 31 | * @see https://wow.gamepedia.com/API_C_LegendaryCrafting.GetRuneforgeItemPreviewInfo 32 | * @since 9.0.1 (2020-10-13) 33 | */ 34 | function GetRuneforgeItemPreviewInfo(baseItem: ItemLocation.ItemLocationMixin, runeforgePowerID: number, modifiers: number[]): WoWAPI.Unknown; 35 | 36 | /** 37 | * Needs summary 38 | * @param baseItem 39 | * @see https://wow.gamepedia.com/API_C_LegendaryCrafting.GetRuneforgeLegendaryCost 40 | * @since 9.0.1 (2020-10-13) 41 | */ 42 | function GetRuneforgeLegendaryCost(baseItem: ItemLocation.ItemLocationMixin): WoWAPI.Unknown; 43 | 44 | /** 45 | * Needs summary 46 | * @returns spellId 47 | * @see https://wow.gamepedia.com/API_C_LegendaryCrafting.GetRuneforgeLegendaryCraftSpellID 48 | * @since 9.0.1 (2020-10-13) 49 | */ 50 | function GetRuneforgeLegendaryCraftSpellID(): number; 51 | 52 | /** 53 | * Needs summary 54 | * @returns currencies 55 | * @see https://wow.gamepedia.com/API_C_LegendaryCrafting.GetRuneforgeLegendaryCurrencies 56 | * @since 9.0.1 (2020-10-13) 57 | */ 58 | function GetRuneforgeLegendaryCurrencies(): number[]; 59 | 60 | /** 61 | * Needs summary 62 | * @param runeforgeLegendary 63 | * @param upgradeItem 64 | * @see https://wow.gamepedia.com/API_C_LegendaryCrafting.GetRuneforgeLegendaryUpgradeCost 65 | * @since 9.0.1 (2020-10-13) 66 | */ 67 | function GetRuneforgeLegendaryUpgradeCost(runeforgeLegendary: ItemLocation.ItemLocationMixin, upgradeItem: ItemLocation.ItemLocationMixin): WoWAPI.Unknown; 68 | 69 | /** 70 | * Needs summary 71 | * @param baseItem 72 | * @param powerId 73 | * @param addedModifierIndex 74 | * @param modifiers 75 | * @returns name and description 76 | * @see https://wow.gamepedia.com/API_C_LegendaryCrafting.GetRuneforgeModifierInfo 77 | * @since 9.0.1 (2020-10-13) 78 | */ 79 | function GetRuneforgeModifierInfo( 80 | baseItem: ItemLocation.ItemLocationMixin, 81 | powerId: number | null, 82 | addedModifierIndex: number, 83 | modifiers: number[] 84 | ): [string, string]; 85 | 86 | /** 87 | * Needs summary 88 | * @returns modifiedReagentItemIDs 89 | * @see https://wow.gamepedia.com/API_C_LegendaryCrafting.GetRuneforgeModifiers 90 | * @since 9.0.1 (2020-10-13) 91 | */ 92 | function GetRuneforgeModifiers(): number[]; 93 | 94 | /** 95 | * Needs summary 96 | * @returns runeforgePowerINfo 97 | * @see https://wow.gamepedia.com/API_C_LegendaryCrafting.GetRuneforgePowerInfo 98 | * @since 9.0.1 (2020-10-13) 99 | */ 100 | function GetRuneforgePowerInfo(runeforgePowerID: number): WoWAPI.Unknown; 101 | 102 | /** 103 | * Needs summary 104 | * @returns specRuneforgePowerIDs and otherSpecRuneforgePowerIDs 105 | * @see https://wow.gamepedia.com/API_C_LegendaryCrafting.GetRuneforgePowers 106 | * @since 9.0.1 (2020-10-13) 107 | */ 108 | function GetRuneforgePowers(): [number[], number[]]; 109 | 110 | /** 111 | * Needs summary 112 | * @param baseItem 113 | * @param filter 114 | * @returns specRuneforgePowerIDs and otherSpecRuneforgePowerIDs 115 | * @see https://wow.gamepedia.com/API_C_LegendaryCrafting.GetRuneforgePowers 116 | * @since 9.0.1 (2020-10-13) 117 | */ 118 | function GetRuneforgePowers(baseItem: ItemLocation.ItemLocationMixin, filter: Enum.RuneforgePowerFilter): [number[], number[]]; 119 | 120 | /** 121 | * Needs summary 122 | * @returns runeforgePowerIDs 123 | * @see https://wow.gamepedia.com/API_C_LegendaryCrafting.GetRuneforgePowersByClassAndSpec 124 | * @since 9.0.1 (2020-10-13) 125 | */ 126 | function GetRuneforgePowersByClassAndSpec(): number[]; 127 | 128 | /** 129 | * Needs summary 130 | * @param classID 131 | * @param specId 132 | * @param filter 133 | * @returns runeforgePowerIDs 134 | * @see https://wow.gamepedia.com/API_C_LegendaryCrafting.GetRuneforgePowersByClassAndSpec 135 | * @since 9.0.1 (2020-10-13) 136 | */ 137 | function GetRuneforgePowersByClassAndSpec(classID: WoWAPI.CLASS_ID, specId: number, filter: Enum.RuneforgePowerFilter): number[]; 138 | 139 | /** 140 | * Needs summary 141 | * @param runeforgePowerID 142 | * @see https://wow.gamepedia.com/API_C_LegendaryCrafting.GetRuneforgePowerSlots 143 | * @since 9.0.1 (2020-10-13) 144 | */ 145 | function GetRuneforgePowerSlots(runeforgePowerID: number): string[]; 146 | 147 | /** 148 | * Needs summary 149 | * @param item 150 | * @see https://wow.gamepedia.com/API_C_LegendaryCrafting.IsRuneforgeLegendary 151 | * @since 9.0.1 (2020-10-13) 152 | */ 153 | function IsRuneforgeLegendary(item: ItemLocation.ItemLocationMixin): boolean; 154 | 155 | /** 156 | * Needs summary 157 | * @param runeforgeLegendary 158 | * @see https://wow.gamepedia.com/API_C_LegendaryCrafting.IsRuneforgeLegendaryMaxLevel 159 | * @since 9.0.1 (2020-10-13) 160 | */ 161 | function IsRuneforgeLegendaryMaxLevel(runeforgeLegendary: ItemLocation.ItemLocationMixin): boolean; 162 | 163 | /** 164 | * Needs summary 165 | * @param runeforgeLegendary 166 | * @param upgradeItem 167 | * @see https://wow.gamepedia.com/API_C_LegendaryCrafting.IsUpgradeItemValidForRuneforgeLegendary 168 | * @since 9.0.1 (2020-10-13) 169 | */ 170 | function IsUpgradeItemValidForRuneforgeLegendary(runeforgeLegendary: ItemLocation.ItemLocationMixin, upgradeItem: ItemLocation.ItemLocationMixin): boolean; 171 | 172 | /** 173 | * Needs summary 174 | * @param baseItem 175 | * @see https://wow.gamepedia.com/API_C_LegendaryCrafting.IsValidRuneforgeBaseItem 176 | * @since 9.0.1 (2020-10-13) 177 | */ 178 | function IsValidRuneforgeBaseItem(baseItem: ItemLocation.ItemLocationMixin): boolean; 179 | 180 | /** 181 | * Needs summary 182 | * @param baseItem 183 | * @param runeforgePowerId 184 | * @param modifiers 185 | * @returns runeforgeLegendaryCraftDescription 186 | * @see https://wow.gamepedia.com/API_C_LegendaryCrafting.MakeRuneforgeCraftDescription 187 | * @since 9.0.1 (2020-10-13) 188 | */ 189 | function MakeRuneforgeCraftDescription(baseItem: ItemLocation.ItemLocationMixin, runeforgePowerId: number, modifiers: number[]): WoWAPI.Unknown; 190 | 191 | /** 192 | * Needs summary. 193 | * @param runeforgeLegendary 194 | * @param upgradeItem 195 | * @see https://wow.gamepedia.com/API_C_LegendaryCrafting.UpgradeRuneforgeLegendary 196 | * @since 9.0.1 (2020-10-13) 197 | */ 198 | function UpgradeRuneforgeLegendary(runeforgeLegendary: ItemLocation.ItemLocationMixin, upgradeItem: ItemLocation.ItemLocationMixin): void; 199 | } 200 | -------------------------------------------------------------------------------- /declarations/classes/C_Item.d.ts: -------------------------------------------------------------------------------- 1 | declare namespace C_Item { 2 | 3 | /** 4 | * Needs summary 5 | * @param item 6 | * @see https://wow.gamepedia.com/API_C_Item.IsItemConduit 7 | * @since 9.0.2 (2020-11-17) 8 | */ 9 | function IsItemConduit(item: ItemLocation.ItemLocationMixin): boolean; 10 | 11 | /** 12 | * Needs summary 13 | * @param itemInfo 14 | * @see https://wow.gamepedia.com/API_C_Item.IsAnimaItemByID 15 | * @since 9.0.2 (2020-11-17) 16 | */ 17 | function IsAnimaItemByID(itemInfo: string): boolean; 18 | 19 | /** 20 | * Needs summary 21 | * @param item 22 | * @see https://wow.gamepedia.com/API_C_Item.CanViewItemPowers 23 | * @since 8.1.0 (2018-12-11) 24 | */ 25 | function CanViewItemPowers(item: ItemLocation.ItemLocationMixin): boolean; 26 | 27 | /** 28 | * Needs summary 29 | * @param item 30 | * @see https://wow.gamepedia.com/API_C_Item.DoesItemExist 31 | * @since 8.0.1 (2018-07-17) 32 | */ 33 | function DoesItemExist(item: ItemLocation.ItemLocationMixin): boolean; 34 | 35 | /** 36 | * Needs summary 37 | * @param itemInfo 38 | * @see https://wow.gamepedia.com/API_C_Item.DoesItemExistByID 39 | * @since 8.0.1 (2018-07-17) 40 | */ 41 | function DoesItemExistByID(itemInfo: WoWAPI.Hyperlink | string | number): boolean; 42 | 43 | /** 44 | * Needs summary 45 | * @param item 46 | * @see https://wow.gamepedia.com/API_C_Item.DoesItemMatchBonusTreeReplacement 47 | * @since 9.0.1 (2020-10-13) 48 | */ 49 | function DoesItemMatchBonusTreeReplacement(item: ItemLocation.ItemLocationMixin): boolean; 50 | 51 | /** 52 | * Needs summary 53 | * @param item 54 | * @see https://wow.gamepedia.com/API_C_Item.GetCurrentItemLevel 55 | * @since 9.0.1 (2020-10-13) 56 | */ 57 | function GetCurrentItemLevel(item: ItemLocation.ItemLocationMixin): number | null; 58 | 59 | /** 60 | * Needs summary 61 | * @param item 62 | * @see https://wow.gamepedia.com/API_C_Item.GetItemGUID 63 | * @since 8.0.1 (2018-07-17) 64 | */ 65 | function GetItemGUID(item: ItemLocation.ItemLocationMixin): string; 66 | 67 | /** 68 | * Needs summary 69 | * @param item 70 | * @see https://wow.gamepedia.com/API_C_Item.GetItemIcon 71 | * @since 8.0.1 (2018-07-17) 72 | */ 73 | function GetItemIcon(item: ItemLocation.ItemLocationMixin): number | null; 74 | 75 | /** 76 | * Needs summary 77 | * @param itemInfo 78 | * @see https://wow.gamepedia.com/API_C_Item.GetItemIconByID 79 | * @since 8.0.1 (2018-07-17) 80 | */ 81 | function GetItemIconByID(itemInfo: WoWAPI.Hyperlink | string | number): number | null; 82 | 83 | /** 84 | * Needs summary 85 | * @param item 86 | * @see https://wow.gamepedia.com/API_C_Item.GetItemID 87 | * @since 8.0.1 (2018-07-17) 88 | */ 89 | function GetItemID(item: ItemLocation.ItemLocationMixin): number; 90 | 91 | /** 92 | * Needs summary 93 | * @param item 94 | * @see https://wow.gamepedia.com/API_C_Item.GetItemInventoryType 95 | * @since 8.0.1 (2018-07-17) 96 | */ 97 | function GetItemInventoryType(item: ItemLocation.ItemLocationMixin): Enum.InventoryType | null; 98 | 99 | /** 100 | * Needs summary 101 | * @param itemInfo 102 | * @see https://wow.gamepedia.com/API_C_Item.GetItemInventoryTypeByID 103 | * @since 8.0.1 (2018-07-17) 104 | */ 105 | function GetItemInventoryTypeByID(itemInfo: WoWAPI.Hyperlink | string | number): Enum.InventoryType | null; 106 | 107 | /** 108 | * Needs summary 109 | * @param item 110 | * @see https://wow.gamepedia.com/API_C_Item.GetItemLink 111 | * @since 8.0.1 (2018-07-17) 112 | */ 113 | function GetItemLink(item: ItemLocation.ItemLocationMixin): WoWAPI.Hyperlink | null; 114 | 115 | /** 116 | * Needs summary 117 | * @param item 118 | * @see https://wow.gamepedia.com/API_C_Item.GetItemName 119 | * @since 8.0.1 (2018-07-17) 120 | */ 121 | function GetItemName(item: ItemLocation.ItemLocationMixin): string | null; 122 | 123 | /** 124 | * Needs summary 125 | * @param itemInfo 126 | * @see https://wow.gamepedia.com/API_C_Item.GetItemNameByID 127 | * @since 8.0.1 (2018-07-17) 128 | */ 129 | function GetItemNameByID(itemInfo: WoWAPI.Hyperlink | string | number): string | null; 130 | 131 | /** 132 | * Needs summary 133 | * @param item 134 | * @see https://wow.gamepedia.com/API_C_Item.GetItemQuality 135 | * @since 8.0.1 (2018-07-17) 136 | */ 137 | function GetItemQuality(item: ItemLocation.ItemLocationMixin): Enum.ItemQuality | null; 138 | 139 | /** 140 | * Needs summary 141 | * @param itemInfo 142 | * @see https://wow.gamepedia.com/API_C_Item.GetItemQualityByID 143 | * @since 8.0.1 (2018-07-17) 144 | */ 145 | function GetItemQualityByID(itemInfo: WoWAPI.Hyperlink | string | number): Enum.ItemQuality | null; 146 | 147 | /** 148 | * Needs summary 149 | * @param item 150 | * @see https://wow.gamepedia.com/API_C_Item.GetStackCount 151 | * @since 8.3.0 (2020-01-14) 152 | */ 153 | function GetStackCount(item: ItemLocation.ItemLocationMixin): number; 154 | 155 | /** 156 | * Needs summary 157 | * @param item 158 | * @returns Whether or not the item is soul- or accountbound 159 | * @see https://wow.gamepedia.com/API_C_Item.IsBound 160 | * @since 8.0.1 (2018-07-17) 161 | */ 162 | function IsBound(item: ItemLocation.ItemLocationMixin): boolean; 163 | 164 | /** 165 | * Needs summary 166 | * @param item 167 | * @see https://wow.gamepedia.com/API_C_Item.IsItemDataCached 168 | * @since 8.0.1 (2018-07-17) 169 | */ 170 | function IsItemDataCached(item: ItemLocation.ItemLocationMixin): boolean; 171 | 172 | /** 173 | * Needs summary 174 | * @param itemInfo 175 | * @see https://wow.gamepedia.com/API_C_Item.IsItemDataCachedByID 176 | * @since 8.0.1 (2018-07-17) 177 | */ 178 | function IsItemDataCachedByID(itemInfo: WoWAPI.Hyperlink | string | number): boolean; 179 | 180 | /** 181 | * Needs summary 182 | * @param itemInfo 183 | * @see https://wow.gamepedia.com/API_C_Item.IsItemKeystoneByID 184 | * @since 9.0.1 (2020-10-13) 185 | */ 186 | function IsItemKeystoneByID(itemInfo: WoWAPI.Hyperlink | string | number): boolean; 187 | 188 | /** 189 | * Needs summary 190 | * @param item 191 | * @see https://wow.gamepedia.com/API_C_Item.IsItemDataCached 192 | * @since 8.0.1 (2018-07-17) 193 | */ 194 | function IsLocked(item: ItemLocation.ItemLocationMixin): boolean; 195 | 196 | /** 197 | * Needs summary 198 | * @param item 199 | * @see https://wow.gamepedia.com/API_C_Item.IsLocked 200 | * @since 8.0.1 (2018-07-17) 201 | */ 202 | function LockItem(item: ItemLocation.ItemLocationMixin): void; 203 | 204 | /** 205 | * Needs summary 206 | * @param itemGuid 207 | * @see https://wow.gamepedia.com/API_C_Item.LockItemByGUID 208 | * @since 8.0.1 (2018-07-17) 209 | */ 210 | function LockItemByGUID(itemGuid: string): void; 211 | 212 | /** 213 | * Needs summary 214 | * @param item 215 | * @see https://wow.gamepedia.com/API_C_Item.RequestLoadItemData 216 | * @since 8.0.1 (2018-07-17) 217 | */ 218 | function RequestLoadItemData(item: ItemLocation.ItemLocationMixin): void; 219 | 220 | /** 221 | * Needs summary 222 | * @param itemInfo 223 | * @see https://wow.gamepedia.com/API_C_Item.RequestLoadItemDataByID 224 | * @since 8.0.1 (2018-07-17) 225 | */ 226 | function RequestLoadItemDataByID(itemInfo: WoWAPI.Hyperlink | string | number): void; 227 | 228 | /** 229 | * Needs summary 230 | * @param item 231 | * @see https://wow.gamepedia.com/API_C_Item.UnlockItem 232 | * @since 8.0.1 (2018-07-17) 233 | */ 234 | function UnlockItem(item: ItemLocation.ItemLocationMixin): void; 235 | 236 | /** 237 | * Needs summary 238 | * @param itemGuid 239 | * @see https://wow.gamepedia.com/API_C_Item.UnlockItemByGUID 240 | * @since 8.3.0 (2020-01-14) 241 | */ 242 | function UnlockItemByGUID(itemGuid: string): void; 243 | 244 | } 245 | -------------------------------------------------------------------------------- /declarations/addon.d.ts: -------------------------------------------------------------------------------- 1 | /** @noSelfInFile */ 2 | 3 | /// 4 | 5 | declare namespace WoWAPI { 6 | /** 7 | * Addon is banned by the client 8 | */ 9 | type ADDON_LOAD_REASON_BANNED = "BANNED"; 10 | 11 | /** 12 | * The addon's file(s) are corrupt 13 | */ 14 | type ADDON_LOAD_REASON_CORRUPT = "CORRUPT"; 15 | 16 | /** 17 | * Addon's dependency is banned by the client 18 | */ 19 | type ADDON_LOAD_REASON_DEP_BANNED = "DEP_BANNED"; 20 | 21 | /** 22 | * The addon's dependency cannot load because its file(s) are corrupt 23 | */ 24 | type ADDON_LOAD_REASON_DEP_CORRUPT = "DEP_CORRUPT"; 25 | 26 | /** 27 | * The addon cannot load without its dependency enabled 28 | */ 29 | type ADDON_LOAD_REASON_DEP_DISABLED = "DEP_DISABLED"; 30 | 31 | /** 32 | * The addon cannot load if its dependency cannot load 33 | */ 34 | type ADDON_LOAD_REASON_DEP_INCOMPATIBLE = "DEP_INCOMPATIBLE"; 35 | 36 | /** 37 | * The addon's dependency is physically not there 38 | */ 39 | type ADDON_LOAD_REASON_DEP_MISSING = "DEP_MISSING"; 40 | 41 | /** 42 | * The addon's dependency must be loadable on demand too 43 | */ 44 | type ADDON_LOAD_REASON_DEP_NOT_DEMAND_LOADED = "DEP_NOT_DEMAND_LOADED"; 45 | 46 | /** 47 | * Addon is disabled on the character select screen 48 | */ 49 | type ADDON_LOAD_REASON_DISABLED = "DISABLED"; 50 | 51 | /** 52 | * The addon is too old. 53 | */ 54 | type ADDON_LOAD_REASON_INCOMPATIBLE = "INCOMPATIBLE"; 55 | 56 | /** 57 | * The addon is physically not there 58 | */ 59 | type ADDON_LOAD_REASON_MISSING = "MISSING"; 60 | 61 | /** 62 | * As of 1.8 only addons marked as LoadOnDemand can be loaded via this function 63 | */ 64 | type ADDON_LOAD_REASON_NOT_DEMAND_LOADED = "NOT_DEMAND_LOADED"; 65 | 66 | /** 67 | * Unknown, presumably the interface version in the .toc file is incorrect 68 | */ 69 | type ADDON_LOAD_REASON_INTERFACE_VERSION = "INTERFACE_VERSION"; 70 | 71 | /** 72 | * all possible load error reasons 73 | */ 74 | type ADDON_LOAD_REASON = ADDON_LOAD_REASON_BANNED | ADDON_LOAD_REASON_CORRUPT | ADDON_LOAD_REASON_DEP_BANNED | ADDON_LOAD_REASON_DEP_CORRUPT | 75 | ADDON_LOAD_REASON_DEP_DISABLED | ADDON_LOAD_REASON_DEP_INCOMPATIBLE | ADDON_LOAD_REASON_DEP_MISSING | 76 | ADDON_LOAD_REASON_DEP_NOT_DEMAND_LOADED | ADDON_LOAD_REASON_DISABLED | ADDON_LOAD_REASON_INCOMPATIBLE | ADDON_LOAD_REASON_MISSING | 77 | ADDON_LOAD_REASON_NOT_DEMAND_LOADED | ADDON_LOAD_REASON_INTERFACE_VERSION; 78 | } 79 | 80 | /** 81 | * Disable an AddOn for subsequent sessions 82 | * 83 | * @param index The index of the AddOn to disable in the user's AddOn list, from 1 to GetNumAddOns(). 84 | * @see https://wow.gamepedia.com/API_DisableAddOn 85 | */ 86 | declare function DisableAddOn(index: number): void; 87 | 88 | /** 89 | * Disable an AddOn for subsequent sessions 90 | * 91 | * @param name The name of the AddOn to be disabled 92 | * @param character The name of the character (without realm) for whom to disable the addon. Defaults to the current character 93 | * @see https://wow.gamepedia.com/API_DisableAddOn 94 | */ 95 | declare function DisableAddOn(name: string, character?: string): void; 96 | 97 | /** 98 | * Disable all AddOns for subsequent sessions 99 | * 100 | * @see https://wow.gamepedia.com/API_DisableAllAddOns 101 | */ 102 | declare function DisableAllAddOns(): void; 103 | 104 | /** 105 | * Enable an AddOn for subsequent sessions 106 | * 107 | * @param indexOrName The index of the AddOn to enable in the user's AddOn list OR The name of the AddOn to be enabled 108 | * @see https://wow.gamepedia.com/API_EnableAddOn 109 | */ 110 | declare function EnableAddOn(indexOrName: number | string): void; 111 | 112 | /** 113 | * Enable all AddOns for subsequent sessions 114 | * 115 | * @see https://wow.gamepedia.com/API_EnableAllAddOns 116 | */ 117 | declare function EnableAllAddOns(): void; 118 | 119 | /** 120 | * Get the required dependencies for an AddOn 121 | * 122 | * @param indexOrName The index of the AddOn in the user's AddOn list. Note that you cannot access Blizzard-provided AddOns through this mechanism. 123 | * OR The name of the AddOn to be queries. You can access Blizzard-provided AddOns through this mechanism 124 | * @returns Name of an addon the specified addon lists as a required dependency 125 | * @see https://wow.gamepedia.com/API_GetAddOnDependencies 126 | * @tupleReturn 127 | */ 128 | declare function GetAddOnDependencies(indexOrName: number | string): [...string[]]; 129 | 130 | /** 131 | * Unknown 132 | * 133 | * @param character Unknown 134 | * @param addonIndex Unknown 135 | * @see https://wow.gamepedia.com/API_GetAddOnEnableState 136 | */ 137 | declare function GetAddOnEnableState(character: WoWAPI.Unknown, addonIndex: WoWAPI.Unknown): WoWAPI.Unknown; 138 | 139 | /** 140 | * Get information about an AddOn 141 | * 142 | * @param indexOrName The index of the AddOn in the user's AddOn list. Note that you cannot access Blizzard-provided AddOns through this 143 | * mechanism OR The name of the AddOn to be queried. You can access Blizzard-provided AddOns through this mechanism 144 | * @returns name, title, notes, loadable, reason, security, newVersion 145 | * @see https://wow.gamepedia.com/API_GetAddOnInfo 146 | * @tupleReturn 147 | */ 148 | declare function GetAddOnInfo(indexOrName: number | string): [string, string, string, boolean, WoWAPI.ADDON_LOAD_REASON, string, boolean]; 149 | 150 | /** 151 | * get addon metadata from the toc file 152 | * 153 | * @param addonNameOrIndex Addon name to look up metadata for 154 | * @param field Field name. May be Title, Notes, Author, Version, or anything starting with X- 155 | * @returns The value of the field, nil if not defined. 156 | * @see https://wow.gamepedia.com/API_GetAddOnMetadata 157 | */ 158 | declare function GetAddOnMetadata(addonNameOrIndex: string | number, field: string): string | null; 159 | 160 | /** 161 | * Returns a list of optional dependencies 162 | * 163 | * @param indexOrName The index of the AddOn in the user's AddOn list. Note that you cannot access Blizzard-provided AddOns through this mechanism. 164 | * OR The name of the AddOn to be queries. You can access Blizzard-provided AddOns through this mechanism 165 | * @see https://wow.gamepedia.com/API_GetAddOnOptionalDependencies 166 | * @tupleReturn 167 | */ 168 | declare function GetAddOnOptionalDependencies(indexOrName: number | string): [...string[]]; 169 | 170 | /** 171 | * Get the number of user supplied AddOns 172 | * 173 | * @see https://wow.gamepedia.com/API_GetNumAddOns 174 | */ 175 | declare function GetNumAddOns(): number; 176 | 177 | /** 178 | * Returns whether an addon has been loaded 179 | * 180 | * @param indexOrName The index of the addon in the user's addon list. You cannot query Blizzard-provided AddOns using this parameter OR 181 | * The name of the addon to be queried. You can query Blizzard-provided addon using this parameter 182 | * @returns loaded, finished 183 | * @see https://wow.gamepedia.com/API_IsAddOnLoaded 184 | * @tupleReturn 185 | */ 186 | declare function IsAddOnLoaded(indexOrName: number | string): [WoWAPI.Flag, WoWAPI.Flag]; 187 | 188 | /** 189 | * Determine if an AddOn is loaded on demand (via .toc file dependencies or LoadAddOn) rather than at startup 190 | * 191 | * @param indexOrName The index of the AddOn in the user's AddOn list. Note that you cannot access Blizzard-provided AddOns through this mechanism. 192 | * OR The name of the AddOn to be queries. You can access Blizzard-provided AddOns through this mechanism 193 | * @returns Indicates if the AddOn is loaded on demand, 1 if it is, nil if it is loaded on startup 194 | * @see https://wow.gamepedia.com/API_IsAddOnLoadOnDemand 195 | */ 196 | declare function IsAddOnLoadOnDemand(indexOrName: number | string): WoWAPI.Flag; 197 | 198 | /** 199 | * Request the loading of an On-Demand AddOn 200 | * 201 | * @param indexOrName The index of the AddOn in the user's AddOn list. Note that you cannot access Blizzard-provided AddOns through this mechanism. 202 | * OR The name of the AddOn to be queries. You can access Blizzard-provided AddOns through this mechanism 203 | * @returns loaded, reason 204 | * @see https://wow.gamepedia.com/API_LoadAddOn 205 | * @tupleReturn 206 | */ 207 | declare function LoadAddOn(indexOrName: number | string): [WoWAPI.Flag, WoWAPI.ADDON_LOAD_REASON]; 208 | -------------------------------------------------------------------------------- /declarations/characterStatistics.d.ts: -------------------------------------------------------------------------------- 1 | /** @noSelfInFile */ 2 | 3 | declare const CR_DEFENSE_SKILL = 2; 4 | declare const CR_DODGE = 3; 5 | declare const CR_PARRY = 4; 6 | declare const CR_BLOCK = 5; 7 | declare const CR_HIT_MELEE = 6; 8 | declare const CR_HIT_RANGED = 7; 9 | declare const CR_HIT_SPELL = 8; 10 | declare const CR_CRIT_MELEE = 9; 11 | declare const CR_CRIT_RANGED = 10; 12 | declare const CR_CRIT_SPELL = 11; 13 | declare const CR_MULTISTRIKE = 12; 14 | declare const CR_READINESS = 13; 15 | declare const CR_SPEED = 14; 16 | declare const COMBAT_RATING_RESILIENCE_CRIT_TAKEN = 15; 17 | declare const COMBAT_RATING_RESILIENCE_PLAYER_DAMAGE_TAKEN = 16; 18 | declare const CR_LIFESTEAL = 17; 19 | declare const CR_HASTE_MELEE = 18; 20 | declare const CR_HASTE_RANGED = 19; 21 | declare const CR_HASTE_SPELL = 20; 22 | declare const CR_AVOIDANCE = 21; 23 | declare const CR_WEAPON_SKILL_RANGED = 23; 24 | declare const CR_EXPERTISE = 24; 25 | declare const CR_ARMOR_PENETRATION = 25; 26 | declare const CR_MASTERY = 26; 27 | declare const CR_VERSATILITY_DAMAGE_DONE = 29; 28 | declare const CR_VERSATILITY_DAMAGE_TAKEN = 31; 29 | 30 | declare namespace WoWAPI { 31 | 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; 32 | } 33 | 34 | /** 35 | * Returns attack power granted by particular amount of a particular stat 36 | * @param statIndex Index of the stat (Strength, Agility, ...) to check the bonus AP of 37 | * @param amount Amount of the stat to check the AP value of 38 | * @returns Amount of attack power granted by the specified amount of the specified stat 39 | * @see https://wow.gamepedia.com/API_GetAttackPowerForStat 40 | */ 41 | declare function GetAttackPowerForStat(statIndex: number, amount: number): number; 42 | 43 | /** 44 | * Player's block chance in percentage 45 | * @see https://wow.gamepedia.com/API_GetBlockChance 46 | */ 47 | declare function GetBlockChance(): number; 48 | 49 | /** 50 | * Returns the number of points of a specific combat rating the player has 51 | * @param combatRatingIdentifier A combat rating identifier from PaperDollFrame.lua 52 | * @see https://wow.gamepedia.com/API_GetCombatRating 53 | */ 54 | declare function GetCombatRating(combatRatingIdentifier: WoWAPI.CombatRatingIdentifier): number; 55 | 56 | /** 57 | * Returns the bonus, in percent (or other converted units, such as skill points), of a specific combat rating for the player 58 | * @param combatRatingIdentifier A combat rating identifier from PaperDollFrame.lua 59 | * @see https://wow.gamepedia.com/API_GetCombatRatingBonus 60 | */ 61 | declare function GetCombatRatingBonus(combatRatingIdentifier: WoWAPI.CombatRatingIdentifier): number; 62 | 63 | /** 64 | * Returns the player's critical hit chance 65 | * @returns The player's melee critical hit chance, as a percentage; e.g. 5.3783211 corresponding to a ~5.38% crit chance 66 | * @see https://wow.gamepedia.com/API_GetCritChance 67 | */ 68 | declare function GetCritChance(): number; 69 | 70 | /** 71 | * Returns the player's dodge change 72 | * @see https://wow.gamepedia.com/API_GetDodgeChance 73 | */ 74 | declare function GetDodgeChance(): number; 75 | 76 | /** 77 | * Returns the player's expertise percentage for main hand, offhand and ranged attacks 78 | * - **arg1**: Expertise percentage for swings with your main hand weapon 79 | * - **arg2**: Expertise percentage for swings with your offhand weapon 80 | * - **arg3**: Expertise percentage for your ranged weapon 81 | * @description Expertise reduces the chance that the player's attacks are dodged or parried by an enemy. 82 | * 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 83 | * 3.5% reduction to both dodge and parry probabilities). 84 | * @see https://wow.gamepedia.com/API_GetExpertise 85 | * @tupleReturn 86 | */ 87 | declare function GetExpertise(): [number, number, number]; 88 | 89 | /** 90 | * Returns the player's haste 91 | */ 92 | declare function GetHaste(): number; 93 | 94 | /** 95 | * Returns the amount of Melee Hit %, not from Melee Hit Rating, that your character has 96 | * @returns hit modifier (e.g. 16 for 16%) 97 | * @see https://wow.gamepedia.com/API_GetHitModifier 98 | */ 99 | declare function GetHitModifier(): number; 100 | 101 | /** 102 | * Gets the player's current mana regeneration rates (in mana per 1 seconds). 103 | * - **arg1**: mana regeneration when not casting spells 104 | * - **arg2**: mana regeneration while casting spells 105 | * @see https://wow.gamepedia.com/API_GetManaRegen 106 | * @tupleReturn 107 | */ 108 | declare function GetManaRegen(): [number, number]; 109 | 110 | /** 111 | * Returns the (raw) mastery of the player 112 | * @returns sum of player's base and rating bonus mastery 113 | * @description Mastery does not suffer diminishing returns, but the value returns by GetMastery is not, necessarily, your final Mastery value. 114 | * Different classes, in different forms, can have a multiplier performed against the value returned by GetMastery. To find your true Mastery, 115 | * and the multiplier factor used to calculate it, see GetMasteryEffect 116 | * @see https://wow.gamepedia.com/API_GetMastery 117 | */ 118 | declare function GetMastery(): number; 119 | 120 | /** 121 | * Returns the effect of player's current Mastery 122 | * - **arg1**: Current effect of the player's mastery, typically a damage increase percentage, or a percentage chance to trigger some 123 | * specialization-specific effect 124 | * - **arg2**: A spec-dependent coefficient multiplied onto the player's raw mastery effect (as returned by GetMastery) to yield the actual 125 | * effect of the mastery 126 | * @see https://wow.gamepedia.com/API_GetMasteryEffect 127 | * @since 5.0.4 128 | * @tupleReturn 129 | */ 130 | declare function GetMasteryEffect(): [number, number]; 131 | 132 | /** 133 | * unknown 134 | * @param combatRatingIdentifier unknown 135 | */ 136 | declare function GetMaxCombatRatingBonus(combatRatingIdentifier: WoWAPI.CombatRatingIdentifier): WoWAPI.Unknown; 137 | 138 | /** 139 | * Returns player's Melee attack haste 140 | */ 141 | declare function GetMeleeHaste(): WoWAPI.Unknown; 142 | 143 | /** 144 | * unknown 145 | */ 146 | declare function GetModResilienceDamageReduction(): WoWAPI.Unknown; 147 | 148 | /** 149 | * unknown 150 | */ 151 | declare function GetOverrideAPBySpellPower(): WoWAPI.Unknown; 152 | 153 | /** 154 | * unknown 155 | */ 156 | declare function GetOverrideSpellPowerByAP(...args: WoWAPI.Unknown[]): WoWAPI.Unknown; 157 | 158 | /** 159 | * Player's parry chance in percentage 160 | * @see https://wow.gamepedia.com/API_GetParryChance 161 | */ 162 | declare function GetParryChance(): number; 163 | 164 | /** 165 | * unknown 166 | */ 167 | declare function GetPetMeleeHaste(): WoWAPI.Unknown; 168 | 169 | /** 170 | * unknown 171 | */ 172 | declare function GetPetSpellBonusDamage(): WoWAPI.Unknown; 173 | 174 | /** 175 | * unknown 176 | */ 177 | declare function GetPowerRegenForPowerType(powerType: WoWAPI.UnitPowerType): WoWAPI.Unknown; 178 | 179 | /** 180 | * The players critical strike chance with the currently equipped range weapon as a floating point figure 181 | * @description If you are displaying this figure in a UI element and want it to update, hook to the UNIT_INVENTORY_CHANGED and 182 | * SPELLS_CHANGED events as well as any other that effect equipment and buffs 183 | * @see https://wow.gamepedia.com/API_GetRangedCritChance 184 | */ 185 | declare function GetRangedCritChance(): number; 186 | 187 | /** 188 | * Returns the percentage of damage blocked by your shield 189 | * @returns the percentage of damage reduced your shield 190 | * @see https://wow.gamepedia.com/API_GetShieldBlock 191 | */ 192 | declare function GetShieldBlock(): number; 193 | 194 | /** 195 | * Returns the raw spell damage bonus of the player for a given spell tree 196 | * @param spellTreeId the spell tree 197 | * - 1 for Physical 198 | * - 2 for Holy 199 | * - 3 for Fire 200 | * - 4 for Nature 201 | * - 5 for Frost 202 | * - 6 for Shadow 203 | * - 7 for Arcane 204 | * @see https://wow.gamepedia.com/API_GetSpellBonusDamage 205 | */ 206 | declare function GetSpellBonusDamage(spellTreeId: WoWAPI.SpellTreeId): number; 207 | 208 | /** 209 | * Returns the raw bonus healing of the player 210 | * @returns The raw bonus healing of the player 211 | * @see https://wow.gamepedia.com/API_GetSpellBonusHealing 212 | */ 213 | declare function GetSpellBonusHealing(): number; 214 | 215 | /** 216 | * Returns the amount of Spell Hit %, not from Spell Hit Rating, that your character has 217 | * @returns hit modifier (e.g. 16 for 16%) 218 | * @see https://wow.gamepedia.com/API_GetSpellHitModifier 219 | * @since 4.0.1 220 | */ 221 | declare function GetSpellHitModifier(): number; 222 | 223 | /** 224 | * unknown 225 | */ 226 | declare function GetSpellPenetration(): WoWAPI.Unknown; 227 | -------------------------------------------------------------------------------- /declarations/archaeology.d.ts: -------------------------------------------------------------------------------- 1 | /** @noSelfInFile */ 2 | 3 | /// 4 | /// 5 | 6 | declare namespace WoWAPI { 7 | type ARCHAELOLOGY_RARITY_COMMON = 0; 8 | type ARCHAELOLOGY_RARITY_RARE = 1; 9 | type ARCHAELOLOGY_RARITY = ARCHAELOLOGY_RARITY_COMMON | ARCHAELOLOGY_RARITY_RARE; 10 | 11 | type ARCHAELOLOGY_BRANCH_DWARF = 1; 12 | type ARCHAELOLOGY_BRANCH_DRAENEI = 2; 13 | type ARCHAELOLOGY_BRANCH_FOSSIL = 3; 14 | type ARCHAELOLOGY_BRANCH_NIGHT_ELF = 4; 15 | type ARCHAELOLOGY_BRANCH_NERUBIAN = 5; 16 | type ARCHAELOLOGY_BRANCH_ORC = 6; 17 | type ARCHAELOLOGY_BRANCH_TOL_VIR = 7; 18 | type ARCHAELOLOGY_BRANCH_TROLL = 8; 19 | type ARCHAELOLOGY_BRANCH_VRYKUL = 27; 20 | type ARCHAELOLOGY_BRANCH_MANTID = 29; 21 | type ARCHAELOLOGY_BRANCH_PANDAREN = 229; 22 | type ARCHAELOLOGY_BRANCH_MOGU = 231; 23 | type ARCHAELOLOGY_BRANCH_ARAKKOA = 315; 24 | type ARCHAELOLOGY_BRANCH_DRAENOR_CLANS = 350; 25 | type ARCHAELOLOGY_BRANCH_OGRE = 382; 26 | type ARCHAELOLOGY_BRANCH_HIGHBORNE = 404; 27 | type ARCHAELOLOGY_BRANCH_HIGHMOUNTAIN_TAUREN = 406; 28 | type ARCHAELOLOGY_BRANCH_DEMONIC = 408; 29 | 30 | /** 31 | * all currently known branches 32 | */ 33 | type ARCHAELOLOGY_BRANCH = ARCHAELOLOGY_BRANCH_DWARF | ARCHAELOLOGY_BRANCH_DRAENEI | ARCHAELOLOGY_BRANCH_FOSSIL | 34 | ARCHAELOLOGY_BRANCH_NIGHT_ELF | ARCHAELOLOGY_BRANCH_NERUBIAN | ARCHAELOLOGY_BRANCH_ORC | ARCHAELOLOGY_BRANCH_TOL_VIR | 35 | ARCHAELOLOGY_BRANCH_TROLL | ARCHAELOLOGY_BRANCH_VRYKUL | ARCHAELOLOGY_BRANCH_MANTID | ARCHAELOLOGY_BRANCH_PANDAREN | 36 | ARCHAELOLOGY_BRANCH_MOGU | ARCHAELOLOGY_BRANCH_ARAKKOA | ARCHAELOLOGY_BRANCH_DRAENOR_CLANS | ARCHAELOLOGY_BRANCH_OGRE | 37 | ARCHAELOLOGY_BRANCH_HIGHBORNE | ARCHAELOLOGY_BRANCH_HIGHMOUNTAIN_TAUREN | ARCHAELOLOGY_BRANCH_DEMONIC; 38 | 39 | } 40 | 41 | /** 42 | * Returns how many digsites are in a zone like Azsuna or Elwynn Forest 43 | * 44 | * @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 45 | * @see https://wow.gamepedia.com/API_ArchaeologyMapUpdateAll 46 | * @since 5.4.0 47 | */ 48 | declare function ArchaeologyMapUpdateAll(): number; 49 | 50 | /** 51 | * Unknown 52 | * 53 | * @param index Unknown 54 | * @see https://wow.gamepedia.com/API_ArchaeologyGetIconInfo 55 | * @since 4.0.0 56 | */ 57 | declare function ArchaeologyGetIconInfo(index: WoWAPI.Unknown): WoWAPI.Unknown; 58 | 59 | /** 60 | * Returns 1 if item could be added to the selected artifact 61 | * 62 | * @param itemId Unknown 63 | * @see https://wow.gamepedia.com/API_CanItemBeSocketedToArtifact 64 | * @since 4.0.0 65 | */ 66 | declare function CanItemBeSocketedToArtifact(itemId: number): WoWAPI.Flag; 67 | 68 | /** 69 | * Returns whether the player is currently on a digsite 70 | * 71 | * @returns true if the player is currently on a digsite (and can use [Survey]), false otherwise 72 | * @see https://wow.gamepedia.com/API_CanScanResearchSite 73 | * @since 5.4.0 74 | */ 75 | declare function CanScanResearchSite(): boolean; 76 | 77 | /** 78 | * Return true if artifact can be solved 79 | * 80 | * @see https://wow.gamepedia.com/API_CanSolveArtifact 81 | * @since 4.0.0 82 | */ 83 | declare function CanSolveArtifact(): boolean; 84 | 85 | /** 86 | * Unknown 87 | * 88 | * @see https://wow.gamepedia.com/API_CloseResearch 89 | * @since 4.0.0 90 | */ 91 | declare function CloseResearch(): WoWAPI.Unknown; 92 | 93 | /** 94 | * Returns the information for a specific race's active artifact 95 | * 96 | * @param raceIndex Index of the race to pick the artifact from 97 | * @returns artifactName, artifactDescription, artifactRarity, artifactIcon, hoverDescription, keystoneCount, bgTexture 98 | * @see https://wow.gamepedia.com/API_GetActiveArtifactByRace 99 | * @since 4.0.0 100 | * @tupleReturn 101 | */ 102 | // tslint:disable-next-line max-line-length 103 | declare function GetActiveArtifactByRace(raceIndex: number): [string, string, WoWAPI.ARCHAELOLOGY_RARITY, WoWAPI.TexturePath, string, number, WoWAPI.TexturePath]; 104 | 105 | /** 106 | * Returns the localized name for Archaeology 107 | * 108 | * @returns Localized name of the Archaeology secondary skill 109 | * @see https://wow.gamepedia.com/API_GetArchaeologyInfo 110 | * @since 4.0.0 111 | */ 112 | declare function GetArchaeologyInfo(): string; 113 | 114 | /** 115 | * Returns the information for a specific race used in Archaeology 116 | * 117 | * @param raceIndex Index of the race to query, between 1 and GetNumArchaeologyRaces(). 118 | * @returns raceName, raceTexture, raceItemID, numFragmentsCollected, numFragmentsRequired, maxFragments 119 | * @see https://wow.gamepedia.com/API_GetArchaeologyRaceInfo 120 | * @since 4.0.0 121 | * @tupleReturn 122 | */ 123 | declare function GetArchaeologyRaceInfo(raceIndex: number): [string, WoWAPI.TexturePath, number, number, number, number]; 124 | 125 | /** 126 | * Returns information about a branch of Archaeology 127 | * 128 | * @param branchId ID of the research branch (race) to query. 129 | * @returns raceName, raceTextureID, raceItemID, numFragmentsCollected, numFragmentsRequired, maxFragments 130 | * @see https://wow.gamepedia.com/API_GetArchaeologyRaceInfoByID 131 | * @since 5.4.0 132 | * @tupleReturn 133 | */ 134 | declare function GetArchaeologyRaceInfoByID(branchId: WoWAPI.ARCHAELOLOGY_BRANCH): [string, WoWAPI.TexturePath, number, number, number, number]; 135 | 136 | /** 137 | * Returns the information for a specific race's artifact 138 | * 139 | * @param raceIndex Index of the race to pick the artifact from 140 | * @param artifactIndex Index of the artifact 141 | * @returns artifactName, artifactDescription, artifactRarity, artifactIcon, hoverDescription, keystoneCount, bgTexture, firstCompletionTime, completionCount 142 | * @see https://wow.gamepedia.com/API_GetArtifactInfoByRace 143 | * @since 4.0.0 144 | * @tupleReturn 145 | */ 146 | // tslint:disable-next-line max-line-length 147 | declare function GetArtifactInfoByRace(raceIndex: number, artifactIndex: number): [string, string, WoWAPI.ARCHAELOLOGY_RARITY, WoWAPI.TexturePath, string, number, WoWAPI.TexturePath, number, number]; 148 | 149 | /** 150 | * Returns the number of Archaeology races in the game 151 | * 152 | * @returns The number of Archaeology races in the game 153 | * @see https://wow.gamepedia.com/API_GetNumArchaeologyRaces 154 | * @since 4.0.0 155 | */ 156 | declare function GetNumArchaeologyRaces(): number; 157 | 158 | /** 159 | * Returns the amount of artifacts the player has acquired from the provided race. 160 | * 161 | * @param raceIndex Index of the race to be selected. 162 | * @returns Number of artifacts for that race 163 | * @see https://wow.gamepedia.com/API_GetNumArtifactsByRace 164 | * @since 4.0.0 165 | */ 166 | declare function GetNumArtifactsByRace(raceIndex: number): number; 167 | 168 | /** 169 | * Returns the information for the selected race's current archaeology artifact 170 | * 171 | * @returns artifactName, artifactDescription, artifactRarity, artifactIcon, hoverDescription, keystoneCount, bgTexture, spellId 172 | * @see https://wow.gamepedia.com/API_GetSelectedArtifactInfo 173 | * @since 4.0.0 174 | * @tupleReturn 175 | */ 176 | declare function GetSelectedArtifactInfo(): [string, string, WoWAPI.ARCHAELOLOGY_RARITY, WoWAPI.TexturePath, string, number, WoWAPI.TexturePath, number]; 177 | 178 | /** 179 | * Returns information about current used fragments for the selected artifact 180 | * 181 | * @returns numFragmentsCollected, numFragmentsAdded, numFragmentsRequired 182 | * @see https://wow.gamepedia.com/API_GetArtifactProgress 183 | * @since 4.0.0 184 | * @tupleReturn 185 | */ 186 | declare function GetArtifactProgress(): [number, number, number]; 187 | 188 | /** 189 | * Unknown 190 | * 191 | * @param args Unknown 192 | * @see https://wow.gamepedia.com/API_IsArtifactCompletionHistoryAvailable 193 | * @since 4.0.0 194 | */ 195 | declare function IsArtifactCompletionHistoryAvailable(...args: WoWAPI.Unknown[]): WoWAPI.Unknown; 196 | 197 | /** 198 | * Returns if there is a keystone in the artifact 199 | * 200 | * @param keystoneIndex Unknown 201 | * @see https://wow.gamepedia.com/API_ItemAddedToArtifact 202 | * @since 4.0.0 203 | */ 204 | declare function ItemAddedToArtifact(keystoneIndex: WoWAPI.Unknown): WoWAPI.Unknown; 205 | 206 | /** 207 | * Set the artifact-pointer to raceIndex 208 | * 209 | * @param raceIndex Index of the race to select 210 | * @see https://wow.gamepedia.com/API_SetSelectedArtifact 211 | * @since 4.0.0 212 | */ 213 | declare function SetSelectedArtifact(raceIndex: number): void; 214 | 215 | /** 216 | * Remove a Keystone from the selected artifact 217 | * 218 | * @returns True if the keystone is successfully removed 219 | * @see https://wow.gamepedia.com/API_RemoveItemFromArtifact 220 | * @since 4.0.0 221 | */ 222 | declare function RemoveItemFromArtifact(): boolean; 223 | 224 | /** 225 | * Queries the server for archeology data. RESEARCH_ARTIFACT_HISTORY_READY is fired when data is available 226 | * 227 | * @event RESEARCH_ARTIFACT_HISTORY_READY 228 | * @see https://wow.gamepedia.com/API_RequestArtifactCompletionHistory 229 | * @since 4.0.0 230 | */ 231 | declare function RequestArtifactCompletionHistory(): void; 232 | 233 | /** 234 | * Socked a Keystone to the selected artifact 235 | * 236 | * @returns True if the keystone is successfully added 237 | * @see https://wow.gamepedia.com/API_SocketItemToArtifact 238 | * @since 4.0.0 239 | */ 240 | declare function SocketItemToArtifact(): boolean; 241 | 242 | /** 243 | * Solve the selected artifact 244 | * 245 | * @see https://wow.gamepedia.com/API_SolveArtifact 246 | * @since 4.0.0 247 | */ 248 | declare function SolveArtifact(): WoWAPI.Unknown; 249 | -------------------------------------------------------------------------------- /declarations/character.d.ts: -------------------------------------------------------------------------------- 1 | /** @noSelfInFile */ 2 | 3 | declare namespace WoWAPI { 4 | type CharacterTotemElementType = 1 | 2 | 3 | 4; 5 | type CharacterRestState = 0 | 1; 6 | type CharacterDeathkightRuneType = 0 | 1 | 2 | 3 | 4 | 5 | 6; 7 | } 8 | 9 | /** 10 | * Accepts a resurrection, returning the character to life 11 | * @description Most player-sponsored resurrection offers expire automatically after 60 seconds 12 | * @see https://wow.gamepedia.com/API_AcceptResurrect 13 | */ 14 | declare function AcceptResurrect(): void; 15 | 16 | /** 17 | * Accept the durability loss / resurrection sickness when being resurrected by the spirit healer 18 | * @description Name is misleading: you no longer lose XP when you use the spirit healer. You're really accepting 25% durability penalty 19 | * and (if over level 10) resurrection sickness 20 | * @see https://wow.gamepedia.com/API_AcceptXPLoss 21 | */ 22 | declare function AcceptXPLoss(): void; 23 | 24 | /** 25 | * Declines a resurrection offer 26 | * @see https://wow.gamepedia.com/API_DeclineResurrect 27 | */ 28 | declare function DeclineResurrect(): void; 29 | 30 | /** 31 | * Destroys a totem/minion 32 | * @param slot The totem type to be destroyed, where Fire is 1, Earth is 2, Water is 3 and Air is 4. 33 | * @event PLAYER_TOTEM_UPDATE 34 | * @protected 35 | * @deprecated 36 | * @see https://wow.gamepedia.com/API_DestroyTotem 37 | */ 38 | declare function DestroyTotem(slot: WoWAPI.CharacterTotemElementType): void; 39 | 40 | /** 41 | * Finds the subzone the player's Hearthstone is set to 42 | * @returns Returns the String name of the subzone the player's Hearthstone is set to, e.g. "Tarren Mill", "Crossroads", or "Brill". 43 | * @see https://wow.gamepedia.com/API_GetBindLocation 44 | */ 45 | declare function GetBindLocation(): string; 46 | 47 | /** 48 | * Retrieves the number of combo points gained by a player 49 | * @param unitId Either "player" or "vehicle". 50 | * @param target Normally "target", but can be any valid UnitId 51 | * @deprecated Combo Points for rogues are now shared across all targets and they are no longer lost when switching targets. GetComboPoints 52 | * will return 0 if target is friendly or not found. Use UnitPower(unitId, 4) to get combo points without an enemy targeted 53 | * @see https://wow.gamepedia.com/API_GetComboPoints 54 | */ 55 | declare function GetComboPoints(unitId: WoWAPI.UnitId, target: WoWAPI.UnitId): number; 56 | 57 | /** 58 | * Returns the integer of the title currently selected by the player 59 | * @see https://wow.gamepedia.com/API_GetCurrentTitle 60 | */ 61 | declare function GetCurrentTitle(): number; 62 | 63 | /** 64 | * Gives information about the mirror bar. (Spirit release, exhaustion/fatigue, etc) 65 | * @param timerIndex timer index, from 1 to MIRRORTIMER_NUMTIMERS (3 as of 3.2). In general, the following correspondence holds: 66 | * 1 = Fatigue, 2 = Breath, 3 = Feign Death 67 | * @see https://wow.gamepedia.com/API_GetMirrorTimerInfo 68 | * @tupleReturn 69 | */ 70 | declare function GetMirrorTimerInfo(timerIndex: number): [string, number, number, number, WoWAPI.Flag, string]; 71 | 72 | /** 73 | * Returns the current value of a mirror timer (fatigue, breath, feign death etc). 74 | * @param timerIndex the first return value from GetMirrorTimerInfo, identifying the timer queried. Valid values include "EXHAUSTION", "BREATH" 75 | * and "FEIGNDEATH". 76 | * @returns current value of the timer. If the timer is not active, 0 is returned 77 | * @see https://wow.gamepedia.com/API_GetMirrorTimerProgress 78 | */ 79 | declare function GetMirrorTimerProgress(timerIndex: number): number; 80 | 81 | /** 82 | * Returns an integer value of your held money 83 | * @returns The amount of money the player's character has, in copper 84 | * @see https://wow.gamepedia.com/API_GetMoney 85 | */ 86 | declare function GetMoney(): number; 87 | 88 | /** 89 | * Gets the highest number in the Title index 90 | * @returns The last number in the TitleId index 91 | * @see https://wow.gamepedia.com/API_GetNumTitles 92 | */ 93 | declare function GetNumTitles(): number; 94 | 95 | /** 96 | * Checks to see if the player has enabled PvP ("Permaflagged") 97 | * @returns 1 if the player has selected to be PvP flagged, 0 otherwise 98 | * @see https://wow.gamepedia.com/API_GetPVPDesired 99 | */ 100 | declare function GetPVPDesired(): WoWAPI.Flag; 101 | 102 | /** 103 | * retrieve the ranged crit chance as a two-decimal float 104 | * @returns The players critical strike chance with the currently equipped range weapon as a floating point figure 105 | * @see https://wow.gamepedia.com/API_GetRangedCritChance 106 | */ 107 | declare function GetRangedCritChance(): number; 108 | 109 | /** 110 | * Returns whether the player is in a rested (earning double XP for kills) or normal state 111 | * @see https://wow.gamepedia.com/API_GetRestState 112 | * @tupleReturn 113 | */ 114 | declare function GetRestState(): [WoWAPI.CharacterRestState, string, number]; 115 | 116 | /** 117 | * Gets the cooldown information about a Death Knight's Rune 118 | * @param runeId A number between 1 and 6 denoting which rune to be queried 119 | * @see https://wow.gamepedia.com/API_GetRuneCooldown 120 | * @tupleReturn 121 | */ 122 | declare function GetRuneCooldown(runeId: WoWAPI.CharacterDeathkightRuneType): [number, number, boolean]; 123 | 124 | /** 125 | * Gets the name of the title associated with a title index 126 | * @param titleId Title ID to return the name of 127 | * @since 2.0.1 128 | * @see https://wow.gamepedia.com/API_GetTitleName 129 | * @tupleReturn 130 | */ 131 | declare function GetTitleName(titleId: number): [string, boolean]; 132 | 133 | /** 134 | * Returns the number of XP gained from killing mobs until "player" goes from rest state to normal state 135 | * @returns Number (if player is "rested"), null (if player is "normal") 136 | * @see https://wow.gamepedia.com/API_GetXPExhaustion 137 | */ 138 | declare function GetXPExhaustion(): number | null; 139 | 140 | /** 141 | * Checks whether you have full control over your character (i.e. you are not feared, etc) 142 | * @see https://wow.gamepedia.com/API_HasFullControl 143 | */ 144 | declare function HasFullControl(): boolean; 145 | 146 | /** 147 | * Returns whether or not, and how, your character can self-resurrect 148 | * @returns the type of self-resurrect available to your character (known values are "Use Soulstone", "Reincarnate", and "Twisting Nether") 149 | * or nil if none are available 150 | * @see https://wow.gamepedia.com/API_HasSoulstone 151 | */ 152 | declare function HasSoulstone(): string | null; 153 | 154 | /** 155 | * Checks if the character is currently falling 156 | * @returns true if the character is currently falling, false otherwise 157 | * @see https://wow.gamepedia.com/API_IsFalling 158 | */ 159 | declare function IsFalling(): boolean; 160 | 161 | /** 162 | * Checks whether the player is currently flying 163 | * @returns true if the character is currently flying, false otherwise 164 | * @since 2.0.1 165 | * @see https://wow.gamepedia.com/API_IsFlying 166 | */ 167 | declare function IsFlying(): boolean; 168 | 169 | /** 170 | * Checks if the character's current location is classified as being a flyable area 171 | * @returns true if the area is classified as flyable, false otherwise 172 | * @see https://wow.gamepedia.com/API_IsFlyableArea 173 | */ 174 | declare function IsFlyableArea(): boolean; 175 | 176 | /** 177 | * Returns whether the player's character is currently indoors. Most mounts are not usable indoors 178 | * @returns true if the character is currently indoors, false otherwise 179 | * @see https://wow.gamepedia.com/API_IsIndoors 180 | */ 181 | declare function IsIndoors(): boolean; 182 | 183 | /** 184 | * Checks to see if the player is mounted or not 185 | * @returns true if the character is currently mounted, false otherwise 186 | * @see https://wow.gamepedia.com/API_IsMounted 187 | */ 188 | declare function IsMounted(): boolean; 189 | 190 | /** 191 | * Returns whether the player's character is currently outdoors 192 | * @returns true if the character is currently outdoors, false otherwise. 193 | * @see https://wow.gamepedia.com/API_IsOutdoors 194 | */ 195 | declare function IsOutdoors(): boolean; 196 | 197 | /** 198 | * Returns whether the player's character is currently outside of the map 199 | * @returns 1 if the player's character is currently outside of the map, nil otherwise 200 | * @description Players may end up outside of a map's bounds (and therefore dead) both as a consequence of geometry errors and normal world 201 | * 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 202 | * @see https://wow.gamepedia.com/API_IsOutOfBounds 203 | */ 204 | declare function IsOutOfBounds(): boolean; 205 | 206 | /** 207 | * Checks to see if Player is resting 208 | * @returns Whether the player is resting 209 | * @see https://wow.gamepedia.com/API_IsResting 210 | */ 211 | declare function IsResting(): boolean; 212 | 213 | /** 214 | * Checks to see if Player is stealthed 215 | * @returns true if stealthed, otherwise false 216 | * @see https://wow.gamepedia.com/API_IsStealthed 217 | */ 218 | declare function IsStealthed(): boolean; 219 | 220 | /** 221 | * Returns whether the player character is swimming 222 | * @returns 1 if the player is swimming, nil otherwise. 223 | * @see https://wow.gamepedia.com/API_IsSwimming 224 | */ 225 | declare function IsSwimming(): boolean; 226 | 227 | /** 228 | * Generates an error message saying you cannot do that while dead 229 | * @event UI_ERROR_MESSAGE 230 | * @see https://wow.gamepedia.com/API_NotWhileDeadError 231 | */ 232 | declare function NotWhileDeadError(): void; 233 | 234 | /** 235 | * Resurrects when the player is standing near its corpse 236 | * @see https://wow.gamepedia.com/API_RetrieveCorpse 237 | */ 238 | declare function RetrieveCorpse(): void; 239 | 240 | /** 241 | * Changes your character's displayed title 242 | * @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. 243 | * Invalid or unlearned values clear your title. See TitleId for a list 244 | * @requires HARDWARE_EVENT 245 | * @see https://wow.gamepedia.com/API_SetCurrentTitle 246 | */ 247 | declare function SetCurrentTitle(titleId: number): void; 248 | -------------------------------------------------------------------------------- /declarations/battlefield.d.ts: -------------------------------------------------------------------------------- 1 | /** @noSelfInFile */ 2 | 3 | declare namespace WoWAPI { 4 | type BattlefieldStatusType = "queued" | "confirm" | "active" | "none" | "error"; 5 | type BattlefieldTeamSize = 0 | 2 | 3 | 5; 6 | type BattlefieldType = "ARENA" | "BATTLEGROUND" | "WARGAME"; 7 | type BattlefieldWinType = null | 0 | 1 | 255; 8 | type BattlefieldUiStateType = 0 | 1 | 2; 9 | type BattlefieldFaction = null | undefined | void | 0 | 1; 10 | } 11 | 12 | /** 13 | * Acccept the area Spirit Healer's resurrection in battlegrounds 14 | * @see https://wow.gamepedia.com/API_AcceptAreaSpiritHeal 15 | */ 16 | declare function AcceptAreaSpiritHeal(): void; 17 | 18 | /** 19 | * Confirms entry into a Battleground you are queued for that is ready 20 | * @param index The battlefield in queue to enter 21 | * @param accept Whether or not to accept entry to the battlefield 22 | * @protected HARDWARE_EVENT 23 | * @see https://wow.gamepedia.com/API_AcceptBattlefieldPort 24 | */ 25 | declare function AcceptBattlefieldPort(index: number, accept: boolean): void; 26 | 27 | /** 28 | * Cancels the area Spirit Healer's resurrection in battlegrounds 29 | * @see https://wow.gamepedia.com/API_CancelAreaSpiritHeal 30 | */ 31 | declare function CancelAreaSpiritHeal(): void; 32 | 33 | /** 34 | * Returns, whether the player can join a battlefield as group or not 35 | * @return returns true, if the player can join the battlefield as group 36 | * @see https://wow.gamepedia.com/API_CanJoinBattlefieldAsGroup 37 | */ 38 | declare function CanJoinBattlefieldAsGroup(): boolean; 39 | 40 | /** 41 | * Gets the time left until the next resurrection cast. 42 | * @return Seconds until the Spirit Guide casts its next Area Resurrection. Returns 0 if player is not dead 43 | * @see https://wow.gamepedia.com/API_GetAreaSpiritHealerTime 44 | */ 45 | declare function GetAreaSpiritHealerTime(): number; 46 | 47 | /** 48 | * Get estimated wait time for a Battlefield's availability 49 | * @returns Milliseconds until Battlefield opening is available (estimated) 50 | * @see https://wow.gamepedia.com/API_GetBattlefieldEstimatedWaitTime 51 | */ 52 | declare function GetBattlefieldEstimatedWaitTime(): number; 53 | 54 | /** 55 | * Used to position the flag icon on the world map and the battlefield minimap 56 | * @param index Index to get the flag position from 57 | * @see https://wow.gamepedia.com/API_GetBattlefieldFlagPosition 58 | * @tupleReturn 59 | */ 60 | declare function GetBattlefieldFlagPosition(index: number): [number, number, string]; 61 | 62 | /** 63 | * Get shutdown timer for the battlefield instance 64 | * @returns the number of milliseconds before the Battlefield will close after a battle is finished. This is 0 before the battle is finished 65 | * @see https://wow.gamepedia.com/API_GetBattlefieldInstanceExpiration 66 | */ 67 | declare function GetBattlefieldInstanceExpiration(): number; 68 | 69 | /** 70 | * Returns the time passed since the battleground started 71 | * @returns miliseconds passed since the battle started 72 | * @see https://wow.gamepedia.com/API_GetBattlefieldInstanceRunTime 73 | */ 74 | declare function GetBattlefieldInstanceRunTime(): number; 75 | 76 | /** 77 | * Returns the remaining seconds of a battlefield port 78 | * @param index Index of queue to get the expiration from 79 | * @returns Remaining time of battlefield port in seconds 80 | * @see https://wow.gamepedia.com/API_GetBattlefieldPortExpiration 81 | */ 82 | declare function GetBattlefieldPortExpiration(index: number): number; 83 | 84 | /** 85 | * Returns information about a player's score in battlegrounds 86 | * @param playerIndex The characters index in battlegrounds, going from 1 to GetNumBattlefieldScores(). 87 | * @see https://wow.gamepedia.com/API_GetBattlefieldScore 88 | * @tupleReturn 89 | */ 90 | declare function GetBattlefieldScore(playerIndex: number): [string, number, number, number, number, number, string, string, string, number, number, string]; 91 | 92 | /** 93 | * Get data from the custom battlefield scoreboard columns 94 | * @param playerIndex Player you want to grab the data for 95 | * @param columnIndex Column you want to grab the data from 96 | * @description Used to retrieve data from battleground specific scoreboard columns like flag captures in Warsong Gulch. 97 | * 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 98 | * @see https://wow.gamepedia.com/API_GetBattlefieldStatData 99 | */ 100 | declare function GetBattlefieldStatData(playerIndex: number, columnIndex: number): WoWAPI.Unknown; 101 | 102 | /** 103 | * Get list of battleground specific columns on the scoreboard 104 | * @param columnIndex Column to get data for 105 | * @see https://wow.gamepedia.com/API_GetBattlefieldStatInfo 106 | * @tupleReturn 107 | */ 108 | declare function GetBattlefieldStatInfo(columnIndex: number): [string, string, string]; 109 | 110 | /** 111 | * Get the status of the arena, battleground, or wargame that the player is either queued for or inside 112 | * @param battlefieldIndex Index of the battlefield you wish to view, in the range of 1 to GetMaxBattlefieldID() 113 | * @see https://wow.gamepedia.com/API_GetBattlefieldStatus 114 | * @tupleReturn 115 | */ 116 | // tslint:disable-next-line max-line-length 117 | declare function GetBattlefieldStatus(battlefieldIndex: number): [WoWAPI.BattlefieldStatusType, string, WoWAPI.BattlefieldTeamSize, number, WoWAPI.Unknown, WoWAPI.BattlefieldType, WoWAPI.Unknown, WoWAPI.UnitRoleType]; 118 | 119 | /** 120 | * Get time this player's been in the queue in milliseconds 121 | * @param battlegroundQueuePosition The queue position 122 | * @see https://wow.gamepedia.com/API_GetBattlefieldTimeWaited 123 | */ 124 | declare function GetBattlefieldTimeWaited(battlegroundQueuePosition: number): number; 125 | 126 | /** 127 | * Get the winner of the battlefield 128 | * @returns Faction/team that has won the battlefield. Results are: nil if nobody has won, 0 for Horde, 1 for Alliance and 255 129 | * for a draw in a battleground, 0 for Green Team and 1 for Yellow in an arena 130 | * @see https://wow.gamepedia.com/API_GetBattlefieldWinner 131 | */ 132 | declare function GetBattlefieldWinner(): WoWAPI.BattlefieldWinType; 133 | 134 | /** 135 | * Returns information about a battleground type 136 | * @param battlegroundTypeIndex battleground type index, 1 to GetNumBattlegroundTypes(). 137 | * @see https://wow.gamepedia.com/API_GetBattlegroundInfo 138 | * @tupleReturn 139 | */ 140 | declare function GetBattlegroundInfo(battlegroundTypeIndex: number): [string, WoWAPI.Flag, WoWAPI.Flag, WoWAPI.Flag, number, string]; 141 | 142 | /** 143 | * Returns the max number of battlefields you can queue for 144 | * @returns Max number of Battlefields 145 | * @see https://wow.gamepedia.com/API_GetMaxBattlefieldID 146 | * @since 4.3.0 147 | */ 148 | declare function GetMaxBattlefieldID(): number; 149 | 150 | /** 151 | * Appears to return the number of scores in the battleground/field scoreboard 152 | * @see https://wow.gamepedia.com/API_GetNumBattlefieldScores 153 | */ 154 | declare function GetNumBattlefieldScores(): WoWAPI.Unknown; 155 | 156 | /** 157 | * Appears to return the number of columns in the battleground/field scoreboard, other than the common ones (Killing Blows, Kills, Deaths, Bonus Honour): 158 | * @returns Number of columns available for the battleground (2 for Warsong Gulch and Arathi Basin, 7 for Alterac Valley) 159 | * @see https://wow.gamepedia.com/API_GetNumBattlefieldStats 160 | */ 161 | declare function GetNumBattlefieldStats(): number; 162 | 163 | /** 164 | * Returns the number of world state UI elements. These are displayed in the WorldStateFrame at the top center of the screen 165 | * @see https://wow.gamepedia.com/API_GetNumWorldStateUI 166 | */ 167 | declare function GetNumWorldStateUI(): number; 168 | 169 | /** 170 | * Get score and flag status within a battlefield 171 | * @param worldUiStateIndex between 1 and GetNumWorldStateUI(). 172 | * @see https://wow.gamepedia.com/API_GetWorldStateUIInfo 173 | * @tupleReturn 174 | */ 175 | // tslint:disable-next-line max-line-length 176 | declare function GetWorldStateUIInfo(worldUiStateIndex: number): [number, WoWAPI.BattlefieldUiStateType, boolean, string, string, string, string, string, string, number, number, number]; 177 | 178 | /** 179 | * Queues the player, or the player's group, for a battlefield instance 180 | * @param battlefieldIndex Which battlefield instance to queue for (0 for first available), or which arena bracket to queue for 181 | * @param asGroup If true-equivalent, the player's group is queued for the battlefield, otherwise, only the player is queued 182 | * @param isRated If true-equivalent, and queueing for an arena bracket, the group is queued for a rated match as opposed to a skirmish 183 | * @deprecated 184 | * @protected Protected functions can only be called from a secure execution path. 185 | */ 186 | declare function JoinBattlefield(battlefieldIndex: number, asGroup?: boolean, isRated?: boolean): void; 187 | 188 | /** 189 | * Leaves the current battlefield 190 | * @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 191 | * 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. 192 | * @see https://wow.gamepedia.com/API_LeaveBattlefield 193 | */ 194 | declare function LeaveBattlefield(): void; 195 | 196 | /** 197 | * Requests the lastest battlefield score data from the server 198 | * @event UPDATE_BATTLEFIELD_SCORE 199 | * @see https://wow.gamepedia.com/API_RequestBattlefieldScoreData 200 | */ 201 | declare function RequestBattlefieldScoreData(): void; 202 | 203 | /** 204 | * Requests information about the available instances of a particular battleground 205 | * @param instanceIndex Index of the battleground type to request instance information for; valid indices start from 1 and go up to GetNumBattlegroundTypes(). 206 | * @event PVPQUEUE_ANYWHERE_SHOW 207 | * @description Calling JoinBattlefield after calling this function, but before PVPQUEUE_ANYWHERE_SHOW, will fail silently; you must wait for 208 | * the instance list to become available before you can queue for an instance. 209 | * @see https://wow.gamepedia.com/API_RequestBattlegroundInstanceInfo 210 | */ 211 | declare function RequestBattlegroundInstanceInfo(instanceIndex: number): void; 212 | 213 | /** 214 | * Set the faction to show on the battlefield scoreboard 215 | * @param faction nil = All, 0 = Horde, 1 = Alliance 216 | * @see https://wow.gamepedia.com/API_SetBattlefieldScoreFaction 217 | */ 218 | declare function SetBattlefieldScoreFaction(faction?: WoWAPI.BattlefieldFaction): void; 219 | -------------------------------------------------------------------------------- /declarations/camera.d.ts: -------------------------------------------------------------------------------- 1 | /** @noSelfInFile */ 2 | 3 | /** 4 | * Begin "Left click" in the 3D world 5 | * @protected 6 | * @deprecated 7 | * @see https://wow.gamepedia.com/API_CameraOrSelectOrMoveStart 8 | */ 9 | declare function CameraOrSelectOrMoveStart(): void; 10 | 11 | /** 12 | * End "Left click" in the 3D game world 13 | * @param stickyFlag If present and set then any camera offset is 'sticky' and remains until explicitly cancelled 14 | * @protected 15 | * @deprecated 16 | * @see https://wow.gamepedia.com/API_CameraOrSelectOrMoveStop 17 | */ 18 | declare function CameraOrSelectOrMoveStop(stickyFlag?: boolean): void; 19 | 20 | /** 21 | * Zooms the camera into the viewplane 22 | * @param increment float increment 23 | * @description Zooms the camera into the viewplane by increment. The increment must be between 0.0 and 50 with 0.0 indicating no 24 | * zoom relative to current view and 50 being maximum zoom. From a completely zoomed out position, an increment of 50 will result in 25 | * a first person camera angle 26 | * @see https://wow.gamepedia.com/API_CameraZoomIn 27 | */ 28 | declare function CameraZoomIn(increment: number): void; 29 | 30 | /** 31 | * Zooms the camera out of the viewplane 32 | * @param increment float increment 33 | * @description Zooms the camera out of the viewplane by increment. The increment must be between 0.0 and the max camera distance. 34 | * As of patch 1.9.0 if the 'Interface Options > Advanced Options > Max Camera Distance' setting is set to Low, then the largest 35 | * 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 36 | * 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 37 | * @see https://wow.gamepedia.com/API_CameraZoomOut 38 | */ 39 | declare function CameraZoomOut(increment: number): void; 40 | 41 | /** 42 | * Rotates the camera about the Z-axis 43 | * @param angle float angle 44 | * @description Rotates the camera about the Z-axis by the angle amount specified in degrees 45 | * @see https://wow.gamepedia.com/API_FlipCameraYaw 46 | */ 47 | declare function FlipCameraYaw(angle: number): void; 48 | 49 | /** 50 | * Gets the current zoom level of the camera 51 | * @returns float, the currently set zoom level 52 | * @description Doesn't take camera collisions with the environment into account and will return what the camera would be at. If the 53 | * camera is in motion, the zoom level that is set that frame is used, not the zoom level that the camera is traveling to. 54 | * @see https://wow.gamepedia.com/API_GetCameraZoom 55 | */ 56 | declare function GetCameraZoom(): number; 57 | 58 | /** 59 | * For checking whether mouselook mode is currently active 60 | * @returns true if mouselook mode is active, false otherwise 61 | * @see https://wow.gamepedia.com/API_IsMouselooking 62 | */ 63 | declare function IsMouselooking(): boolean; 64 | 65 | /** 66 | * Enters mouse look mode, during which mouse movement is used to alter the character's movement/facing direction 67 | * @see https://wow.gamepedia.com/API_MouselookStart 68 | */ 69 | declare function MouselookStart(): void; 70 | 71 | /** 72 | * Exits mouse look mode; allows mouse input to move the mouse cursor 73 | * @see https://wow.gamepedia.com/API_MouselookStop 74 | */ 75 | declare function MouselookStop(): void; 76 | 77 | /** 78 | * Begins rotating the camera down around your character 79 | * - Speed is a multiplier on the CVar 'cameraPitchMoveSpeed', which is in degrees/second 80 | * - If speed is omitted, it is assumed to be 1.0. 81 | * - Negative numbers go the opposite way, a speed of 0.0 will stop it. 82 | * - This is not canceled by moving your character or interacting with the camera 83 | * - Applying a negative speed is not the same as using the other function to go the opposite way, both vectors are applied 84 | * simultaneously. If you rotate both ways equally, it will appear to stop, but the rotations are still being applied, though canceling each other 85 | * @param speed Speed at which to begin rotating 86 | * @see https://wow.gamepedia.com/API_MoveViewDownStart 87 | */ 88 | declare function MoveViewDownStart(speed: number): void; 89 | 90 | /** 91 | * Stops rotating the camera Down 92 | * @see https://wow.gamepedia.com/API_MoveViewDownStop 93 | */ 94 | declare function MoveViewDownStop(): void; 95 | 96 | /** 97 | * Begins zooming the camera in 98 | * - 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 99 | * - If speed is omitted, it is assumed to be 1.0 100 | * - Negative numbers go the opposite way, a speed of 0.0 will stop it. 101 | * - This is not canceled by moving your character, but is canceled by using the mousewheel to zoom 102 | * - Applying a negative speed is not the same as using the other function to go the opposite way, both vectors are applied 103 | * simultaneously. If you zoom both ways equally, it will appear to stop, but the rotations are still being applied, though canceling each other 104 | * @param speed Speed at which to begin zooming 105 | * @see https://wow.gamepedia.com/API_MoveViewInStart 106 | */ 107 | declare function MoveViewInStart(speed: number): void; 108 | 109 | /** 110 | * Stops moving the camera In 111 | * @see https://wow.gamepedia.com/API_MoveViewInStop 112 | */ 113 | declare function MoveViewInStop(): void; 114 | 115 | /** 116 | * Begins rotating the camera to the left around your character 117 | * - Speed is a multiplier on the CVar 'cameraYawMoveSpeed', which is in degrees/second 118 | * - If speed is omitted, it is assumed to be 1.0 119 | * - Negative numbers go the opposite way, a speed of 0.0 will stop it. 120 | * - This is not canceled by moving your character or interacting with the camera 121 | * - Applying a negative speed is not the same as using the other function to go the opposite way, both vectors are applied simultaneously. 122 | * If you zoom both ways equally, it will appear to stop, but the rotations are still being applied, though canceling each other 123 | * @param speed Speed at which to begin rotating 124 | * @see https://wow.gamepedia.com/API_MoveViewLeftStart 125 | */ 126 | declare function MoveViewLeftStart(speed: number): void; 127 | 128 | /** 129 | * Stops rotating the camera to the Left 130 | * @see https://wow.gamepedia.com/API_MoveViewLeftStop 131 | */ 132 | declare function MoveViewLeftStop(): void; 133 | 134 | /** 135 | * Begins zooming the camera out 136 | * - 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 137 | * - If speed is omitted, it is assumed to be 1.0 138 | * - Negative numbers go the opposite way, a speed of 0.0 will stop it 139 | * - This is not canceled by moving your character, but is canceled by using the mousewheel to zoom 140 | * - Applying a negative speed is not the same as using the other function to go the opposite way, both vectors are applied simultaneously. 141 | * If you zoom both ways equally, it will appear to stop, but the rotations are still being applied, though canceling each other 142 | * @param speed Speed at which to begin zooming 143 | * @see https://wow.gamepedia.com/API_MoveViewOutStart 144 | */ 145 | declare function MoveViewOutStart(speed: number): void; 146 | 147 | /** 148 | * Stops moving the camera out 149 | * @see https://wow.gamepedia.com/API_MoveViewOutStop 150 | */ 151 | declare function MoveViewOutStop(): void; 152 | 153 | /** 154 | * Begins rotating the camera to the right around your character 155 | * - Speed is a multiplier on the CVar 'cameraYawMoveSpeed', which is in degrees/second 156 | * - If speed is omitted, it is assumed to be 1.0. 157 | * - Negative numbers go the opposite way, a speed of 0.0 will stop it 158 | * - This is not canceled by moving your character or interacting with the camera 159 | * - Applying a negative speed is not the same as using the other function to go the opposite way, both vectors are applied simultaneously. 160 | * If you rotate both ways equally, it will appear to stop, but the rotations are still being applied, though canceling each other 161 | * @param speed Speed at which to begin rotating 162 | * @see https://wow.gamepedia.com/API_MoveViewRightStart 163 | */ 164 | declare function MoveViewRightStart(speed: number): void; 165 | 166 | /** 167 | * Stops rotating the camera to the Right 168 | * @see https://wow.gamepedia.com/API_MoveViewRightStop 169 | */ 170 | declare function MoveViewRightStop(): void; 171 | 172 | /** 173 | * Begins rotating the camera up around your character 174 | * - Speed is a multiplier on the CVar 'cameraPitchMoveSpeed', which is in degrees/second 175 | * - If speed is omitted, it is assumed to be 1.0 176 | * - Negative numbers go the opposite way, a speed of 0.0 will stop it 177 | * - This is not canceled by moving your character or interacting with the camera 178 | * - Applying a negative speed is not the same as using the other function to go the opposite way, both vectors are applied simultaneously. 179 | * If you rotate both ways equally, it will appear to stop, but the rotations are still being applied, though canceling each other 180 | * @param speed Speed at which to begin rotating 181 | * @see https://wow.gamepedia.com/API_MoveViewUpStart 182 | */ 183 | declare function MoveViewUpStart(speed: number): void; 184 | 185 | /** 186 | * Stops rotating the camera Up 187 | * @see https://wow.gamepedia.com/API_MoveViewUpStop 188 | */ 189 | declare function MoveViewUpStop(): void; 190 | 191 | /** 192 | * unknown 193 | * @param args unknown 194 | * @protected 195 | * @deprecated 196 | */ 197 | declare function PitchDownStart(...args: WoWAPI.Unknown[]): void; 198 | 199 | /** 200 | * unknown 201 | * @param args unknown 202 | * @protected 203 | * @deprecated 204 | */ 205 | declare function PitchDownStop(...args: WoWAPI.Unknown[]): void; 206 | 207 | /** 208 | * unknown 209 | * @param args unknown 210 | * @protected 211 | * @deprecated 212 | */ 213 | declare function PitchUpStart(...args: WoWAPI.Unknown[]): void; 214 | 215 | /** 216 | * unknown 217 | * @param args unknown 218 | * @protected 219 | * @deprecated 220 | */ 221 | declare function PitchUpStop(...args: WoWAPI.Unknown[]): void; 222 | 223 | /** 224 | * Cycles forward through the five predefined camera positions 225 | */ 226 | declare function NextView(): void; 227 | 228 | /** 229 | * Cycles backward through the five predefined camera positions 230 | */ 231 | declare function PrevView(): void; 232 | 233 | /** 234 | * Resets the specified (1-5) predefined camera position to it's default if it was changed using SaveView(index) 235 | * @param index the index set to 236 | */ 237 | declare function ResetView(index: 1 | 2 | 3 | 4 | 5): void; 238 | 239 | /** 240 | * Saves a camera angle for later retrieval with SetView. The last position loaded is stored in the CVar cameraView 241 | * @param viewIndex The index (2-5) to save the camera angle to. (1 is reserved for first person view) 242 | * @see https://wow.gamepedia.com/API_SaveView 243 | */ 244 | declare function SaveView(viewIndex: 2 | 3 | 4 | 5): void; 245 | 246 | /** 247 | * Sets a camera perspective from one previously saved with SaveView. The last position loaded is stored in the CVar cameraView 248 | * @param viewIndex The view index (1-5) to return to (1 is always first person, and cannot be saved with SaveView) 249 | * @see https://wow.gamepedia.com/API_SetView 250 | */ 251 | declare function SetView(viewIndex: 1 | 2 | 3 | 4 | 5): void; 252 | --------------------------------------------------------------------------------