Quantcast
WoWInterface: SVN - ChatIcons - Path Comparison - /trunk Rev 4 and /trunk Rev 5

WoWInterface SVN ChatIcons

Compare Revisions

  • This comparison shows the changes necessary to convert path
    /trunk
    from Rev 4 to Rev 5
    Reverse comparison

Rev 4 → Rev 5

ChatIcons/ChatIcons.lua
2,9 → 2,10
 
local TEXTURE_LINK_FORMAT_FORMAT = "|T%%s:%d:%d:0:%d|t"
local TEXTURE_LINK_FORMAT
local ITEM_LINK_PATTERN = "|c%x%x%x%x%x%x%x%x|Hitem:(%d+):%-?%d+:%-?%d+:%-?%d+:%-?%d+:%-?%d+:%-?%d+:%-?%d+|h"
local ITEM_LINK_PATTERN = "|c%x%x%x%x%x%x%x%x|Hitem:(%d+):%-?%d+:%-?%d+:%-?%d+:%-?%d+:%-?%d+:%-?%d+:%-?%d+:?-?%d*|h"
local SPELL_LINK_PATTERN = "|c%x%x%x%x%x%x%x%x|Hspell:(%d+)|h"
local PLAYER_LINK_PATTERN = "|Hplayer:([^|:]+)"
local ACHIEVEMENT_LINK_PATTERN = "|Hachievement:(%d+):[%x:-]+|h" -- lazy, I know. Shoot me.
local classIcons, raceIcons
local EXAMPLE_TEXT = "|Hplayer:CHAT_ICONS_FAKE_NAME_LINK|h[Medihv]|h says: I farmed |cff1eff00|Hitem:21884:0:0:0:0:0:0:0|h[Primal Fire]|h|r for weeks to make my " ..
"\124cffa335ee\124Hitem:21848:0:0:0:0:0:0:0\124h[Spellfire Robe]\124h\124r. Man, I thought my |cff71d5ff|Hspell:133|h[Fireball]|h|r hit *so* " ..
91,10 → 92,15
return raceIcons[(getPlayerInfo(name))]
end
 
local function getAchievementIcon(id)
return select(10,GetAchievementInfo(id))
end
 
function addon:ProcessMessage(msg,textureFormat,example)
local db = example and self.tempDB or self.db
if db.items then msg = parseMessage(msg,textureFormat,ITEM_LINK_PATTERN,GetItemIcon) end
if db.spells then msg = parseMessage(msg,textureFormat,SPELL_LINK_PATTERN,getSpellIcon) end
if db.achievements then msg = parseMessage(msg,textureFormat,ACHIEVEMENT_LINK_PATTERN,getAchievementIcon) end
if example or event == "CHAT_MSG_PARTY" or event == "CHAT_MSG_RAID" or event == "CHAT_MSG_GUILD" then
--if db.race then msg = parseMessage(msg,textureFormat,PLAYER_LINK_PATTERN,getPlayerRaceIcon) end
if db.class then msg = parseMessage(msg,textureFormat,PLAYER_LINK_PATTERN,getPlayerClassIcon) end
170,6 → 176,7
self.itemIcons = createCheckButton("Item Icons","items","Item icons are added next to item links in chat.","TOPLEFT",self.subtext,"BOTTOMLEFT",-2,-8)
self.spellIcons = createCheckButton("Spell Icons","spells","Spell icons are added next to spell links in chat.","TOPLEFT",self.itemIcons,"BOTTOMLEFT",0,-8)
self.classIcons = createCheckButton("Player Class Icons","class","Class icons are added next to players' names when they speak in party, raid or guild chat.","TOPLEFT",self.spellIcons,"BOTTOMLEFT",0,-8)
self.achIcons = createCheckButton("Achievement Icons","achievements","Achievement icons are added next to achievement links in chat.","TOPLEFT",self.classIcons,"BOTTOMLEFT",0,-8)
 
--self.raceIcons = createCheckButton("Player Race Icons","race","Race icons are added next to players' names when they speak in party, raid or guild chat.","TOPLEFT",self.classIcons,"BOTTOMLEFT",0,-8)
--self.moneyIcons = createCheckButton("Coin Icons","money","","TOPLEFT",self.classIcons,"BOTTOMLEFT",0,-8)
305,7 → 312,7
end
 
createSlider = function(name,option,min,max,tooltipText,...)
local s = CreateFrame("Slider","ChatIcons - "..name,addon,"InterfaceOptionsSliderTemplate")
local s = CreateFrame("Slider","ChatIcons - "..name,addon,"OptionsSliderTemplate")
local t = s:CreateFontString(nil,"ARTWORK","GameFontHighlightSmall")
t:SetPoint("TOP",s,"BOTTOM")
s.valueText = t
ChatIcons/ChatIcons.toc
1,4 → 1,4
## Interface: 20400
## Interface: 30000
## Notes: Adds icons to your chat.
## Version: 0.9 beta
## SavedVariables: ChatIconsDB