lmcintyre / DamageInfoPlugin

Dalamud plugin for extra damage info
GNU General Public License v3.0
7 stars 13 forks source link

some action doesn't include AttackType #5

Open LittleNightmare opened 3 years ago

LittleNightmare commented 3 years ago

like action 22803 Tender Loin doesn't include AttackType. However, it has been used in ColorCastBar. The name of action '22804' is the same as action 22803 but it includes AttackType. This problem causes the type of action 22803 to become a DamageType.Unknown.

i think the program could use ActionCategory instead of AttackType when not available.

lmcintyre commented 3 years ago

Hi, I don't think ActionCategory is reliable for determining if an action is magic damage or not. I can try to find another solution to these kinds of issues

LittleNightmare commented 3 years ago

I just notice there a big different between those

how about search another action with the same name, like below

                    foreach (var tmp in actionSheet)
                    {
                        if ((DamageType)tmp.AttackType.Row == DamageType.Unknown || row.Name == null || row.Name == "") continue;
                        if (tmp.Name == row.Name)
                        {
                            tmpType = (DamageType)tmp.AttackType.Row;
                            break;
                        }

                    }
lmcintyre commented 3 years ago

There is no guarantee that two actions with the same name will be the same damage type

LittleNightmare commented 3 years ago

yeah, you are right. I find some actions like Terminus Est, Fireball with the same name but different AttckType. but most of them, are using the same type. Maybe could use current finding write a filter? Set it as an option of plugin. In addition, it causes more time when initializing the plugin (close to crash the game lol).