From 895a1966fc984078549bb658e869454a5c650346 Mon Sep 17 00:00:00 2001 From: fuba Date: Mon, 28 Nov 2022 00:26:24 +0100 Subject: [PATCH] Update for Dragonflight --- WardrobeTools/WardrobeTools.toc | 4 +-- WardrobeTools/wardrobe/core.lua | 12 ++++++++- WardrobeTools/wardrobe/mailer.lua | 44 ++++++++++++++++++++++++++++++- 3 files changed, 56 insertions(+), 4 deletions(-) diff --git a/WardrobeTools/WardrobeTools.toc b/WardrobeTools/WardrobeTools.toc index 85ddebe..3e7b026 100644 --- a/WardrobeTools/WardrobeTools.toc +++ b/WardrobeTools/WardrobeTools.toc @@ -1,9 +1,9 @@ -## Interface: 90100 +## Interface: 100002 ## Title: WardrobeTools ## Notes: A simple addon to streamline transmog/appearance collection. ## SavedVariables: WardrobeToolsADB ## SavedVariablesPerCharacter: WardrobeToolsCDB -## Version: 1.0.0 +## Version: 1.0.1 ## OptionalDeps: sUI ## X-SezzADB: WardrobeToolsADB diff --git a/WardrobeTools/wardrobe/core.lua b/WardrobeTools/wardrobe/core.lua index 9a77209..b1c7caa 100644 --- a/WardrobeTools/wardrobe/core.lua +++ b/WardrobeTools/wardrobe/core.lua @@ -61,7 +61,17 @@ local strmatch, tonumber, select = string.match, tonumber, select; -- WoW API/Constants local IsDressableItem, GetItemInfo = IsDressableItem, GetItemInfo; local TRANSMOGRIFY_TOOLTIP_APPEARANCE_UNKNOWN, TRANSMOGRIFY_TOOLTIP_APPEARANCE_KNOWN, TRANSMOGRIFY_TOOLTIP_ITEM_UNKNOWN_APPEARANCE_KNOWN = TRANSMOGRIFY_TOOLTIP_APPEARANCE_UNKNOWN, TRANSMOGRIFY_TOOLTIP_APPEARANCE_KNOWN, TRANSMOGRIFY_TOOLTIP_ITEM_UNKNOWN_APPEARANCE_KNOWN; -local LE_ITEM_CLASS_ARMOR, LE_ITEM_ARMOR_CLOTH, LE_ITEM_ARMOR_LEATHER, LE_ITEM_ARMOR_MAIL, LE_ITEM_ARMOR_PLATE, LE_ITEM_CLASS_WEAPON, LE_ITEM_ARMOR_COSMETIC = LE_ITEM_CLASS_ARMOR, LE_ITEM_ARMOR_CLOTH, LE_ITEM_ARMOR_LEATHER, LE_ITEM_ARMOR_MAIL, LE_ITEM_ARMOR_PLATE, LE_ITEM_CLASS_WEAPON, LE_ITEM_ARMOR_COSMETIC; + +-- Armor +local LE_ITEM_CLASS_ARMOR = LE_ITEM_CLASS_ARMOR or Enum.ItemClass.Armor or 4 +local LE_ITEM_ARMOR_CLOTH = LE_ITEM_ARMOR_CLOTH or Enum.ItemArmorSubclass.Cloth or 1 +local LE_ITEM_ARMOR_LEATHER = LE_ITEM_ARMOR_LEATHER or Enum.ItemArmorSubclass.Leather or 2 +local LE_ITEM_ARMOR_MAIL = LE_ITEM_ARMOR_MAIL or Enum.ItemArmorSubclass.Mail or 3 +local LE_ITEM_ARMOR_PLATE = LE_ITEM_ARMOR_PLATE or Enum.ItemArmorSubclass.Plate or 4 +local LE_ITEM_ARMOR_COSMETIC = LE_ITEM_ARMOR_COSMETIC or Enum.ItemArmorSubclass.Cosmetic or 5 + +-- Weapons +local LE_ITEM_CLASS_WEAPON = LE_ITEM_CLASS_WEAPON or Enum.ItemClass.Weapon or 2 ----------------------------------------------------------------------------- diff --git a/WardrobeTools/wardrobe/mailer.lua b/WardrobeTools/wardrobe/mailer.lua index 49649c1..8b203fe 100644 --- a/WardrobeTools/wardrobe/mailer.lua +++ b/WardrobeTools/wardrobe/mailer.lua @@ -26,7 +26,49 @@ local select, strlen, tinsert, tremove, strlower, next = select, string.len, tab -- WoW API local GetItemClassInfo, GetItemSubClassInfo, GameTooltip_Hide, ClearCursor, PickupContainerItem, ClickSendMailItemButton, SendMail, GetItemInfo = GetItemClassInfo, GetItemSubClassInfo, GameTooltip_Hide, ClearCursor, PickupContainerItem, ClickSendMailItemButton, SendMail, GetItemInfo; -local ATTACHMENTS_MAX_SEND, LE_ITEM_CLASS_ARMOR, LE_ITEM_ARMOR_CLOTH, LE_ITEM_ARMOR_LEATHER, LE_ITEM_ARMOR_MAIL, LE_ITEM_ARMOR_PLATE, LE_ITEM_CLASS_WEAPON, LE_ITEM_WEAPON_AXE1H, LE_ITEM_WEAPON_AXE2H, LE_ITEM_WEAPON_MACE1H, LE_ITEM_WEAPON_MACE2H, LE_ITEM_WEAPON_SWORD1H, LE_ITEM_WEAPON_SWORD2H, LE_ITEM_WEAPON_WARGLAIVE, LE_ITEM_WEAPON_DAGGER, LE_ITEM_WEAPON_UNARMED, LE_ITEM_WEAPON_POLEARM, LE_ITEM_WEAPON_STAFF, LE_ITEM_WEAPON_WAND, LE_ITEM_WEAPON_BOWS, LE_ITEM_WEAPON_CROSSBOW, LE_ITEM_WEAPON_GUNS, LE_ITEM_ARMOR_SHIELD, LE_ITEM_ARMOR_GENERIC, INVTYPE_RANGED, INVTYPE_HOLDABLE = ATTACHMENTS_MAX_SEND, LE_ITEM_CLASS_ARMOR, LE_ITEM_ARMOR_CLOTH, LE_ITEM_ARMOR_LEATHER, LE_ITEM_ARMOR_MAIL, LE_ITEM_ARMOR_PLATE, LE_ITEM_CLASS_WEAPON, LE_ITEM_WEAPON_AXE1H, LE_ITEM_WEAPON_AXE2H, LE_ITEM_WEAPON_MACE1H, LE_ITEM_WEAPON_MACE2H, LE_ITEM_WEAPON_SWORD1H, LE_ITEM_WEAPON_SWORD2H, LE_ITEM_WEAPON_WARGLAIVE, LE_ITEM_WEAPON_DAGGER, LE_ITEM_WEAPON_UNARMED, LE_ITEM_WEAPON_POLEARM, LE_ITEM_WEAPON_STAFF, LE_ITEM_WEAPON_WAND, LE_ITEM_WEAPON_BOWS, LE_ITEM_WEAPON_CROSSBOW, LE_ITEM_WEAPON_GUNS, LE_ITEM_ARMOR_SHIELD, LE_ITEM_ARMOR_GENERIC, INVTYPE_RANGED, INVTYPE_HOLDABLE; + +local ATTACHMENTS_MAX_SEND = ATTACHMENTS_MAX_SEND +local INVTYPE_RANGED = INVTYPE_RANGED +local INVTYPE_HOLDABLE = INVTYPE_HOLDABLE + +-- Armor +local LE_ITEM_CLASS_ARMOR = LE_ITEM_CLASS_ARMOR or Enum.ItemClass.Armor or 4 +local LE_ITEM_ARMOR_GENERIC = LE_ITEM_ARMOR_GENERIC or Enum.ItemArmorSubclass.Generic or 0 +local LE_ITEM_ARMOR_CLOTH = LE_ITEM_ARMOR_CLOTH or Enum.ItemArmorSubclass.Cloth or 1 +local LE_ITEM_ARMOR_LEATHER = LE_ITEM_ARMOR_LEATHER or Enum.ItemArmorSubclass.Leather or 2 +local LE_ITEM_ARMOR_MAIL = LE_ITEM_ARMOR_MAIL or Enum.ItemArmorSubclass.Mail or 3 +local LE_ITEM_ARMOR_PLATE = LE_ITEM_ARMOR_PLATE or Enum.ItemArmorSubclass.Plate or 4 +local LE_ITEM_ARMOR_COSMETIC = LE_ITEM_ARMOR_COSMETIC or Enum.ItemArmorSubclass.Cosmetic or 5 +local LE_ITEM_ARMOR_SHIELD = LE_ITEM_ARMOR_SHIELD or Enum.ItemArmorSubclass.Shield or 6 +local LE_ITEM_ARMOR_LIBRAM = LE_ITEM_ARMOR_LIBRAM or Enum.ItemArmorSubclass.Libram or 7 +local LE_ITEM_ARMOR_IDOL = LE_ITEM_ARMOR_IDOL or Enum.ItemArmorSubclass.Idol or 8 +local LE_ITEM_ARMOR_TOTEM = LE_ITEM_ARMOR_TOTEM or Enum.ItemArmorSubclass.Totem or 9 +local LE_ITEM_ARMOR_SIGIL = LE_ITEM_ARMOR_SIGIL or Enum.ItemArmorSubclass.Sigil or 10 +local LE_ITEM_ARMOR_RELIC = LE_ITEM_ARMOR_RELIC or Enum.ItemArmorSubclass.Relic or 11 + +-- Weapons +local LE_ITEM_CLASS_WEAPON = LE_ITEM_CLASS_WEAPON or Enum.ItemClass.Weapon or 2 +local LE_ITEM_WEAPON_AXE1H = LE_ITEM_WEAPON_AXE1H or Enum.ItemWeaponSubclass.Axe1H or 0 +local LE_ITEM_WEAPON_AXE2H = LE_ITEM_WEAPON_AXE2H or Enum.ItemWeaponSubclass.Axe2H or 1 +local LE_ITEM_WEAPON_BOWS = LE_ITEM_WEAPON_BOWS or Enum.ItemWeaponSubclass.Bows or 2 +local LE_ITEM_WEAPON_GUNS = LE_ITEM_WEAPON_GUNS or Enum.ItemWeaponSubclass.Guns or 3 +local LE_ITEM_WEAPON_MACE1H = LE_ITEM_WEAPON_MACE1H or Enum.ItemWeaponSubclass.Mace1H or 4 +local LE_ITEM_WEAPON_MACE2H = LE_ITEM_WEAPON_MACE2H or Enum.ItemWeaponSubclass.Mace2H or 5 +local LE_ITEM_WEAPON_POLEARM = LE_ITEM_WEAPON_POLEARM or Enum.ItemWeaponSubclass.Polearm or 6 +local LE_ITEM_WEAPON_SWORD1H = LE_ITEM_WEAPON_SWORD1H or Enum.ItemWeaponSubclass.Sword1H or 7 +local LE_ITEM_WEAPON_SWORD2H = LE_ITEM_WEAPON_SWORD2H or Enum.ItemWeaponSubclass.Sword2H or 8 +local LE_ITEM_WEAPON_WARGLAIVE = LE_ITEM_WEAPON_WARGLAIVE or Enum.ItemWeaponSubclass.Warglaive or 9 +local LE_ITEM_WEAPON_STAFF = LE_ITEM_WEAPON_STAFF or Enum.ItemWeaponSubclass.Staff or 10 +local LE_ITEM_WEAPON_EXOTIC1H = LE_ITEM_WEAPON_EXOTIC1H or Enum.ItemWeaponSubclass.Bearclaw or 11 +local LE_ITEM_WEAPON_EXOTIC2H = LE_ITEM_WEAPON_EXOTIC2H or Enum.ItemWeaponSubclass.Catclaw or 12 +local LE_ITEM_WEAPON_UNARMED = LE_ITEM_WEAPON_UNARMED or Enum.ItemWeaponSubclass.Unarmed or 13 +local LE_ITEM_WEAPON_GENERIC = LE_ITEM_WEAPON_GENERIC or Enum.ItemWeaponSubclass.Generic or 14 +local LE_ITEM_WEAPON_DAGGER = LE_ITEM_WEAPON_DAGGER or Enum.ItemWeaponSubclass.Dagger or 15 +local LE_ITEM_WEAPON_THROWN = LE_ITEM_WEAPON_THROWN or Enum.ItemWeaponSubclass.Thrown or 16 +local LE_ITEM_WEAPON_SPEAR = LE_ITEM_WEAPON_SPEAR or Enum.ItemWeaponSubclass.Obsolete3 or 17 +local LE_ITEM_WEAPON_CROSSBOW = LE_ITEM_WEAPON_CROSSBOW or Enum.ItemWeaponSubclass.Crossbow or 18 +local LE_ITEM_WEAPON_WAND = LE_ITEM_WEAPON_WAND or Enum.ItemWeaponSubclass.Wand or 19 +local LE_ITEM_WEAPON_FISHINGPOLE = LE_ITEM_WEAPON_FISHINGPOLE or Enum.ItemWeaponSubclass.Fishingpole or 20 ----------------------------------------------------------------------------- -- BoA armor tokens