Skip to content

Commit

Permalink
fixed pet damage
Browse files Browse the repository at this point in the history
  • Loading branch information
bkader committed Sep 19, 2021
1 parent e7b4e97 commit b74e36a
Show file tree
Hide file tree
Showing 2 changed files with 51 additions and 13 deletions.
51 changes: 41 additions & 10 deletions NameplateSCT/NameplateSCT.lua
Original file line number Diff line number Diff line change
Expand Up @@ -529,6 +529,7 @@ local missedSpellEvents = {
SPELL_BUILDING_MISSED = true
}

local BITMASK_PETS = bit.bor(COMBATLOG_OBJECT_AFFILIATION_MINE, COMBATLOG_OBJECT_TYPE_PET, COMBATLOG_OBJECT_TYPE_GUARDIAN)
function NameplateSCT:COMBAT_LOG_EVENT_UNFILTERED(_, _, clueevent, srcGUID, srcName, srcFlags, dstGUID, dstName, _, ...)
if NameplateSCT.db.global.personalOnly and NameplateSCT.db.global.personal and playerGUID ~= dstGUID then
return
Expand All @@ -547,11 +548,8 @@ function NameplateSCT:COMBAT_LOG_EVENT_UNFILTERED(_, _, clueevent, srcGUID, srcN
elseif clueevent == "SWING_MISSED" then
self:MissEvent(dstGUID, dstName, AutoAttack, dstGUID == playerGUID and AutoAttack or ..., 6603)
end
elseif
(bit.band(srcFlags, COMBATLOG_OBJECT_TYPE_GUARDIAN) > 0 or bit.band(srcFlags, COMBATLOG_OBJECT_TYPE_PET) > 0) and
bit.band(srcFlags, COMBATLOG_OBJECT_AFFILIATION_MINE) > 0
then -- Pet/Guardian events
if dstGUID == playerGUID and NameplateSCT.db.global.personal then
elseif bit.band(srcFlags, BITMASK_PETS) ~= 0 then -- Pet/Guardian events
if dstGUID ~= playerGUID and NameplateSCT.db.global.personal then
if damageSpellEvents[clueevent] then
local spellId, spellName, _, amount, _, _, _, _, _, critical, _, _ = ...
self:DamageEvent(dstGUID, spellName, amount, "pet", critical, spellId)
Expand Down Expand Up @@ -806,11 +804,6 @@ local menu = {
handler = NameplateSCT,
type = "group",
args = {
discord = {
type = "header",
name = "Discord Server : \124c007289d9https://discord.gg/a8z5CyS3eW\124r",
order = 1
},
nameplatesEnabled = {
type = "description",
name = "\124cFFFF0000" .. L["YOUR ENEMY NAMEPLATES ARE DISABLED, NAMEPLATESCT WILL NOT WORK!!"] .. "\124r",
Expand Down Expand Up @@ -1602,6 +1595,44 @@ local menu = {
order = 22
}
}
},
about = {
type = "group",
name = "About",
order = 110,
inline = true,
args = {
website = {
type = "description",
name = format("|cffffff33Website|r: %s", GetAddOnMetadata("NameplateSCT", "X-Website")),
width = "double",
order = 10
},
discord = {
type = "description",
name = format("|cffffff33Discord|r: %s", GetAddOnMetadata("NameplateSCT", "X-Discord")),
width = "double",
order = 20
},
email = {
type = "description",
name = format("|cffffff33Email|r: %s", GetAddOnMetadata("NameplateSCT", "X-Email")),
width = "double",
order = 30
},
donate = {
type = "description",
name = format("|cffffff33Donation|r: %s", GetAddOnMetadata("NameplateSCT", "X-Donate")),
width = "double",
order = 40
},
credits = {
type = "description",
name = format("|cffffff33Credits|r: %s", GetAddOnMetadata("NameplateSCT", "X-Credits")),
width = "double",
order = 50
}
}
}
}
}
Expand Down
13 changes: 10 additions & 3 deletions NameplateSCT/NameplateSCT.toc
Original file line number Diff line number Diff line change
@@ -1,10 +1,17 @@
## Interface: 30300
## Version: 1.8
## Title: NameplateSCT (|c00ffffffWoTLK|r)
## Author: mpstark, Justwait (Kader Backport)
## SavedVariables: NameplateSCTDB
## Notes: Nameplate-based scrolling combat text.
## Version: 1.8
## OptionalDeps: Ace3, LibEasing
## SavedVariables: NameplateSCTDB
## Author: Kader (|cff808080bkader#6361|r)
## X-Date: 2021-09-19 @ 01:02 AM |cff808080UTC|r
## X-Credits: mpstark, Justwait
## X-Category: Combat
## X-Email: [email protected]
## X-Website: https://github.com/bkader/NameplateSCT_WoTLK
## X-Discord: https://discord.gg/a8z5CyS3eW
## X-Donate: |cff0079c1PayPal|r or |cff246a96Paysera|r at |cff20ff20[email protected]|r

Libs\Libs.xml
Locales\Locale.xml
Expand Down

0 comments on commit b74e36a

Please sign in to comment.