Advertisement
Guest User

Untitled

a guest
Nov 19th, 2014
131
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 19.47 KB | None | 0 0
  1. if not LibStub then return end
  2.  
  3. local dewdrop = LibStub('Dewdrop-2.0', true)
  4. local icon = LibStub('LibDBIcon-1.0')
  5.  
  6. local _
  7. local math_floor = math.floor
  8.  
  9. local CreateFrame = CreateFrame
  10. local GetContainerItemCooldown = GetContainerItemCooldown
  11. local GetContainerItemInfo = GetContainerItemInfo
  12. local GetContainerItemLink = GetContainerItemLink
  13. local GetContainerNumSlots = GetContainerNumSlots
  14. local GetBindLocation = GetBindLocation
  15. local GetInventoryItemCooldown = GetInventoryItemCooldown
  16. local GetInventoryItemLink = GetInventoryItemLink
  17. local GetSpellCooldown = GetSpellCooldown
  18. local GetSpellInfo = GetSpellInfo
  19. local GetSpellBookItemName = GetSpellBookItemName
  20. local SendChatMessage = SendChatMessage
  21. local UnitInRaid = UnitInRaid
  22. local GetNumGroupMembers = GetNumGroupMembers
  23. local IsPlayerSpell = IsPlayerSpell
  24.  
  25. local addonName, addonTable = ...
  26. local L = addonTable.L
  27.  
  28. -- IDs of items usable for transportation
  29. local items = {
  30. -- Dalaran rings
  31. 40586, -- Band of the Kirin Tor
  32. 48954, -- Etched Band of the Kirin Tor
  33. 48955, -- Etched Loop of the Kirin Tor
  34. 48956, -- Etched Ring of the Kirin Tor
  35. 48957, -- Etched Signet of the Kirin Tor
  36. 45688, -- Inscribed Band of the Kirin Tor
  37. 45689, -- Inscribed Loop of the Kirin Tor
  38. 45690, -- Inscribed Ring of the Kirin Tor
  39. 45691, -- Inscribed Signet of the Kirin Tor
  40. 44934, -- Loop of the Kirin Tor
  41. 44935, -- Ring of the Kirin Tor
  42. 40585, -- Signet of the Kirin Tor
  43. 51560, -- Runed Band of the Kirin Tor
  44. 51558, -- Runed Loop of the Kirin Tor
  45. 51559, -- Runed Ring of the Kirin Tor
  46. 51557, -- Runed Signet of the Kirin Tor
  47. -- Engineering Gadgets
  48. 30542, -- Dimensional Ripper - Area 52
  49. 18984, -- Dimensional Ripper - Everlook
  50. 18986, -- Ultrasafe Transporter: Gadgetzan
  51. 30544, -- Ultrasafe Transporter: Toshley's Station
  52. 48933, -- Wormhole Generator: Northrend
  53. 87215, -- Wormhole Generator: Pandaria
  54. -- Seasonal items
  55. 37863, -- Direbrew's Remote
  56. 21711, -- Lunar Festival Invitation
  57. -- Miscellaneous
  58. 46874, -- Argent Crusader's Tabard
  59. 32757, -- Blessed Medallion of Karabor
  60. 35230, -- Darnarian's Scroll of Teleportation
  61. 50287, -- Boots of the Bay
  62. 52251, -- Jaina's Locket
  63. 43824, -- The Schools of Arcane Magic - Mastery
  64. 58487, -- Potion of Deepholm
  65. 65274, -- Cloak of Coordination (Horde)
  66. 65360, -- Cloak of Coordination (Alliance)
  67. 63378, -- Hellscream's Reach Tabard
  68. 63379, -- Baradin's Wardens Tabard
  69. 64457, -- The Last Relic of Argus
  70. 63206, -- Wrap of Unity (Alliance)
  71. 63207, -- Wrap of Unity (Horde)
  72. 63352, -- Shroud of Cooperation (Alliance)
  73. 63353, -- Shroud of Cooperation (Horde)
  74. 95050, -- The Brassiest Knuckle (Horde)
  75. 95051, -- The Brassiest Knuckle (Alliance)
  76. 95567, -- Kirin Tor Beacon
  77. 95568, -- Sunreaver Beacon
  78. 17690, -- Frostwolf Insignia Rank 1 (Horde)
  79. 17905, -- Frostwolf Insignia Rank 2 (Horde)
  80. 17906, -- Frostwolf Insignia Rank 3 (Horde)
  81. 17907, -- Frostwolf Insignia Rank 4 (Horde)
  82. 17908, -- Frostwolf Insignia Rank 5 (Horde)
  83. 17909, -- Frostwolf Insignia Rank 6 (Horde)
  84. 17691, -- Stormpike Insignia Rank 1 (Alliance)
  85. 17900, -- Stormpike Insignia Rank 2 (Alliance)
  86. 17901, -- Stormpike Insignia Rank 3 (Alliance)
  87. 17902, -- Stormpike Insignia Rank 4 (Alliance)
  88. 17903, -- Stormpike Insignia Rank 5 (Alliance)
  89. 17904, -- Stormpike Insignia Rank 6 (Alliance)
  90. 22631, -- Atiesh, Greatstaff of the Guardian
  91. 87548, -- Lorewalker's Lodestone
  92. 54452, -- Ethereal Portal
  93. 93672, -- Dark Portal
  94. 103678, -- Time-Lost Artifact
  95. 110560 -- Garrison Hearthstone
  96. }
  97.  
  98. -- IDs of items usable instead of hearthstone
  99. local scrolls = {
  100. 64488, -- The Innkeeper's Daughter
  101. 28585, -- Ruby Slippers
  102. 6948, -- Hearthstone
  103. 44315, -- Scroll of Recall III
  104. 44314, -- Scroll of Recall II
  105. 37118 -- Scroll of Recall
  106. }
  107.  
  108. -- Gold Challenge portals
  109. local challengeSpells = {
  110. { 131204, 'TRUE' }, -- Path of the Jade Serpent
  111. { 131205, 'TRUE' }, -- Path of the Stout Brew
  112. { 131206, 'TRUE' }, -- Path of the Shado-Pan
  113. { 131222, 'TRUE' }, -- Path of the Mogu King
  114. { 131225, 'TRUE' }, -- Path of the Setting Sun
  115. { 131231, 'TRUE' }, -- Path of the Scarlet Blade
  116. { 131229, 'TRUE' }, -- Path of the Scarlet Mitre
  117. { 131232, 'TRUE' }, -- Path of the Necromancer
  118. { 131228, 'TRUE' } -- Path of the Black Ox
  119. }
  120.  
  121. obj = LibStub:GetLibrary('LibDataBroker-1.1'):NewDataObject(addonName, {
  122. type = 'data source',
  123. text = L['P'],
  124. icon = 'Interface\\Icons\\INV_Misc_Rune_06',
  125. })
  126. local obj = obj
  127. local methods = {}
  128. local portals
  129. local frame = CreateFrame('frame')
  130.  
  131. frame:SetScript('OnEvent', function(self, event, ...) if self[event] then return self[event](self, event, ...) end end)
  132. frame:RegisterEvent('PLAYER_LOGIN')
  133. frame:RegisterEvent('SKILL_LINES_CHANGED')
  134.  
  135.  
  136. local function pairsByKeys(t)
  137. local a = {}
  138. for n in pairs(t) do
  139. table.insert(a, n)
  140. end
  141. table.sort(a)
  142.  
  143. local i = 0
  144. local iter = function()
  145. i = i + 1
  146. if a[i] == nil then
  147. return nil
  148. else
  149. return a[i], t[a[i]]
  150. end
  151. end
  152. return iter
  153. end
  154.  
  155. local function tconcat(t1, t2)
  156. for i = 1, #t2 do
  157. t1[#t1 + 1] = t2[i]
  158. end
  159. return t1
  160. end
  161.  
  162. function findSpell(spellName)
  163. local i = 1
  164. while true do
  165. local s = GetSpellBookItemName(i, BOOKTYPE_SPELL)
  166. if not s then
  167. break
  168. end
  169.  
  170. if s == spellName then
  171. return i
  172. end
  173.  
  174. i = i + 1
  175. end
  176. end
  177.  
  178. -- returns true, if player has item with given ID in inventory or bags and it's not on cooldown
  179. local function hasItem(itemID)
  180. local item, found, id
  181. -- scan inventory
  182. for slotId = 1, 19 do
  183. item = GetInventoryItemLink('player', slotId)
  184. if item then
  185. found, _, id = item:find('^|c%x+|Hitem:(%d+):.+')
  186. if found and tonumber(id) == itemID then
  187. if GetInventoryItemCooldown('player', slotId) ~= 0 then
  188. return false
  189. else
  190. return true
  191. end
  192. end
  193. end
  194. end
  195. -- scan bags
  196. for bag = 0, 4 do
  197. for slot = 1, GetContainerNumSlots(bag) do
  198. item = GetContainerItemLink(bag, slot)
  199. if item then
  200. found, _, id = item:find('^|c%x+|Hitem:(%d+):.+')
  201. if found and tonumber(id) == itemID then
  202. if GetContainerItemCooldown(bag, slot) ~= 0 then
  203. return false
  204. else
  205. return true
  206. end
  207. end
  208. end
  209. end
  210. end
  211.  
  212. return false
  213. end
  214.  
  215. local function getReagentCount(name)
  216. local count = 0
  217. for bag = 0, 4 do
  218. for slot = 1, GetContainerNumSlots(bag) do
  219. local item = GetContainerItemLink(bag, slot)
  220. if item then
  221. if item:find(name) then
  222. local _, itemCount = GetContainerItemInfo(bag, slot)
  223. count = count + itemCount
  224. end
  225. end
  226. end
  227. end
  228.  
  229. return count
  230. end
  231.  
  232. local function SetupSpells()
  233. local spells = {
  234. Alliance = {
  235. { 3561, 'TP_RUNE' }, -- TP:Stormwind
  236. { 3562, 'TP_RUNE' }, -- TP:Ironforge
  237. { 3565, 'TP_RUNE' }, -- TP:Darnassus
  238. { 32271, 'TP_RUNE' }, -- TP:Exodar
  239. { 49359, 'TP_RUNE' }, -- TP:Theramore
  240. { 33690, 'TP_RUNE' }, -- TP:Shattrath
  241. { 53140, 'TP_RUNE' }, -- TP:Dalaran
  242. { 88342, 'TP_RUNE' }, -- TP:Tol Barad
  243. { 132621, 'TP_RUNE' }, -- TP:Vale of Eternal Blossoms
  244. { 120145, 'TP_RUNE' }, -- TP:Ancient Dalaran
  245. { 10059, 'P_RUNE' }, -- P:Stormwind
  246. { 11416, 'P_RUNE' }, -- P:Ironforge
  247. { 11419, 'P_RUNE' }, -- P:Darnassus
  248. { 32266, 'P_RUNE' }, -- P:Exodar
  249. { 49360, 'P_RUNE' }, -- P:Theramore
  250. { 33691, 'P_RUNE' }, -- P:Shattrath
  251. { 53142, 'P_RUNE' }, -- P:Dalaran
  252. { 88345, 'P_RUNE' }, -- P:Tol Barad
  253. { 120146, 'P_RUNE' }, -- P:Ancient Dalaran
  254. { 132620, 'P_RUNE' }, -- P:Vale of Eternal Blossoms
  255. { 176248, 'TP_RUNE' }, -- TP:StormShield
  256. { 176246, 'P_RUNE' } -- P:StormShield
  257.  
  258. },
  259. Horde = {
  260. { 3563, 'TP_RUNE' }, -- TP:Undercity
  261. { 3566, 'TP_RUNE' }, -- TP:Thunder Bluff
  262. { 3567, 'TP_RUNE' }, -- TP:Orgrimmar
  263. { 32272, 'TP_RUNE' }, -- TP:Silvermoon
  264. { 49358, 'TP_RUNE' }, -- TP:Stonard
  265. { 35715, 'TP_RUNE' }, -- TP:Shattrath
  266. { 53140, 'TP_RUNE' }, -- TP:Dalaran
  267. { 88344, 'TP_RUNE' }, -- TP:Tol Barad
  268. { 132627, 'TP_RUNE' }, -- TP:Vale of Eternal Blossoms
  269. { 120145, 'TP_RUNE' }, -- TP:Ancient Dalaran
  270. { 11418, 'P_RUNE' }, -- P:Undercity
  271. { 11420, 'P_RUNE' }, -- P:Thunder Bluff
  272. { 11417, 'P_RUNE' }, -- P:Orgrimmar
  273. { 32267, 'P_RUNE' }, -- P:Silvermoon
  274. { 49361, 'P_RUNE' }, -- P:Stonard
  275. { 35717, 'P_RUNE' }, -- P:Shattrath
  276. { 53142, 'P_RUNE' }, -- P:Dalaran
  277. { 88346, 'P_RUNE' }, -- P:Tol Barad
  278. { 120146, 'P_RUNE' }, -- P:Ancient Dalaran
  279. { 132626, 'P_RUNE' }, -- P:Vale of Eternal Blossoms
  280. { 176242, 'TP_RUNE' }, -- TP:Warspear
  281. { 176244, 'P_RUNE' } -- P:Warspear
  282. }
  283. }
  284.  
  285. local _, class = UnitClass('player')
  286. if class == 'MAGE' then
  287. portals = spells[select(1, UnitFactionGroup('player'))]
  288. elseif class == 'DEATHKNIGHT' then
  289. portals = {
  290. { 50977, 'TRUE' } -- Death Gate
  291. }
  292. elseif class == 'DRUID' then
  293. portals = {
  294. { 18960, 'TRUE' }, -- TP:Moonglade
  295. { 147420, 'TRUE' } -- TP:One with Nature
  296. }
  297. elseif class == 'SHAMAN' then
  298. portals = {
  299. { 556, 'TRUE' } -- Astral Recall
  300. }
  301. elseif class == 'MONK' then
  302. portals = {
  303. { 126892, 'TRUE' }, -- Zen Pilgrimage
  304. { 126895, 'TRUE' } -- Zen Pilgrimage: Return
  305. }
  306. else
  307. portals = {}
  308. end
  309.  
  310. spells = nil
  311. end
  312.  
  313. local function GenerateLinks(spells)
  314. for _, unTransSpell in ipairs(spells) do
  315. if IsPlayerSpell(unTransSpell[1]) then
  316. local spell, _, spellIcon = GetSpellInfo(unTransSpell[1])
  317. local spellid = findSpell(spell)
  318.  
  319. if spellid then
  320. methods[spell] = {
  321. spellid = spellid,
  322. text = spell,
  323. spellIcon = spellIcon,
  324. isPortal = unTransSpell[2] == 'P_RUNE',
  325. secure = {
  326. type = 'spell',
  327. spell = spell
  328. }
  329. }
  330. end
  331. end
  332. end
  333. end
  334.  
  335. local function UpdateSpells()
  336. if not portals then
  337. SetupSpells()
  338. end
  339.  
  340. if portals then
  341. GenerateLinks(portals)
  342. end
  343.  
  344. GenerateLinks(challengeSpells)
  345. end
  346.  
  347. local function UpdateIcon(icon)
  348. obj.icon = icon
  349. end
  350.  
  351. local function GetHearthCooldown()
  352. local cooldown, startTime, duration
  353.  
  354. for _, item in pairs(scrolls) do
  355. if GetItemCount(item) > 0 then
  356. startTime, duration = GetItemCooldown(item)
  357. cooldown = duration - (GetTime() - startTime)
  358. if cooldown >= 60 then
  359. cooldown = math_floor(cooldown / 60)
  360. cooldown = cooldown .. ' ' .. L['MIN']
  361. elseif cooldown <= 0 then
  362. cooldown = L['READY']
  363. else
  364. cooldown = math_floor(cooldown) .. ' ' .. L['SEC']
  365. end
  366. return cooldown
  367. end
  368. end
  369.  
  370. return L['N/A']
  371. end
  372.  
  373. local function GetItemCooldowns()
  374. local cooldown, cooldowns
  375.  
  376. for _, item in pairs(items) do
  377. if GetItemCount(item) > 0 then
  378. startTime, duration = GetItemCooldown(item)
  379. cooldown = duration - (GetTime() - startTime)
  380. if cooldown >= 60 then
  381. cooldown = math_floor(cooldown / 60)
  382. cooldown = cooldown .. ' ' .. L['MIN']
  383. elseif cooldown <= 0 then
  384. cooldown = L['READY']
  385. else
  386. cooldown = math_floor(cooldown) .. ' ' .. L['SEC']
  387. end
  388.  
  389. if cooldowns == nil then
  390. cooldowns = {}
  391. end
  392.  
  393. cooldowns[GetItemInfo(item)] = cooldown
  394. end
  395. end
  396.  
  397. return cooldowns
  398. end
  399.  
  400. local function ShowHearthstone()
  401. local bindLoc = GetBindLocation()
  402. local secure, text, icon, name
  403.  
  404. for _, itemID in ipairs(scrolls) do
  405. if hasItem(itemID) then
  406. name, _, _, _, _, _, _, _, _, icon = GetItemInfo(itemID)
  407. text = L['INN'] .. ' ' .. bindLoc
  408. secure = {
  409. type = 'item',
  410. item = name
  411. }
  412. break
  413. end
  414. end
  415.  
  416. if secure ~= nil then
  417. dewdrop:AddLine('text', text,
  418. 'secure', secure,
  419. 'icon', icon,
  420. 'func', function() UpdateIcon(icon) end,
  421. 'closeWhenClicked', true)
  422. dewdrop:AddLine()
  423. end
  424. end
  425.  
  426. local function ShowOtherItems()
  427. local i = 0
  428.  
  429. for _, itemID in ipairs(items) do
  430. if hasItem(itemID) then
  431. local name, _, quality, _, _, _, _, _, _, icon = GetItemInfo(itemID)
  432. local secure = {
  433. type = 'item',
  434. item = name
  435. }
  436.  
  437. dewdrop:AddLine(
  438. 'text', name,
  439. 'textR', ITEM_QUALITY_COLORS[quality].r,
  440. 'textG', ITEM_QUALITY_COLORS[quality].g,
  441. 'textB', ITEM_QUALITY_COLORS[quality].b,
  442. 'secure', secure,
  443. 'icon', icon,
  444. 'func', function() UpdateIcon(icon) end,
  445. 'closeWhenClicked', true)
  446. i = i + 1
  447. end
  448. end
  449. if i > 0 then
  450. dewdrop:AddLine()
  451. end
  452. end
  453.  
  454. local function ToggleMinimap()
  455. local hide = not PortalsDB.minimap.hide
  456. PortalsDB.minimap.hide = hide
  457. if hide then
  458. icon:Hide('Broker_Portals')
  459. else
  460. icon:Show('Broker_Portals')
  461. end
  462. end
  463.  
  464. local function UpdateMenu(level, value)
  465. if level == 1 then
  466. dewdrop:AddLine('text', 'Broker_Portals',
  467. 'isTitle', true)
  468.  
  469. methods = {}
  470. UpdateSpells()
  471. dewdrop:AddLine()
  472. local chatType = (UnitInRaid("player") and "RAID") or (GetNumGroupMembers() > 0 and "PARTY") or nil
  473. local announce = PortalsDB.announce
  474. for k, v in pairsByKeys(methods) do
  475. if v.secure and GetSpellCooldown(v.text) == 0 then
  476. dewdrop:AddLine(
  477. 'text', v.text,
  478. 'secure', v.secure,
  479. 'icon', v.spellIcon,
  480. 'func', function()
  481. UpdateIcon(v.spellIcon)
  482. if announce and v.isPortal and chatType then
  483. SendChatMessage(L['ANNOUNCEMENT'] .. ' ' .. v.text, chatType)
  484. end
  485. end,
  486. 'closeWhenClicked', true)
  487. end
  488. end
  489.  
  490. dewdrop:AddLine()
  491.  
  492. ShowHearthstone()
  493.  
  494. if PortalsDB.showItems then
  495. ShowOtherItems()
  496. end
  497.  
  498. dewdrop:AddLine('text', L['OPTIONS'],
  499. 'hasArrow', true,
  500. 'value', 'options')
  501.  
  502. dewdrop:AddLine('text', CLOSE,
  503. 'tooltipTitle', CLOSE,
  504. 'tooltipText', CLOSE_DESC,
  505. 'closeWhenClicked', true)
  506. elseif level == 2 and value == 'options' then
  507. dewdrop:AddLine('text', L['SHOW_ITEMS'],
  508. 'checked', PortalsDB.showItems,
  509. 'func', function() PortalsDB.showItems = not PortalsDB.showItems end,
  510. 'closeWhenClicked', true)
  511. dewdrop:AddLine('text', L['SHOW_ITEM_COOLDOWNS'],
  512. 'checked', PortalsDB.showItemCooldowns,
  513. 'func', function() PortalsDB.showItemCooldowns = not PortalsDB.showItemCooldowns end,
  514. 'closeWhenClicked', true)
  515. dewdrop:AddLine('text', L['ATT_MINIMAP'],
  516. 'checked', not PortalsDB.minimap.hide,
  517. 'func', function() ToggleMinimap() end,
  518. 'closeWhenClicked', true)
  519. dewdrop:AddLine('text', L['ANNOUNCE'],
  520. 'checked', PortalsDB.announce,
  521. 'func', function() PortalsDB.announce = not PortalsDB.announce end,
  522. 'closeWhenClicked', true)
  523. end
  524. end
  525.  
  526. function frame:PLAYER_LOGIN()
  527. -- PortalsDB.minimap is there for smooth upgrade of SVs from old version
  528. if (not PortalsDB) or (PortalsDB.version == nil) then
  529. PortalsDB = {}
  530. PortalsDB.minimap = {}
  531. PortalsDB.minimap.hide = false
  532. PortalsDB.showItems = true
  533. PortalsDB.showItemCooldowns = true
  534. PortalsDB.announce = false
  535. PortalsDB.version = 4
  536. end
  537.  
  538. -- upgrade from versions
  539. if PortalsDB.version == 3 then
  540. PortalsDB.announce = false
  541. PortalsDB.version = 4
  542. elseif PortalsDB.version == 2 then
  543. PortalsDB.showItemCooldowns = true
  544. PortalsDB.announce = false
  545. PortalsDB.version = 4
  546. elseif PortalsDB.version < 2 then
  547. PortalsDB.showItems = true
  548. PortalsDB.showItemCooldowns = true
  549. PortalsDB.announce = false
  550. PortalsDB.version = 4
  551. end
  552.  
  553. if icon then
  554. icon:Register('Broker_Portals', obj, PortalsDB.minimap)
  555. end
  556.  
  557. self:UnregisterEvent('PLAYER_LOGIN')
  558. end
  559.  
  560. function frame:SKILL_LINES_CHANGED()
  561. UpdateSpells()
  562. end
  563.  
  564. -- All credit for this func goes to Tekkub and his picoGuild!
  565. local function GetTipAnchor(frame)
  566. local x, y = frame:GetCenter()
  567. if not x or not y then return 'TOPLEFT', 'BOTTOMLEFT' end
  568. local hhalf = (x > UIParent:GetWidth() * 2 / 3) and 'RIGHT' or (x < UIParent:GetWidth() / 3) and 'LEFT' or ''
  569. local vhalf = (y > UIParent:GetHeight() / 2) and 'TOP' or 'BOTTOM'
  570. return vhalf .. hhalf, frame, (vhalf == 'TOP' and 'BOTTOM' or 'TOP') .. hhalf
  571. end
  572.  
  573. function obj.OnClick(self, button)
  574. GameTooltip:Hide()
  575. if button == 'RightButton' then
  576. dewdrop:Open(self, 'children', function(level, value) UpdateMenu(level, value) end)
  577. end
  578. end
  579.  
  580. function obj.OnLeave()
  581. GameTooltip:Hide()
  582. end
  583.  
  584. function obj.OnEnter(self)
  585. GameTooltip:SetOwner(self, 'ANCHOR_NONE')
  586. GameTooltip:SetPoint(GetTipAnchor(self))
  587. GameTooltip:ClearLines()
  588.  
  589. GameTooltip:AddLine('Broker Portals')
  590. GameTooltip:AddDoubleLine(L['RCLICK'], L['SEE_SPELLS'], 0.9, 0.6, 0.2, 0.2, 1, 0.2)
  591. GameTooltip:AddLine(' ')
  592. GameTooltip:AddDoubleLine(L['HEARTHSTONE'] .. ': ' .. GetBindLocation(), GetHearthCooldown(), 0.9, 0.6, 0.2, 0.2, 1, 0.2)
  593.  
  594. if PortalsDB.showItemCooldowns then
  595. local cooldowns = GetItemCooldowns()
  596. if cooldowns ~= nil then
  597. GameTooltip:AddLine(' ')
  598. for name, cooldown in pairs(cooldowns) do
  599. GameTooltip:AddDoubleLine(name, cooldown, 0.9, 0.6, 0.2, 0.2, 1, 0.2)
  600. end
  601. end
  602. end
  603.  
  604. GameTooltip:Show()
  605. end
  606.  
  607. -- slash command definition
  608. SlashCmdList['BROKER_PORTALS'] = function() ToggleMinimap() end
  609. SLASH_BROKER_PORTALS1 = '/portals'
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement