Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
58 changes: 38 additions & 20 deletions Localization.lua
Original file line number Diff line number Diff line change
Expand Up @@ -104,10 +104,18 @@ L:RegisterTranslations("enUS", function()
["Not ignored"] = true,
["Ignored Mobs List (Enter to save)"] = true,
["Ignored Mobs Desc"] = "Comma separated list of strings to ignore if found in the unit name. If you use any of these regex characters (*+%?) it will do a regex search otherwise it will do a plain text search. So both Rift-Lost and Rift%-Lost should work.",
["Shared Faerie Fire"] = true,
["This will show other player's Faerie Fires and avoid trying to cast Faerie Fire on those mobs"] = true,
["Shared Faerie Fire"] = true,
["This will show other player's Faerie Fires and avoid trying to cast Faerie Fire on those mobs"] = true,
["Shared Sunder Armor"] = true,
["This will show other player's Sunder Armor"] = true,
["Shared Expose Armor"] = true,
["This will show other player's Expose Armor"] = true,
["Shared Curse of Recklessness"] = true,
["This will show other player's Curse of Recklessness"] = true,
["Hide Own Debuffs"] = true,
["Hide your own debuffs, show only shared debuffs from other players"] = true,

-- spells
-- spells
["Rank"] = true,
["Rank 1"] = true,
["Rank 2"] = true,
Expand Down Expand Up @@ -181,11 +189,11 @@ L:RegisterTranslations("enUS", function()
["hemorrhage"] = true,
["cheap shot"] = true,

-- shaman
["flame shock"] = true,
["molten blast"] = true,
-- shaman
["flame shock"] = true,
["molten blast"] = true,

-- warlock
-- warlock
["conflagrate"] = true,
["corruption"] = true,
["curse of agony"] = true,
Expand All @@ -203,9 +211,10 @@ L:RegisterTranslations("enUS", function()
["siphon life"] = true,
["fear"] = true,

-- warrior
["rend"] = true,
}
-- warrior
["rend"] = true,
["sunder armor"] = true,
}
end)

