WoWInterface SVN Thanks4Buff

Compare Revisions

  • This comparison shows the changes necessary to convert path
    /
    from Rev 9 to Rev 10
    Reverse comparison

Rev 9 → Rev 10

trunk/Thanks4Buff.toc
1,4 → 1,4
## Interface: 30100
## Interface: 40100
## Title : Thanks For Buff
## Notes: Emotes a thank you to people who buff you.
## Author: Sekrin@Argent Dawn-EU
trunk/Thanks4Buff.lua
60,19 → 60,28
 
 
function T4B_COMBAT_LOG_EVENT_UNFILTERED(event, ...)
local timestamp, eventType, sourceGUID, sourceName, sourceFlags, destGUID, destName, destFlags = select(1, ...)
local timestamp, eventType, hideCaster, sourceGUID, sourceName, sourceFlags, destGUID, destName, destFlags = select(1, ...)
local filter
if T4BOpts["npc"] then
filter = bit.bor(COMBATLOG_OBJECT_AFFILIATION_OUTSIDER, COMBATLOG_OBJECT_REACTION_FRIENDLY, COMBATLOG_OBJECT_CONTROL_MASK, COMBATLOG_OBJECT_TYPE_MASK)
else
filter = bit.bor(COMBATLOG_OBJECT_AFFILIATION_OUTSIDER, COMBATLOG_OBJECT_REACTION_FRIENDLY, COMBATLOG_OBJECT_CONTROL_MASK, COMBATLOG_OBJECT_TYPE_PLAYER)
end
if eventType == "SPELL_AURA_APPLIED" and destGUID == UnitGUID("player") and (CombatLog_Object_IsA(sourceFlags, filter) == 1) then
 
print(eventType)
if ( eventType == "SPELL_AURA_APPLIED" or eventType== "SPELL_AURA_REFRESH" ) and destGUID == UnitGUID("player") and (CombatLog_Object_IsA(sourceFlags, filter) == 1) then
local emotetext
if T4BOpts["spell"] then
local spellId, spellName, spellSchool = select(9, ...)
emotetext = T4B_Sayings["spell"][random(#(T4B_Sayings["spell"]))]
local spellId, spellName, spellSchool = select(10, ...)
if GetLocale() == "frFR" then
local firstLetter = strsub(spellName, 1, 1)
if firstLetter == "a" or firstLetter == "e" or firstLetter == "i" or firstLetter == "o" or firstLetter == "u" then
emotetext = T4B_Sayings["spell"]["vowel"][random(#(T4B_Sayings["spell"]))]
else
emotetext = T4B_Sayings["spell"]["cons"][random(#(T4B_Sayings["spell"]))]
end
else
emotetext = T4B_Sayings["spell"][random(#(T4B_Sayings["spell"]))]
end
emotetext = gsub(emotetext, "#s", spellName)
else
emotetext = T4B_Sayings["nospell"][random(#(T4B_Sayings["nospell"]))]
103,17 → 112,41
["PRIEST"] = GetSpellInfo(1243), --Fort
["MAGE"] = GetSpellInfo(1459) --AI
}
 
 
 
-- The T4B_Sayings table holds the list of strings for the emotes.
T4B_Sayings = {}
T4B_Sayings["spell"] = {}
T4B_Sayings["spell"] = {
"thanks #n for their #s.",
"is grateful for #n's #s.",
"appreciates #n's #s."
}
T4B_Sayings["nospell"] = {}
T4B_Sayings["nospell"] = {
"thanks #n.",
"is grateful to #n.",
"is appreciative towards #n."
}
\ No newline at end of file + +if GetLocale() == "frFR" then + T4B_Sayings["spell"]["vowel"] = { + "remercie #n pour sa #s.", + "est reconnaissant pour l'#s de #n.", + "apprécie l'#s de #n." + } + T4B_Sayings["spell"]["cons"] = { + "remercie #n pour sa #s.", + "est reconnaissant pour la #s de #n.", + "apprécie la #s de #n." + } + + T4B_Sayings["nospell"] = { + "remercie #n.", + "est reconnaissant envers #n.", + "apprécie #n." + } + +else + T4B_Sayings["spell"] = { + "thanks #n for their #s.", + "is grateful for #n's #s.", + "appreciates #n's #s." + } + + T4B_Sayings["nospell"] = { + "thanks #n.", + "is grateful to #n.", + "is appreciative towards #n." + } +end \ No newline at end of file