Don't refresh nicknames if nicknames are disabled
This commit is contained in:
@@ -291,17 +291,29 @@ function openRaidLib.CooldownManager.GetPlayerCooldownList()
|
||||
if (cooldownInfo) then
|
||||
--does this cooldown is based on a talent?
|
||||
local talentId = cooldownInfo.talent
|
||||
if (talentId) then
|
||||
--check if the player has the talent selected
|
||||
if (talentsHash[talentId]) then
|
||||
|
||||
--check if the player has a talent which makes this cooldown unavailable
|
||||
local ignoredByTalentId = cooldownInfo.ignoredIfTalent
|
||||
local isIgnoredByTalentId = false
|
||||
if (ignoredByTalentId) then
|
||||
if (talentsHash[ignoredByTalentId]) then
|
||||
isIgnoredByTalentId = true
|
||||
end
|
||||
end
|
||||
|
||||
if (not isIgnoredByTalentId) then
|
||||
if (talentId) then
|
||||
--check if the player has the talent selected
|
||||
if (talentsHash[talentId]) then
|
||||
if (canAddCooldown(cooldownInfo)) then
|
||||
addCooldownToTable(cooldowns, cooldownsHash, cooldownSpellId, timeNow)
|
||||
end
|
||||
end
|
||||
else
|
||||
if (canAddCooldown(cooldownInfo)) then
|
||||
addCooldownToTable(cooldowns, cooldownsHash, cooldownSpellId, timeNow)
|
||||
end
|
||||
end
|
||||
else
|
||||
if (canAddCooldown(cooldownInfo)) then
|
||||
addCooldownToTable(cooldowns, cooldownsHash, cooldownSpellId, timeNow)
|
||||
end
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
@@ -15,6 +15,7 @@ Code Rules:
|
||||
- Public callbacks are callbacks registered by an external addon.
|
||||
|
||||
Change Log:
|
||||
- if Ace Comm is installed, use it
|
||||
- added "KeystoneWipe" callback
|
||||
- finished keystone info, see docs
|
||||
- added interrupts to cooldown tracker, new filter: "interrupt"
|
||||
@@ -46,7 +47,7 @@ if (WOW_PROJECT_ID ~= WOW_PROJECT_MAINLINE) then
|
||||
end
|
||||
|
||||
local major = "LibOpenRaid-1.0"
|
||||
local CONST_LIB_VERSION = 39
|
||||
local CONST_LIB_VERSION = 41
|
||||
LIB_OPEN_RAID_CAN_LOAD = false
|
||||
|
||||
--declae the library within the LibStub
|
||||
@@ -233,6 +234,15 @@ LIB_OPEN_RAID_CAN_LOAD = false
|
||||
--0x1: to party
|
||||
--0x2: to raid
|
||||
--0x4: to guild
|
||||
local sendData = function(dataEncoded, channel)
|
||||
local aceComm = LibStub:GetLibrary("AceComm-3.0")
|
||||
if (aceComm) then
|
||||
aceComm:SendCommMessage(CONST_COMM_PREFIX, dataEncoded, channel, nil, "ALERT")
|
||||
else
|
||||
C_ChatInfo.SendAddonMessage(CONST_COMM_PREFIX, dataEncoded, channel)
|
||||
end
|
||||
end
|
||||
|
||||
function openRaidLib.commHandler.SendCommData(data, flags)
|
||||
local LibDeflate = LibStub:GetLibrary("LibDeflate")
|
||||
local dataCompressed = LibDeflate:CompressDeflate(data, {level = 9})
|
||||
@@ -240,28 +250,28 @@ LIB_OPEN_RAID_CAN_LOAD = false
|
||||
|
||||
if (flags) then
|
||||
if (bit.band(flags, CONST_COMM_SENDTO_PARTY)) then --send to party
|
||||
if (IsInGroup() and not IsInRaid()) then
|
||||
C_ChatInfo.SendAddonMessage(CONST_COMM_PREFIX, dataEncoded, IsInGroup(LE_PARTY_CATEGORY_INSTANCE) and "INSTANCE_CHAT" or "PARTY")
|
||||
if (IsInGroup() and not IsInRaid()) then
|
||||
sendData(dataEncoded, IsInGroup(LE_PARTY_CATEGORY_INSTANCE) and "INSTANCE_CHAT" or "PARTY")
|
||||
end
|
||||
end
|
||||
|
||||
if (bit.band(flags, CONST_COMM_SENDTO_RAID)) then --send to raid
|
||||
if (IsInRaid()) then
|
||||
C_ChatInfo.SendAddonMessage(CONST_COMM_PREFIX, dataEncoded, IsInRaid(LE_PARTY_CATEGORY_INSTANCE) and "INSTANCE_CHAT" or "RAID")
|
||||
sendData(dataEncoded, IsInRaid(LE_PARTY_CATEGORY_INSTANCE) and "INSTANCE_CHAT" or "RAID")
|
||||
end
|
||||
end
|
||||
|
||||
if (bit.band(flags, CONST_COMM_SENDTO_GUILD)) then --send to guild
|
||||
if (IsInGuild()) then
|
||||
C_ChatInfo.SendAddonMessage(CONST_COMM_PREFIX, dataEncoded, "GUILD")
|
||||
sendData(dataEncoded, "GUILD")
|
||||
end
|
||||
end
|
||||
else
|
||||
if (IsInGroup() and not IsInRaid()) then --in party only
|
||||
C_ChatInfo.SendAddonMessage(CONST_COMM_PREFIX, dataEncoded, IsInGroup(LE_PARTY_CATEGORY_INSTANCE) and "INSTANCE_CHAT" or "PARTY")
|
||||
sendData(dataEncoded, IsInGroup(LE_PARTY_CATEGORY_INSTANCE) and "INSTANCE_CHAT" or "PARTY")
|
||||
|
||||
elseif (IsInRaid()) then
|
||||
C_ChatInfo.SendAddonMessage(CONST_COMM_PREFIX, dataEncoded, IsInRaid(LE_PARTY_CATEGORY_INSTANCE) and "INSTANCE_CHAT" or "RAID")
|
||||
sendData(dataEncoded, IsInRaid(LE_PARTY_CATEGORY_INSTANCE) and "INSTANCE_CHAT" or "RAID")
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
@@ -903,7 +903,8 @@ LIB_OPEN_RAID_COOLDOWNS_INFO = {
|
||||
|
||||
--priest
|
||||
[10060] = {cooldown = 120, duration = 20, talent = false, charges = 1, class = "PRIEST", type = 1}, --Power Infusion
|
||||
[34433] = {cooldown = 180, duration = 15, talent = false, charges = 1, class = "PRIEST", type = 1}, --Shadowfiend
|
||||
[34433] = {cooldown = 180, duration = 15, talent = false, charges = 1, class = "PRIEST", type = 1, ignoredIfTalent = 21719}, --Shadowfiend
|
||||
[200174] = {cooldown = 60, duration = 15, talent = 21719, charges = 1, class = "PRIEST", type = 1}, --Mindbender (talent)
|
||||
[123040] = {cooldown = 60, duration = 12, talent = 22094, charges = 1, class = "PRIEST", type = 1}, --Mindbender (talent)
|
||||
[33206] = {cooldown = 180, duration = 8, talent = false, charges = 1, class = "PRIEST", type = 3}, --Pain Suppression
|
||||
[62618] = {cooldown = 180, duration = 10, talent = false, charges = 1, class = "PRIEST", type = 4}, --Power Word: Barrier
|
||||
@@ -917,7 +918,6 @@ LIB_OPEN_RAID_COOLDOWNS_INFO = {
|
||||
[265202] = {cooldown = 720, duration = false, talent = 23145, charges = 1, class = "PRIEST", type = 4}, --Holy Word: Salvation (talent)
|
||||
[109964] = {cooldown = 60, duration = 12, talent = 21184, charges = 1, class = "PRIEST", type = 4}, --Spirit Shell (talent)
|
||||
[8122] = {cooldown = 60, duration = 8, talent = false, charges = 1, class = "PRIEST", type = 5}, --Psychic Scream
|
||||
[200174] = {cooldown = 60, duration = 15, talent = 21719, charges = 1, class = "PRIEST", type = 1}, --Mindbender (talent)
|
||||
[193223] = {cooldown = 240, duration = 60, talent = 21979, charges = 1, class = "PRIEST", type = 1}, --Surrender to Madness (talent)
|
||||
[47585] = {cooldown = 120, duration = 6, talent = false, charges = 1, class = "PRIEST", type = 2}, --Dispersion
|
||||
[15286] = {cooldown = 120, duration = 15, talent = false, charges = 1, class = "PRIEST", type = 4}, --Vampiric Embrace
|
||||
|
||||
Reference in New Issue
Block a user