Skip to content

Commit

Permalink
Group Buff TEsting
Browse files Browse the repository at this point in the history
  • Loading branch information
DerpleMQ2 committed Jan 13, 2024
1 parent e4b4148 commit 6a443ca
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 9 deletions.
22 changes: 14 additions & 8 deletions class_configs/enc_class_config.lua
Original file line number Diff line number Diff line change
Expand Up @@ -944,17 +944,22 @@ local _ClassConfig = {
active_cond = function(self, spell) return mq.TLO.Me.FindBuff("id " .. tostring(spell.ID()))() ~= nil end,
cond = function(self, spell, target)
if not target or not target() then return false end
-- dont handle mercs for now.
if target.Type():lower() == "mercenary" then return false end

if target.ID() == mq.TLO.Me.ID() then return mq.TLO.Me.FindBuff("id " .. tostring(spell.ID()))() == nil end

if not RGMercConfig.Constants.RGCasters:contains(target.Class.ShortName()) then return false end

-- need to rely on DanNet for this next part.
local needBuff = DanNet.query(target.CleanName(), string.format("Me.FindBuff[id %d]", spell.ID()), 1000)
return RGMercUtils.CheckPCNeedsBuff(spell, target.ID(), target.CleanName())
end,
},
{
name = "HasteBuff",
type = "Spell",
active_cond = function(self, spell) return mq.TLO.Me.FindBuff("id " .. tostring(spell.ID()))() ~= nil end,
cond = function(self, spell, target)
if not target or not target() then return false end

return needBuff == "NULL"
if not RGMercConfig.Constants.RGMelee:contains(target.Class.ShortName()) then return false end

return RGMercUtils.CheckPCNeedsBuff(spell, target.ID(), target.CleanName())
end,
},
{
Expand All @@ -971,7 +976,8 @@ local _ClassConfig = {
if not RGMercConfig.Constants.RGMelee:contains(target.Class.ShortName()) then return false end

-- need to rely on DanNet for this next part.
local needBuff = DanNet.query(target.CleanName(), string.format("Me.FindBuff[id %d]", spell.ID()), 1000)
local needBuff = false
DanNet.query(target.CleanName(), string.format("Me.FindBuff[id %d]", spell.ID()), 1000)

return needBuff == "NULL"
end,
Expand Down
2 changes: 1 addition & 1 deletion extras/version.lua
Original file line number Diff line number Diff line change
@@ -1 +1 @@
return { commitId = '805895e 2024-01-13' }
return { commitId = 'e4b4148 2024-01-13' }

0 comments on commit 6a443ca

Please sign in to comment.