Nameplate Scrolling Combat Text

Nameplate Scrolling Combat Text

2M Downloads

[Cata classic] 1.43-3-g9a682d1 alpha CLEU argument missmatch

Road-block opened this issue ยท 6 comments

commented
1x NameplateSCT/NameplateSCT.lua:927: attempt to perform arithmetic on local 'amount' (a string value)
[string "@NameplateSCT/NameplateSCT.lua"]:927: in function `DamageEvent'
[string "@NameplateSCT/NameplateSCT.lua"]:773: in function <NameplateSCT/NameplateSCT.lua:742>
[string "=(tail call)"]: ?
[string "@Ace3/CallbackHandler-1.0-8/CallbackHandler-1.0.lua"]:109: in function <...Ons/Ace3/CallbackHandler-1.0/CallbackHandler-1.0.lua:109>
[string "=[C]"]: ?
[string "@Ace3/CallbackHandler-1.0-8/CallbackHandler-1.0.lua"]:19: in function <...Ons/Ace3/CallbackHandler-1.0/CallbackHandler-1.0.lua:15>
[string "@Ace3/CallbackHandler-1.0-8/CallbackHandler-1.0.lua"]:54: in function `Fire'
[string "@Ace3/AceEvent-3.0-4/AceEvent-3.0.lua"]:120: in function <Ace3/AceEvent-3.0/AceEvent-3.0.lua:119>

Locals:
self = <table> {
 modules = <table> {
 }
 defaultModuleLibraries = <table> {
 }
 baseName = "NameplateSCT"
 name = "NameplateSCT"
 orderedModules = <table> {
 }
 db = <table> {
 }
 enabledState = true
 defaultModuleState = true
 frame = Frame {
 }
}
guid = "Creature-0-4469-657-19680-45924-000330EA56"
spellName = "Thorns"
amount = "RESIST"
overkill = false
school = 0
crit = nil
spellId = 467
absorbed = nil
amount = "RESIST"
absorbed = 0
(*temporary) = 0
(*temporary) = nil
(*temporary) = nil
(*temporary) = nil
(*temporary) = nil
(*temporary) = nil
(*temporary) = nil
(*temporary) = nil
(*temporary) = nil
(*temporary) = nil
(*temporary) = nil
(*temporary) = nil
(*temporary) = nil
(*temporary) = nil
(*temporary) = nil
(*temporary) = nil
(*temporary) = nil
(*temporary) = "attempt to perform arithmetic on local 'amount' (a string value)"
playerGUID = "Player-4453-0000B83D"
guidToUnit = <table> {
 Creature-0-4469-657-19680-45924-000330EA56 = "nameplate5"
 Creature-0-4469-657-19680-45924-000230EA56 = "nameplate3"
 Creature-0-4469-657-19680-45922-000130EA56 = "nameplate4"
 Creature-0-4469-657-19680-45924-0003B0EA56 = "nameplate6"
 Creature-0-4469-657-19680-45922-0001B0EA56 = "nameplate2"
 Creature-0-4469-657-19680-45924-0002B0EA56 = "nameplate1"
}
NameplateSCT = <table> {
 modules = <table> {
 }
 defaultModuleLibraries = <table> {
 }
 baseName = "NameplateSCT"
 name = "NameplateSCT"
 orderedModules = <table> {
 }
 db = <table> {
 }
 enabledState = true
 defaultModuleState = true
 frame = Frame {
 }
}
commented

The problem is this line here

if string.find(clue, "_DAMAGE") or string.find(clue, "DAMAGE_SHIELD") then

Specifically the

string.find(clue, "DAMAGE_SHIELD")

part.

This would evaluate true for both DAMAGE_SHIELD and DAMAGE_SHIELD_MISSED subevents but they have different argument lists for the variable part of CLEU.
first one follows SPELL prefix _DAMAGE suffix rules and the second SPELL prefix and _MISSED suffix rules.

In the first case arg15 is amount (number) and in the second it's missType (string)

Fix is to anchor the pattern at the end like string.find(clue, "DAMAGE_SHIELD$")

commented

There is another instance of the same logic error at line 805 in the latest alpha.
Both places still need a fix.

commented

I see, so for normal abilities there's SPELL_MISSED, but for the shield types it ends up showng as SPELL_DAMAGE_SHIELD_MISSED, is my assumption correct? (I don't have a class to test this, so just want to clarify it for myself)

commented

I see, so for normal abilities there's SPELL_MISSED, but for the shield types it ends up showing as SPELL_DAMAGE_SHIELD_MISSED, is my assumption correct? (I don't have a class to test this, so just want to clarify it for myself)

That's correct.

commented

flipped around the order of which we check the events with, should resolve this issue: 87f257e

commented

closing this for now, feel free to reopen if it still occurs