|
From: <xu...@us...> - 2006-10-04 20:23:32
|
Revision: 1
http://svn.sourceforge.net/dkptooltip/?rev=1&view=rev
Author: xunil
Date: 2006-10-04 13:23:28 -0700 (Wed, 04 Oct 2006)
Log Message:
-----------
Initial import
Added Paths:
-----------
DKPSchedule.lua
DKPToolTip.lua
DKPToolTip.toc
DKPToolTip.xml
LICENSE
Added: DKPSchedule.lua
===================================================================
--- DKPSchedule.lua (rev 0)
+++ DKPSchedule.lua 2006-10-04 20:23:28 UTC (rev 1)
@@ -0,0 +1,184 @@
+-- This is only for non-setpiece items.
+DKPToolTip_LootSchedule = {
+ -- Molten Core items
+ ["Aged Core Leather Gloves"] = 10.00,
+ ["Ancient Petrified Leaf"] = 80.00,
+ ["Aurastone Hammer"] = 50.00,
+ ["Azuresong Mageblade"] = 60.00,
+ ["Band of Accuria"] = 40.00,
+ ["Band of Sulfuras"] = 40.00,
+ ["Blastershot Launcher"] = 40.00,
+ ["Bonereaver's Edge"] = 90.00,
+ ["Brutality Blade"] = 50.00,
+ ["Cauterizing Band"] = 30.00,
+ ["Choker of Enlightenment"] = 20.00,
+ ["Choker of the Firelord"] = 40.00,
+ ["Cloak of the Shrouded Mists"] = 32.00,
+ ["Core Forged Greaves"] = 20.00,
+ ["Corehound Tooth"] = 60.00,
+ ["Crimson Shocker"] = 15.00,
+ ["Crown of Destruction"] = 40.00,
+ ["Deep Earth Spaulders"] = 20.00,
+ ["Dragon's Blood Cape"] = 28.00,
+ ["Drillborer Disk"] = 25.00,
+ ["Earthshaker"] = 65.00,
+ ["Eskhandar's Right Claw"] = 20.00,
+ ["Finkle's Lava Dredger"] = 80.00,
+ ["Fire Runed Grimoire"] = 30.00,
+ ["Fireguard Shoulders"] = 14.00,
+ ["Fireproof Cloak"] = 24.00,
+ ["Flameguard Gauntlets"] = 28.00,
+ ["Flamewalker Legplates"] = 20.00,
+ ["Gloves of the Hypnotic Flame"] = 20.00,
+ ["Gutgore Ripper"] = 50.00,
+ ["Heavy Dark Iron Ring"] = 30.00,
+ ["Helm of the Lifegiver"] = 20.00,
+ ["Malistar's Defender"] = 40.00,
+ ["Mana Igniting Cord"] = 50.00,
+ ["Manastorm Leggings"] = 25.00,
+ ["Medallion of Steadfast Might"] = 38.00,
+ ["Obsidian Edged Blade"] = 70.00,
+ ["Onslaught Girdle"] = 36.00,
+ ["Perdition's Blade"] = 80.00,
+ ["Quick Strike Ring"] = 30.00,
+ ["Ring of Spellpower"] = 30.00,
+ ["Robe of Volatile Power"] = 60.00,
+ ["Sabatons of the Flamewalker"] = 20.00,
+ ["Salamander Scale Pants"] = 30.00,
+ ["Sash of Whispered Secrets"] = 20.00,
+ ["Seal of the Archmagus"] = 30.00,
+ ["Shadowstrike"] = 18.00,
+ ["Shard of the Flame"] = 24.00,
+ ["Sorcerous Dagger"] = 40.00,
+ ["Spinal Reaper"] = 70.00,
+ ["Staff of Dominance"] = 80.00,
+ ["Striker's Mark"] = 45.00,
+ ["Talisman of Ephemeral Power"] = 50.00,
+ ["The Eye of Divinity"] = 75.00,
+ ["Wild Growth Spaulders"] = 20.00,
+ ["Wristguards of Stability"] = 20.00,
+ ["Wristguards of True Flight"] = 30.00,
+
+ -- Onyxia items
+ ["Ancient Cornerstone Grimoire"] = 25.00,
+ ["Deathbringer"] = 80.00,
+ ["Head of Onyxia"] = 50.00,
+ ["Mature Black Dragon Sinew"] = 20.00,
+ ["Ring of Binding"] = 10.00,
+ ["Sapphirion Drape"] = 37.50,
+ ["Vis'kag the Bloodletter"] = 80.00,
+ ["Shard of the Scale"] = 20.00,
+ ["Eskhandar's Collar"] = 44.00,
+
+ -- Kazzak items
+ ["Amberseal Keeper"] = 50.00,
+ ["Blazefury Medallion"] = 25.00,
+ ["Empyrean Demolisher"] = 45.00,
+ ["Infernal Headcage"] = 20.00,
+ ["Ring of Entropy"] = 30.00,
+ ["The Eye of Shadow"] = 10.00,
+ ["Eskhandar's Pelt"] = 36.00,
+
+ -- Azuregos items
+ ["Cold Snap"] = 25.00,
+ ["Fang of the Mystics"] = 45.00,
+ ["Mature Blue Dragon Sinew"] = 20.00,
+ ["Snowblind Shoes"] = 30.00,
+ ["Typhoon"] = 60.00,
+ ["Unmelting Ice Girdle"] = 40.00,
+ ["Leggings of Arcane Supremecy"] = 20.00,
+ ["Eskhandar's Left Claw"] = 20.00,
+
+ -- BWL items
+ -- Razorgore
+ ["Arcane Infused Gem"] = 24,
+ ["Mantle of the Blackwing Cabal"] = 40,
+ ["Gloves of Rapid Evolution"] = 20,
+ ["Spineshatter"] = 50,
+ ["The Black Book"] = 24,
+ ["The Untamed Blade"] = 85,
+
+ --Vael
+ ["Mind Quickening Gem"] = 24,
+ ["Pendant of the Fallen Dragon"] = 45,
+ ["Helm of Endless Rage"] = 56,
+ ["Rune of Meamorphosis"] = 24,
+ ["Dragonfang Blade"] = 80,
+ ["Red Dragonscale Protector"] = 50,
+
+ -- Broodlord
+ ["Venomous Totem"] = 24,
+ ["Lifegiving Gem"] = 24,
+ ["Black Brood Pauldrons"] = 30,
+ ["Bracers of Arcane Accuracy"] = 34,
+ ["Maladath, Runed Blade of the Black Flight"] = 90,
+ ["Heartstriker"] = 60,
+
+ -- Firemaw
+ ["Natural Alignment Crystal"] = 24,
+ ["Cloak of Firemaw"] = 55,
+ ["Black Ash Robe"] = 30,
+ ["Firemaw's Clutch"] = 40,
+ ["Taut Dragonhide Belt"] = 30,
+ ["Drake Talon Pauldrons"] = 36,
+ ["Rejuvenating Gem"] = 50,
+ ["Ring of Blackrock"] = 40,
+ ["Primalist's Linked Legguards"] = 30,
+ ["Shadow Wing Focus Staff"] = 90,
+ ["Claw of the Black Drake"] = 85,
+ ["Drake Talon Cleaver"] = 90,
+
+ -- Ebronroc
+ ["Aegis of Preservation"] = 24,
+ ["Drake Fang Talisman"] = 60,
+ ["Band of Forced Concentration"] = 45,
+ ["Malfurion's Blessed Bulwark"] = 30,
+ ["Ebony Flame Gloves"] = 48,
+ ["Dragonbreath Hand Cannon"] = 70,
+
+ -- Flamegor
+ ["Emberweave Leggings"] = 30,
+ ["Circle of Applied Force"] = 40,
+ ["Shroud of Pure Thought"] = 36,
+ ["Styleen's Impeding Scarab"] = 50,
+ ["Herald of Woe"] = 85,
+ ["Dragon's Touch"] = 30,
+
+ -- Trash
+ ["Ringo's Blizzard Boots"] = 30,
+ ["Boots of Pure Thought"] = 35,
+ ["Interlaced Shadow Jerkin"] = 10,
+ ["Cloak of Draconic Might"] = 40,
+ ["Draconic Maul"] = 40,
+ ["Doom's Edge"] = 48,
+ ["Essence Gatherer"] = 25,
+
+ -- Chromaggus
+ ["Chromatic Boots"] = 35,
+ ["Angelista's Grasp"] = 12,
+ ["Elementium Threaded Cloak"] = 40,
+ ["Empowered Leggings"] = 50,
+ ["Taut Dragonhide Shoulders"] = 30,
+ ["Taut Dragonhide Gloves"] = 38,
+ ["Shimmering Geta"] = 35,
+ ["Chromatically Tempered Sword"] = 120,
+ ["Ashjre'thul, Crosswbow of Smiting"] = 80,
+ ["Primalist's Linked Waistguard"] = 50,
+ ["Elementium Reinforced Bulwark"] = 80,
+ ["Claw of Chromaggus"] = 110,
+
+ -- Nefarian
+ ["Therazane's Link"] = 40,
+ ["Boots of the Shadow Flame"] = 135,
+ ["Mish'undare, Circlet of the Mind Flayer"] = 60,
+ ["Archimtiros' Ring of Reckoning"] = 50,
+ ["Prestor's Talisman of Connivery"] = 55,
+ ["Cloak of the Brood Lord"] = 60,
+ ["Neltharion's Tear"] = 60,
+ ["Ashkandi, Greatsword of the Brotherhood"] = 130,
+ ["Pure Elementium Band"] = 50,
+ ["Staff of the Shadow Flame"] = 140,
+ ["Crul'shorukh, Edge of Chaos"] = 100,
+ ["Lok'amir Il Romathis"] = 125,
+ ["Head of Nefarian"] = 65,
+};
Added: DKPToolTip.lua
===================================================================
--- DKPToolTip.lua (rev 0)
+++ DKPToolTip.lua 2006-10-04 20:23:28 UTC (rev 1)
@@ -0,0 +1,153 @@
+-- DKPToolTip
+--
+-- ChangeLog
+-- 06/25/06 Hacked together from DKPToolTip mod code.
+-- 07/26/06 Updated for 1.11.
+-- 08/28/06 Updated for 1.12; also adjusted points due to Centuria
+-- repricing of certain items.
+--
+-- Todo:
+-- Add ability to search database through slash-commands.
+
+DKPToolTip_Initialized = false;
+-- DKPToolTip_LootSchedule = {};
+DKPToolTip_TierSets = {};
+DKPToolTip_Version = "0.3";
+
+
+
+function DKPToolTip_OnLoad()
+ DKPToolTip_Initialize()
+ return
+end
+
+-- Tooltip hook function
+function DKPToolTip_TipHook(funcVars, retVal, frame, name, link, quality, count)
+ price_divided = {};
+ if ( tonumber(quality) >= 4 ) then
+ if ( link ~= nil ) then
+ price = DKPToolTip_LookupPrice(link);
+ if ( price ~= 0 ) then
+ price_divided[0] = price;
+ price_divided[1] = (price * 0.75);
+ price_divided[2] = (price * 0.50);
+ price_divided[3] = (price * 0.25);
+ EnhTooltip.AddLine('Cost: ' .. tostring(price_divided[0]) .. '/' .. tostring(price_divided[1]) .. '/' .. tostring(price_divided[2]) .. '/' .. tostring(price_divided[3]) .. ' DKP', nil, true);
+ EnhTooltip.LineColor(0.9,0.5,0.5);
+ end
+ end
+ end
+end
+
+
+-- Expects a full item link, i.e. |cffffffff|Hitem:51620...
+function DKPToolTip_LookupPrice(itemLink)
+ if ( itemLink == nil ) then
+ return 0;
+ end
+
+ local itemIDiter = string.gfind(itemLink, "(%d+):");
+ local itemID = 0;
+ if ( itemIDiter ~= nil ) then
+ itemID = itemIDiter();
+ else
+ return 0;
+ end
+
+ local itemName,
+ itemLink,
+ itemRarity,
+ itemMinLevel,
+ itemType,
+ itemSubType,
+ itemStackCount,
+ itemEquipLoc,
+ itemTexture = GetItemInfo(tonumber(itemID));
+ local slot;
+
+ if ( itemEquipLoc ~= nil ) then
+ slot = string.gsub(itemEquipLoc, "INVTYPE_", "");
+ end
+
+ for tier = 1,2 do
+ for _,setName in DKPToolTip_TierSets.Names[tier] do
+ local index = string.find ( itemName, setName );
+ if ( index ~= nil ) then
+ if ( DKPToolTip_TierSets.Prices[tier][slot] ~= nil ) then
+ return DKPToolTip_TierSets.Prices[tier][slot];
+ end
+ end
+ end
+ end
+
+ for key,price in pairs(DKPToolTip_LootSchedule) do
+ if ( key == itemName ) then
+ return price
+ end
+ end
+
+ return 0;
+end
+
+function DKPToolTip_Initialize()
+
+ -- Tier set piece prices (and set names).
+ DKPToolTip_TierSets = {
+ ["Names"] = {
+ [1] = {
+ "Cenarion", -- Druid
+ "Giantstalker's", -- Hunter
+ "Arcanist", -- Mage
+ "Lawbringer", -- Paladin (for completeness)
+ "Prophecy", -- Priest
+ "Nightslayer", -- Rogue
+ "Earthfury", -- Shaman
+ "Felheart", -- Warlock
+ "Might", -- Warrior
+ },
+
+ [2] = {
+ "Stormrage", -- Druid
+ "Dragonstalker's", -- Hunter
+ "Netherwind", -- Mage
+ "Judgement", -- Paladin (for completeness)
+ "Transcendence", -- Priest
+ "Bloodfang", -- Rogue
+ "Ten Storms", -- Shaman
+ "Nemesis", -- Warlock
+ "Wrath", -- Warrior
+ }
+ },
+
+ ["Prices"] = {
+ [1] = {
+ ["WRIST"] = 25.00,
+ ["WAIST"] = 32.50,
+ ["FEET"] = 35.00,
+ ["HAND"] = 35.00,
+ ["SHOULDER"] = 35.00,
+ ["HEAD"] = 42.50,
+ ["LEGS"] = 45.00,
+ ["CHEST"] = 50.00,
+ ["ROBE"] = 50.00, -- Same thing as "Chest", stupid blizzard
+ },
+
+ [2] = {
+ ["WRIST"] = 34.00,
+ ["WAIST"] = 42.00,
+ ["FEET"] = 48.00,
+ ["HAND"] = 48.00,
+ ["SHOULDER"] = 48.00,
+ ["HEAD"] = 58.00,
+ ["LEGS"] = 60.00,
+ ["CHEST"] = 68.00,
+ ["ROBE"] = 68.00, -- Same thing as "Chest", stupid blizzard
+ },
+ },
+ };
+
+ Stubby.RegisterFunctionHook("EnhTooltip.AddTooltip", 200, DKPToolTip_TipHook);
+
+ DKPToolTip_Initialized = true;
+ DEFAULT_CHAT_FRAME:AddMessage("DKPToolTip v" .. DKPToolTip_Version);
+end
Added: DKPToolTip.toc
===================================================================
--- DKPToolTip.toc (rev 0)
+++ DKPToolTip.toc 2006-10-04 20:23:28 UTC (rev 1)
@@ -0,0 +1,12 @@
+## Interface: 11200
+## Title: DKPToolTip
+## Author: Robert Liesenfeld
+## Version: 0.4
+## Notes: Reports Centuria DKP cost for items in tooltips.
+## eMail: xu...@xu...
+## URL: http://blee.org/DKPToolTip/
+## DefaultState: Enabled
+## LoadOnDemand: 0
+## SavedVariables:
+## Dependencies: EnhTooltip,Stubby
+DKPToolTip.xml
Added: DKPToolTip.xml
===================================================================
--- DKPToolTip.xml (rev 0)
+++ DKPToolTip.xml 2006-10-04 20:23:28 UTC (rev 1)
@@ -0,0 +1,11 @@
+<Ui xmlns="http://www.blizzard.com/wow/ui/" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://www.blizzard.com/wow/ui/">
+ <Script file="DKPToolTip.lua"/>
+ <Script file="DKPSchedule.lua"/>
+ <Frame name="DKPToolTipFrame" frameStrata="LOW" enableMouse="false" movable="false" parent="UIParent" hidden="false">
+ <Scripts>
+ <OnLoad>
+ DKPToolTip_OnLoad();
+ </OnLoad>
+ </Scripts>
+ </Frame>
+</Ui>
Added: LICENSE
===================================================================
--- LICENSE (rev 0)
+++ LICENSE 2006-10-04 20:23:28 UTC (rev 1)
@@ -0,0 +1,10 @@
+Copyright (c) 2006, Robert "Eupynan" Liesenfeld <eu...@ce...>
+All rights reserved.
+
+Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met:
+
+ * Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer.
+ * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution.
+ * Neither the name of the author nor the names of this project's contributors may be used to endorse or promote products derived from this software without specific prior written permission.
+
+THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|