- Added new sub attribute for Heal: Enemy Heal.
- Added new sub attribute for Heal: Damage Prevented. - Added new sub attribute for Misc: Cooldowns. - All tooltips has been revised and changed. - Fixed issue with absobed heal amount. - Actors will be placed inside cache only if Details is in combat. - Added support to dual status bar on CoolTips. - Fixed some labels over info window were text was to big. - Cosmetic changes in many places.
This commit is contained in:
+1
-2
@@ -3,10 +3,9 @@
|
||||
## Notes: Computes detailed infos about combats.
|
||||
## SavedVariables: _detalhes_global
|
||||
## SavedVariablesPerCharacter: _detalhes_database
|
||||
## OptionalDeps: Ace3, LibSharedMedia-3.0, LibBossIDs-1.0, LibGraph-2.0, !ClassColors
|
||||
|
||||
#@no-lib-strip@
|
||||
embeds.xml
|
||||
Libs\libs.xml
|
||||
#@end-no-lib-strip@
|
||||
|
||||
locales\Details-ptBR.lua
|
||||
|
||||
@@ -0,0 +1,951 @@
|
||||
--> Library NickTag is a small library for share individual nicknames and avatars.
|
||||
|
||||
--> Basic Functions:
|
||||
-- NickTag:SetNickname (name) -> set the player nick name, after set nicktag will broadcast the nick over addon guild channel.
|
||||
--
|
||||
|
||||
local major, minor = "NickTag-1.0", 2
|
||||
local NickTag, oldminor = LibStub:NewLibrary (major, minor)
|
||||
|
||||
if (not NickTag) then
|
||||
return
|
||||
end
|
||||
|
||||
------------------------------------------------------------------------------------------------------------------------------------------------------
|
||||
--> constants
|
||||
|
||||
local CONST_INDEX_NICKNAME = 1
|
||||
local CONST_INDEX_AVATAR_PATH = 2
|
||||
local CONST_INDEX_AVATAR_TEXCOORD = 3
|
||||
local CONST_INDEX_BACKGROUND_PATH = 4
|
||||
local CONST_INDEX_BACKGROUND_TEXCOORD = 5
|
||||
local CONST_INDEX_BACKGROUND_COLOR = 6
|
||||
local CONST_INDEX_REVISION = 7
|
||||
|
||||
local CONST_COMM_FULLPERSONA = 1
|
||||
local CONST_COMM_LOGONREVISION = 2
|
||||
local CONST_COMM_REQUESTPERSONA = 3
|
||||
|
||||
------------------------------------------------------------------------------------------------------------------------------------------------------
|
||||
--> library stuff
|
||||
|
||||
_G.NickTag = NickTag --> nicktag object over global container
|
||||
|
||||
local pool = {default = true} --> pointer to the cache pool and the default pool if no cache
|
||||
|
||||
LibStub:GetLibrary ("AceComm-3.0"):Embed (NickTag)
|
||||
LibStub:GetLibrary ("AceSerializer-3.0"):Embed (NickTag)
|
||||
LibStub:GetLibrary ("AceTimer-3.0"):Embed (NickTag)
|
||||
local CallbackHandler = LibStub:GetLibrary ("CallbackHandler-1.0")
|
||||
NickTag.callbacks = NickTag.callbacks or CallbackHandler:New (NickTag)
|
||||
|
||||
NickTag.embeds = NickTag.embeds or {}
|
||||
local embed_functions = {
|
||||
"SetNickname",
|
||||
"SetNicknameAvatar",
|
||||
"SetNicknameBackground",
|
||||
"GetNickname",
|
||||
"GetNicknameAvatar",
|
||||
"GetNicknameBackground",
|
||||
"GetNicknameTable",
|
||||
"NickTagSetCache"
|
||||
}
|
||||
function NickTag:Embed (target)
|
||||
for k, v in pairs (embed_functions) do
|
||||
target[v] = self[v]
|
||||
end
|
||||
self.embeds [target] = true
|
||||
return target
|
||||
end
|
||||
|
||||
local enUS = LibStub("AceLocale-3.0"):NewLocale ("NickTag-1.0", "enUS", true)
|
||||
if (enUS) then
|
||||
enUS ["STRING_ERROR_1"] = "Your nickname is too long, max of 12 characters is allowed."
|
||||
enUS ["STRING_ERROR_2"] = "Only letters and two spaces are allowed."
|
||||
enUS ["STRING_ERROR_3"] = "You can't use the same letter three times consecutively, two spaces consecutively or more then two spaces."
|
||||
enUS ["STRING_INVALID_NAME"] = "Invalid Name"
|
||||
end
|
||||
|
||||
local ptBR = LibStub("AceLocale-3.0"):NewLocale ("NickTag-1.0", "ptBR")
|
||||
if (ptBR) then
|
||||
ptBR ["STRING_ERROR_1"] = "Seu apelido esta muito longo, o maximo permitido sao 12 caracteres."
|
||||
ptBR ["STRING_ERROR_2"] = "Apenas letras, numeros e espacos sao permitidos no apelido."
|
||||
ptBR ["STRING_ERROR_3"] = "Voce nao pode usar a mesma letra mais de 2 vezes consecutivas, dois espacos consecutivos ou mais de 2 espacos."
|
||||
ptBR ["STRING_INVALID_NAME"] = "Nome Invalido"
|
||||
end
|
||||
|
||||
NickTag.background_pool = {
|
||||
{[[Interface\PetBattles\Weather-ArcaneStorm]], "Arcane Storm", {0.129609375, 1, 1, 0}},
|
||||
{[[Interface\PetBattles\Weather-Blizzard]], "Blizzard", {0.068704154, 1, 1, 0}},
|
||||
{[[Interface\PetBattles\Weather-BurntEarth]], "Burnt Earth", {0.087890625, 0.916015625, 1, 0}},
|
||||
{[[Interface\PetBattles\Weather-Darkness]], "Darkness", {0.080078125, 0.931640625, 1, 0}},
|
||||
{[[Interface\PetBattles\Weather-Moonlight]], "Moonlight", {0.02765625, 0.94359375, 1, 0}},
|
||||
{[[Interface\PetBattles\Weather-Moonlight]], "Moonlight (reverse)", {0.94359375, 0.02765625, 1, 0}},
|
||||
{[[Interface\PetBattles\Weather-Mud]], "Mud", {0.068359375, 0.94359375, 1, 0}},
|
||||
{[[Interface\PetBattles\Weather-Rain]], "Rain", {0.078125, 0.970703125, 1, 0}},
|
||||
{[[Interface\PetBattles\Weather-Sandstorm]], "Sand Storm", {0.048828125, 0.947265625, 1, 0}},
|
||||
{[[Interface\PetBattles\Weather-StaticField]], "Static Field", {0.1171875, 0.953125, 1, 0}},
|
||||
{[[Interface\PetBattles\Weather-Sunlight]], "Sun Light", {0.1772721, 0.953125, 1, 0}},
|
||||
{[[Interface\PetBattles\Weather-Windy]], "Windy", {0.9453125, 0.07421875, 0.8203125, 0}}
|
||||
}
|
||||
|
||||
NickTag.avatar_pool = {
|
||||
{[[Interface\EncounterJournal\UI-EJ-BOSS-Arcanist Doan]], "Arcanist Doan"},
|
||||
{[[Interface\EncounterJournal\UI-EJ-BOSS-Archbishop Benedictus]], "Archbishop Benedictus"},
|
||||
{[[Interface\EncounterJournal\UI-EJ-BOSS-Argent Confessor Paletress]], "Argent Confessor Paletress"},
|
||||
{[[Interface\EncounterJournal\UI-EJ-BOSS-Armsmaster Harlan]], "Armsmaster Harlan"},
|
||||
{[[Interface\EncounterJournal\UI-EJ-BOSS-Asira Dawnslayer]], "Asira Dawnslayer"},
|
||||
{[[Interface\EncounterJournal\UI-EJ-BOSS-Baelog]], "Baelog"},
|
||||
{[[Interface\EncounterJournal\UI-EJ-BOSS-Baron Ashbury]], "Baron Ashbury"},
|
||||
{[[Interface\EncounterJournal\UI-EJ-BOSS-Baron Silverlaine]], "Baron Silverlaine"},
|
||||
{[[Interface\EncounterJournal\UI-EJ-BOSS-Bronjahm]], "Bronjahm"},
|
||||
{[[Interface\EncounterJournal\UI-EJ-BOSS-Brother Korloff]], "Brother Korloff"},
|
||||
{[[Interface\EncounterJournal\UI-EJ-BOSS-Captain Skarloc]], "Captain Skarloc"},
|
||||
{[[Interface\EncounterJournal\UI-EJ-BOSS-Commander Sarannis]], "Commander Sarannis"},
|
||||
{[[Interface\EncounterJournal\UI-EJ-BOSS-Commander Springvale]], "Commander Springvale"},
|
||||
{[[Interface\EncounterJournal\UI-EJ-BOSS-Commander Stoutbeard]], "Commander Stoutbeard"},
|
||||
{[[Interface\EncounterJournal\UI-EJ-BOSS-Corla, Herald of Twilight]], "Corla, Herald of Twilight"},
|
||||
{[[Interface\EncounterJournal\UI-EJ-BOSS-Cyanigosa]], "Cyanigosa"},
|
||||
{[[Interface\EncounterJournal\UI-EJ-BOSS-Darkmaster Gandling]], "Darkmaster Gandling"},
|
||||
{[[Interface\EncounterJournal\UI-EJ-BOSS-Doctor Theolen Krastinov]], "Doctor Theolen Krastinov"},
|
||||
{[[Interface\EncounterJournal\UI-EJ-BOSS-DoomRel]], "DoomRel"},
|
||||
{[[Interface\EncounterJournal\UI-EJ-BOSS-Eadric the Pure]], "Eadric the Pure"},
|
||||
{[[Interface\EncounterJournal\UI-EJ-BOSS-Emperor Thaurissan]], "Emperor Thaurissan"},
|
||||
{[[Interface\EncounterJournal\UI-EJ-BOSS-Empyreal Queens]], "Lu'lin"},
|
||||
{[[Interface\EncounterJournal\UI-EJ-BOSS-Exarch Maladaar]], "Exarch Maladaar"},
|
||||
{[[Interface\EncounterJournal\UI-EJ-BOSS-Fineous Darkvire]], "Fineous Darkvire"},
|
||||
{[[Interface\EncounterJournal\UI-EJ-BOSS-Grand Champions-Alliance]], "Grand Champions-Alliance"},
|
||||
{[[Interface\EncounterJournal\UI-EJ-BOSS-Grand Magus Telestra]], "Grand Magus Telestra"},
|
||||
{[[Interface\EncounterJournal\UI-EJ-BOSS-HateRel]], "HateRel"},
|
||||
{[[Interface\EncounterJournal\UI-EJ-BOSS-Hearthsinger Forresten]], "Hearthsinger Forresten"},
|
||||
{[[Interface\EncounterJournal\UI-EJ-BOSS-High Botanist Freywinn]], "High Botanist Freywinn"},
|
||||
{[[Interface\EncounterJournal\UI-EJ-BOSS-High Inquisitor Whitemane]], "High Inquisitor Whitemane"},
|
||||
{[[Interface\EncounterJournal\UI-EJ-BOSS-High Interrogator Gerstahn]], "High Interrogator Gerstahn"},
|
||||
{[[Interface\EncounterJournal\UI-EJ-BOSS-High Justice Grimstone]], "High Justice Grimstone"},
|
||||
{[[Interface\EncounterJournal\UI-EJ-BOSS-Houndmaster Braun]], "Houndmaster Braun"},
|
||||
{[[Interface\EncounterJournal\UI-EJ-BOSS-Houndmaster Loksey]], "Houndmaster Loksey"},
|
||||
{[[Interface\EncounterJournal\UI-EJ-BOSS-Hydromancer Velratha]], "Hydromancer Velratha"},
|
||||
{[[Interface\EncounterJournal\UI-EJ-BOSS-Illyanna Ravenoak]], "Illyanna Ravenoak"},
|
||||
{[[Interface\EncounterJournal\UI-EJ-BOSS-Ingvar the Plunderer]], "Ingvar the Plunderer"},
|
||||
{[[Interface\EncounterJournal\UI-EJ-BOSS-Instructor Malicia]], "Instructor Malicia"},
|
||||
{[[Interface\EncounterJournal\UI-EJ-BOSS-Interrogator Vishas]], "Interrogator Vishas"},
|
||||
{[[Interface\EncounterJournal\UI-EJ-BOSS-Isiset]], "Isiset"},
|
||||
{[[Interface\EncounterJournal\UI-EJ-BOSS-JainaProudmoore]], "Jaina Proudmoore"},
|
||||
{[[Interface\EncounterJournal\UI-EJ-BOSS-Jandice Barov]], "Jandice Barov"},
|
||||
{[[Interface\EncounterJournal\UI-EJ-BOSS-Kaelthas Sunstrider]], "Kaelthas Sunstrider"},
|
||||
{[[Interface\EncounterJournal\UI-EJ-BOSS-Krick]], "Krick"},
|
||||
{[[Interface\EncounterJournal\UI-EJ-BOSS-Lady Anacondra]], "Lady Anacondra"},
|
||||
{[[Interface\EncounterJournal\UI-EJ-BOSS-Lady Illucia Barov]], "Lady Illucia Barov"},
|
||||
{[[Interface\EncounterJournal\UI-EJ-BOSS-Lethtendris]], "Lethtendris"},
|
||||
{[[Interface\EncounterJournal\UI-EJ-BOSS-Loken]], "Loken"},
|
||||
{[[Interface\EncounterJournal\UI-EJ-BOSS-Lord Alexei Barov]], "Lord Alexei Barov"},
|
||||
{[[Interface\EncounterJournal\UI-EJ-BOSS-Lord Aurius Rivendare]], "Lord Aurius Rivendare"},
|
||||
{[[Interface\EncounterJournal\UI-EJ-BOSS-Lord Cobrahn]], "Lord Cobrahn"},
|
||||
{[[Interface\EncounterJournal\UI-EJ-BOSS-Lord Pythas]], "Lord Pythas"},
|
||||
{[[Interface\EncounterJournal\UI-EJ-BOSS-Lord Serpentis]], "Lord Serpentis"},
|
||||
{[[Interface\EncounterJournal\UI-EJ-BOSS-Lorgus Jett]], "Lorgus Jett"},
|
||||
{[[Interface\EncounterJournal\UI-EJ-BOSS-Mage Lord Urom]], "Mage Lord Urom"},
|
||||
{[[Interface\EncounterJournal\UI-EJ-BOSS-Magister Kalendris]], "Magister Kalendris"},
|
||||
{[[Interface\EncounterJournal\UI-EJ-BOSS-Magistrate Barthilas]], "Magistrate Barthilas"},
|
||||
{[[Interface\EncounterJournal\UI-EJ-BOSS-Maiden of Grief]], "Maiden of Grief"},
|
||||
{[[Interface\EncounterJournal\UI-EJ-BOSS-Maleki the Pallid]], "Maleki the Pallid"},
|
||||
{[[Interface\EncounterJournal\UI-EJ-BOSS-Nethermancer Sepethrea]], "Nethermancer Sepethrea"},
|
||||
{[[Interface\EncounterJournal\UI-EJ-BOSS-Olaf]], "Olaf"},
|
||||
{[[Interface\EncounterJournal\UI-EJ-BOSS-Pathaleon the Calculator]], "Pathaleon the Calculator"},
|
||||
{[[Interface\EncounterJournal\UI-EJ-BOSS-Prince Tortheldrin]], "Prince Tortheldrin"},
|
||||
{[[Interface\EncounterJournal\UI-EJ-BOSS-Princess Moira Bronzebeard]], "Princess Moira Bronzebeard"},
|
||||
{[[Interface\EncounterJournal\UI-EJ-BOSS-QueenAzshara]], "Queen Azshara"},
|
||||
{[[Interface\EncounterJournal\UI-EJ-BOSS-Randolph Moloch]], "Randolph Moloch"},
|
||||
{[[Interface\EncounterJournal\UI-EJ-BOSS-Scarlet Commander Mograine]], "Scarlet Commander Mograine"},
|
||||
{[[Interface\EncounterJournal\UI-EJ-BOSS-Selin Fireheart]], "Selin Fireheart"},
|
||||
{[[Interface\EncounterJournal\UI-EJ-BOSS-Skarvald the Constructor]], "Skarvald the Constructor"},
|
||||
{[[Interface\EncounterJournal\UI-EJ-BOSS-Tribunal of the Ages]], "Tribunal of the Ages"},
|
||||
{[[Interface\EncounterJournal\UI-EJ-BOSS-TyrandeWhisperwind]], "Tyrande Whisperwind"},
|
||||
{[[Interface\EncounterJournal\UI-EJ-BOSS-Vanessa VanCleef]], "Vanessa VanCleef"}
|
||||
}
|
||||
------------------------------------------------------------------------------------------------------------------------------------------------------
|
||||
--> send and receive functions
|
||||
|
||||
function NickTag:OnReceiveComm (_, data, _, source)
|
||||
|
||||
local _type, serial, arg3, name, realm, version = select (2, NickTag:Deserialize (data))
|
||||
|
||||
--> 0x1: received a full persona
|
||||
if (_type == CONST_COMM_FULLPERSONA) then
|
||||
local receivedPersona = arg3
|
||||
version = name
|
||||
|
||||
if (serial ~= NickTag:GetSerial() and (version and version == minor)) then
|
||||
|
||||
local storedPersona = NickTag:GetNicknameTable (serial)
|
||||
if (not storedPersona) then
|
||||
storedPersona = NickTag:Create (serial)
|
||||
end
|
||||
|
||||
if (storedPersona [CONST_INDEX_REVISION] < receivedPersona [CONST_INDEX_REVISION]) then
|
||||
storedPersona [CONST_INDEX_REVISION] = receivedPersona [CONST_INDEX_REVISION]
|
||||
|
||||
--> we need to check if the received nickname fit in our rules.
|
||||
local allowNickName = NickTag:CheckName (receivedPersona [CONST_INDEX_NICKNAME])
|
||||
if (allowNickName) then
|
||||
storedPersona [CONST_INDEX_NICKNAME] = receivedPersona [CONST_INDEX_NICKNAME]
|
||||
else
|
||||
storedPersona [CONST_INDEX_NICKNAME] = LibStub ("AceLocale-3.0"):GetLocale ("NickTag-1.0")["STRING_INVALID_NAME"]
|
||||
end
|
||||
--> update the rest
|
||||
storedPersona [CONST_INDEX_AVATAR_PATH] = receivedPersona [CONST_INDEX_AVATAR_PATH]
|
||||
storedPersona [CONST_INDEX_AVATAR_TEXCOORD] = receivedPersona [CONST_INDEX_AVATAR_TEXCOORD]
|
||||
storedPersona [CONST_INDEX_BACKGROUND_TEXCOORD] = receivedPersona [CONST_INDEX_BACKGROUND_TEXCOORD]
|
||||
storedPersona [CONST_INDEX_BACKGROUND_PATH] = receivedPersona [CONST_INDEX_BACKGROUND_PATH]
|
||||
storedPersona [CONST_INDEX_BACKGROUND_COLOR] = receivedPersona [CONST_INDEX_BACKGROUND_COLOR]
|
||||
end
|
||||
end
|
||||
|
||||
--> 0x2: received a revision version from a guy which logon in the game
|
||||
elseif (_type == CONST_COMM_LOGONREVISION) then
|
||||
|
||||
local receivedRevision = arg3
|
||||
local storedPersona = NickTag:GetNicknameTable (serial)
|
||||
|
||||
if (type (version) ~= "number" or version ~= minor) then
|
||||
return
|
||||
end
|
||||
|
||||
if (not storedPersona or storedPersona [CONST_INDEX_REVISION] < receivedRevision) then
|
||||
--> not sure how connected realms will work, but guess this will be fine
|
||||
if (realm ~= GetRealmName()) then
|
||||
name = name .. "-" .. realm
|
||||
end
|
||||
NickTag:ScheduleTimer ("RequestPersona", math.random (1, 20), name)
|
||||
end
|
||||
|
||||
--> 0x3: someone requested my persona, so i need to send to him
|
||||
elseif (_type == CONST_COMM_REQUESTPERSONA) then
|
||||
|
||||
if (type (version) ~= "number" or version ~= minor) then
|
||||
return
|
||||
end
|
||||
|
||||
--> not sure how connected realms will work, but guess this will be fine
|
||||
if (realm ~= GetRealmName()) then
|
||||
name = name .. "-" .. realm
|
||||
end
|
||||
NickTag:SendPersona (name)
|
||||
end
|
||||
|
||||
end
|
||||
|
||||
NickTag:RegisterComm ("NickTag", "OnReceiveComm")
|
||||
|
||||
--> after logon, we send our revision, who needs update my persona will send 0x3 (request persona) to me and i send back 0x1 (send persona)
|
||||
function NickTag:SendRevision()
|
||||
local battlegroup_serial = NickTag:GetSerial()
|
||||
if (not battlegroup_serial) then
|
||||
return
|
||||
end
|
||||
|
||||
local myPersona = NickTag:GetNicknameTable (battlegroup_serial)
|
||||
if (myPersona) then
|
||||
NickTag:SendCommMessage ("NickTag", NickTag:Serialize (CONST_COMM_LOGONREVISION, battlegroup_serial, myPersona [CONST_INDEX_REVISION], UnitName ("player"), GetRealmName(), minor), "GUILD")
|
||||
end
|
||||
end
|
||||
|
||||
--> i received 0x2 and his persona is out of date here, so i need to send 0x3 to him and him will send 0x1.
|
||||
function NickTag:RequestPersona (target)
|
||||
NickTag:SendCommMessage ("NickTag", NickTag:Serialize (CONST_COMM_REQUESTPERSONA, 0, 0, UnitName ("player"), GetRealmName(), minor), "WHISPER", target)
|
||||
end
|
||||
|
||||
--> this broadcast my persona to entire guild when i update my persona or send my persona to someone who doesn't have it or need to update.
|
||||
function NickTag:SendPersona (target)
|
||||
local battlegroup_serial = NickTag:GetSerial()
|
||||
if (not battlegroup_serial) then
|
||||
return
|
||||
end
|
||||
|
||||
if (target) then
|
||||
--> was requested
|
||||
NickTag:SendCommMessage ("NickTag", NickTag:Serialize (CONST_COMM_FULLPERSONA, battlegroup_serial, NickTag:GetNicknameTable (battlegroup_serial), minor), "WHISPER", target)
|
||||
else
|
||||
--> updating my own persona
|
||||
NickTag.send_scheduled = false
|
||||
--> need to increase 1 revision
|
||||
NickTag:IncRevision()
|
||||
--> broadcast over guild channel
|
||||
NickTag:SendCommMessage ("NickTag", NickTag:Serialize (CONST_COMM_FULLPERSONA, battlegroup_serial, NickTag:GetNicknameTable (battlegroup_serial), minor), "GUILD")
|
||||
end
|
||||
end
|
||||
|
||||
------------------------------------------------------------------------------------------------------------------------------------------------------
|
||||
--> on logon stuff
|
||||
|
||||
--> reset cache
|
||||
function NickTag:ResetCache()
|
||||
|
||||
local guid = UnitGUID ("player")
|
||||
|
||||
if (guid) then
|
||||
local player = NickTag:GetNicknameTable (guid)
|
||||
if (player and pool.last_version == minor) then
|
||||
local serial = NickTag:GetSerial (guid)
|
||||
for this_serial, _ in pairs (pool) do
|
||||
if (this_serial ~= serial) then
|
||||
pool [this_serial] = nil
|
||||
end
|
||||
end
|
||||
--vardump (pool)
|
||||
else
|
||||
table.wipe (pool)
|
||||
end
|
||||
|
||||
pool.nextreset = time() + (60*60*24*15) --> 15 days or 1296000 seconds
|
||||
pool.last_version = minor
|
||||
else
|
||||
--> sometimes player guid isn't available right after logon, so, just schedule until it become available.
|
||||
NickTag:ScheduleTimer ("ResetCache", 0.3)
|
||||
end
|
||||
end
|
||||
|
||||
function NickTag:NickTagSetCache (_table)
|
||||
if (not pool.default) then
|
||||
return table.wipe (_table)
|
||||
end
|
||||
|
||||
pool = _table
|
||||
|
||||
if (not pool.nextreset) then
|
||||
pool.nextreset = time() + (60*60*24*15)
|
||||
end
|
||||
if (not pool.last_version) then
|
||||
pool.last_version = minor
|
||||
end
|
||||
if (pool.last_version < minor) then
|
||||
pool.nextreset = 1
|
||||
end
|
||||
if (time() > pool.nextreset) then
|
||||
NickTag:ResetCache()
|
||||
end
|
||||
|
||||
NickTag:ScheduleTimer ("SendRevision", 30)
|
||||
end
|
||||
|
||||
------------------------------------------------------------------------------------------------------------------------------------------------------
|
||||
--> basic functions
|
||||
|
||||
--> trim from from http://lua-users.org/wiki/StringTrim
|
||||
function trim (s)
|
||||
local from = s:match"^%s*()"
|
||||
return from > #s and "" or s:match(".*%S", from)
|
||||
end
|
||||
--
|
||||
local titlecase = function (first, rest)
|
||||
return first:upper()..rest:lower()
|
||||
end
|
||||
--
|
||||
local have_repeated = false
|
||||
local count_spaces = 0
|
||||
local check_repeated = function (char)
|
||||
if (char == " ") then
|
||||
have_repeated = true
|
||||
elseif (string.len (char) > 2) then
|
||||
have_repeated = true
|
||||
elseif (char == " ") then
|
||||
count_spaces = count_spaces + 1
|
||||
end
|
||||
end
|
||||
|
||||
--> we need to keep game smooth checking and formating nicknames.
|
||||
--> SetNickname and names comming from other player need to be check.
|
||||
function NickTag:CheckName (name)
|
||||
|
||||
--> as nicktag only work internally in the guild, we think that is not necessary a work filter to avoid people using bad language.
|
||||
|
||||
name = trim (name)
|
||||
|
||||
--> limit nickname to 12 characters, same as wow.
|
||||
local len = string.len (name)
|
||||
if (len > 12) then
|
||||
return false, LibStub ("AceLocale-3.0"):GetLocale ("NickTag-1.0")["STRING_ERROR_1"] --> error 1 = nickname is too long, max of 12 characters.
|
||||
end
|
||||
|
||||
--> check if contain any non allowed characters, by now only accpet letters, numbers and spaces.
|
||||
--> by default wow do not accetp spaces, but here will allow.
|
||||
--> tested over lua 5.2 and this capture was okey with accents, not sure why inside wow this doesn't work.
|
||||
local notallow = string.find (name, "[^a-zA-Záéíóúãõ%s]")
|
||||
if (notallow) then
|
||||
return false, LibStub ("AceLocale-3.0"):GetLocale ("NickTag-1.0")["STRING_ERROR_2"] --> error 2 = nickname only support letters, numbers and spaces.
|
||||
end
|
||||
|
||||
--> check if there is sequencial repeated characters, like "Jasooon" were repeats 3 times the "o" character.
|
||||
--> got this from http://stackoverflow.com/questions/15608299/lua-pattern-matching-repeating-character
|
||||
have_repeated = false
|
||||
count_spaces = 0
|
||||
string.gsub (name, '.', '\0%0%0'):gsub ('(.)%z%1','%1'):gsub ('%z.([^%z]+)', check_repeated)
|
||||
if (count_spaces > 2) then
|
||||
have_repeated = true
|
||||
end
|
||||
if (have_repeated) then
|
||||
return false, LibStub ("AceLocale-3.0"):GetLocale ("NickTag-1.0")["STRING_ERROR_3"] --> error 3 = cant use the same letter three times consecutively, 2 spaces consecutively or 3 or more spaces.
|
||||
end
|
||||
|
||||
return true
|
||||
end
|
||||
|
||||
--> set the "player" nickname and schedule for send updated persona
|
||||
function NickTag:SetNickname (name)
|
||||
--> check data before
|
||||
assert (type (name) == "string", "NickTag 'SetNickname' expects a string on #1 argument.")
|
||||
|
||||
--> check if the nickname is okey to allowed to use.
|
||||
local okey, errortype = NickTag:CheckName (name)
|
||||
if (not okey) then
|
||||
return false, errortype
|
||||
end
|
||||
|
||||
--> here we format the text to match titles, e.g converts name like "JASON NICKSHOW" into "Jason Nickshow".
|
||||
name = name:gsub ("(%a)([%w_']*)", titlecase)
|
||||
|
||||
--> get player serial, note that serials are unique between battlegroups and we are using serial instead of full GUID just for reduce memory usage,
|
||||
--> e.g guids are strings with 18 characters, serials are 8 digits number (or 9).
|
||||
local battlegroup_serial = NickTag:GetSerial()
|
||||
if (not battlegroup_serial) then
|
||||
return
|
||||
end
|
||||
|
||||
--> get the full nick table.
|
||||
local nick_table = NickTag:GetNicknameTable (battlegroup_serial)
|
||||
if (not nick_table) then
|
||||
nick_table = NickTag:Create (battlegroup_serial, true)
|
||||
end
|
||||
|
||||
--> change the nickname for the player nick table.
|
||||
if (nick_table [CONST_INDEX_NICKNAME] ~= name) then
|
||||
nick_table [CONST_INDEX_NICKNAME] = name
|
||||
|
||||
--> send the update for script which need it.
|
||||
NickTag.callbacks:Fire ("NickTag_Update", CONST_INDEX_NICKNAME)
|
||||
|
||||
--> schedule a update for revision and broadcast full persona.
|
||||
--> this is a kind of protection for scripts which call SetNickname, SetColor and SetAvatar one after other, so scheduling here avoid three revisions upgrades and 3 broadcasts to the guild.
|
||||
if (not NickTag.send_scheduled) then
|
||||
NickTag.send_scheduled = true
|
||||
NickTag:ScheduleTimer ("SendPersona", 1)
|
||||
end
|
||||
end
|
||||
|
||||
return true
|
||||
end
|
||||
|
||||
function NickTag:SetNicknameAvatar (texture, l, r, t, b)
|
||||
|
||||
if (l == nil) then
|
||||
l, r, t, b = 0, 1, 0, 1
|
||||
elseif (type (l) == "table") then
|
||||
l, r, t, b = unpack (l)
|
||||
end
|
||||
|
||||
--> check data before
|
||||
assert (texture and l and r and t and b, "NickTag 'SetAvatar' bad format. Usage NickTag:SetAvatar (texturepath [, L, R, T, B] or texturepath [, {L, R, T, B}])")
|
||||
|
||||
local battlegroup_serial = NickTag:GetSerial()
|
||||
if (not battlegroup_serial) then
|
||||
return
|
||||
end
|
||||
|
||||
local nick_table = NickTag:GetNicknameTable (battlegroup_serial)
|
||||
if (not nick_table) then
|
||||
nick_table = NickTag:Create (battlegroup_serial, true)
|
||||
end
|
||||
|
||||
if (nick_table [CONST_INDEX_AVATAR_PATH] ~= texture) then
|
||||
nick_table [CONST_INDEX_AVATAR_PATH] = texture
|
||||
|
||||
--> by default, CONST_INDEX_AVATAR_TEXCOORD comes as boolean false
|
||||
if (type (nick_table [CONST_INDEX_AVATAR_TEXCOORD]) == "boolean") then
|
||||
nick_table [CONST_INDEX_AVATAR_TEXCOORD] = {}
|
||||
end
|
||||
|
||||
nick_table [CONST_INDEX_AVATAR_TEXCOORD][1] = l
|
||||
nick_table [CONST_INDEX_AVATAR_TEXCOORD][2] = r
|
||||
nick_table [CONST_INDEX_AVATAR_TEXCOORD][3] = t
|
||||
nick_table [CONST_INDEX_AVATAR_TEXCOORD][4] = b
|
||||
|
||||
NickTag.callbacks:Fire ("NickTag_Update", CONST_INDEX_AVATAR_PATH)
|
||||
|
||||
if (not NickTag.send_scheduled) then
|
||||
NickTag.send_scheduled = true
|
||||
NickTag:ScheduleTimer ("SendPersona", 1)
|
||||
end
|
||||
end
|
||||
|
||||
return true
|
||||
end
|
||||
|
||||
--> set the background
|
||||
function NickTag:SetNicknameBackground (path, texcoord, color, silent)
|
||||
|
||||
if (not silent) then
|
||||
assert (type (path) == "string", "NickTag 'SetNicknameBackground' expects a string on #1 argument.")
|
||||
else
|
||||
if (type (path) ~= "string") then
|
||||
return
|
||||
end
|
||||
end
|
||||
|
||||
if (not texcoord) then
|
||||
texcoord = {0, 1, 0, 1}
|
||||
end
|
||||
|
||||
if (not color) then
|
||||
color = {1, 1, 1}
|
||||
end
|
||||
|
||||
local battlegroup_serial = NickTag:GetSerial()
|
||||
if (not battlegroup_serial) then
|
||||
return
|
||||
end
|
||||
|
||||
local nick_table = NickTag:GetNicknameTable (battlegroup_serial)
|
||||
if (not nick_table) then
|
||||
nick_table = NickTag:Create (battlegroup_serial, true)
|
||||
end
|
||||
|
||||
local need_sync = false
|
||||
if (nick_table [CONST_INDEX_BACKGROUND_PATH] ~= path) then
|
||||
nick_table [CONST_INDEX_BACKGROUND_PATH] = path
|
||||
need_sync = true
|
||||
end
|
||||
|
||||
if (nick_table [CONST_INDEX_BACKGROUND_TEXCOORD] ~= texcoord) then
|
||||
nick_table [CONST_INDEX_BACKGROUND_TEXCOORD] = texcoord
|
||||
need_sync = true
|
||||
end
|
||||
|
||||
if (nick_table [CONST_INDEX_BACKGROUND_COLOR] ~= color) then
|
||||
nick_table [CONST_INDEX_BACKGROUND_COLOR] = color
|
||||
need_sync = true
|
||||
end
|
||||
|
||||
if (need_sync) then
|
||||
NickTag.callbacks:Fire ("NickTag_Update", CONST_INDEX_BACKGROUND_PATH)
|
||||
|
||||
if (not NickTag.send_scheduled) then
|
||||
NickTag.send_scheduled = true
|
||||
NickTag:ScheduleTimer ("SendPersona", 1)
|
||||
end
|
||||
end
|
||||
|
||||
return true
|
||||
end
|
||||
|
||||
function NickTag:GetNickname (serial, default, silent)
|
||||
if (not silent) then
|
||||
assert (serial, "NickTag 'GetNickname' expects a number or string on #1 argument.")
|
||||
end
|
||||
|
||||
if (type (serial) == "string") then
|
||||
serial = NickTag:GetSerial (serial, silent)
|
||||
end
|
||||
|
||||
if (serial) then
|
||||
local _table = pool [serial]
|
||||
if (not _table) then
|
||||
return default or nil
|
||||
end
|
||||
return _table [CONST_INDEX_NICKNAME] or default or nil
|
||||
end
|
||||
end
|
||||
|
||||
--> return the avatar and the texcoord.
|
||||
function NickTag:GetNicknameAvatar (serial, default, silent)
|
||||
if (not silent) then
|
||||
assert (serial, "NickTag 'GetAvatar' expects a number or string on #1 argument.")
|
||||
end
|
||||
|
||||
if (type (serial) == "string") then
|
||||
serial = NickTag:GetSerial (serial, silent)
|
||||
end
|
||||
|
||||
if (serial) then
|
||||
local _table = pool [serial]
|
||||
if (not _table and default) then
|
||||
return default, {0, 1, 0, 1}
|
||||
elseif (not _table) then
|
||||
return "", {0, 1, 0, 1}
|
||||
end
|
||||
return _table [CONST_INDEX_AVATAR_PATH] or default "", _table [CONST_INDEX_AVATAR_TEXCOORD] or {0, 1, 0, 1}
|
||||
end
|
||||
end
|
||||
|
||||
function NickTag:GetNicknameBackground (serial, default_path, default_texcoord, default_color, silent)
|
||||
if (not silent) then
|
||||
assert (serial, "NickTag 'GetNicknameBackground' expects a number or string on #1 argument.")
|
||||
end
|
||||
|
||||
if (type (serial) == "string") then
|
||||
serial = NickTag:GetSerial (serial, silent)
|
||||
end
|
||||
|
||||
if (serial) then
|
||||
local _table = pool [serial]
|
||||
if (not _table) then
|
||||
return default_path, default_texcoord, default_color
|
||||
end
|
||||
return _table [CONST_INDEX_BACKGROUND_PATH] or default_path, _table [CONST_INDEX_BACKGROUND_TEXCOORD] or default_texcoord, _table [CONST_INDEX_BACKGROUND_COLOR] or default_color
|
||||
else
|
||||
return default_path, default_texcoord, default_color
|
||||
end
|
||||
end
|
||||
|
||||
--> get the full nicktag table
|
||||
function NickTag:GetNicknameTable (serial)
|
||||
--> check data before
|
||||
assert (serial, "NickTag 'Get' expects a number on #1 argument.")
|
||||
|
||||
if (type (serial) == "string") then
|
||||
serial = NickTag:GetSerial (serial)
|
||||
if (not serial) then
|
||||
return
|
||||
end
|
||||
end
|
||||
|
||||
return pool [serial]
|
||||
end
|
||||
|
||||
------------------------------------------------------------------------------------------------------------------------------------------------------
|
||||
--> internal functions
|
||||
|
||||
--> create a empty nick table for the player
|
||||
function NickTag:Create (serial, isSelf)
|
||||
--> check data before
|
||||
assert (type (serial) == "number", "NickTag 'Create' expects a number on #1 argument.")
|
||||
|
||||
--> check if alredy exists
|
||||
local alredy_have = pool [serial]
|
||||
if (alredy_have) then
|
||||
return alredy_have
|
||||
end
|
||||
|
||||
--> create the table:
|
||||
local n = { UnitName ("player"), --[1] player nickname
|
||||
false, --[2] avatar texture path
|
||||
false, --[3] avatar texture coord
|
||||
false, --[4] background texture path
|
||||
false, --[5] background texcoord
|
||||
false, --[6] background color
|
||||
1 --[7] revision
|
||||
}
|
||||
|
||||
--> if not my persona, set revision to 0, this make always get update after creation
|
||||
if (not isSelf) then
|
||||
n [CONST_INDEX_REVISION] = 0
|
||||
end
|
||||
|
||||
pool [serial] = n
|
||||
return n
|
||||
end
|
||||
|
||||
--> inc the revision of the player persona after update nick or avatar
|
||||
function NickTag:IncRevision()
|
||||
local battlegroup_serial = NickTag:GetSerial()
|
||||
if (not battlegroup_serial) then
|
||||
return
|
||||
end
|
||||
|
||||
local nick_table = NickTag:GetNicknameTable (battlegroup_serial)
|
||||
if (not nick_table) then
|
||||
nick_table = NickTag:Create (battlegroup_serial, true)
|
||||
end
|
||||
|
||||
nick_table [CONST_INDEX_REVISION] = nick_table [CONST_INDEX_REVISION] + 1
|
||||
|
||||
return true
|
||||
end
|
||||
|
||||
--> convert GUID into serial number
|
||||
function NickTag:GetSerial (serial, silent)
|
||||
if (not serial) then
|
||||
local guid = UnitGUID ("player")
|
||||
if (not guid) then
|
||||
return
|
||||
end
|
||||
serial = guid:sub (12, 18)
|
||||
else
|
||||
if (not silent) then
|
||||
assert (type (serial) == "string", "NickTag 'GetSerial' expects a GUID string on #1 parameter"..serial)
|
||||
assert (string.len (serial) > 17, "NickTag 'GetSerial' expects a GUID string on #1 parameter")
|
||||
else
|
||||
if (type (serial) ~= "string") then
|
||||
return
|
||||
elseif (string.len (serial) < 17) then
|
||||
return
|
||||
end
|
||||
end
|
||||
|
||||
serial = serial:sub (12, 18)
|
||||
end
|
||||
return tonumber ("0x"..serial)
|
||||
end
|
||||
|
||||
--> choose avatar window
|
||||
do
|
||||
local avatar_pick_frame = CreateFrame ("frame", "AvatarPickFrame", UIParent)
|
||||
avatar_pick_frame:SetBackdrop ({bgFile = [[Interface\DialogFrame\UI-DialogBox-Background]], edgeFile = [[Interface\DialogFrame\UI-DialogBox-Border]], tile = true, tileSize = 32, edgeSize = 32, insets = {left = 11, right = 12, top = 12, bottom = 11}})
|
||||
avatar_pick_frame:SetWidth (460)
|
||||
avatar_pick_frame:SetHeight (240)
|
||||
|
||||
avatar_pick_frame.selected_avatar = 1
|
||||
avatar_pick_frame.selected_background = 1
|
||||
avatar_pick_frame.selected_color = {1, 1, 1}
|
||||
avatar_pick_frame.selected_texcoord = {0, 1, 0, 1}
|
||||
|
||||
avatar_pick_frame:SetPoint ("center", UIParent, "center", 200, 0)
|
||||
|
||||
---
|
||||
local avatar_texture = avatar_pick_frame:CreateTexture ("AvatarPickFrameAvatarPreview", "overlay")
|
||||
avatar_texture:SetPoint ("topleft", avatar_pick_frame, "topleft", 167, -10)
|
||||
avatar_texture:SetTexture ([[Interface\EncounterJournal\UI-EJ-BOSS-Default]])
|
||||
--
|
||||
local background_texture = avatar_pick_frame:CreateTexture ("AvatarPickFrameBackgroundPreview", "artwork")
|
||||
background_texture:SetPoint ("topleft", avatar_pick_frame, "topleft", 167, 2)
|
||||
background_texture:SetWidth (290)
|
||||
background_texture:SetHeight (75)
|
||||
background_texture:SetTexture (NickTag.background_pool[1][1])
|
||||
background_texture:SetTexCoord (unpack (NickTag.background_pool[1][3]))
|
||||
--
|
||||
local name = avatar_pick_frame:CreateFontString ("AvatarPickFrameName", "overlay", "GameFontHighlightHuge")
|
||||
name:SetPoint ("left", avatar_texture, "right", -11, -17)
|
||||
name:SetText (UnitName ("player"))
|
||||
---
|
||||
|
||||
local OnClickFunction = function (button)
|
||||
if (button.isAvatar) then
|
||||
local avatar = NickTag.avatar_pool [button.IconID]
|
||||
_G.AvatarPickFrameAvatarPreview:SetTexture ( avatar [1] )
|
||||
avatar_pick_frame.selected_avatar = avatar [1]
|
||||
elseif (button.isBackground) then
|
||||
local background = NickTag.background_pool [button.IconID]
|
||||
_G.AvatarPickFrameBackgroundPreview:SetTexture ( background [1] )
|
||||
_G.AvatarPickFrameBackgroundPreview:SetTexCoord (unpack (background [3]))
|
||||
avatar_pick_frame.selected_background = background [1]
|
||||
avatar_pick_frame.selected_texcoord = background [3]
|
||||
end
|
||||
end
|
||||
|
||||
local selectedColor = function()
|
||||
local r, g, b = ColorPickerFrame:GetColorRGB()
|
||||
background_texture:SetVertexColor (r, g, b)
|
||||
avatar_pick_frame.selected_color[1] = r
|
||||
avatar_pick_frame.selected_color[2] = g
|
||||
avatar_pick_frame.selected_color[3] = b
|
||||
end
|
||||
|
||||
local okey = CreateFrame ("button", "AvatarPickFrameAccept", avatar_pick_frame, "OptionsButtonTemplate")
|
||||
okey:SetPoint ("bottomright", avatar_pick_frame, "bottomright", -37, 12)
|
||||
okey:SetText ("Accept")
|
||||
okey:SetFrameLevel (avatar_pick_frame:GetFrameLevel()+2)
|
||||
okey:SetScript ("OnClick", function (self)
|
||||
avatar_pick_frame:Hide()
|
||||
if (avatar_pick_frame.callback) then
|
||||
avatar_pick_frame.callback (avatar_pick_frame.selected_avatar, {0, 1, 0, 1}, avatar_pick_frame.selected_background, avatar_pick_frame.selected_texcoord, avatar_pick_frame.selected_color)
|
||||
end
|
||||
end)
|
||||
local change_color = CreateFrame ("button", "AvatarPickFrameColor", avatar_pick_frame, "OptionsButtonTemplate")
|
||||
change_color:SetPoint ("bottomright", avatar_pick_frame, "bottomright", -205, 12)
|
||||
change_color:SetText ("Color")
|
||||
change_color:SetFrameLevel (avatar_pick_frame:GetFrameLevel()+2)
|
||||
|
||||
change_color:SetScript ("OnClick", function (self)
|
||||
ColorPickerFrame.func = selectedColor
|
||||
ColorPickerFrame.hasOpacity = false
|
||||
ColorPickerFrame:SetParent (avatar_pick_frame)
|
||||
ColorPickerFrame:SetColorRGB (_G.AvatarPickFrameBackgroundPreview:GetVertexColor())
|
||||
ColorPickerFrame:ClearAllPoints()
|
||||
ColorPickerFrame:SetPoint ("left", avatar_pick_frame, "right", 0, -10)
|
||||
ColorPickerFrame:Show()
|
||||
end)
|
||||
|
||||
local buttons = {}
|
||||
for i = 0, 2 do
|
||||
local newbutton = CreateFrame ("button", "AvatarPickFrameAvatarScrollButton"..i+1, avatar_pick_frame)
|
||||
newbutton:SetScript ("OnClick", OnClickFunction)
|
||||
newbutton:SetWidth (128)
|
||||
newbutton:SetHeight (64)
|
||||
newbutton:SetPoint ("topleft", avatar_pick_frame, "topleft", 15, (i*70*-1) - 20)
|
||||
newbutton:SetID (i+1)
|
||||
newbutton.isAvatar = true
|
||||
buttons [#buttons+1] = newbutton
|
||||
end
|
||||
|
||||
local buttonsbg = {}
|
||||
for i = 0, 2 do
|
||||
local newbutton = CreateFrame ("button", "AvatarPickFrameBackgroundScrollButton"..i+1, avatar_pick_frame)
|
||||
newbutton:SetScript ("OnClick", OnClickFunction)
|
||||
newbutton:SetWidth (275)
|
||||
newbutton:SetHeight (60)
|
||||
newbutton:SetPoint ("topleft", avatar_pick_frame, "topleft", 157, (i*50*-1) - 80)
|
||||
newbutton:SetID (i+1)
|
||||
newbutton.isBackground = true
|
||||
buttonsbg [#buttonsbg+1] = newbutton
|
||||
end
|
||||
|
||||
local avatar_list = CreateFrame ("ScrollFrame", "AvatarPickFrameAvatarScroll", avatar_pick_frame, "ListScrollFrameTemplate")
|
||||
avatar_list:SetPoint ("topleft", avatar_pick_frame, "topleft", 10, -10)
|
||||
local background_list = CreateFrame ("ScrollFrame", "AvatarPickFrameBackgroundScroll", avatar_pick_frame, "ListScrollFrameTemplate")
|
||||
background_list:SetPoint ("topleft", avatar_pick_frame, "topleft", 147, -85)
|
||||
|
||||
avatar_list:SetWidth (128)
|
||||
avatar_list:SetHeight (220)
|
||||
background_list:SetWidth (275)
|
||||
background_list:SetHeight (140)
|
||||
|
||||
local avatar_scroll_update = function (self)
|
||||
local numMacroIcons = #NickTag.avatar_pool
|
||||
local macroPopupIcon, macroPopupButton, index, texture
|
||||
local macroPopupOffset = FauxScrollFrame_GetOffset (avatar_list)
|
||||
|
||||
for i = 1, 3 do
|
||||
macroPopupIcon = _G ["AvatarPickFrameAvatarScrollButton"..i]
|
||||
macroPopupButton = _G ["AvatarPickFrameAvatarScrollButton"..i]
|
||||
index = (macroPopupOffset * 1) + i
|
||||
|
||||
texture = NickTag.avatar_pool [index][1]
|
||||
if ( index <= numMacroIcons and texture ) then
|
||||
macroPopupButton:SetNormalTexture (texture)
|
||||
macroPopupButton:SetPushedTexture (texture)
|
||||
macroPopupButton:SetDisabledTexture (texture)
|
||||
macroPopupButton:SetHighlightTexture (texture, "ADD")
|
||||
macroPopupButton.IconID = index
|
||||
macroPopupButton:Show()
|
||||
else
|
||||
macroPopupButton:Hide()
|
||||
end
|
||||
end
|
||||
FauxScrollFrame_Update (avatar_list, numMacroIcons , 3, 64)
|
||||
end
|
||||
local background_scroll_update = function (self)
|
||||
local numMacroIcons = #NickTag.background_pool
|
||||
local macroPopupIcon, macroPopupButton, index, texture
|
||||
local macroPopupOffset = FauxScrollFrame_GetOffset (background_list)
|
||||
|
||||
for i = 1, 3 do
|
||||
macroPopupIcon = _G ["AvatarPickFrameBackgroundScrollButton"..i]
|
||||
macroPopupButton = _G ["AvatarPickFrameBackgroundScrollButton"..i]
|
||||
index = (macroPopupOffset * 1) + i
|
||||
|
||||
texture = NickTag.background_pool [index][1]
|
||||
if ( index <= numMacroIcons and texture ) then
|
||||
macroPopupButton:SetNormalTexture (texture)
|
||||
macroPopupButton:SetPushedTexture (texture)
|
||||
macroPopupButton:SetDisabledTexture (texture)
|
||||
macroPopupButton:SetHighlightTexture (texture, "ADD")
|
||||
macroPopupButton.IconID = index
|
||||
macroPopupButton:Show()
|
||||
else
|
||||
macroPopupButton:Hide()
|
||||
end
|
||||
end
|
||||
FauxScrollFrame_Update (background_list, numMacroIcons , 3, 40)
|
||||
end
|
||||
|
||||
avatar_list:SetScript ("OnVerticalScroll", function (self, offset)
|
||||
FauxScrollFrame_OnVerticalScroll (avatar_list, offset, 64, avatar_scroll_update)
|
||||
end)
|
||||
background_list:SetScript ("OnVerticalScroll", function (self, offset)
|
||||
FauxScrollFrame_OnVerticalScroll (background_list, offset, 40, background_scroll_update)
|
||||
end)
|
||||
|
||||
avatar_scroll_update (avatar_list)
|
||||
background_scroll_update (background_list)
|
||||
|
||||
function avatar_pick_frame:SetAvatar (n)
|
||||
if (type (n) ~= "number") then
|
||||
n = 1
|
||||
end
|
||||
if (n > #NickTag.avatar_pool) then
|
||||
n = 1
|
||||
end
|
||||
local avatar = NickTag.avatar_pool [n]
|
||||
_G.AvatarPickFrameAvatarPreview:SetTexture ( avatar [1] )
|
||||
avatar_pick_frame.selected_avatar = avatar [1]
|
||||
end
|
||||
function avatar_pick_frame:SetBackground (n)
|
||||
if (type (n) ~= "number") then
|
||||
n = 1
|
||||
end
|
||||
if (n > #NickTag.background_pool) then
|
||||
n = 1
|
||||
end
|
||||
local background = NickTag.background_pool [n]
|
||||
_G.AvatarPickFrameBackgroundPreview:SetTexture ( background [1] )
|
||||
_G.AvatarPickFrameBackgroundPreview:SetTexCoord (unpack (background [3]))
|
||||
_G.AvatarPickFrameBackgroundPreview:SetVertexColor (unpack (avatar_pick_frame.selected_color))
|
||||
avatar_pick_frame.selected_background = background [1]
|
||||
end
|
||||
function avatar_pick_frame:SetColor (r, g, b)
|
||||
if (type (r) ~= "number" or r > 1) then
|
||||
r = 1
|
||||
end
|
||||
if (type (g) ~= "number" or g > 1) then
|
||||
g = 1
|
||||
end
|
||||
if (type (b) ~= "number" or b > 1) then
|
||||
b = 1
|
||||
end
|
||||
_G.AvatarPickFrameBackgroundPreview:SetVertexColor (r, g, b)
|
||||
avatar_pick_frame.selected_color[1] = r
|
||||
avatar_pick_frame.selected_color[2] = g
|
||||
avatar_pick_frame.selected_color[3] = b
|
||||
end
|
||||
|
||||
local CONST_INDEX_NICKNAME = 1
|
||||
local CONST_INDEX_AVATAR_PATH = 2
|
||||
local CONST_INDEX_AVATAR_TEXCOORD = 3
|
||||
local CONST_INDEX_BACKGROUND_PATH = 4
|
||||
local CONST_INDEX_BACKGROUND_TEXCOORD = 5
|
||||
local CONST_INDEX_BACKGROUND_COLOR = 6
|
||||
|
||||
avatar_pick_frame:SetScript ("OnShow", function()
|
||||
--get player avatar
|
||||
local avatar = NickTag:GetNicknameTable (UnitGUID ("player"))
|
||||
if (avatar) then
|
||||
_G.AvatarPickFrameName:SetText ( avatar [1] or UnitName ("player"))
|
||||
|
||||
_G.AvatarPickFrameAvatarPreview:SetTexture ( avatar [CONST_INDEX_AVATAR_PATH] or [[Interface\EncounterJournal\UI-EJ-BOSS-Default]] )
|
||||
avatar_pick_frame.selected_avatar = avatar [CONST_INDEX_AVATAR_PATH] or [[Interface\EncounterJournal\UI-EJ-BOSS-Default]]
|
||||
|
||||
_G.AvatarPickFrameAvatarPreview:SetTexCoord ( 0, 1, 0, 1 ) --> always
|
||||
|
||||
_G.AvatarPickFrameBackgroundPreview:SetTexture ( avatar [CONST_INDEX_BACKGROUND_PATH] or [[Interface\PetBattles\Weather-ArcaneStorm]] )
|
||||
avatar_pick_frame.selected_background = avatar [CONST_INDEX_BACKGROUND_PATH] or [[Interface\PetBattles\Weather-ArcaneStorm]]
|
||||
|
||||
if (avatar [CONST_INDEX_BACKGROUND_TEXCOORD]) then
|
||||
_G.AvatarPickFrameBackgroundPreview:SetTexCoord ( unpack (avatar [CONST_INDEX_BACKGROUND_TEXCOORD]) )
|
||||
avatar_pick_frame.selected_texcoord = avatar [CONST_INDEX_BACKGROUND_TEXCOORD]
|
||||
else
|
||||
_G.AvatarPickFrameBackgroundPreview:SetTexCoord ( 0.129609375, 1, 1, 0 )
|
||||
avatar_pick_frame.selected_texcoord = {0.129609375, 1, 1, 0}
|
||||
end
|
||||
|
||||
if (avatar [CONST_INDEX_BACKGROUND_COLOR]) then
|
||||
_G.AvatarPickFrameBackgroundPreview:SetVertexColor ( unpack (avatar [CONST_INDEX_BACKGROUND_COLOR]) )
|
||||
avatar_pick_frame.selected_color = avatar [CONST_INDEX_BACKGROUND_COLOR]
|
||||
else
|
||||
_G.AvatarPickFrameBackgroundPreview:SetVertexColor ( 1, 1, 1 )
|
||||
avatar_pick_frame.selected_color = {1, 1, 1}
|
||||
end
|
||||
else
|
||||
--> if none
|
||||
_G.AvatarPickFrameAvatarPreview:SetTexture ( [[Interface\EncounterJournal\UI-EJ-BOSS-Default]] )
|
||||
avatar_pick_frame.selected_avatar = [[Interface\EncounterJournal\UI-EJ-BOSS-Default]]
|
||||
local background = NickTag.background_pool [avatar_pick_frame.selected_background]
|
||||
_G.AvatarPickFrameBackgroundPreview:SetTexture ( background [1] )
|
||||
avatar_pick_frame.selected_background = background [1]
|
||||
_G.AvatarPickFrameBackgroundPreview:SetTexCoord (unpack (background [3]))
|
||||
avatar_pick_frame.selected_texcoord = background [3]
|
||||
_G.AvatarPickFrameBackgroundPreview:SetVertexColor (unpack (avatar_pick_frame.selected_color))
|
||||
avatar_pick_frame.selected_color = avatar_pick_frame.selected_color
|
||||
end
|
||||
end)
|
||||
|
||||
avatar_pick_frame:Hide()
|
||||
end
|
||||
@@ -0,0 +1,3 @@
|
||||
<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/..\FrameXML\UI.xsd">
|
||||
<Script file="NickTag-1.0.lua"/>
|
||||
</Ui>
|
||||
@@ -0,0 +1,14 @@
|
||||
<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/..\FrameXML\UI.xsd">
|
||||
<Script file="LibStub\LibStub.lua"/>
|
||||
|
||||
<Include file="CallbackHandler-1.0\CallbackHandler-1.0.xml"/>
|
||||
<Include file="AceLocale-3.0\AceLocale-3.0.xml" />
|
||||
<Include file="AceAddon-3.0\AceAddon-3.0.xml" />
|
||||
<Include file="AceComm-3.0\AceComm-3.0.xml" />
|
||||
<Include file="AceSerializer-3.0\AceSerializer-3.0.xml" />
|
||||
<Include file="AceTimer-3.0\AceTimer-3.0.xml" />
|
||||
<Include file="LibSharedMedia-3.0\lib.xml" />
|
||||
<Include file="NickTag-1.0\NickTag-1.0.xml" />
|
||||
|
||||
<Script file="LibGraph-2.0\LibGraph-2.0.lua"/>
|
||||
</Ui>
|
||||
@@ -5,11 +5,21 @@
|
||||
|
||||
-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
|
||||
--> global name declaration
|
||||
|
||||
--> fix for old nicktag version
|
||||
if (_G.NickTag) then
|
||||
if (_G.NickTag.OnEvent) then
|
||||
_G.NickTag:UnregisterComm ("NickTag")
|
||||
end
|
||||
end
|
||||
|
||||
_detalhes = LibStub("AceAddon-3.0"):NewAddon("_detalhes", "AceTimer-3.0", "AceComm-3.0", "AceSerializer-3.0", "NickTag-1.0")
|
||||
_detalhes.userversion = "v1.2.0"
|
||||
_detalhes.version = "Alpha 004"
|
||||
_detalhes.realversion = 4
|
||||
|
||||
--_detalhes:NickTagSetCache (_detalhes.NickTagCache)
|
||||
|
||||
-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
|
||||
--> initialization stuff
|
||||
|
||||
@@ -184,6 +194,7 @@ do
|
||||
--> register textures and fonts for shared media
|
||||
local SharedMedia = LibStub:GetLibrary ("LibSharedMedia-3.0")
|
||||
SharedMedia:Register ("statusbar", "Details D'ictum", [[Interface\AddOns\Details\images\bar4]])
|
||||
SharedMedia:Register ("statusbar", "Details D'ictum (reverse)", [[Interface\AddOns\Details\images\bar4_reverse]])
|
||||
|
||||
--> global 'vardump' for dump table contents over chat panel
|
||||
function vardump (t)
|
||||
|
||||
@@ -133,7 +133,8 @@ function combate:NovaTabela (iniciada, _tabela_overall, combatId, ...)
|
||||
ress = 0, --> armazena quantos pessoas ele reviveu
|
||||
interrupt = 0, --> armazena quantos interrupt a pessoa deu
|
||||
dispell = 0, --> armazena quantos dispell esta pessoa recebeu
|
||||
dead = 0 --> armazena quantas vezes essa oessia morreu
|
||||
dead = 0, --> armazena quantas vezes essa pessia morreu
|
||||
cooldowns_defensive = 0 --> armazena quantos cooldowns a raid usou
|
||||
}
|
||||
}
|
||||
|
||||
@@ -151,7 +152,8 @@ function combate:NovaTabela (iniciada, _tabela_overall, combatId, ...)
|
||||
ress = 0, --> armazena quantos pessoas ele reviveu
|
||||
interrupt = 0, --> armazena quantos interrupt a pessoa deu
|
||||
dispell = 0, --> armazena quantos dispell esta pessoa recebeu
|
||||
dead = 0 --> armazena quantas vezes essa oessia morreu
|
||||
dead = 0, --> armazena quantas vezes essa oessia morreu
|
||||
cooldowns_defensive = 0 --> armazena quantos cooldowns a raid usou
|
||||
}
|
||||
}
|
||||
|
||||
@@ -333,6 +335,27 @@ combate.__sub = function (overall, combate)
|
||||
local no_overall = overall[4]._ActorTable [overall[4]._NameIndexTable [nome]]
|
||||
no_overall = no_overall - classe_misc
|
||||
|
||||
if (classe_misc.cooldowns_defensive) then
|
||||
local alvos = classe_misc.cooldowns_defensive_targets
|
||||
local habilidades = classe_misc.cooldowns_defensive_spell_tables
|
||||
|
||||
for index, alvo in _ipairs (alvos._ActorTable) do
|
||||
local alvo_overall = no_overall.cooldowns_defensive_targets._ActorTable [no_overall.cooldowns_defensive_targets._NameIndexTable [alvo.nome]]
|
||||
alvo_overall = alvo_overall - alvo
|
||||
end
|
||||
|
||||
for _spellid, habilidade in _pairs (habilidades._ActorTable) do
|
||||
local habilidade_overall = no_overall.cooldowns_defensive_spell_tables._ActorTable [_spellid]
|
||||
habilidade_overall = habilidade_overall - habilidade
|
||||
|
||||
local alvos = habilidade.targets
|
||||
for index, alvo in _ipairs (alvos._ActorTable) do
|
||||
local alvo_overall = habilidade_overall.targets._ActorTable [habilidade_overall.targets._NameIndexTable [alvo.nome]]
|
||||
alvo_overall = alvo_overall - alvo
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
if (classe_misc.interrupt) then
|
||||
local alvos = classe_misc.interrupt_targets
|
||||
local habilidades = classe_misc.interrupt_spell_tables
|
||||
@@ -433,6 +456,7 @@ combate.__sub = function (overall, combate)
|
||||
overall.totals[4].interrupt = overall.totals[4].interrupt - combate.totals[4].interrupt
|
||||
overall.totals[4].dispell = overall.totals[4].dispell - combate.totals[4].dispell
|
||||
overall.totals[4].dead = overall.totals[4].dead - combate.totals[4].dead
|
||||
overall.totals[4].cooldowns_defensive = overall.totals[4].cooldowns_defensive - combate.totals[4].cooldowns_defensive
|
||||
|
||||
|
||||
overall.totals_grupo[1] = overall.totals_grupo[1] - combate.totals_grupo[1]
|
||||
@@ -448,7 +472,7 @@ combate.__sub = function (overall, combate)
|
||||
overall.totals_grupo[4].interrupt = overall.totals_grupo[4].interrupt - combate.totals_grupo[4].interrupt
|
||||
overall.totals_grupo[4].dispell = overall.totals_grupo[4].dispell - combate.totals_grupo[4].dispell
|
||||
overall.totals_grupo[4].dead = overall.totals_grupo[4].dead - combate.totals_grupo[4].dead
|
||||
|
||||
overall.totals_grupo[4].cooldowns_defensive = overall.totals_grupo[4].cooldowns_defensive - combate.totals_grupo[4].cooldowns_defensive
|
||||
|
||||
return overall
|
||||
end
|
||||
|
||||
@@ -244,7 +244,7 @@ function atributo_damage:RefreshWindow (instancia, tabela_do_combate, forcar, ex
|
||||
if (_detalhes.in_combat) then
|
||||
using_cache = true
|
||||
end
|
||||
|
||||
|
||||
if (using_cache) then
|
||||
conteudo = _detalhes.cache_damage_group
|
||||
|
||||
@@ -741,7 +741,8 @@ function atributo_damage:ToolTip_DamageDone (instancia, numero, barra)
|
||||
--leftText, rightText, frame, ColorR, ColorG, ColorB, ColorA, ColorR1, ColorG2, ColorB3, ColorA4, fontSize, fontFace
|
||||
|
||||
GameCooltip:AddLine (Loc ["STRING_SPELLS"].."", nil, nil, headerColor, nil, 12)
|
||||
GameCooltip:AddIcon ([[Interface\HELPFRAME\HotIssueIcon]], 1, 1, 14, 14, 0.0625, 0.90625, 0, 1)
|
||||
--GameCooltip:AddIcon ([[Interface\HELPFRAME\HotIssueIcon]], 1, 1, 14, 14, 0.0625, 0.90625, 0, 1)
|
||||
GameCooltip:AddIcon ([[Interface\ICONS\Spell_Shaman_BlessingOfTheEternals]], 1, 1, 14, 14, 0.90625, 0.109375, 0.15625, 0.875)
|
||||
GameCooltip:AddStatusBar (100, 1, r, g, b, barAlha)
|
||||
|
||||
local tooltip_max_abilities = _detalhes.tooltip_max_abilities
|
||||
@@ -769,7 +770,6 @@ function atributo_damage:ToolTip_DamageDone (instancia, numero, barra)
|
||||
--> MOSTRA INIMIGOS
|
||||
if (instancia.sub_atributo == 1) then
|
||||
GameCooltip:AddLine (Loc ["STRING_TARGETS"].."", nil, nil, headerColor, nil, 12)
|
||||
--GameCooltip:AddIcon ([[Interface\Addons\Details\images\icons]], 1, 1, 14, 14, 0.03515625, 0.087890625, 0.0234375, 0.09765625, _detalhes.class_colors [self.classe])
|
||||
GameCooltip:AddIcon ([[Interface\Addons\Details\images\icons]], 1, 1, 14, 14, 0, 0.03125, 0.126953125, 0.15625)
|
||||
GameCooltip:AddStatusBar (100, 1, r, g, b, barAlha)
|
||||
|
||||
|
||||
+89
-21
@@ -67,6 +67,7 @@ function atributo_heal:NovaTabela (serial, nome, link)
|
||||
|
||||
total = 0,
|
||||
totalover = 0,
|
||||
totalabsorb = 0,
|
||||
custom = 0,
|
||||
|
||||
total_without_pet = 0,
|
||||
@@ -88,6 +89,7 @@ function atributo_heal:NovaTabela (serial, nome, link)
|
||||
pets = {}, --> nome já formatado: pet nome <owner nome>
|
||||
|
||||
heal_enemy = {}, --> quando o jogador cura um inimigo
|
||||
heal_enemy_amt = 0,
|
||||
|
||||
--container armazenará os IDs das habilidades usadas por este jogador
|
||||
spell_tables = container_habilidades:NovoContainer (container_heal),
|
||||
@@ -144,6 +146,10 @@ function atributo_heal:RefreshWindow (instancia, tabela_do_combate, forcar, expo
|
||||
keyName = "totalover"
|
||||
elseif (sub_atributo == 4) then --> healing take
|
||||
keyName = "healing_taken"
|
||||
elseif (sub_atributo == 5) then --> enemy heal
|
||||
keyName = "heal_enemy_amt"
|
||||
elseif (sub_atributo == 6) then --> absorbs
|
||||
keyName = "totalabsorb"
|
||||
end
|
||||
else
|
||||
keyName = exportar.key
|
||||
@@ -161,6 +167,10 @@ function atributo_heal:RefreshWindow (instancia, tabela_do_combate, forcar, expo
|
||||
keyName = "totalover"
|
||||
elseif (sub_atributo == 4) then --> healing take
|
||||
keyName = "healing_taken"
|
||||
elseif (sub_atributo == 5) then --> enemy heal
|
||||
keyName = "heal_enemy_amt"
|
||||
elseif (sub_atributo == 6) then --> absorbs
|
||||
keyName = "totalabsorb"
|
||||
end
|
||||
end
|
||||
|
||||
@@ -171,7 +181,7 @@ function atributo_heal:RefreshWindow (instancia, tabela_do_combate, forcar, expo
|
||||
--> grava o total
|
||||
instancia.top = conteudo[1][keyName]
|
||||
|
||||
elseif (instancia.modo == modo_ALL) then --> mostrando ALL
|
||||
elseif (instancia.modo == modo_ALL or sub_atributo == 5) then --> mostrando ALL
|
||||
|
||||
amount = _detalhes:ContainerSort (conteudo, amount, keyName)
|
||||
|
||||
@@ -194,16 +204,15 @@ function atributo_heal:RefreshWindow (instancia, tabela_do_combate, forcar, expo
|
||||
instancia.top = conteudo[1][keyName]
|
||||
|
||||
elseif (instancia.modo == modo_GROUP) then --> mostrando GROUP
|
||||
|
||||
|
||||
if (_detalhes.in_combat) then
|
||||
using_cache = true
|
||||
end
|
||||
|
||||
|
||||
if (using_cache) then
|
||||
conteudo = _detalhes.cache_healing_group
|
||||
|
||||
_table_sort (conteudo, _detalhes.SortKeySimple)
|
||||
_detalhes:ContainerSort (conteudo, nil, keyName)
|
||||
|
||||
if (conteudo[1][keyName] < 1) then
|
||||
amount = 0
|
||||
@@ -254,6 +263,7 @@ function atributo_heal:RefreshWindow (instancia, tabela_do_combate, forcar, expo
|
||||
end
|
||||
|
||||
--> refaz o mapa do container
|
||||
--> se for cache não precisa remapear
|
||||
showing:remapear()
|
||||
|
||||
if (exportar) then
|
||||
@@ -272,6 +282,8 @@ function atributo_heal:RefreshWindow (instancia, tabela_do_combate, forcar, expo
|
||||
local qual_barra = 1
|
||||
local barras_container = instancia.barras --> evita buscar N vezes a key .barras dentro da instância
|
||||
|
||||
--print (sub_atributo, total, keyName)
|
||||
|
||||
local combat_time = instancia.showing:GetCombatTime()
|
||||
for i = instancia.barraS[1], instancia.barraS[2], 1 do --> vai atualizar só o range que esta sendo mostrado
|
||||
--conteudo[i]:AtualizaBarra (instancia, qual_barra, i, total, sub_atributo, forcar) --> instância, index, total, valor da 1º barra
|
||||
@@ -378,7 +390,14 @@ function atributo_heal:AtualizaBarra (instancia, barras_container, qual_barra, l
|
||||
elseif (sub_atributo == 4) then --> mostrando healing take
|
||||
esta_barra.texto_direita:SetText (_detalhes:ToK (self.healing_taken) .." ".. div_abre .._cstr("%.1f", porcentagem).."%" .. div_fecha) --seta o texto da direita --_cstr("%.1f", dps) .. " - ".. DPS do damage taken não será possivel correto?
|
||||
esta_porcentagem = _math_floor ((self.healing_taken/instancia.top) * 100) --> determina qual o tamanho da barra
|
||||
|
||||
elseif (sub_atributo == 5) then --> mostrando enemy heal
|
||||
esta_barra.texto_direita:SetText (_detalhes:ToK (self.heal_enemy_amt) .." ".. div_abre .._cstr("%.1f", porcentagem).."%" .. div_fecha) --seta o texto da direita --_cstr("%.1f", dps) .. " - ".. DPS do damage taken não será possivel correto?
|
||||
esta_porcentagem = _math_floor ((self.heal_enemy_amt/instancia.top) * 100) --> determina qual o tamanho da barra
|
||||
|
||||
elseif (sub_atributo == 6) then --> mostrando enemy heal
|
||||
esta_barra.texto_direita:SetText (_detalhes:ToK (self.totalabsorb) .." ".. div_abre .._cstr("%.1f", porcentagem).."%" .. div_fecha) --seta o texto da direita --_cstr("%.1f", dps) .. " - ".. DPS do damage taken não será possivel correto?
|
||||
esta_porcentagem = _math_floor ((self.totalabsorb/instancia.top) * 100) --> determina qual o tamanho da barra
|
||||
end
|
||||
end
|
||||
|
||||
@@ -403,6 +422,8 @@ function atributo_heal:ToolTip (instancia, numero, barra)
|
||||
--GameTooltip:AddLine (barra.colocacao..". "..self.nome)
|
||||
if (instancia.sub_atributo <= 3) then --> healing done, HPS or Overheal
|
||||
return self:ToolTip_HealingDone (instancia, numero, barra)
|
||||
elseif (instancia.sub_atributo == 6) then --> healing done, HPS or Overheal
|
||||
return self:ToolTip_HealingDone (instancia, numero, barra)
|
||||
elseif (instancia.sub_atributo == 4) then --> healing taken
|
||||
return self:ToolTip_HealingTaken (instancia, numero, barra)
|
||||
end
|
||||
@@ -471,6 +492,7 @@ function atributo_heal:ToolTip_HealingTaken (instancia, numero, barra)
|
||||
end
|
||||
|
||||
---------> HEALING DONE / HPS / OVERHEAL
|
||||
local background_heal_vs_absorbs = {value = 100, color = {1, 1, 0, .25}, specialSpark = false, texture = [[Interface\AddOns\Details\images\bar4_glass]]}
|
||||
function atributo_heal:ToolTip_HealingDone (instancia, numero, barra)
|
||||
|
||||
local owner = self.owner
|
||||
@@ -486,7 +508,9 @@ function atributo_heal:ToolTip_HealingDone (instancia, numero, barra)
|
||||
|
||||
local actor_key, skill_key = "total", "total"
|
||||
if (instancia.sub_atributo == 3) then
|
||||
key = "totalover", "overheal"
|
||||
actor_key, skill_key = "totalover", "overheal"
|
||||
elseif (instancia.sub_atributo == 6) then
|
||||
actor_key, skill_key = "totalabsorb", "totalabsorb"
|
||||
end
|
||||
|
||||
local meu_tempo
|
||||
@@ -495,10 +519,12 @@ function atributo_heal:ToolTip_HealingDone (instancia, numero, barra)
|
||||
elseif (_detalhes.time_type == 2) then
|
||||
meu_tempo = self:GetCombatTime()
|
||||
end
|
||||
|
||||
local ActorTotal = self [actor_key]
|
||||
|
||||
for _spellid, _skill in _pairs (ActorSkillsContainer) do
|
||||
local SkillName, _, SkillIcon = _GetSpellInfo (_spellid)
|
||||
_table_insert (ActorHealingTable, {_spellid, _skill [skill_key], _skill [skill_key]/ActorTotal*100, {SkillName, nil, SkillIcon}, _skill [skill_key]/meu_tempo})
|
||||
_table_insert (ActorHealingTable, {_spellid, _skill [skill_key], _skill [skill_key]/ActorTotal*100, {SkillName, nil, SkillIcon}, _skill [skill_key]/meu_tempo, _skill.total})
|
||||
end
|
||||
_table_sort (ActorHealingTable, _detalhes.Sort2)
|
||||
|
||||
@@ -511,9 +537,6 @@ function atributo_heal:ToolTip_HealingDone (instancia, numero, barra)
|
||||
|
||||
--> Mostra as habilidades no tooltip
|
||||
GameCooltip:AddLine (Loc ["STRING_SPELLS"], nil, nil, headerColor, nil, 12) --> localiza-me
|
||||
--GameCooltip:AddIcon ([[Interface\Addons\Details\images\icons]], 1, 1, 14, 14, 0.03515625, 0.087890625, 0.0234375, 0.09765625, _detalhes.class_colors [self.classe])
|
||||
--GameCooltip:AddIcon ([[Interface\HELPFRAME\HotIssueIcon]], 1, 1, 14, 14, 0, 1, 0, 1)
|
||||
--GameCooltip:AddIcon ([[Interface\TUTORIALFRAME\UI-TUTORIALFRAME-SPIRITREZ]], 1, 1, 14, 14, 0.283203125, 0.470703125, 0.0859375, 0.9296875)
|
||||
GameCooltip:AddIcon ([[Interface\RAIDFRAME\Raid-Icon-Rez]], 1, 1, 14, 14, 0.109375, 0.890625, 0.0625, 0.90625)
|
||||
GameCooltip:AddStatusBar (100, 1, r, g, b, barAlha)
|
||||
|
||||
@@ -527,8 +550,12 @@ function atributo_heal:ToolTip_HealingDone (instancia, numero, barra)
|
||||
if (ActorHealingTable[i][2] < 1) then
|
||||
break
|
||||
end
|
||||
if (instancia.sub_atributo == 2) then
|
||||
if (instancia.sub_atributo == 2) then --> hps
|
||||
GameCooltip:AddLine (ActorHealingTable[i][4][1]..": ", _detalhes:comma_value ( _math_floor (ActorHealingTable[i][5])).." (".._cstr ("%.1f", ActorHealingTable[i][3]).."%)")
|
||||
elseif (instancia.sub_atributo == 3) then --> overheal
|
||||
local overheal = ActorHealingTable[i][2]
|
||||
local total = ActorHealingTable[i][6]
|
||||
GameCooltip:AddLine (ActorHealingTable[i][4][1] .." (|cFFFF3333" .. _math_floor ( (overheal / (overheal+total)) *100) .. "%|r):", _detalhes:comma_value ( _math_floor (ActorHealingTable[i][5])).." (".._cstr ("%.1f", ActorHealingTable[i][3]).."%)")
|
||||
else
|
||||
GameCooltip:AddLine (ActorHealingTable[i][4][1]..": ", _detalhes:comma_value (ActorHealingTable[i][2]).." (".._cstr ("%.1f", ActorHealingTable[i][3]).."%)")
|
||||
end
|
||||
@@ -541,8 +568,6 @@ function atributo_heal:ToolTip_HealingDone (instancia, numero, barra)
|
||||
if (instancia.sub_atributo == 1) then -- 1 or 2 -> healing done or hps
|
||||
|
||||
GameCooltip:AddLine (Loc ["STRING_TARGETS"].."", nil, nil, headerColor, nil, 12)
|
||||
--GameCooltip:AddIcon ([[Interface\Addons\Details\images\icons]], 1, 1, 14, 14, 0.03515625, 0.087890625, 0.0234375, 0.09765625, _detalhes.class_colors [self.classe])
|
||||
--GameCooltip:AddIcon ([[Interface\Addons\Details\images\icons]], 1, 1, 14, 14, 0, 0.03125, 0.126953125, 0.15625)
|
||||
GameCooltip:AddIcon ([[Interface\TUTORIALFRAME\UI-TutorialFrame-LevelUp]], 1, 1, 14, 14, 0.10546875, 0.89453125, 0.05859375, 0.6796875)
|
||||
GameCooltip:AddStatusBar (100, 1, r, g, b, barAlha)
|
||||
|
||||
@@ -573,7 +598,7 @@ function atributo_heal:ToolTip_HealingDone (instancia, numero, barra)
|
||||
--> PETS
|
||||
local meus_pets = self.pets
|
||||
|
||||
if (#meus_pets > 0) then --> teve ajudantes
|
||||
if (#meus_pets > 0 and (instancia.sub_atributo == 1 or instancia.sub_atributo == 2)) then --> teve ajudantes
|
||||
|
||||
local quantidade = {} --> armazena a quantidade de pets iguais
|
||||
local danos = {} --> armazena as habilidades
|
||||
@@ -650,6 +675,46 @@ function atributo_heal:ToolTip_HealingDone (instancia, numero, barra)
|
||||
|
||||
end
|
||||
|
||||
--> absorbs vs heal
|
||||
if (instancia.sub_atributo == 1 or instancia.sub_atributo == 2) then
|
||||
local total_healed = self.total - self.totalabsorb
|
||||
local total_previned = self.totalabsorb
|
||||
|
||||
local healed_percentage = total_healed / self.total * 100
|
||||
local previned_percentage = total_previned / self.total * 100
|
||||
|
||||
if (healed_percentage > 1 and previned_percentage > 1) then
|
||||
GameCooltip:AddLine (_math_floor (healed_percentage).."%", _math_floor (previned_percentage).."%")
|
||||
local r, g, b = _unpack (_detalhes.class_colors [self.classe])
|
||||
background_heal_vs_absorbs.color[1] = r
|
||||
background_heal_vs_absorbs.color[2] = g
|
||||
background_heal_vs_absorbs.color[3] = b
|
||||
background_heal_vs_absorbs.specialSpark = false
|
||||
GameCooltip:AddStatusBar (healed_percentage, 1, r, g, b, .9, false, background_heal_vs_absorbs)
|
||||
GameCooltip:AddIcon ([[Interface\ICONS\Ability_Priest_ReflectiveShield]], 1, 2, 14, 14, 0.0625, 0.9375, 0.0625, 0.9375)
|
||||
GameCooltip:AddIcon ([[Interface\ICONS\Ability_Monk_ChiWave]], 1, 1, 14, 14, 0.9375, 0.0625, 0.0625, 0.9375)
|
||||
end
|
||||
|
||||
elseif (instancia.sub_atributo == 3) then
|
||||
local total_healed = self.total
|
||||
local total_overheal = self.totalover
|
||||
local both = total_healed + total_overheal
|
||||
|
||||
local healed_okey = total_healed / both * 100
|
||||
local healed_disposed = total_overheal / both * 100
|
||||
|
||||
if (healed_okey > 1 and healed_disposed > 1) then
|
||||
GameCooltip:AddLine (_math_floor (healed_okey).."%", _math_floor (healed_disposed).."%")
|
||||
background_heal_vs_absorbs.color[1] = 1
|
||||
background_heal_vs_absorbs.color[2] = 0
|
||||
background_heal_vs_absorbs.color[3] = 0
|
||||
background_heal_vs_absorbs.specialSpark = false
|
||||
GameCooltip:AddStatusBar (healed_okey, 1, 0, 1, 0, .9, false, background_heal_vs_absorbs)
|
||||
GameCooltip:AddIcon ([[Interface\Scenarios\ScenarioIcon-Check]], 1, 1, 14, 14, 0, 1, 0, 1)
|
||||
GameCooltip:AddIcon ([[Interface\Glues\LOGIN\Glues-CheckBox-Check]], 1, 2, 14, 14, 1, 0, 0, 1)
|
||||
end
|
||||
end
|
||||
|
||||
return true
|
||||
end
|
||||
|
||||
@@ -767,7 +832,7 @@ function atributo_heal:MontaInfoOverHealing()
|
||||
local barras = info.barras1
|
||||
|
||||
for spellid, tabela in _pairs (tabela) do
|
||||
local nome, rank, icone = _GetSpellInfo (spellid)
|
||||
local nome, _, icone = _GetSpellInfo (spellid)
|
||||
_table_insert (minhas_curas, {spellid, tabela.overheal, tabela.overheal/total*100, nome, icone})
|
||||
end
|
||||
|
||||
@@ -813,7 +878,7 @@ function atributo_heal:MontaInfoOverHealing()
|
||||
end
|
||||
|
||||
barra.texto_esquerdo:SetText (index..instancia.divisores.colocacao..tabela[4]) --seta o texto da esqueda
|
||||
barra.texto_direita:SetText (tabela[2] .." ".. instancia.divisores.abre .. _cstr ("%.1f", tabela[3]) .."%".. instancia.divisores.fecha) --seta o texto da direita
|
||||
barra.texto_direita:SetText (_detalhes:comma_value (tabela[2]) .." ".. instancia.divisores.abre .. _cstr ("%.1f", tabela[3]) .."%".. instancia.divisores.fecha) --seta o texto da direita
|
||||
|
||||
barra.icone:SetTexture (tabela[5])
|
||||
|
||||
@@ -855,7 +920,8 @@ function atributo_heal:MontaInfoOverHealing()
|
||||
end
|
||||
|
||||
barra.texto_esquerdo:SetText (index..instancia.divisores.colocacao..tabela[1]) --seta o texto da esqueda
|
||||
barra.texto_direita:SetText (tabela[2] .." ".. instancia.divisores.abre .. _cstr ("%.1f", tabela[3]) .. instancia.divisores.fecha) --seta o texto da direita
|
||||
barra.texto_direita:SetText (_detalhes:comma_value (tabela[2]) .." ".. instancia.divisores.abre .. _cstr ("%.1f", tabela[3]) .. instancia.divisores.fecha) --seta o texto da direita
|
||||
barra.texto_esquerdo:SetWidth (barra:GetWidth() - barra.texto_direita:GetStringWidth() - 30)
|
||||
|
||||
-- o que mostrar no local do ícone?
|
||||
--barra.icone:SetTexture (tabela[4][3])
|
||||
@@ -1321,19 +1387,20 @@ atributo_heal.__add = function (shadow, tabela2)
|
||||
local tempo = (tabela2.end_time or time()) - tabela2.start_time
|
||||
shadow.start_time = shadow.start_time - tempo
|
||||
|
||||
shadow.total = shadow.total - tabela2.total
|
||||
shadow.total = shadow.total + tabela2.total
|
||||
_detalhes.tabela_overall.totals[2] = _detalhes.tabela_overall.totals[2] + tabela2.total
|
||||
|
||||
if (tabela2.grupo) then
|
||||
_detalhes.tabela_overall.totals_grupo[2] = _detalhes.tabela_overall.totals_grupo[2] + tabela2.total
|
||||
end
|
||||
|
||||
shadow.totalover = shadow.totalover - tabela2.totalover
|
||||
shadow.totalover = shadow.totalover + tabela2.totalover
|
||||
shadow.heal_enemy_amt = shadow.heal_enemy_amt + tabela2.heal_enemy_amt
|
||||
|
||||
shadow.total_without_pet = shadow.total_without_pet - tabela2.total_without_pet
|
||||
shadow.totalover_without_pet = shadow.totalover_without_pet - tabela2.totalover_without_pet
|
||||
shadow.total_without_pet = shadow.total_without_pet + tabela2.total_without_pet
|
||||
shadow.totalover_without_pet = shadow.totalover_without_pet + tabela2.totalover_without_pet
|
||||
|
||||
shadow.healing_taken = shadow.healing_taken - tabela2.healing_taken
|
||||
shadow.healing_taken = shadow.healing_taken + tabela2.healing_taken
|
||||
|
||||
--> copia o healing_from
|
||||
for nome, _ in _pairs (tabela2.healing_from) do
|
||||
@@ -1388,6 +1455,7 @@ end
|
||||
atributo_heal.__sub = function (tabela1, tabela2)
|
||||
tabela1.total = tabela1.total - tabela2.total
|
||||
tabela1.totalover = tabela1.totalover - tabela2.totalover
|
||||
tabela1.heal_enemy_amt = tabela1.heal_enemy_amt - tabela2.heal_enemy_amt
|
||||
|
||||
tabela1.total_without_pet = tabela1.total_without_pet - tabela2.total_without_pet
|
||||
tabela1.totalover_without_pet = tabela1.totalover_without_pet - tabela2.totalover_without_pet
|
||||
|
||||
@@ -24,6 +24,7 @@ function habilidade_cura:NovaTabela (id, link) --aqui eu n
|
||||
local _newHealSpell = {
|
||||
|
||||
total = 0,
|
||||
totalabsorb = 0,
|
||||
counter = 0,
|
||||
id = id,
|
||||
|
||||
@@ -54,6 +55,7 @@ function habilidade_cura:NovaTabela (id, link) --aqui eu n
|
||||
return _newHealSpell
|
||||
end
|
||||
|
||||
--> o primeiro parametro "spell" vira self a atrasa 1 parâmetro em todos os argumentos.
|
||||
function habilidade_cura:Add (serial, nome, flag, amount, who_nome, absorbed, critical, overhealing, is_shield)
|
||||
|
||||
self.counter = self.counter + 1
|
||||
@@ -79,6 +81,9 @@ function habilidade_cura:Add (serial, nome, flag, amount, who_nome, absorbed, cr
|
||||
if (amount and amount > 0) then
|
||||
|
||||
self.total = self.total + amount
|
||||
if (is_shield) then
|
||||
self.totalabsorb = self.totalabsorb + amount
|
||||
end
|
||||
|
||||
alvo:AddQuantidade (amount)
|
||||
|
||||
|
||||
+223
-9
@@ -146,7 +146,11 @@ function _detalhes:ToolTipDead (instancia, morte, esta_barra)
|
||||
|
||||
GameCooltip:SetOption ("StatusBarHeightMod", -6)
|
||||
GameCooltip:SetOption ("FixedWidth", 300)
|
||||
GameCooltip:SetOption ("TextSize", 9.5)
|
||||
GameCooltip:SetOption ("TextSize", 9)
|
||||
GameCooltip:SetOption ("LeftBorderSize", -4)
|
||||
GameCooltip:SetOption ("RightBorderSize", 5)
|
||||
GameCooltip:SetOption ("StatusBarTexture", [[Interface\AddOns\Details\images\bar4_reverse]])
|
||||
|
||||
GameCooltip:ShowCooltip()
|
||||
|
||||
--_detalhes.popup:ShowMe (esta_barra, "tooltip_bars", linhas, 300, 16, 9) --> [1] ancora [2] tipo do painel [3] texto/linhas [4] largura [5] tamanho do icone e altura da barra [6] tamanho da fonte
|
||||
@@ -251,6 +255,8 @@ function atributo_misc:RefreshWindow (instancia, tabela_do_combate, forcar, expo
|
||||
keyName = "dispell"
|
||||
elseif (sub_atributo == 5) then --> DEATHS
|
||||
keyName = "dead"
|
||||
elseif (sub_atributo == 6) then --> DEFENSIVE COOLDOWNS
|
||||
keyName = "cooldowns_defensive"
|
||||
end
|
||||
else
|
||||
keyName = exportar.key
|
||||
@@ -274,6 +280,8 @@ function atributo_misc:RefreshWindow (instancia, tabela_do_combate, forcar, expo
|
||||
keyName = "dispell"
|
||||
elseif (sub_atributo == 5) then --> DEATHS
|
||||
keyName = "dead"
|
||||
elseif (sub_atributo == 6) then --> DEFENSIVE COOLDOWNS
|
||||
keyName = "cooldowns_defensive"
|
||||
end
|
||||
|
||||
end
|
||||
@@ -514,6 +522,8 @@ function atributo_misc:ToolTip (instancia, numero, barra)
|
||||
return self:ToolTipDispell (instancia, numero, barra)
|
||||
elseif (instancia.sub_atributo == 5) then --> mortes
|
||||
return self:ToolTipDead (instancia, numero, barra)
|
||||
elseif (instancia.sub_atributo == 6) then --> defensive cooldowns
|
||||
return self:ToolTipDefensiveCooldowns (instancia, numero, barra)
|
||||
end
|
||||
end
|
||||
--> tooltip locals
|
||||
@@ -598,13 +608,19 @@ function atributo_misc:ToolTipDispell (instancia, numero, barra)
|
||||
end
|
||||
_table_sort (meus_dispells, function(a, b) return a[2] > b[2] end)
|
||||
|
||||
GameTooltip:AddLine (Loc ["STRING_SPELLS"]..":")
|
||||
GameCooltip:AddLine (Loc ["STRING_SPELLS"].."", nil, nil, headerColor, nil, 12)
|
||||
--GameCooltip:AddIcon ([[Interface\ICONS\inv_emberweavebandage2]], 1, 1, 14, 14, 0.078125, 0.9375, 0.078125, 0.953125)
|
||||
--GameCooltip:AddIcon ([[Interface\ICONS\INV_Enchant_Disenchant]], 1, 1, 14, 14, 0.078125, 0.9375, 0.078125, 0.953125)
|
||||
GameCooltip:AddIcon ([[Interface\ICONS\Spell_Arcane_ArcaneTorrent]], 1, 1, 14, 14, 0.078125, 0.9375, 0.078125, 0.953125)
|
||||
GameCooltip:AddStatusBar (100, 1, r, g, b, barAlha)
|
||||
|
||||
if (#meus_dispells > 0) then
|
||||
for i = 1, _math_min (3, #meus_dispells) do
|
||||
local esta_habilidade = meus_dispells[i]
|
||||
local nome_magia, _, icone_magia = _GetSpellInfo (esta_habilidade[1])
|
||||
GameCooltip:AddLine (nome_magia..": ", esta_habilidade[2].." (".._cstr("%.1f", esta_habilidade[2]/meu_total*100).."%)")
|
||||
GameCooltip:AddIcon (icone_magia, nil, nil, 14, 14)
|
||||
GameCooltip:AddStatusBar (100, 1, .1, .1, .1, .3)
|
||||
end
|
||||
else
|
||||
GameTooltip:AddLine (Loc ["STRING_NO_SPELL"])
|
||||
@@ -617,19 +633,133 @@ function atributo_misc:ToolTipDispell (instancia, numero, barra)
|
||||
end
|
||||
_table_sort (buffs_dispelados, function(a, b) return a[2] > b[2] end)
|
||||
|
||||
GameTooltip:AddLine (Loc ["STRING_DISPELLED"] .. ":")
|
||||
GameCooltip:AddLine (Loc ["STRING_DISPELLED"] .. ":", nil, nil, headerColor, nil, 12)
|
||||
GameCooltip:AddIcon ([[Interface\ICONS\Spell_Arcane_ManaTap]], 1, 1, 14, 14, 0.078125, 0.9375, 0.078125, 0.953125)
|
||||
GameCooltip:AddStatusBar (100, 1, r, g, b, barAlha)
|
||||
|
||||
if (#buffs_dispelados > 0) then
|
||||
for i = 1, _math_min (3, #buffs_dispelados) do
|
||||
local esta_habilidade = buffs_dispelados[i]
|
||||
local nome_magia, _, icone_magia = _GetSpellInfo (esta_habilidade[1])
|
||||
GameCooltip:AddLine (nome_magia..": ", esta_habilidade[2].." (".._cstr("%.1f", esta_habilidade[2]/meu_total*100).."%)")
|
||||
GameCooltip:AddIcon (icone_magia, nil, nil, 14, 14)
|
||||
GameCooltip:AddStatusBar (100, 1, .1, .1, .1, .3)
|
||||
end
|
||||
end
|
||||
|
||||
GameCooltip:AddLine (Loc ["STRING_TARGETS"].."", nil, nil, headerColor, nil, 12)
|
||||
GameCooltip:AddIcon ([[Interface\ICONS\ACHIEVEMENT_GUILDPERK_EVERYONES A HERO_RANK2]], 1, 1, 14, 14, 0.078125, 0.9375, 0.078125, 0.953125)
|
||||
GameCooltip:AddStatusBar (100, 1, r, g, b, barAlha)
|
||||
|
||||
local alvos_dispelados = {}
|
||||
for _, TargetTable in _ipairs (self.dispell_targets._ActorTable) do
|
||||
alvos_dispelados [#alvos_dispelados + 1] = {TargetTable.nome, TargetTable.total, TargetTable.total/meu_total*100}
|
||||
end
|
||||
_table_sort (alvos_dispelados, _detalhes.Sort2)
|
||||
|
||||
for i = 1, _math_min (3, #alvos_dispelados) do
|
||||
if (alvos_dispelados[i][2] < 1) then
|
||||
break
|
||||
end
|
||||
|
||||
GameCooltip:AddLine (alvos_dispelados[i][1]..": ", _detalhes:comma_value (alvos_dispelados[i][2]) .." (".._cstr ("%.1f", alvos_dispelados[i][3]).."%)")
|
||||
GameCooltip:AddStatusBar (100, 1, .1, .1, .1, .3)
|
||||
|
||||
local targetActor = instancia.showing[4]:PegarCombatente (_, alvos_dispelados[i][1])
|
||||
|
||||
if (targetActor) then
|
||||
local classe = targetActor.classe
|
||||
if (not classe) then
|
||||
classe = "UNKNOW"
|
||||
end
|
||||
if (classe == "UNKNOW") then
|
||||
GameCooltip:AddIcon ("Interface\\LFGFRAME\\LFGROLE_BW", nil, nil, 14, 14, .25, .5, 0, 1)
|
||||
else
|
||||
GameCooltip:AddIcon ("Interface\\AddOns\\Details\\images\\classes_small", nil, nil, 14, 14, _unpack (_detalhes.class_coords [classe]))
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
return true
|
||||
end
|
||||
|
||||
function atributo_misc:ToolTipDefensiveCooldowns (instancia, numero, barra)
|
||||
|
||||
local owner = self.owner
|
||||
if (owner and owner.classe) then
|
||||
r, g, b = unpack (_detalhes.class_colors [owner.classe])
|
||||
else
|
||||
r, g, b = unpack (_detalhes.class_colors [self.classe])
|
||||
end
|
||||
|
||||
local meu_total = self ["cooldowns_defensive"]
|
||||
local minha_tabela = self.cooldowns_defensive_spell_tables._ActorTable
|
||||
|
||||
--> habilidade usada para interromper
|
||||
local cooldowns_usados = {}
|
||||
|
||||
for _spellid, _tabela in _pairs (minha_tabela) do
|
||||
cooldowns_usados [#cooldowns_usados+1] = {_spellid, _tabela.counter}
|
||||
end
|
||||
_table_sort (cooldowns_usados, function(a, b) return a[2] > b[2] end)
|
||||
|
||||
|
||||
GameCooltip:AddLine (Loc ["STRING_SPELLS"].."", nil, nil, headerColor, nil, 12)
|
||||
GameCooltip:AddIcon ([[Interface\ICONS\Ability_Warrior_Safeguard]], 1, 1, 14, 14, 0.9375, 0.078125, 0.078125, 0.953125)
|
||||
GameCooltip:AddStatusBar (100, 1, r, g, b, barAlha)
|
||||
|
||||
if (#cooldowns_usados > 0) then
|
||||
for i = 1, _math_min (3, #cooldowns_usados) do
|
||||
local esta_habilidade = cooldowns_usados[i]
|
||||
local nome_magia, _, icone_magia = _GetSpellInfo (esta_habilidade[1])
|
||||
GameCooltip:AddLine (nome_magia..": ", esta_habilidade[2].." (".._cstr("%.1f", esta_habilidade[2]/meu_total*100).."%)")
|
||||
GameCooltip:AddIcon (icone_magia, nil, nil, 14, 14) --0.03125, 0.96875, 0.03125, 0.96875
|
||||
GameCooltip:AddStatusBar (100, 1, .1, .1, .1, .3)
|
||||
end
|
||||
else
|
||||
GameCooltip:AddLine (Loc ["STRING_NO_SPELL"])
|
||||
end
|
||||
|
||||
--> quem foi que o cara reviveu
|
||||
local meus_alvos = self.cooldowns_defensive_targets._ActorTable
|
||||
local alvos = {}
|
||||
|
||||
for _, _tabela in _ipairs (meus_alvos) do
|
||||
alvos [#alvos+1] = {_tabela.nome, _tabela.total}
|
||||
end
|
||||
_table_sort (alvos, function(a, b) return a[2] > b[2] end)
|
||||
|
||||
GameCooltip:AddLine (Loc ["STRING_TARGETS"].."", nil, nil, headerColor, nil, 12)
|
||||
GameCooltip:AddIcon ([[Interface\ICONS\Ability_Warrior_DefensiveStance]], 1, 1, 14, 14, 0.9375, 0.125, 0.0625, 0.9375)
|
||||
GameCooltip:AddStatusBar (100, 1, r, g, b, barAlha)
|
||||
|
||||
if (#alvos > 0) then
|
||||
for i = 1, _math_min (3, #alvos) do
|
||||
GameCooltip:AddLine (alvos[i][1]..": ", alvos[i][2], 1, "white", "white")
|
||||
GameCooltip:AddStatusBar (100, 1, .1, .1, .1, .3)
|
||||
|
||||
GameCooltip:AddIcon ("Interface\\Icons\\PALADIN_HOLY", nil, nil, 14, 14)
|
||||
|
||||
local targetActor = instancia.showing[4]:PegarCombatente (_, alvos[i][1])
|
||||
if (targetActor) then
|
||||
local classe = targetActor.classe
|
||||
if (not classe) then
|
||||
classe = "UNKNOW"
|
||||
end
|
||||
if (classe == "UNKNOW") then
|
||||
GameCooltip:AddIcon ("Interface\\LFGFRAME\\LFGROLE_BW", nil, nil, 14, 14, .25, .5, 0, 1)
|
||||
else
|
||||
GameCooltip:AddIcon ("Interface\\AddOns\\Details\\images\\classes_small", nil, nil, 14, 14, _unpack (_detalhes.class_coords [classe]))
|
||||
end
|
||||
end
|
||||
|
||||
end
|
||||
end
|
||||
|
||||
return true
|
||||
|
||||
end
|
||||
|
||||
function atributo_misc:ToolTipRess (instancia, numero, barra)
|
||||
|
||||
local owner = self.owner
|
||||
@@ -650,16 +780,20 @@ function atributo_misc:ToolTipRess (instancia, numero, barra)
|
||||
end
|
||||
_table_sort (meus_ress, function(a, b) return a[2] > b[2] end)
|
||||
|
||||
GameTooltip:AddLine (Loc ["STRING_SPELLS"]..":")
|
||||
GameCooltip:AddLine (Loc ["STRING_SPELLS"].."", nil, nil, headerColor, nil, 12)
|
||||
GameCooltip:AddIcon ([[Interface\ICONS\Ability_Paladin_BlessedMending]], 1, 1, 14, 14, 0.098125, 0.828125, 0.953125, 0.168125)
|
||||
GameCooltip:AddStatusBar (100, 1, r, g, b, barAlha)
|
||||
|
||||
if (#meus_ress > 0) then
|
||||
for i = 1, _math_min (3, #meus_ress) do
|
||||
local esta_habilidade = meus_ress[i]
|
||||
local nome_magia, _, icone_magia = _GetSpellInfo (esta_habilidade[1])
|
||||
GameCooltip:AddLine (nome_magia..": ", esta_habilidade[2].." (".._cstr("%.1f", esta_habilidade[2]/meu_total*100).."%)")
|
||||
GameCooltip:AddIcon (icone_magia, nil, nil, 14, 14)
|
||||
GameCooltip:AddStatusBar (100, 1, .1, .1, .1, .3)
|
||||
end
|
||||
else
|
||||
GameTooltip:AddLine (Loc ["STRING_NO_SPELL"])
|
||||
GameCooltip:AddLine (Loc ["STRING_NO_SPELL"])
|
||||
end
|
||||
|
||||
--> quem foi que o cara reviveu
|
||||
@@ -671,11 +805,30 @@ function atributo_misc:ToolTipRess (instancia, numero, barra)
|
||||
end
|
||||
_table_sort (alvos, function(a, b) return a[2] > b[2] end)
|
||||
|
||||
GameTooltip:AddLine (Loc ["STRING_TARGETS"]..":")
|
||||
GameCooltip:AddLine (Loc ["STRING_TARGETS"].."", nil, nil, headerColor, nil, 12)
|
||||
--GameCooltip:AddIcon ([[Interface\ICONS\Ability_DeathKnight_IcyGrip]], 1, 1, 14, 14, 0.9375, 0.078125, 0.953125, 0.078125)
|
||||
|
||||
GameCooltip:AddIcon ([[Interface\ICONS\Ability_Priest_Cascade]], 1, 1, 14, 14, 0.9375, 0.0625, 0.0625, 0.9375)
|
||||
GameCooltip:AddStatusBar (100, 1, r, g, b, barAlha)
|
||||
|
||||
if (#alvos > 0) then
|
||||
for i = 1, _math_min (3, #alvos) do
|
||||
GameCooltip:AddLine (alvos[i][1]..": ", alvos[i][2])
|
||||
GameCooltip:AddIcon ("Interface\\Icons\\PALADIN_HOLY", nil, nil, 14, 14)
|
||||
GameCooltip:AddStatusBar (100, 1, .1, .1, .1, .3)
|
||||
|
||||
local targetActor = instancia.showing[4]:PegarCombatente (_, alvos[i][1])
|
||||
if (targetActor) then
|
||||
local classe = targetActor.classe
|
||||
if (not classe) then
|
||||
classe = "UNKNOW"
|
||||
end
|
||||
if (classe == "UNKNOW") then
|
||||
GameCooltip:AddIcon ("Interface\\LFGFRAME\\LFGROLE_BW", nil, nil, 14, 14, .25, .5, 0, 1)
|
||||
else
|
||||
GameCooltip:AddIcon ("Interface\\AddOns\\Details\\images\\classes_small", nil, nil, 14, 14, _unpack (_detalhes.class_coords [classe]))
|
||||
end
|
||||
end
|
||||
|
||||
end
|
||||
end
|
||||
|
||||
@@ -703,13 +856,17 @@ function atributo_misc:ToolTipInterrupt (instancia, numero, barra)
|
||||
end
|
||||
_table_sort (meus_interrupts, function(a, b) return a[2] > b[2] end)
|
||||
|
||||
GameTooltip:AddLine (Loc ["STRING_SPELLS"]..":")
|
||||
GameCooltip:AddLine (Loc ["STRING_SPELLS"].."", nil, nil, headerColor, nil, 12)
|
||||
GameCooltip:AddIcon ([[Interface\ICONS\Ability_Warrior_PunishingBlow]], 1, 1, 14, 14, 0.9375, 0.078125, 0.078125, 0.953125)
|
||||
GameCooltip:AddStatusBar (100, 1, r, g, b, barAlha)
|
||||
|
||||
if (#meus_interrupts > 0) then
|
||||
for i = 1, _math_min (3, #meus_interrupts) do
|
||||
local esta_habilidade = meus_interrupts[i]
|
||||
local nome_magia, _, icone_magia = _GetSpellInfo (esta_habilidade[1])
|
||||
GameCooltip:AddLine (nome_magia..": ", esta_habilidade[2].." (".._cstr("%.1f", esta_habilidade[2]/meu_total*100).."%)")
|
||||
GameCooltip:AddIcon (icone_magia, nil, nil, 14, 14)
|
||||
GameCooltip:AddStatusBar (100, 1, .1, .1, .1, .3)
|
||||
end
|
||||
else
|
||||
GameTooltip:AddLine (Loc ["STRING_NO_SPELL"])
|
||||
@@ -723,13 +880,17 @@ function atributo_misc:ToolTipInterrupt (instancia, numero, barra)
|
||||
end
|
||||
_table_sort (habilidades_interrompidas, function(a, b) return a[2] > b[2] end)
|
||||
|
||||
GameTooltip:AddLine (Loc ["STRING_SPELL_INTERRUPTED"] .. ":")
|
||||
GameCooltip:AddLine (Loc ["STRING_SPELL_INTERRUPTED"] .. ":", nil, nil, headerColor, nil, 12)
|
||||
GameCooltip:AddIcon ([[Interface\ICONS\Ability_Warrior_Sunder]], 1, 1, 14, 14, 0.078125, 0.9375, 0.128125, 0.913125)
|
||||
GameCooltip:AddStatusBar (100, 1, r, g, b, barAlha)
|
||||
|
||||
if (#habilidades_interrompidas > 0) then
|
||||
for i = 1, _math_min (3, #habilidades_interrompidas) do
|
||||
local esta_habilidade = habilidades_interrompidas[i]
|
||||
local nome_magia, _, icone_magia = _GetSpellInfo (esta_habilidade[1])
|
||||
GameCooltip:AddLine (nome_magia..": ", esta_habilidade[2].." (".._cstr("%.1f", esta_habilidade[2]/meu_total*100).."%)")
|
||||
GameCooltip:AddIcon (icone_magia, nil, nil, 14, 14)
|
||||
GameCooltip:AddStatusBar (100, 1, .1, .1, .1, .3)
|
||||
end
|
||||
end
|
||||
|
||||
@@ -1063,6 +1224,11 @@ function _detalhes.refresh:r_atributo_misc (este_jogador, shadow)
|
||||
_detalhes.refresh:r_container_combatentes (este_jogador.interrupt_targets, shadow.interrupt_targets)
|
||||
_detalhes.refresh:r_container_habilidades (este_jogador.interrupt_spell_tables, shadow.interrupt_spell_tables)
|
||||
end
|
||||
--> refresh cooldowns defensive
|
||||
if (este_jogador.cooldowns_defensive_targets) then
|
||||
_detalhes.refresh:r_container_combatentes (este_jogador.cooldowns_defensive_targets, shadow.cooldowns_defensive_targets)
|
||||
_detalhes.refresh:r_container_habilidades (este_jogador.cooldowns_defensive_spell_tables, shadow.cooldowns_defensive_spell_tables)
|
||||
end
|
||||
|
||||
--> refresh ressers
|
||||
if (este_jogador.ress_targets) then
|
||||
@@ -1088,6 +1254,11 @@ function _detalhes.refresh:r_atributo_misc (este_jogador, shadow)
|
||||
_detalhes.refresh:r_container_combatentes (este_jogador.interrupt_targets, -1)
|
||||
_detalhes.refresh:r_container_habilidades (este_jogador.interrupt_spell_tables, -1)
|
||||
end
|
||||
--> refresh cooldowns defensive
|
||||
if (este_jogador.cooldowns_defensive_targets) then
|
||||
_detalhes.refresh:r_container_combatentes (este_jogador.cooldowns_defensive_targets, -1)
|
||||
_detalhes.refresh:r_container_habilidades (este_jogador.cooldowns_defensive_spell_tables, -1)
|
||||
end
|
||||
|
||||
--> refresh ressers
|
||||
if (este_jogador.ress_targets) then
|
||||
@@ -1120,6 +1291,10 @@ function _detalhes.clear:c_atributo_misc (este_jogador)
|
||||
_detalhes.clear:c_container_combatentes (este_jogador.interrupt_targets)
|
||||
_detalhes.clear:c_container_habilidades (este_jogador.interrupt_spell_tables)
|
||||
end
|
||||
if (este_jogador.cooldowns_defensive_targets) then
|
||||
_detalhes.clear:c_container_combatentes (este_jogador.cooldowns_defensive_targets)
|
||||
_detalhes.clear:c_container_habilidades (este_jogador.cooldowns_defensive_spell_tables)
|
||||
end
|
||||
|
||||
if (este_jogador.ress_targets) then
|
||||
_detalhes.clear:c_container_combatentes (este_jogador.ress_targets)
|
||||
@@ -1188,6 +1363,42 @@ atributo_misc.__add = function (shadow, tabela2)
|
||||
|
||||
end
|
||||
|
||||
if (tabela2.cooldowns_defensive) then
|
||||
|
||||
shadow.cooldowns_defensive = shadow.cooldowns_defensive + tabela2.cooldowns_defensive
|
||||
_detalhes.tabela_overall.totals[4]["cooldowns_defensive"] = _detalhes.tabela_overall.totals[4]["cooldowns_defensive"] + tabela2.cooldowns_defensive
|
||||
|
||||
if (tabela2.grupo) then
|
||||
_detalhes.tabela_overall.totals_grupo[4]["cooldowns_defensive"] = _detalhes.tabela_overall.totals_grupo[4]["cooldowns_defensive"] + tabela2.cooldowns_defensive
|
||||
end
|
||||
|
||||
for index, alvo in _ipairs (tabela2.cooldowns_defensive_targets._ActorTable) do
|
||||
local alvo_shadow = shadow.cooldowns_defensive_targets:PegarCombatente (alvo.serial, alvo.nome, alvo.flag_original, true)
|
||||
alvo_shadow.total = alvo_shadow.total + alvo.total
|
||||
end
|
||||
|
||||
for spellid, habilidade in _pairs (tabela2.cooldowns_defensive_spell_tables._ActorTable) do
|
||||
local habilidade_shadow = shadow.cooldowns_defensive_spell_tables:PegaHabilidade (spellid, true, nil, true)
|
||||
|
||||
for index, alvo in _ipairs (habilidade.targets._ActorTable) do
|
||||
local alvo_shadow = habilidade_shadow.targets:PegarCombatente (alvo.serial, alvo.nome, alvo.flag_original, true)
|
||||
alvo_shadow.total = alvo_shadow.total + alvo.total
|
||||
end
|
||||
|
||||
for key, value in _pairs (habilidade) do
|
||||
if (_type (value) == "number") then
|
||||
if (key ~= "id") then
|
||||
if (not habilidade_shadow [key]) then
|
||||
habilidade_shadow [key] = 0
|
||||
end
|
||||
habilidade_shadow [key] = habilidade_shadow [key] + value
|
||||
end
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
end
|
||||
|
||||
if (tabela2.ress) then
|
||||
|
||||
shadow.ress = shadow.ress + tabela2.ress
|
||||
@@ -1335,6 +1546,9 @@ atributo_misc.__sub = function (tabela1, tabela2)
|
||||
tabela1.interrompeu_oque [spellid] = tabela1.interrompeu_oque [spellid] - amt
|
||||
end
|
||||
end
|
||||
if (tabela1.cooldowns_defensive and tabela2.cooldowns_defensive) then
|
||||
tabela1.cooldowns_defensive = tabela1.cooldowns_defensive - tabela2.cooldowns_defensive
|
||||
end
|
||||
|
||||
if (tabela1.ress and tabela2.ress) then
|
||||
tabela1.ress = tabela1.ress - tabela2.ress
|
||||
|
||||
@@ -53,8 +53,12 @@ function habilidade_misc:Add (serial, nome, flag, who_nome, token, spellID, spel
|
||||
alvo.total = alvo.total + 1
|
||||
|
||||
--alvo:AddQuantidade (1)
|
||||
|
||||
if (token == "SPELL_INTERRUPT") then
|
||||
if (spellID == "BUFF") then
|
||||
if (spellName == "COOLDOWN") then
|
||||
self.counter = self.counter + 1
|
||||
end
|
||||
|
||||
elseif (token == "SPELL_INTERRUPT") then
|
||||
self.counter = self.counter + 1
|
||||
|
||||
if (not self.interrompeu_oque [spellID]) then --> interrompeu_oque a NIL value
|
||||
|
||||
@@ -259,7 +259,7 @@ function container_combatentes:PegarCombatente (serial, nome, flag, criar, isOwn
|
||||
novo_objeto.shadow = shadow_objeto
|
||||
novo_objeto:CriaLink (shadow_objeto) --> criando o link
|
||||
shadow_objeto.flag = details_flag
|
||||
if (novo_objeto.grupo) then
|
||||
if (novo_objeto.grupo and _detalhes.in_combat) then
|
||||
_detalhes.cache_damage_group [#_detalhes.cache_damage_group+1] = novo_objeto
|
||||
end
|
||||
end
|
||||
@@ -288,7 +288,7 @@ function container_combatentes:PegarCombatente (serial, nome, flag, criar, isOwn
|
||||
novo_objeto.shadow = shadow_objeto
|
||||
novo_objeto:CriaLink (shadow_objeto) --> criando o link
|
||||
shadow_objeto.flag = details_flag
|
||||
if (novo_objeto.grupo) then
|
||||
if (novo_objeto.grupo and _detalhes.in_combat) then
|
||||
_detalhes.cache_healing_group [#_detalhes.cache_healing_group+1] = novo_objeto
|
||||
end
|
||||
end
|
||||
@@ -482,30 +482,4 @@ function _detalhes.clear:c_container_combatentes (container)
|
||||
container._NameIndexTable = nil
|
||||
container.need_refresh = nil
|
||||
container.funcao_de_criacao = nil
|
||||
end
|
||||
|
||||
--[[
|
||||
if (not serial) then
|
||||
print ("DEBUG: objeto sem serial: "..nome)
|
||||
novo_objeto.classe = "UNKNOW"
|
||||
else
|
||||
if (_bit_band (flag, 0x00000400) ~= 0) then --> é player
|
||||
|
||||
local _, engClass, _, engRace = _GetPlayerInfoByGUID (serial)
|
||||
novo_objeto.classe = engClass
|
||||
--print (novo_objeto.classe)
|
||||
--print ("eh um player ".. nome.." da classe "..engClass)
|
||||
else
|
||||
--print ("nao eh um player "..nome)
|
||||
local _, engClass = _UnitClass (nome)
|
||||
--print (engClass)
|
||||
|
||||
if (engClass) then
|
||||
novo_objeto.classe = engClass
|
||||
else
|
||||
novo_objeto.classe = "UNKNOW"
|
||||
end
|
||||
end
|
||||
--novo_objeto.classe = "UNKNOW"
|
||||
end
|
||||
--]]
|
||||
end
|
||||
+48
-2
@@ -99,6 +99,12 @@
|
||||
_combate.totals_grupo [_actor.tipo] ["interrupt"] = _combate.totals_grupo [_actor.tipo] ["interrupt"] - _actor.interrupt
|
||||
end
|
||||
end
|
||||
if (_actor.cooldowns_defensive) then
|
||||
_combate.totals [_actor.tipo] ["cooldowns_defensive"] = _combate.totals [_actor.tipo] ["cooldowns_defensive"] - _actor.cooldowns_defensive
|
||||
if (_actor.grupo) then
|
||||
_combate.totals_grupo [_actor.tipo] ["cooldowns_defensive"] = _combate.totals_grupo [_actor.tipo] ["cooldowns_defensive"] - _actor.cooldowns_defensive
|
||||
end
|
||||
end
|
||||
if (_actor.dispell) then
|
||||
_combate.totals [_actor.tipo] ["dispell"] = _combate.totals [_actor.tipo] ["dispell"] - _actor.dispell
|
||||
if (_actor.grupo) then
|
||||
@@ -208,8 +214,6 @@
|
||||
|
||||
elseif (class_type == class_type_misc) then
|
||||
|
||||
-- o problema ta na habilidade do interrupt, aqui ele só ta recriando os containers no Actor principal e não esta itinerando nas habilidades
|
||||
|
||||
shadow = overall_misc._ActorTable [overall_misc._NameIndexTable[nome]]
|
||||
|
||||
if (not shadow) then
|
||||
@@ -217,6 +221,14 @@
|
||||
shadow.classe = esta_classe.classe
|
||||
end
|
||||
|
||||
if (esta_classe.cooldowns_defensive) then
|
||||
if (not shadow.cooldowns_defensive_targets) then
|
||||
shadow.cooldowns_defensive = 0
|
||||
shadow.cooldowns_defensive_targets = container_combatentes:NovoContainer (container_damage_target) --> pode ser um container de alvo de dano, pois irá usar apenas o .total
|
||||
shadow.cooldowns_defensive_spell_tables = container_habilidades:NovoContainer (_detalhes.container_type.CONTAINER_MISC_CLASS) --> cria o container das habilidades usadas para interromper
|
||||
end
|
||||
end
|
||||
|
||||
if (esta_classe.interrupt) then
|
||||
if (not shadow.interrupt_targets) then
|
||||
shadow.interrupt = 0
|
||||
@@ -260,6 +272,11 @@
|
||||
_detalhes.refresh:r_alvo_da_habilidade (este_alvo, shadow.interrupt_targets)
|
||||
end
|
||||
end
|
||||
if (esta_classe.cooldowns_defensive) then
|
||||
for _, este_alvo in _ipairs (esta_classe.cooldowns_defensive_targets._ActorTable) do
|
||||
_detalhes.refresh:r_alvo_da_habilidade (este_alvo, shadow.cooldowns_defensive_targets)
|
||||
end
|
||||
end
|
||||
if (esta_classe.ress) then
|
||||
for _, este_alvo in _ipairs (esta_classe.ress_targets._ActorTable) do
|
||||
_detalhes.refresh:r_alvo_da_habilidade (este_alvo, shadow.ress_targets)
|
||||
@@ -307,6 +324,15 @@
|
||||
end
|
||||
end
|
||||
end
|
||||
if (esta_classe.cooldowns_defensive) then
|
||||
for _, habilidade in _pairs (esta_classe.cooldowns_defensive_spell_tables._ActorTable) do
|
||||
_detalhes.refresh:r_habilidade_misc (habilidade, shadow.cooldowns_defensive_spell_tables)
|
||||
|
||||
for _, este_alvo in _ipairs (habilidade.targets._ActorTable) do
|
||||
_detalhes.refresh:r_alvo_da_habilidade (este_alvo, habilidade.targets.shadow)
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
if (esta_classe.ress) then
|
||||
for _, habilidade in _pairs (esta_classe.ress_spell_tables._ActorTable) do
|
||||
@@ -468,6 +494,12 @@
|
||||
_combate.totals_grupo [myself.tipo] ["ress"] = _combate.totals_grupo [myself.tipo] ["ress"] - myself.ress
|
||||
end
|
||||
end
|
||||
if (myself.cooldowns_defensive) then
|
||||
_combate.totals [myself.tipo] ["cooldowns_defensive"] = _combate.totals [myself.tipo] ["cooldowns_defensive"] - myself.cooldowns_defensive
|
||||
if (myself.grupo) then
|
||||
_combate.totals_grupo [myself.tipo] ["cooldowns_defensive"] = _combate.totals_grupo [myself.tipo] ["cooldowns_defensive"] - myself.cooldowns_defensive
|
||||
end
|
||||
end
|
||||
if (myself.interrupt) then
|
||||
_combate.totals [myself.tipo] ["interrupt"] = _combate.totals [myself.tipo] ["interrupt"] - myself.interrupt
|
||||
if (myself.grupo) then
|
||||
@@ -524,6 +556,11 @@
|
||||
_detalhes.clear:c_alvo_da_habilidade (_alvo)
|
||||
end
|
||||
end
|
||||
if (esta_classe.cooldowns_defensive) then
|
||||
for _, _alvo in _ipairs (esta_classe.cooldowns_defensive_targets._ActorTable) do
|
||||
_detalhes.clear:c_alvo_da_habilidade (_alvo)
|
||||
end
|
||||
end
|
||||
|
||||
if (esta_classe.ress) then
|
||||
for _, _alvo in _ipairs (esta_classe.ress_targets._ActorTable) do
|
||||
@@ -572,6 +609,15 @@
|
||||
end
|
||||
end
|
||||
end
|
||||
if (esta_classe.cooldowns_defensive) then
|
||||
for _, habilidade in _pairs (esta_classe.cooldowns_defensive_spell_tables._ActorTable) do
|
||||
_detalhes.clear:c_habilidade_misc (habilidade)
|
||||
|
||||
for _, _alvo in ipairs (habilidade.targets._ActorTable) do
|
||||
_detalhes.clear:c_alvo_da_habilidade (_alvo)
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
if (esta_classe.ress) then
|
||||
for _, habilidade in _pairs (esta_classe.ress_spell_tables._ActorTable) do
|
||||
|
||||
+134
-58
@@ -33,6 +33,7 @@
|
||||
local escudo = _detalhes.escudos --details local
|
||||
local parser = _detalhes.parser --details local
|
||||
local absorb_spell_list = _detalhes.AbsorbSpells --details local
|
||||
local defensive_cooldown_spell_list = _detalhes.DefensiveCooldownSpells --details local
|
||||
local cc_spell_list = _detalhes.CrowdControlSpells --details local
|
||||
local container_combatentes = _detalhes.container_combatentes --details local
|
||||
local container_habilidades = _detalhes.container_habilidades --details local
|
||||
@@ -488,12 +489,13 @@
|
||||
return
|
||||
end
|
||||
|
||||
--> checking shield and overheals
|
||||
local cura_efetiva = absorbed
|
||||
if (is_shield) then
|
||||
--> o shield ja passa o numero exato da cura e o overheal
|
||||
cura_efetiva = amount
|
||||
else
|
||||
cura_efetiva = amount - overhealing
|
||||
--cura_efetiva = absorbed + amount - overhealing
|
||||
cura_efetiva = cura_efetiva + amount - overhealing
|
||||
end
|
||||
|
||||
_current_heal_container.need_refresh = true
|
||||
@@ -535,11 +537,14 @@
|
||||
end
|
||||
|
||||
if (not este_jogador.shadow.heal_enemy [spellid]) then
|
||||
este_jogador.shadow.heal_enemy [spellid] = cura_efetiva
|
||||
shadow.heal_enemy [spellid] = cura_efetiva
|
||||
else
|
||||
este_jogador.shadow.heal_enemy [spellid] = este_jogador.shadow.heal_enemy [spellid] + cura_efetiva
|
||||
shadow.heal_enemy [spellid] = shadow.heal_enemy [spellid] + cura_efetiva
|
||||
end
|
||||
|
||||
este_jogador.heal_enemy_amt = este_jogador.heal_enemy_amt + cura_efetiva
|
||||
shadow.heal_enemy_amt = shadow.heal_enemy_amt + cura_efetiva
|
||||
|
||||
return
|
||||
end
|
||||
|
||||
@@ -555,41 +560,6 @@
|
||||
|
||||
local t = jogador_alvo.last_events_table
|
||||
local i = t.n
|
||||
|
||||
--[[
|
||||
if (not i) then
|
||||
local isOriginal = jogador_alvo.last_events_table.original
|
||||
if (isOriginal) then
|
||||
isOriginal = "IsOriginal = TRUE"
|
||||
else
|
||||
isOriginal = "IsOriginal = FALSE"
|
||||
end
|
||||
local indexes = #jogador_alvo.last_events_table
|
||||
if (not indexes) then
|
||||
indexes = "Indexes = NIL"
|
||||
else
|
||||
indexes = "Indexes = "..indexes
|
||||
end
|
||||
local resync = _detalhes.tabela_vigente.resincked
|
||||
if (resync) then
|
||||
resync = "resync = TRUE"
|
||||
else
|
||||
resync = "resync = FALSE"
|
||||
end
|
||||
|
||||
local saved = _detalhes.tabela_vigente.hasSaved
|
||||
if (saved) then
|
||||
saved = "saved = TRUE"
|
||||
else
|
||||
saved = "saved = FALSE"
|
||||
end
|
||||
|
||||
print ("Report the lines shown, click on reset button and type /reload")
|
||||
print ("We are investigation this issue, this information is important to us.")
|
||||
assert (false, "Please Report This Error on the Blue Button: Parser 194: " .. isOriginal .. " " .. indexes .. " " .. resync .. " " .. saved)
|
||||
end
|
||||
--]]
|
||||
|
||||
t.n = i + 1
|
||||
|
||||
t = t [i]
|
||||
@@ -652,6 +622,11 @@
|
||||
--> actor healing amount
|
||||
este_jogador.total = este_jogador.total + cura_efetiva
|
||||
shadow.total = shadow.total + cura_efetiva
|
||||
|
||||
if (is_shield) then
|
||||
este_jogador.totalabsorb = este_jogador.totalabsorb + cura_efetiva
|
||||
shadow.totalabsorb = shadow.totalabsorb + cura_efetiva
|
||||
end
|
||||
|
||||
este_jogador.total_without_pet = este_jogador.total_without_pet + cura_efetiva
|
||||
shadow.total_without_pet = shadow.total_without_pet + cura_efetiva
|
||||
@@ -721,6 +696,10 @@
|
||||
else
|
||||
escudo [alvo_name] [spellid] [who_name] = amount
|
||||
end
|
||||
|
||||
elseif (defensive_cooldown_spell_list [spellid]) then
|
||||
--> usou cooldown
|
||||
return parser:add_defensive_cooldown (token, time, who_serial, who_name, who_flags, alvo_serial, alvo_name, alvo_flags, spellid, spellname, _, tipo, amount)
|
||||
|
||||
------------------------------------------------------------------------------------------------
|
||||
--> recording buffs
|
||||
@@ -816,12 +795,16 @@
|
||||
if (absorb_spell_list [spellid] and amount) then
|
||||
|
||||
if (escudo [alvo_name] and escudo [alvo_name][spellid] and escudo [alvo_name][spellid][who_name]) then
|
||||
|
||||
--print ("refresh", escudo [alvo_name][spellid][who_name], amount)
|
||||
|
||||
local absorb = escudo [alvo_name][spellid][who_name] - amount
|
||||
local overheal = amount - absorb
|
||||
escudo [alvo_name][spellid][who_name] = amount
|
||||
|
||||
if (absorb > 0) then
|
||||
return parser:heal (token, time, who_serial, who_name, who_flags, alvo_serial, alvo_name, alvo_flags, spellid, spellname, _, _math_ceil (absorb), 0, 0, 0, true)
|
||||
end
|
||||
--if (absorb > 0) then
|
||||
return parser:heal (token, time, who_serial, who_name, who_flags, alvo_serial, alvo_name, alvo_flags, spellid, spellname, _, _math_ceil (absorb), _math_ceil (overheal), 0, 0, true)
|
||||
--end
|
||||
else
|
||||
--> should apply aura if not found in already applied buff list?
|
||||
end
|
||||
@@ -905,12 +888,21 @@
|
||||
if (absorb_spell_list [spellid]) then
|
||||
if (escudo [alvo_name] and escudo [alvo_name][spellid] and escudo [alvo_name][spellid][who_name]) then
|
||||
if (amount) then
|
||||
local escudo_antigo = escudo [alvo_name][spellid][who_name]
|
||||
if (escudo_antigo and escudo_antigo > amount) then
|
||||
local absorb = escudo_antigo - amount
|
||||
escudo [alvo_name][spellid][who_name] = nil
|
||||
return parser:heal (token, time, who_serial, who_name, who_flags, alvo_serial, alvo_name, alvo_flags, spellid, spellname, _, _math_ceil (absorb), _math_ceil (escudo_antigo), 0, 0, true) --> último parametro IS_SHIELD
|
||||
end
|
||||
|
||||
-- o amount é o que sobrou do escudo
|
||||
|
||||
local escudo_antigo = escudo [alvo_name][spellid][who_name] --> quantidade total do escudo que foi colocado
|
||||
--print (escudo_antigo, amount)
|
||||
--if (escudo_antigo and escudo_antigo > amount) then
|
||||
|
||||
local absorb = escudo_antigo - amount
|
||||
local overheal = escudo_antigo - absorb
|
||||
|
||||
escudo [alvo_name][spellid][who_name] = nil
|
||||
|
||||
return parser:heal (token, time, who_serial, who_name, who_flags, alvo_serial, alvo_name, alvo_flags, spellid, spellname, _, _math_ceil (absorb), _math_ceil (overheal), 0, 0, true) --> último parametro IS_SHIELD
|
||||
|
||||
--end
|
||||
end
|
||||
escudo [alvo_name][spellid][who_name] = nil
|
||||
end
|
||||
@@ -1103,6 +1095,85 @@
|
||||
--> MISC |
|
||||
-----------------------------------------------------------------------------------------------------------------------------------------
|
||||
|
||||
function parser:add_defensive_cooldown (token, time, who_serial, who_name, who_flags, alvo_serial, alvo_name, alvo_flags, spellid, spellname, _, tipo, amount)
|
||||
|
||||
------------------------------------------------------------------------------------------------
|
||||
--> early checks and fixes
|
||||
|
||||
_current_misc_container.need_refresh = true
|
||||
_overall_misc_container.need_refresh = true
|
||||
|
||||
------------------------------------------------------------------------------------------------
|
||||
--> get actors
|
||||
|
||||
--> main actor
|
||||
local este_jogador, meu_dono = misc_cache [who_name]
|
||||
if (not este_jogador) then --> pode ser um desconhecido ou um pet
|
||||
este_jogador, meu_dono, who_name = _current_misc_container:PegarCombatente (who_serial, who_name, who_flags, true)
|
||||
if (not meu_dono) then --> se não for um pet, adicionar no cache
|
||||
misc_cache [who_name] = este_jogador
|
||||
end
|
||||
end
|
||||
|
||||
local shadow = este_jogador.shadow
|
||||
|
||||
------------------------------------------------------------------------------------------------
|
||||
--> build containers on the fly
|
||||
|
||||
if (not este_jogador.cooldowns_defensive) then
|
||||
este_jogador.cooldowns_defensive = 0
|
||||
este_jogador.cooldowns_defensive_targets = container_combatentes:NovoContainer (container_damage_target) --> pode ser um container de alvo de dano, pois irá usar apenas o .total
|
||||
este_jogador.cooldowns_defensive_spell_tables = container_habilidades:NovoContainer (container_misc) --> cria o container das habilidades
|
||||
|
||||
if (not shadow.cooldowns_defensive_targets) then
|
||||
shadow.cooldowns_defensive = 0
|
||||
shadow.cooldowns_defensive_targets = container_combatentes:NovoContainer (container_damage_target) --> pode ser um container de alvo de dano, pois irá usar apenas o .total
|
||||
shadow.cooldowns_defensive_spell_tables = container_habilidades:NovoContainer (container_misc) --> cria o container das habilidades usadas
|
||||
end
|
||||
|
||||
este_jogador.cooldowns_defensive_targets.shadow = shadow.cooldowns_defensive_targets
|
||||
este_jogador.cooldowns_defensive_spell_tables.shadow = shadow.cooldowns_defensive_spell_tables
|
||||
end
|
||||
|
||||
------------------------------------------------------------------------------------------------
|
||||
--> add amount
|
||||
|
||||
--> actor cooldowns used
|
||||
este_jogador.cooldowns_defensive = este_jogador.cooldowns_defensive + 1
|
||||
shadow.cooldowns_defensive = shadow.cooldowns_defensive + 1
|
||||
|
||||
--> combat totals
|
||||
_current_total [4].cooldowns_defensive = _current_total [4].cooldowns_defensive + 1
|
||||
_overall_total [4].cooldowns_defensive = _overall_total [4].cooldowns_defensive + 1
|
||||
|
||||
if (este_jogador.grupo) then
|
||||
_current_gtotal [4].cooldowns_defensive = _current_gtotal [4].cooldowns_defensive + 1
|
||||
_overall_gtotal [4].cooldowns_defensive = _overall_gtotal [4].cooldowns_defensive + 1
|
||||
end
|
||||
|
||||
--> update last event
|
||||
este_jogador.last_event = _tempo
|
||||
shadow.last_event = _tempo
|
||||
|
||||
--> actor targets
|
||||
local este_alvo = este_jogador.cooldowns_defensive_targets._NameIndexTable [alvo_name]
|
||||
if (not este_alvo) then
|
||||
este_alvo = este_jogador.cooldowns_defensive_targets:PegarCombatente (alvo_serial, alvo_name, alvo_flags, true)
|
||||
else
|
||||
este_alvo = este_jogador.cooldowns_defensive_targets._ActorTable [este_alvo]
|
||||
end
|
||||
este_alvo.total = este_alvo.total + 1
|
||||
|
||||
--> actor spells table
|
||||
local spell = este_jogador.cooldowns_defensive_spell_tables._ActorTable [spellid]
|
||||
if (not spell) then
|
||||
spell = este_jogador.cooldowns_defensive_spell_tables:PegaHabilidade (spellid, true, token)
|
||||
end
|
||||
return spell:Add (alvo_serial, alvo_name, alvo_flags, who_name, token, "BUFF", "COOLDOWN")
|
||||
|
||||
end
|
||||
|
||||
|
||||
--serach key: ~interrupt
|
||||
function parser:interrupt (token, time, who_serial, who_name, who_flags, alvo_serial, alvo_name, alvo_flags, spellid, spellname, spelltype, extraSpellID, extraSpellName, extraSchool)
|
||||
|
||||
@@ -1282,16 +1353,18 @@
|
||||
shadow.dispell = shadow.dispell + 1
|
||||
|
||||
--> dispell what
|
||||
if (not este_jogador.dispell_oque [spellid]) then
|
||||
este_jogador.dispell_oque [spellid] = 1
|
||||
else
|
||||
este_jogador.dispell_oque [spellid] = este_jogador.dispell_oque [spellid] + 1
|
||||
end
|
||||
|
||||
if (not shadow.dispell_oque [spellid]) then
|
||||
shadow.dispell_oque [spellid] = 1
|
||||
else
|
||||
shadow.dispell_oque [spellid] = shadow.dispell_oque [spellid] + 1
|
||||
if (extraSpellID) then
|
||||
if (not este_jogador.dispell_oque [extraSpellID]) then
|
||||
este_jogador.dispell_oque [extraSpellID] = 1
|
||||
else
|
||||
este_jogador.dispell_oque [extraSpellID] = este_jogador.dispell_oque [extraSpellID] + 1
|
||||
end
|
||||
|
||||
if (not shadow.dispell_oque [extraSpellID]) then
|
||||
shadow.dispell_oque [extraSpellID] = 1
|
||||
else
|
||||
shadow.dispell_oque [extraSpellID] = shadow.dispell_oque [extraSpellID] + 1
|
||||
end
|
||||
end
|
||||
|
||||
--> actor targets
|
||||
@@ -1823,6 +1896,9 @@
|
||||
|
||||
-- DEBUG
|
||||
|
||||
--local a, b, c, d, e, f, g, h, i, j, k = select (1, ...)
|
||||
--print (token, who_name, a, b, c, d, e, f, g, h, i, j, k)
|
||||
|
||||
--[[
|
||||
if (who_name == "Ditador") then
|
||||
if (token:find ("CAST")) then
|
||||
|
||||
@@ -1,6 +1,7 @@
|
||||
<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/..\FrameXML\UI.xsd">
|
||||
<Script file="Libs\LibStub\LibStub.lua"/>
|
||||
<Include file="Libs\CallbackHandler-1.0\CallbackHandler-1.0.xml" />
|
||||
|
||||
<Include file="Libs\AceLocale-3.0\AceLocale-3.0.xml" />
|
||||
<Include file="Libs\AceAddon-3.0\AceAddon-3.0.xml" />
|
||||
<Include file="Libs\AceComm-3.0\AceComm-3.0.xml" />
|
||||
|
||||
+61
-11
@@ -550,7 +550,7 @@ function DetailsCreateCoolTip()
|
||||
end
|
||||
|
||||
local face, size, flags = menuButton.leftText:GetFont()
|
||||
size = leftTextTable [6] or 10
|
||||
size = leftTextTable [6] or CoolTip.OptionsTable.TextSize or 10
|
||||
face = leftTextTable [7] or [[Fonts\FRIZQT__.TTF]]
|
||||
flags = leftTextTable [8]
|
||||
menuButton.leftText:SetFont (face, size, flags)
|
||||
@@ -585,7 +585,8 @@ function DetailsCreateCoolTip()
|
||||
menuButton.leftIcon:SetWidth (leftIconTable [2])
|
||||
menuButton.leftIcon:SetHeight (leftIconTable [3])
|
||||
menuButton.leftIcon:SetTexCoord (leftIconTable [4], leftIconTable [5], leftIconTable [6], leftIconTable [7])
|
||||
menuButton.leftIcon:SetVertexColor (unpack (leftIconTable [8]))
|
||||
local ColorR, ColorG, ColorB, ColorA = gump:ParseColors (leftIconTable [8])
|
||||
menuButton.leftIcon:SetVertexColor (ColorR, ColorG, ColorB, ColorA)
|
||||
--menuButton.leftText:SetPoint ("left", menuButton.leftIcon, "right", 3, 0)
|
||||
else
|
||||
menuButton.leftIcon:SetTexture (nil)
|
||||
@@ -600,7 +601,8 @@ function DetailsCreateCoolTip()
|
||||
menuButton.rightIcon:SetWidth (rightIconTable [2])
|
||||
menuButton.rightIcon:SetHeight (rightIconTable [3])
|
||||
menuButton.rightIcon:SetTexCoord (rightIconTable [4], rightIconTable [5], rightIconTable [6], rightIconTable [7])
|
||||
menuButton.rightIcon:SetVertexColor (unpack (rightIconTable [8]))
|
||||
local ColorR, ColorG, ColorB, ColorA = gump:ParseColors (rightIconTable [8])
|
||||
menuButton.rightIcon:SetVertexColor (ColorR, ColorG, ColorB, ColorA)
|
||||
--menuButton.rightText:SetPoint ("right", menuButton.rightIcon, "left", -3, 0)
|
||||
else
|
||||
menuButton.rightIcon:SetTexture (nil)
|
||||
@@ -653,6 +655,13 @@ function DetailsCreateCoolTip()
|
||||
|
||||
end
|
||||
|
||||
function CoolTip:RefreshSpark (menuButton)
|
||||
menuButton.spark:ClearAllPoints()
|
||||
menuButton.spark:SetPoint ("LEFT", menuButton.statusbar, "LEFT", (menuButton.statusbar:GetValue() * (menuButton.statusbar:GetWidth() / 100)) - 3, 0)
|
||||
menuButton.spark2:ClearAllPoints()
|
||||
menuButton.spark2:SetPoint ("left", menuButton.statusbar, "left", menuButton.statusbar:GetValue() * (menuButton.statusbar:GetWidth()/100) - 16, 0)
|
||||
end
|
||||
|
||||
function CoolTip:StatusBar (menuButton, StatusBar)
|
||||
|
||||
if (StatusBar) then
|
||||
@@ -661,14 +670,32 @@ function DetailsCreateCoolTip()
|
||||
menuButton.statusbar:SetStatusBarColor (StatusBar [2], StatusBar [3], StatusBar [4], StatusBar [5])
|
||||
menuButton.statusbar:SetHeight (20 + (CoolTip.OptionsTable.StatusBarHeightMod or 0))
|
||||
|
||||
menuButton.spark2:Hide()
|
||||
if (StatusBar [6]) then
|
||||
menuButton.spark:Show()
|
||||
menuButton.spark:ClearAllPoints()
|
||||
menuButton.spark:SetPoint ("LEFT", menuButton.statusbar, "LEFT", (StatusBar [1] * (menuButton.statusbar:GetWidth() / 100)) - 3, 0)
|
||||
--menuButton.spark:ClearAllPoints()
|
||||
--menuButton.spark:SetPoint ("LEFT", menuButton.statusbar, "LEFT", (StatusBar [1] * (menuButton.statusbar:GetWidth() / 100)) - 3, 0)
|
||||
else
|
||||
menuButton.spark:Hide()
|
||||
end
|
||||
|
||||
if (StatusBar [7]) then
|
||||
menuButton.statusbar2:SetValue (StatusBar[7].value)
|
||||
menuButton.statusbar2.texture:SetTexture (StatusBar[7].texture or [[Interface\AddOns\Details\images\bar4_reverse]])
|
||||
if (StatusBar[7].specialSpark) then
|
||||
menuButton.spark2:Show()
|
||||
end
|
||||
if (StatusBar[7].color) then
|
||||
local ColorR, ColorG, ColorB, ColorA = gump:ParseColors (StatusBar[7].color)
|
||||
menuButton.statusbar2:SetStatusBarColor (ColorR, ColorG, ColorB, ColorA)
|
||||
else
|
||||
menuButton.statusbar2:SetStatusBarColor (1, 1, 1, 1)
|
||||
end
|
||||
else
|
||||
menuButton.statusbar2:SetValue (0)
|
||||
menuButton.spark2:Hide()
|
||||
end
|
||||
|
||||
if (CoolTip.OptionsTable.StatusBarTexture) then
|
||||
menuButton.statusbar.texture:SetTexture (CoolTip.OptionsTable.StatusBarTexture)
|
||||
else
|
||||
@@ -677,7 +704,9 @@ function DetailsCreateCoolTip()
|
||||
|
||||
else
|
||||
menuButton.statusbar:SetValue (0)
|
||||
menuButton.statusbar2:SetValue (0)
|
||||
menuButton.spark:Hide()
|
||||
menuButton.spark2:Hide()
|
||||
end
|
||||
|
||||
if (CoolTip.OptionsTable.LeftBorderSize) then
|
||||
@@ -963,6 +992,14 @@ function DetailsCreateCoolTip()
|
||||
--> unhide frame
|
||||
gump:Fade (frame1, 0)
|
||||
CoolTip:SetMyPoint (host)
|
||||
|
||||
--> fix sparks
|
||||
for i = 1, CoolTip.Indexes do
|
||||
local menuButton = frame1.Lines [i]
|
||||
if (menuButton.spark:IsShown() or menuButton.spark2:IsShown()) then
|
||||
CoolTip:RefreshSpark (menuButton)
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
function CoolTip:monta_cooltip (host, instancia, options, sub_menus, icones, tamanho1, tamanho2, font, fontsize)
|
||||
@@ -1574,7 +1611,7 @@ function DetailsCreateCoolTip()
|
||||
--> parameters: value [, color red, color green, color blue, color alpha [, glow]]
|
||||
--> can also use a table or html color name in color red and send glow in color green
|
||||
|
||||
function CoolTip:AddStatusBar (statusbarValue, frame, ColorR, ColorG, ColorB, ColorA, statusbarGlow)
|
||||
function CoolTip:AddStatusBar (statusbarValue, frame, ColorR, ColorG, ColorB, ColorA, statusbarGlow, backgroundBar)
|
||||
|
||||
--> need a previous line
|
||||
if (CoolTip.Indexes == 0) then
|
||||
@@ -1587,8 +1624,9 @@ function DetailsCreateCoolTip()
|
||||
end
|
||||
|
||||
if (type (ColorR) == "table" or type (ColorR) == "string") then
|
||||
statusbarGlow, ColorR, ColorG, ColorB, ColorA = ColorG, gump:ParseColors (ColorR)
|
||||
statusbarGlow, backgroundBar, ColorR, ColorG, ColorB, ColorA = ColorG, ColorB, gump:ParseColors (ColorR)
|
||||
elseif (type (ColorR) == "boolean") then
|
||||
backgroundBar = ColorG
|
||||
statusbarGlow = ColorR
|
||||
ColorR, ColorG, ColorB, ColorA = 1, 1, 1, 1
|
||||
else
|
||||
@@ -1645,6 +1683,7 @@ function DetailsCreateCoolTip()
|
||||
statusbarTable [4] = ColorB
|
||||
statusbarTable [5] = ColorA
|
||||
statusbarTable [6] = statusbarGlow
|
||||
statusbarTable [7] = backgroundBar
|
||||
|
||||
end
|
||||
|
||||
@@ -1840,11 +1879,22 @@ function DetailsCreateCoolTip()
|
||||
function CoolTip:AddLine (leftText, rightText, frame, ColorR1, ColorG1, ColorB1, ColorA1, ColorR2, ColorG2, ColorB2, ColorA2, fontSize, fontFace, fontFlag)
|
||||
|
||||
--> check data integrity
|
||||
if (type (leftText) ~= "string") then
|
||||
leftText = ""
|
||||
local t = type (leftText)
|
||||
if (t ~= "string") then
|
||||
if (t == "number") then
|
||||
leftText = tostring (leftText)
|
||||
else
|
||||
leftText = ""
|
||||
end
|
||||
end
|
||||
if (type (rightText) ~= "string") then
|
||||
rightText = ""
|
||||
|
||||
local t = type (rightText)
|
||||
if (t ~= "string") then
|
||||
if (t == "number") then
|
||||
rightText = tostring (rightText)
|
||||
else
|
||||
rightText = ""
|
||||
end
|
||||
end
|
||||
|
||||
if (type (ColorR1) ~= "number") then
|
||||
|
||||
+37
-1
@@ -177,7 +177,15 @@
|
||||
<Anchor point="RIGHT" relativeTo="$parent_RightIcon" relativePoint="LEFT" x="-3" y="0"/>
|
||||
</Anchors>
|
||||
</FontString>
|
||||
|
||||
<!-- spark 2 -->
|
||||
<Texture name="$parent_Spark2" hidden="true" parentKey="spark2" file = "Interface\CastingBar\UI-CastingBar-Spark" alphaMode="ADD">
|
||||
<Size>
|
||||
<AbsDimension x="32" y="32"/>
|
||||
</Size>
|
||||
<Anchors>
|
||||
<Anchor point="LEFT" relativeTo="$parent" relativePoint="RIGHT" x="-17" y="-1"/>
|
||||
</Anchors>
|
||||
</Texture>
|
||||
</Layer>
|
||||
|
||||
</Layers>
|
||||
@@ -192,6 +200,30 @@
|
||||
</Scripts>
|
||||
|
||||
</StatusBar>
|
||||
|
||||
<StatusBar name="$Parent_StatusBarBackground" parentKey="statusbar2">
|
||||
<Anchors>
|
||||
<Anchor point="LEFT" relativeTo="$Parent_StatusBar" relativePoint="LEFT"/>
|
||||
<Anchor point="RIGHT" relativeTo="$Parent_StatusBar" relativePoint="RIGHT"/>
|
||||
<Anchor point="TOP" relativeTo="$Parent_StatusBar" relativePoint="TOP"/>
|
||||
<Anchor point="BOTTOM" relativeTo="$Parent_StatusBar" relativePoint="BOTTOM"/>
|
||||
</Anchors>
|
||||
<Layers>
|
||||
<Layer level="BACKGROUND">
|
||||
<!-- statusbar texture -->
|
||||
<Texture name="$parent_Texture" hidden="false" parentKey="texture" file = "Interface\AddOns\Details\images\bar4_reverse" horizTile="false" vertTile="false">
|
||||
<Size x="300" y="14" />
|
||||
<Color a = "1" r = "1" g = "1" b = "1" />
|
||||
</Texture>
|
||||
</Layer>
|
||||
</Layers>
|
||||
<Scripts>
|
||||
<OnLoad>
|
||||
self:SetStatusBarTexture (self.texture);
|
||||
self:SetMinMaxValues (0, 100);
|
||||
</OnLoad>
|
||||
</Scripts>
|
||||
</StatusBar>
|
||||
|
||||
</Frames>
|
||||
|
||||
@@ -202,8 +234,12 @@
|
||||
self.rightIcon = self.statusbar.rightIcon
|
||||
self.texture = self.statusbar.texture
|
||||
self.spark = self.statusbar.spark
|
||||
self.spark2 = self.statusbar.spark2
|
||||
self.leftText = self.statusbar.leftText
|
||||
self.rightText = self.statusbar.rightText
|
||||
self.statusbar:SetFrameLevel (self:GetFrameLevel()+2)
|
||||
self.statusbar2:SetFrameLevel (self.statusbar:GetFrameLevel()-1)
|
||||
self.statusbar2:SetValue (0)
|
||||
</OnLoad>
|
||||
|
||||
<OnMouseDown>
|
||||
|
||||
@@ -22,7 +22,7 @@ do
|
||||
|
||||
--[[ HEALING ]]
|
||||
cura = 2, --> identifier
|
||||
[2] = 4, --> sub attributes
|
||||
[2] = 6, --> sub attributes
|
||||
|
||||
--[[ ENERGY ]]
|
||||
e_energy = 3,--> identifier
|
||||
@@ -30,7 +30,7 @@ do
|
||||
|
||||
--[[ MISC ]]
|
||||
misc = 4, --> identifier
|
||||
[4] = 5, --> sub attributes
|
||||
[4] = 6, --> sub attributes
|
||||
|
||||
--[[ CUSTOM ]]
|
||||
custom = 5,
|
||||
@@ -76,20 +76,26 @@ do
|
||||
hps = 2,
|
||||
overheal = 3,
|
||||
healing_tanken = 4,
|
||||
heal_enemy_amt = 5,
|
||||
totalabsorb = 6,
|
||||
lista = { --[[ String Names ]]
|
||||
Loc ["STRING_ATTRIBUTE_HEAL_DONE"],
|
||||
Loc ["STRING_ATTRIBUTE_HEAL_HPS"],
|
||||
Loc ["STRING_ATTRIBUTE_HEAL_OVERHEAL"],
|
||||
Loc ["STRING_ATTRIBUTE_HEAL_TAKEN"]
|
||||
Loc ["STRING_ATTRIBUTE_HEAL_TAKEN"],
|
||||
Loc ["STRING_ATTRIBUTE_HEAL_ENEMY"],
|
||||
Loc ["STRING_ATTRIBUTE_HEAL_PREVENT"],
|
||||
},
|
||||
|
||||
icones = {
|
||||
{"Interface\\AddOns\\Details\\images\\atributos_icones_heal", {0, .125, 0, 1}},
|
||||
{"Interface\\AddOns\\Details\\images\\atributos_icones_heal", {.125, .25, 0, 1}},
|
||||
{"Interface\\AddOns\\Details\\images\\atributos_icones_heal", {.25, .375, 0, 1}},
|
||||
{"Interface\\AddOns\\Details\\images\\atributos_icones_heal", {.375, .5, 0, 1}}
|
||||
{"Interface\\AddOns\\Details\\images\\atributos_icones_heal", {.375, .5, 0, 1}},
|
||||
{"Interface\\AddOns\\Details\\images\\atributos_icones_heal", {.5, 0.625, 0, 1}},
|
||||
{"Interface\\AddOns\\Details\\images\\atributos_icones_heal", {0.625, 0.75, 0, 1}}
|
||||
},
|
||||
internal = {"total", "last_hps", "totalover", "healing_taken"}
|
||||
internal = {"total", "last_hps", "totalover", "healing_taken", "heal_enemy_amt", "totalabsorb"}
|
||||
},
|
||||
|
||||
{
|
||||
@@ -120,21 +126,24 @@ do
|
||||
kick = 3,
|
||||
dispell = 4,
|
||||
deaths = 5,
|
||||
cooldowns_defensive = 6,
|
||||
lista = { --[[ String Names ]]
|
||||
Loc ["STRING_ATTRIBUTE_MISC_CCBREAK"],
|
||||
Loc ["STRING_ATTRIBUTE_MISC_RESS"],
|
||||
Loc ["STRING_ATTRIBUTE_MISC_INTERRUPT"],
|
||||
Loc ["STRING_ATTRIBUTE_MISC_DISPELL"],
|
||||
Loc ["STRING_ATTRIBUTE_MISC_DEAD"],
|
||||
Loc ["STRING_ATTRIBUTE_MISC_DEFENSIVE_COOLDOWNS"],
|
||||
},
|
||||
icones = {
|
||||
{"Interface\\AddOns\\Details\\images\\atributos_icones_misc", {0, .125, 0, 1}},
|
||||
{"Interface\\AddOns\\Details\\images\\atributos_icones_misc", {.125, .25, 0, 1}},
|
||||
{"Interface\\AddOns\\Details\\images\\atributos_icones_misc", {.25, .375, 0, 1}},
|
||||
{"Interface\\AddOns\\Details\\images\\atributos_icones_misc", {.375, .5, 0, 1}},
|
||||
{"Interface\\AddOns\\Details\\images\\atributos_icones_misc", {.5, .625, 0, 1}}
|
||||
{"Interface\\AddOns\\Details\\images\\atributos_icones_misc", {.5, .625, 0, 1}},
|
||||
{"Interface\\AddOns\\Details\\images\\atributos_icones_misc", {.625, 0.75, 0, 1}}
|
||||
},
|
||||
internal = {"cc_break", "ress", "interrupt", "dispell", "dead"}
|
||||
internal = {"cc_break", "ress", "interrupt", "dispell", "dead", "cooldowns_defensive"}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -19,6 +19,9 @@ function _detalhes:SaveDataOnLogout()
|
||||
--> get data
|
||||
|
||||
-- On Character
|
||||
|
||||
--> nicktag cache
|
||||
_detalhes_database.nick_tag_cache = _detalhes.nick_tag_cache
|
||||
|
||||
--> save instances (windows)
|
||||
_detalhes_database.tabela_instancias = _detalhes.tabela_instancias
|
||||
@@ -137,6 +140,9 @@ end --]]
|
||||
|
||||
if (_detalhes_database) then
|
||||
|
||||
--> nicktag cache
|
||||
_detalhes.nick_tag_cache = _detalhes_database.nick_tag_cache or {}
|
||||
_detalhes:NickTagSetCache (_detalhes.nick_tag_cache)
|
||||
|
||||
--> build basic containers
|
||||
_detalhes.tabela_historico = _detalhes_database.tabela_historico or _detalhes.historico:NovoHistorico() -- segments
|
||||
@@ -240,6 +246,13 @@ end --]]
|
||||
|
||||
-- version
|
||||
_detalhes.last_realversion = _detalhes_database.last_realversion or _detalhes.realversion
|
||||
if (_detalhes.last_realversion < _detalhes.realversion) then
|
||||
--> details was been hard upgraded
|
||||
_detalhes.tabela_historico = _detalhes.historico:NovoHistorico()
|
||||
_detalhes.tabela_pets = _detalhes.container_pets:NovoContainer()
|
||||
_detalhes.tabela_overall = _detalhes.combate:NovaTabela()
|
||||
_detalhes.tabela_vigente = _detalhes.combate:NovaTabela (_, _detalhes.tabela_overall)
|
||||
end
|
||||
|
||||
else
|
||||
_detalhes.tabela_instancias = {}
|
||||
|
||||
@@ -367,6 +367,91 @@ do
|
||||
|
||||
}
|
||||
|
||||
_detalhes.DefensiveCooldownSpells = {
|
||||
|
||||
--> spellid = {cooldown, duration}
|
||||
|
||||
-- Death Knigh
|
||||
[55233] = {60, 10}, -- Vampiric Blood
|
||||
[49222] = {60, 300}, -- Bone Shield
|
||||
[48707] = {45, 5}, -- Anti-Magic Shell
|
||||
[48792] = {180, 12}, -- Icebound Fortitude
|
||||
[48743] = {120, 0}, -- Death Pact
|
||||
[49039] = {12, 10}, -- Lichborne
|
||||
["DEATHKNIGHT"] = {55233, 49222, 48707, 48792, 48743, 49039},
|
||||
|
||||
-- Druid
|
||||
[62606] = {1.5, 6}, -- Savage Defense
|
||||
[106922] = {180, 20}, -- Might of Ursoc
|
||||
[102342] = {60, 12}, -- Ironbark
|
||||
[61336] = {180, 12}, -- Survival Instincts
|
||||
[22812] = {60, 12}, -- Barkskin
|
||||
["DRUID"] = {62606, 106922, 102342, 61336, 22812},
|
||||
|
||||
-- Hunter
|
||||
[19263] = {120, 5}, -- Deterrence
|
||||
["HUNTER"] = {19263},
|
||||
|
||||
-- Mage
|
||||
[45438] = {300, 12}, -- Ice Block
|
||||
["MAGE"] = {45438},
|
||||
|
||||
-- Monk
|
||||
[115295] = {30, 30}, -- Guard
|
||||
[115203] = {180, 20}, -- Fortifying Brew
|
||||
[122470] = {90, 10}, -- Touch of Karma
|
||||
[115176] = {180, 8}, -- Zen Meditation
|
||||
[116849] = {120, 12}, -- Life Cocoon
|
||||
[115213] = {180, 6}, -- Avert Harm
|
||||
[122278] = {90, 45}, -- Dampen Harm
|
||||
[122783] = {90, 6}, -- Diffuse Magic
|
||||
["MONK"] = {115295, 115203, 122470, 115176, 116849, 115213, 122278, 122783},
|
||||
|
||||
-- Paladin
|
||||
[86659] = {180, 12}, -- Guardian of Ancient Kings
|
||||
[31850] = {180, 10}, -- Ardent Defender
|
||||
[498] = {60, 10}, -- Divine Protection
|
||||
[642] = {300, 8}, -- Divine Shield
|
||||
[6940] = {120, 12}, -- Hand of Sacrifice
|
||||
[1022] = {300, 10}, -- Hand of Protection
|
||||
[1038] = {120, 10}, -- Hand of Salvation
|
||||
["PALADIN"] = {86659, 31850, 498, 642, 6940, 1022, 1038},
|
||||
|
||||
-- Priest
|
||||
[15286] = {180, 15}, -- Vampiric Embrace
|
||||
[47788] = {180, 10}, -- Guardian Spirit
|
||||
[47585] = {120, 6}, -- Dispersion
|
||||
[33206] = {180, 8}, -- Pain Suppression
|
||||
["PRIEST"] = {15286, 47788, 47585, 33206},
|
||||
|
||||
-- Rogue
|
||||
[1966] = {1.5, 5}, -- Feint
|
||||
[31224] = {60, 5}, -- Cloak of Shadows
|
||||
[5277] = {180, 15}, -- Evasion
|
||||
["ROGUE"] = {1966, 31224, 5277},
|
||||
|
||||
-- Shaman
|
||||
[30823] = {60, 15}, -- Shamanistic Rage
|
||||
[108271] = {120, 6}, -- Astral Shift
|
||||
[108270] = {60, 5}, -- Stone Bulwark Totem
|
||||
["SHAMAN"] = {30823, 108271, 108270},
|
||||
|
||||
-- Warlock
|
||||
[104773] = {180, 8}, -- Unending Resolve
|
||||
[108359] = {120, 12}, -- Dark Regeneration
|
||||
[108416] = {60, 20}, -- Sacrificial Pact
|
||||
[110913] = {180, 8}, -- Dark Bargain
|
||||
["WARLOCK"] = {104773, 108359, 108416, 110913},
|
||||
|
||||
-- Warrior
|
||||
[871] = {180, 12}, -- Shield Wall
|
||||
[12975] = {180, 20}, -- Last Stand
|
||||
[23920] = {25, 5}, -- Spell Reflection
|
||||
[114030] = {120, 12}, -- Vigilance
|
||||
[118038] = {120, 8}, -- Die by the Sword
|
||||
["WARRIOR"] = {871, 12975, 23920, 114030, 118038}
|
||||
}
|
||||
|
||||
local Loc = LibStub ("AceLocale-3.0"):GetLocale ( "Details" )
|
||||
_detalhes.SpellOverwrite = {
|
||||
[124464] = {name = GetSpellInfo (124464) .. " (" .. Loc ["STRING_MASTERY"] .. ")"}, --> shadow word: pain mastery proc
|
||||
|
||||
@@ -1224,6 +1224,9 @@ local function CriaTexturaBarra (instancia, barra)
|
||||
barra.texto_esquerdo:SetJustifyH ("LEFT")
|
||||
barra.texto_esquerdo:SetTextColor (1,1,1,1)
|
||||
|
||||
barra.texto_esquerdo:SetNonSpaceWrap (true)
|
||||
barra.texto_esquerdo:SetWordWrap (false)
|
||||
|
||||
barra.texto_direita = barra.textura:CreateFontString (nil, "OVERLAY", "GameFontHighlightSmall")
|
||||
barra.texto_direita:SetPoint ("RIGHT", barra.textura, "RIGHT", -2)
|
||||
barra.texto_direita:SetJustifyH ("RIGHT")
|
||||
|
||||
+58
-32
@@ -870,7 +870,7 @@ local resizeTooltip = {
|
||||
}
|
||||
|
||||
--> search key: ~resizescript
|
||||
local function resize_scripts (resizer, instancia, ScrollBar, side)
|
||||
local function resize_scripts (resizer, instancia, ScrollBar, side, baseframe)
|
||||
|
||||
resizer:SetScript ("OnMouseDown", function (self, button)
|
||||
|
||||
@@ -914,6 +914,9 @@ local function resize_scripts (resizer, instancia, ScrollBar, side)
|
||||
instancia.baseframe:StartSizing("BOTTOMLEFT")
|
||||
end
|
||||
|
||||
resizer:SetPoint ("BOTTOMLEFT", baseframe, "BOTTOMLEFT", -1, -1)
|
||||
resizer.afundado = true
|
||||
|
||||
elseif (side == ">") then
|
||||
if (_IsShiftKeyDown()) then
|
||||
instancia.baseframe:StartSizing("RIGHT")
|
||||
@@ -928,15 +931,34 @@ local function resize_scripts (resizer, instancia, ScrollBar, side)
|
||||
instancia.baseframe:StartSizing("BOTTOMRIGHT")
|
||||
end
|
||||
|
||||
if (instancia.rolagem and _detalhes.use_scroll) then
|
||||
resizer:SetPoint ("BOTTOMRIGHT", baseframe, "BOTTOMRIGHT", (instancia.largura_scroll*-1) + 1, -1)
|
||||
else
|
||||
resizer:SetPoint ("BOTTOMRIGHT", baseframe, "BOTTOMRIGHT", 1, -1)
|
||||
end
|
||||
resizer.afundado = true
|
||||
end
|
||||
|
||||
_detalhes:SendEvent ("DETAILS_INSTANCE_STARTRESIZE", nil, instancia)
|
||||
|
||||
|
||||
end
|
||||
end)
|
||||
|
||||
|
||||
resizer:SetScript ("OnMouseUp", function (self,button)
|
||||
|
||||
if (resizer.afundado) then
|
||||
resizer.afundado = false
|
||||
if (resizer.side == 2) then
|
||||
if (instancia.rolagem and _detalhes.use_scroll) then
|
||||
resizer:SetPoint ("BOTTOMRIGHT", baseframe, "BOTTOMRIGHT", instancia.largura_scroll*-1, 0)
|
||||
else
|
||||
resizer:SetPoint ("BOTTOMRIGHT", baseframe, "BOTTOMRIGHT", 0, 0)
|
||||
end
|
||||
else
|
||||
resizer:SetPoint ("BOTTOMLEFT", baseframe, "BOTTOMLEFT", 0, 0)
|
||||
end
|
||||
end
|
||||
|
||||
if (self:GetParent().isResizing) then
|
||||
|
||||
self:GetParent():StopMovingOrSizing()
|
||||
@@ -1084,6 +1106,7 @@ local function bota_separar_script (botao, instancia)
|
||||
end
|
||||
|
||||
local function barra_scripts (esta_barra, instancia, i)
|
||||
|
||||
esta_barra:SetScript ("OnEnter", function (self)
|
||||
self.mouse_over = true
|
||||
resize_fade (instancia, "out")
|
||||
@@ -1091,14 +1114,6 @@ local function barra_scripts (esta_barra, instancia, i)
|
||||
|
||||
instancia:MontaTooltip (self, i)
|
||||
|
||||
--[[
|
||||
_GameTooltip:SetOwner (self, "ANCHOR_TOPRIGHT")
|
||||
if (not instancia:MontaTooltip (i)) then
|
||||
return
|
||||
end
|
||||
_GameTooltip:Show()
|
||||
--]]
|
||||
--
|
||||
self:SetBackdrop({
|
||||
bgFile = "Interface\\Tooltips\\UI-Tooltip-Background",
|
||||
tile = true, tileSize = 16,
|
||||
@@ -1132,21 +1147,21 @@ local function barra_scripts (esta_barra, instancia, i)
|
||||
return _detalhes.switch:ShowMe (instancia)
|
||||
end
|
||||
|
||||
--if (button == "leftButton") then
|
||||
self.mouse_down = _GetTime()
|
||||
self.button = button
|
||||
local x, y = _GetCursorPosition()
|
||||
self.x = _math_floor (x)
|
||||
self.y = _math_floor (y)
|
||||
|
||||
local parent = instancia.baseframe
|
||||
if ((not parent.isLocked) or (parent.isLocked == 0)) then
|
||||
_GameTooltip:Hide() --> fecha o tooltip
|
||||
move_janela (parent, true, instancia) --> novo movedor da janela
|
||||
end
|
||||
|
||||
--end
|
||||
|
||||
esta_barra.texto_esquerdo:SetPoint ("LEFT", esta_barra.icone_classe, "right", 4, -1)
|
||||
esta_barra.texto_direita:SetPoint ("RIGHT", esta_barra.statusbar, "RIGHT", 1, -1)
|
||||
|
||||
self.mouse_down = _GetTime()
|
||||
self.button = button
|
||||
local x, y = _GetCursorPosition()
|
||||
self.x = _math_floor (x)
|
||||
self.y = _math_floor (y)
|
||||
|
||||
local parent = instancia.baseframe
|
||||
if ((not parent.isLocked) or (parent.isLocked == 0)) then
|
||||
GameCooltip:Hide() --> fecha o tooltip
|
||||
move_janela (parent, true, instancia) --> novo movedor da janela
|
||||
end
|
||||
|
||||
end)
|
||||
|
||||
esta_barra:SetScript ("OnMouseUp", function (self, button)
|
||||
@@ -1158,11 +1173,14 @@ local function barra_scripts (esta_barra, instancia, i)
|
||||
instancia:SaveMainWindowPosition()
|
||||
_GameTooltip:SetOwner (self, "ANCHOR_TOPRIGHT")
|
||||
if (instancia:MontaTooltip (self, i)) then
|
||||
_GameTooltip:Show()
|
||||
GameCooltip:Show (esta_barra, 1)
|
||||
end
|
||||
|
||||
end
|
||||
|
||||
esta_barra.texto_esquerdo:SetPoint ("LEFT", esta_barra.icone_classe, "right", 3, 0)
|
||||
esta_barra.texto_direita:SetPoint ("RIGHT", esta_barra.statusbar, "RIGHT")
|
||||
|
||||
local x, y = _GetCursorPosition()
|
||||
x = _math_floor (x)
|
||||
y = _math_floor (y)
|
||||
@@ -1832,6 +1850,7 @@ function gump:CriaJanelaPrincipal (ID, instancia, criando)
|
||||
BaseFrame.resize_direita:EnableMouse (true)
|
||||
BaseFrame.resize_direita:SetFrameLevel (BaseFrame:GetFrameLevel() + 6)
|
||||
BaseFrame.resize_direita:SetFrameStrata ("HIGH")
|
||||
BaseFrame.resize_direita.side = 2
|
||||
|
||||
--> lock window button
|
||||
BaseFrame.lock_button = _CreateFrame ("Button", "Details_Lock_Button"..ID, BaseFrame)
|
||||
@@ -1942,8 +1961,8 @@ function gump:CriaJanelaPrincipal (ID, instancia, criando)
|
||||
|
||||
gump:Fade (instancia.botao_separar, "in", 3.0)
|
||||
|
||||
resize_scripts (BaseFrame.resize_direita, instancia, ScrollBar, ">")
|
||||
resize_scripts (BaseFrame.resize_esquerda, instancia, ScrollBar, "<")
|
||||
resize_scripts (BaseFrame.resize_direita, instancia, ScrollBar, ">", BaseFrame)
|
||||
resize_scripts (BaseFrame.resize_esquerda, instancia, ScrollBar, "<", BaseFrame)
|
||||
lock_button_scripts (BaseFrame.lock_button, instancia)
|
||||
|
||||
bota_separar_script (instancia.botao_separar, instancia)
|
||||
@@ -2706,7 +2725,6 @@ function gump:CriaCabecalho (BaseFrame, instancia)
|
||||
CoolTip:SetColor ("main", "transparent")
|
||||
|
||||
----------- segments
|
||||
--for i = 1, _detalhes.segments_amount do
|
||||
local menuIndex = 0
|
||||
for i = _detalhes.segments_amount, 1, -1 do
|
||||
|
||||
@@ -2715,7 +2733,7 @@ function gump:CriaCabecalho (BaseFrame, instancia)
|
||||
local enemy = thisCombat.is_boss and thisCombat.is_boss.name
|
||||
|
||||
if (thisCombat.is_boss and thisCombat.is_boss.name) then
|
||||
CoolTip:AddLine (thisCombat.is_boss.name .." ("..i..")", _, 1, "red")
|
||||
CoolTip:AddLine (thisCombat.is_boss.name .." (#"..i..")", _, 1, "red")
|
||||
local portrait = _detalhes:GetBossPortrait (thisCombat.is_boss.mapid, thisCombat.is_boss.index)
|
||||
if (portrait) then
|
||||
CoolTip:AddIcon (portrait, 2, "top", 128, 64)
|
||||
@@ -2723,7 +2741,7 @@ function gump:CriaCabecalho (BaseFrame, instancia)
|
||||
else
|
||||
enemy = thisCombat.enemy
|
||||
if (enemy) then
|
||||
CoolTip:AddLine (thisCombat.enemy .." ("..i..")", _, 1, "yellow")
|
||||
CoolTip:AddLine (thisCombat.enemy .." (#"..i..")", _, 1, "yellow")
|
||||
else
|
||||
CoolTip:AddLine (segmentos.past..i, _, 1, "silver")
|
||||
end
|
||||
@@ -2763,6 +2781,14 @@ function gump:CriaCabecalho (BaseFrame, instancia)
|
||||
CoolTip:AddIcon ("Interface\\QUESTFRAME\\UI-Quest-BulletPoint", "main", "left", 16, 16)
|
||||
|
||||
local enemy = _detalhes.tabela_vigente.is_boss and _detalhes.tabela_vigente.is_boss.name or _detalhes.tabela_vigente.enemy or "--x--x--"
|
||||
|
||||
if (_detalhes.tabela_vigente.is_boss and _detalhes.tabela_vigente.is_boss.name) then
|
||||
local portrait = _detalhes:GetBossPortrait (_detalhes.tabela_vigente.is_boss.mapid, _detalhes.tabela_vigente.is_boss.index)
|
||||
if (portrait) then
|
||||
CoolTip:AddIcon (portrait, 2, "top", 128, 64)
|
||||
end
|
||||
end
|
||||
|
||||
CoolTip:AddLine (Loc ["STRING_SEGMENT_ENEMY"] .. ":", enemy, 2, "white", "white")
|
||||
|
||||
if (not _detalhes.tabela_vigente.end_time) then
|
||||
|
||||
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
@@ -130,6 +130,8 @@ if not Loc then return end
|
||||
Loc ["STRING_ATTRIBUTE_HEAL_HPS"] = "Healing Per Second"
|
||||
Loc ["STRING_ATTRIBUTE_HEAL_OVERHEAL"] = "Overhealing"
|
||||
Loc ["STRING_ATTRIBUTE_HEAL_TAKEN"] = "Healing Taken"
|
||||
Loc ["STRING_ATTRIBUTE_HEAL_ENEMY"] = "Enemy Healed"
|
||||
Loc ["STRING_ATTRIBUTE_HEAL_PREVENT"] = "Damage Prevented"
|
||||
|
||||
Loc ["STRING_ATTRIBUTE_ENERGY"] = "Energy"
|
||||
Loc ["STRING_ATTRIBUTE_ENERGY_MANA"] = "Mana Restored"
|
||||
@@ -143,6 +145,7 @@ if not Loc then return end
|
||||
Loc ["STRING_ATTRIBUTE_MISC_INTERRUPT"] = "Interrupts"
|
||||
Loc ["STRING_ATTRIBUTE_MISC_DISPELL"] = "Dispells"
|
||||
Loc ["STRING_ATTRIBUTE_MISC_DEAD"] = "Deaths"
|
||||
Loc ["STRING_ATTRIBUTE_MISC_DEFENSIVE_COOLDOWNS"] = "Cooldowns"
|
||||
|
||||
Loc ["STRING_ATTRIBUTE_CUSTOM"] = "Custom"
|
||||
|
||||
|
||||
@@ -127,6 +127,8 @@ if not Loc then return end
|
||||
Loc ["STRING_ATTRIBUTE_HEAL_HPS"] = "Cura Por Segundo"
|
||||
Loc ["STRING_ATTRIBUTE_HEAL_OVERHEAL"] = "Sobrecura"
|
||||
Loc ["STRING_ATTRIBUTE_HEAL_TAKEN"] = "Cura Recebida"
|
||||
Loc ["STRING_ATTRIBUTE_HEAL_ENEMY"] = "Cura no Inimigo"
|
||||
Loc ["STRING_ATTRIBUTE_HEAL_PREVENT"] = "Dano Prevenido"
|
||||
|
||||
Loc ["STRING_ATTRIBUTE_ENERGY"] = "Energia"
|
||||
Loc ["STRING_ATTRIBUTE_ENERGY_MANA"] = "Mana Restaurada"
|
||||
@@ -140,6 +142,7 @@ if not Loc then return end
|
||||
Loc ["STRING_ATTRIBUTE_MISC_INTERRUPT"] = "Interrupcoes"
|
||||
Loc ["STRING_ATTRIBUTE_MISC_DISPELL"] = "Dissipados"
|
||||
Loc ["STRING_ATTRIBUTE_MISC_DEAD"] = "Mortes"
|
||||
Loc ["STRING_ATTRIBUTE_MISC_DEFENSIVE_COOLDOWNS"] = "Cooldowns"
|
||||
|
||||
Loc ["STRING_ATTRIBUTE_CUSTOM"] = "Customizados"
|
||||
|
||||
|
||||
@@ -54,7 +54,10 @@ local ability_type_table = {
|
||||
[0x800] = "|cFF6e4d13"..Loc ["STRING_TANKCOOLDOWN"].."|r",
|
||||
[0x1000] = "|cFFffff00"..Loc ["STRING_KILLADD"].."|r",
|
||||
[0x2000] = "|cFFff9999"..Loc ["STRING_SPREADOUT"].."|r",
|
||||
[0x3000] = "|cFFffff99"..Loc ["STRING_STOPCAST"].."|r"
|
||||
[0x4000] = "|cFFffff99"..Loc ["STRING_STOPCAST"].."|r",
|
||||
[0x8000] = "|cFFffff99"..Loc ["STRING_FACING"].."|r",
|
||||
[0x10000] = "|cFFffff99"..Loc ["STRING_STACK"].."|r",
|
||||
|
||||
}
|
||||
|
||||
local debugmode = false
|
||||
@@ -422,11 +425,10 @@ function _detalhes:BossInfoRowClick (barra, param1)
|
||||
|
||||
if (barra.TTT == "morte") then --> deaths
|
||||
reportar = {barra.report_text .. " " .. barra.texto_esquerdo:GetText()}
|
||||
for i = 1, _detalhes.popup.NumLines, 1 do
|
||||
for i = 1, GameCooltip:GetNumLines(), 1 do
|
||||
|
||||
local texto_left = _detalhes.popup.frame1.linhas[i].left_text:GetText()
|
||||
local texto_right = _detalhes.popup.frame1.linhas[i].right_text:GetText()
|
||||
|
||||
local texto_left, texto_right = GameCooltip:GetText (i)
|
||||
|
||||
if (texto_left and texto_right) then
|
||||
texto_left = texto_left:gsub (("|T(.*)|t "), "")
|
||||
reportar [#reportar+1] = ""..texto_left.." "..texto_right..""
|
||||
@@ -629,7 +631,7 @@ function EncounterDetails:OpenAndRefresh()
|
||||
break
|
||||
end
|
||||
|
||||
if (jogador.classe and jogador.classe ~= "UNGROUPPLAYER") then
|
||||
if (jogador.classe and jogador.classe ~= "UNGROUPPLAYER" and jogador.classe ~= "UNKNOW") then
|
||||
local barra = container.barras [index]
|
||||
if (not barra) then
|
||||
barra = EncounterDetails:CreateRow (index, container)
|
||||
|
||||
@@ -49,4 +49,6 @@ Loc ["STRING_CROWDCONTROL"] = "cc"
|
||||
Loc ["STRING_TANKCOOLDOWN"] = "tankcooldown"
|
||||
Loc ["STRING_KILLADD"] = "killadd"
|
||||
Loc ["STRING_SPREADOUT"] = "spreadout"
|
||||
Loc ["STRING_STOPCAST"] = "stopcast"
|
||||
Loc ["STRING_STOPCAST"] = "stopcast"
|
||||
Loc ["STRING_FACING"] = "facing"
|
||||
Loc ["STRING_STACK"] = "stack"
|
||||
@@ -48,4 +48,6 @@ Loc ["STRING_CROWDCONTROL"] = "cc"
|
||||
Loc ["STRING_TANKCOOLDOWN"] = "tankcooldown"
|
||||
Loc ["STRING_KILLADD"] = "mataradd"
|
||||
Loc ["STRING_SPREADOUT"] = "separar"
|
||||
Loc ["STRING_STOPCAST"] = "pararcast"
|
||||
Loc ["STRING_STOPCAST"] = "pararcast"
|
||||
Loc ["STRING_FACING"] = "virar"
|
||||
Loc ["STRING_STACK"] = "juntar"
|
||||
@@ -585,7 +585,7 @@ local throne_of_thunder = {
|
||||
portrait = [[Interface\EncounterJournal\UI-EJ-BOSS-Dark Animus]],
|
||||
|
||||
spell_mechanics = {
|
||||
[139867] = {0x1, 0x3000}, --> Interrupting Jolt
|
||||
[139867] = {0x1, 0x4000}, --> Interrupting Jolt
|
||||
[138659] = {0x1}, --> Touch of the Animus
|
||||
[138707] = {0x2000, 0x1}, --> Anima Font
|
||||
[138618] = {0x200, 0x10}, --> Matter Swap
|
||||
|
||||
Reference in New Issue
Block a user