L:RegisterTranslations("zhCN", function()
Expand Down Expand Up @@ -314,10 +323,18 @@ L:RegisterTranslations("zhCN", function()
["Not ignored"] = "不被忽略",
["Ignored Mobs List (Enter to save)"] = "忽略的怪物列表(回车保存)",
["Ignored Mobs Desc"] = "用逗号分隔的字符串列表,如果在单位名称中找到则忽略。如果你使用了这些正则表达式字符(*+%?),它将进行正则表达式搜索,否则将进行纯文本搜索。所以Rift-Lost和Rift%-Lost都应该有效.",
["Shared Faerie Fire"] = "共享精灵之火",
["This will show other player's Faerie Fires and avoid trying to cast Faerie Fire on those mobs"] = "这将显示其他玩家的精灵之火,并避免尝试在这些怪物上施放精灵之火",
["Shared Faerie Fire"] = "共享精灵之火",
["This will show other player's Faerie Fires and avoid trying to cast Faerie Fire on those mobs"] = "这将显示其他玩家的精灵之火,并避免尝试在这些怪物上施放精灵之火",
["Shared Sunder Armor"] = "共享破甲",
["This will show other player's Sunder Armor"] = "这将显示其他玩家的破甲",
["Shared Expose Armor"] = "共享破甲",
["This will show other player's Expose Armor"] = "这将显示其他玩家的破甲",
["Shared Curse of Recklessness"] = "共享鲁莽诅咒",
["This will show other player's Curse of Recklessness"] = "这将显示其他玩家的鲁莽诅咒",
["Hide Own Debuffs"] = "隐藏自己的减益",
["Hide your own debuffs, show only shared debuffs from other players"] = "隐藏自己的减益,只显示其他玩家的共享减益",

-- spells
-- spells
["Rank"] = "等级",
["Rank 1"] = "等级 1",
["Rank 2"] = "等级 2",
Expand Down Expand Up @@ -391,11 +408,11 @@ L:RegisterTranslations("zhCN", function()
["hemorrhage"] = "出血", -- no idea if right
["cheap shot"] = "肮脏的打击", -- no idea if right

-- shaman
["flame shock"] = "烈焰震击", -- no idea if right
["molten blast"] = "熔岩爆裂", -- no idea if right
-- shaman
["flame shock"] = "烈焰震击", -- no idea if right
["molten blast"] = "熔岩爆裂", -- no idea if right

-- warlock
-- warlock
["conflagrate"] = "引燃", -- no idea if right
["corruption"] = "腐蚀术",
["curse of agony"] = "痛苦诅咒",
Expand All @@ -413,7 +430,8 @@ L:RegisterTranslations("zhCN", function()
["siphon life"] = "生命虹吸",
["fear"] = "恐惧",

-- warrior
["rend"] = '撕裂', -- no idea if right
}
-- warrior
["rend"] = '撕裂', -- no idea if right
["sunder armor"] = '破甲', -- no idea if right
}
end)
38 changes: 27 additions & 11 deletions curses.lua
Original file line number Diff line number Diff line change
Expand Up @@ -35,10 +35,16 @@ local curses = {

sharedDebuffs = {
faeriefire = {},
sunderarmor = {},
exposearmor = {},
curseofrecklessness = {},
},
sharedDebuffGuids = {
faeriefire = {}, -- used for scanning for shared debuffs like faerie fire
}, -- used for scanning for shared debuffs like faerie fire
faeriefire = {},
sunderarmor = {},
exposearmor = {},
curseofrecklessness = {},
},

-- Whitelist of mobs that can bleed (for rake tracking at client debuff cap)
mobsThatBleed = {
Expand Down Expand Up @@ -277,15 +283,24 @@ Cursive:RegisterEvent("SPELLCAST_FAILED", StopChanneling);
Cursive:RegisterEvent("UNIT_CASTEVENT", function(casterGuid, targetGuid, event, spellID, castDuration)
-- immolate will fire both start and cast
if event == "CAST" then
local _, guid = UnitExists("player")
if casterGuid ~= guid then
-- check for faeriefire
if Cursive.db.profile.shareddebuffs.faeriefire and curses.sharedDebuffs.faeriefire[spellID] then
curses.sharedDebuffGuids.faeriefire[targetGuid] = GetTime()
end

return
local _, guid = UnitExists("player")
if casterGuid ~= guid then
-- check for shared debuffs from other players
if Cursive.db.profile.shareddebuffs.faeriefire and curses.sharedDebuffs.faeriefire[spellID] then
curses.sharedDebuffGuids.faeriefire[targetGuid] = GetTime()
end
if Cursive.db.profile.shareddebuffs.sunderarmor and curses.sharedDebuffs.sunderarmor[spellID] then
curses.sharedDebuffGuids.sunderarmor[targetGuid] = GetTime()
end
if Cursive.db.profile.shareddebuffs.exposearmor and curses.sharedDebuffs.exposearmor[spellID] then
curses.sharedDebuffGuids.exposearmor[targetGuid] = GetTime()
end
if Cursive.db.profile.shareddebuffs.curseofrecklessness and curses.sharedDebuffs.curseofrecklessness[spellID] then
curses.sharedDebuffGuids.curseofrecklessness[targetGuid] = GetTime()
end

return
end

-- store pending cast
curses.pendingCast = {
Expand Down Expand Up @@ -619,7 +634,7 @@ function curses:HasCurse(lowercaseSpellNameNoRank, targetGuid, minRemaining)
end

-- Apply shared curse from another player
function curses:ApplySharedCurse(sharedDebuffKey, spellID, targetGuid, startTime)
function curses:ApplySharedCurse(sharedDebuffKey, spellID, targetGuid, startTime, stacks)
local name = curses.sharedDebuffs[sharedDebuffKey][spellID].name
local rank = curses.sharedDebuffs[sharedDebuffKey][spellID].rank
local duration = curses.sharedDebuffs[sharedDebuffKey][spellID].duration
Expand All @@ -635,6 +650,7 @@ function curses:ApplySharedCurse(sharedDebuffKey, spellID, targetGuid, startTime
spellID = spellID,
targetGuid = targetGuid,
currentPlayer = false,
stacks = stacks or 0,
}
end

Expand Down
7 changes: 5 additions & 2 deletions global.lua
Original file line number Diff line number Diff line change
Expand Up @@ -19,8 +19,11 @@ function Cursive:OnEnable()

DEFAULT_CHAT_FRAME:AddMessage(L["|cffffcc00Cursive:|cffffaaaa Loaded. /cursive for commands and minimap icon for options."])

Cursive.curses:LoadCurses()
if Cursive.db.profile.enabled then
if Cursive.curses then
Cursive.curses:LoadCurses()
end

if Cursive.db and Cursive.db.profile and Cursive.db.profile.enabled then
Cursive.core.enable()
end
end
62 changes: 62 additions & 0 deletions settings.lua
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,12 @@ Cursive:RegisterDefaults("profile", {

shareddebuffs = {
faeriefire = false,
sunderarmor = false,
exposearmor = false,
curseofrecklessness = false,
},

hideonlydebuffs = false,

alwaysshowcurrenttarget = true,

Expand Down Expand Up @@ -493,6 +498,24 @@ local mobFilters = {
}

local sharedDebuffs = {
["hideOwnDebuffs"] = {
type = "toggle",
name = L["Hide Own Debuffs"],
desc = L["Hide your own debuffs, show only shared debuffs from other players"],
order = 1,
get = function()
return Cursive.db.profile.hideonlydebuffs
end,
set = function(v)
Cursive.db.profile.hideonlydebuffs = v
Cursive.UpdateFramesFromConfig()
end,
},
["spacer"] = {
type = "header",
name = " ",
order = 5,
},
["sharedFaerieFire"] = {
type = "toggle",
name = L["Shared Faerie Fire"],
Expand All @@ -506,6 +529,45 @@ local sharedDebuffs = {
Cursive.UpdateFramesFromConfig()
end,
},
["sharedSunderArmor"] = {
type = "toggle",
name = L["Shared Sunder Armor"],
desc = L["This will show other player's Sunder Armor"],
order = 20,
get = function()
return Cursive.db.profile.shareddebuffs.sunderarmor
end,
set = function(v)
Cursive.db.profile.shareddebuffs.sunderarmor = v
Cursive.UpdateFramesFromConfig()
end,
},
["sharedExposeArmor"] = {
type = "toggle",
name = L["Shared Expose Armor"],
desc = L["This will show other player's Expose Armor"],
order = 30,
get = function()
return Cursive.db.profile.shareddebuffs.exposearmor
end,
set = function(v)
Cursive.db.profile.shareddebuffs.exposearmor = v
Cursive.UpdateFramesFromConfig()
end,
},
["sharedCurseOfRecklessness"] = {
type = "toggle",
name = L["Shared Curse of Recklessness"],
desc = L["This will show other player's Curse of Recklessness"],
order = 40,
get = function()
return Cursive.db.profile.shareddebuffs.curseofrecklessness
end,
set = function(v)
Cursive.db.profile.shareddebuffs.curseofrecklessness = v
Cursive.UpdateFramesFromConfig()
end,
},
}

Cursive.cmdtable = {
Expand Down
23 changes: 22 additions & 1 deletion spells/shared_debuffs.lua
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,27 @@ function getSharedDebuffs()
[17390] = { name = L["faerie fire"], rank = 2, duration = 40 },
[17391] = { name = L["faerie fire"], rank = 3, duration = 40 },
[17392] = { name = L["faerie fire"], rank = 4, duration = 40 },
}
},
sunderarmor = {
[7386] = { name = L["sunder armor"], rank = 1, duration = 30 },
[7405] = { name = L["sunder armor"], rank = 2, duration = 30 },
[8380] = { name = L["sunder armor"], rank = 3, duration = 30 },
[11596] = { name = L["sunder armor"], rank = 4, duration = 30 },
[11597] = { name = L["sunder armor"], rank = 5, duration = 30 },
[25225] = { name = L["sunder armor"], rank = 6, duration = 30 },
},
exposearmor = {
[8647] = { name = L["expose armor"], rank = 1, duration = 30 },
[8649] = { name = L["expose armor"], rank = 2, duration = 30 },
[8650] = { name = L["expose armor"], rank = 3, duration = 30 },
[11197] = { name = L["expose armor"], rank = 4, duration = 30 },
[11198] = { name = L["expose armor"], rank = 5, duration = 30 },
},
curseofrecklessness = {
[704] = { name = L["curse of recklessness"], rank = 1, duration = 120 },
[7658] = { name = L["curse of recklessness"], rank = 2, duration = 120 },
[7659] = { name = L["curse of recklessness"], rank = 3, duration = 120 },
[11717] = { name = L["curse of recklessness"], rank = 4, duration = 120 },
}
}
end
Loading