zealvurte / SimSimMissionWin

WoW addon for the Shadowlands command table
GNU General Public License v3.0
4 stars 2 forks source link

Role based auto-attack selection for followers needs overriding #1

Closed zealvurte closed 3 years ago

zealvurte commented 3 years ago

Due to a lack of autoCombatant data for followers from the game's API, role based selection of auto-attack spellID is an optimal solution; however, there are some cases where a using a follower's role to determine the auto-attack spellID would result in the wrong spellID being selected.

The list of cases where this occurs can be obtained by filtering GarrAutoCombatant for:

I've decided to handle this using the combination of the follower id and role as a key, with the value being the correct spellID. This means if the role ever changes, then the override will not be used. It also allows me to more directly see which followers are actually being overridden.

Below is the current implementation of this.

{
    -- ["id-role"] = spellID
    ["1212-4"] = 11,    -- [UNUSED] [1212] Anjali, with role [4] Heal/Support, has [11] Auto Attack
    ["1239-2"] = 11,    -- [UNUSED] [1239] Venthyr Soulcaster, with role [2] Ranged (Physical), has [11] Auto Attack
    ["1243-2"] = 11,    -- [UNUSED] [1243] Maldraxxus Plaguesinger, with role [2] Ranged (Physical), has [11] Auto Attack
    ["1248-2"] = 11,    -- [UNUSED] [1248] Venthyr Soulcaster, with role [2] Ranged (Physical), has [11] Auto Attack
    ["1249-2"] = 11,    -- [UNUSED] [1249] Venthyr Soulcaster, with role [2] Ranged (Physical), has [11] Auto Attack
    ["1258-4"] = 11,    -- [1258] Mikanikos, with role [4] Heal/Support, has [11] Auto Attack
    ["1311-4"] = 11,    -- [1311] Ashraka, with role [4] Heal/Support, has [11] Auto Attack
    ["1314-2"] = 11,    -- [UNUSED] [1314] Maldraxxus Plaguesinger, with role [2] Ranged (Physical), has [11] Auto Attack
    ["1315-2"] = 11,    -- [UNUSED] [1315] Maldraxxus Plaguesinger, with role [2] Ranged (Physical), has [11] Auto Attack
    ["1323-2"] = 11,    -- [1323] Venthyr Soulcaster, with role [2] Ranged (Physical), has [11] Auto Attack
    ["1324-2"] = 11,    -- [1324] Maldraxxus Plaguesinger, with role [2] Ranged (Physical), has [11] Auto Attack
    ["1327-4"] = 11,    -- [1327] Ella, with role [4] Heal/Support, has [11] Auto Attack
    ["1338-4"] = 11,    -- [1338] Elwyn, with role [4] Heal/Support, has [11] Auto Attack
    ["1340-4"] = 11,    -- [UNUSED] [1340] Ella, with role [4] Heal/Support, has [11] Auto Attack
    ["1342-4"] = 11,    -- [1342] Cromas the Mystic, with role [4] Heal/Support, has [11] Auto Attack
    ["1345-4"] = 11,    -- [1345] Chachi the Artiste, with role [4] Heal/Support, has [11] Auto Attack
}

For verification with VP (modified), this is implemented as:

{[57]=0, [181]=0, [341]=0, [777]=0, [1213]=0, [1225]=0, [1237]=0, [1257]=0, [1301]=0}   -- #Mod: Improve auto attack overrides
-- #Bug: [1212] Anjali, with role [4] Heal/Support, has [11] Auto Attack [UNUSED]
-- #Fix: Add [57]=0 [UNUSED]
-- #Bug: [(1239,1248,1249,)1323] Venthyr Soulcaster, with role [2] Ranged (Physical), has [11] Auto Attack [UNVERIFIED]
-- #Fix: Add [181]=0 [UNVERIFIED]
-- #Bug: [1258] Mikanikos, with role [4] Heal/Support, has [11] Auto Attack [VERIFIED]
-- #Fix: Add [341]=0 [VERIFIED]
-- #Bug: [1311] Ashraka, with role [4] Heal/Support, has [11] Auto Attack [UNVERIFIED]
-- #Fix: Add [777]=0 [UNVERIFIED]
-- #Bug: [(1243,1314,1315,)1324] Maldraxxus Plaguesinger, with role [2] Ranged (Physical), has [11] Auto Attack [UNVERIFIED]
-- #Fix: Add [1213]=0 [UNVERIFIED]
-- #Bug: [1338] Elwyn, with role [4] Heal/Support, has [11] Auto Attack [VERIFIED]
-- #Fix: Add [1225]=0 [VERIFIED]
-- #Bug: [1327(,1340)] Ella, with role [4] Heal/Support, has [11] Auto Attack [VERIFIED]
-- #Fix: Add [1237]=0 [VERIFIED]
-- #Bug: [1342] Cromas the Mystic, with role [4] Heal/Support, has [11] Auto Attack [VERIFIED]
-- #Fix: Add [1257]=0 [VERIFIED]
-- #Bug: [1345] Chachi the Artiste, with role [4] Heal/Support, has [11] Auto Attack [UNVERIFIED]
-- #Fix: Add [1301]=0 [UNVERIFIED]