DeadlyBossMods / DBM-WotLK

Deadly Boss Mods (DBM) - WotLK mods
https://www.curseforge.com/wow/addons/deadly-boss-mods-wotlk
Other
8 stars 10 forks source link

RS-Halion: add Corporeality SA #58

Closed Zidras closed 8 months ago

Zidras commented 8 months ago
MysticalOS commented 8 months ago
    ["UPDATE_UI_WIDGET"] = {
        "<3.93 20:13:14> [UPDATE_UI_WIDGET] widgetID:4834, widgetType:2, widgetSetID:817, scriptedAnimationEffectID:0, barMin:0, widgetScale:4, glowAnimType:0, tooltipLoc:0, shownState:0, widgetSizeSetting:0, fillMinOpacity:0, text:Charges Remaining, textEnabledState:3, barTextSizeType:4, layoutDirection:0, barValue:0, hasTimer:false, overrideBarText:, partitionValues:table, colorTint:5, barTextFontType:1, barMax:0, textFontType:1, barTextEnabledState:3, fillMaxOpacity:0, modelSceneLayer:0, textSizeType:0, frameTextureKit:widgetstatusbar, outAnimType:0, orderIndex:1, widgetTag:, inAnimType:0, textureKit:Yellow, showGlowState:0, fillMotionType:0, overrideBarTextShownType:0, barValueTextType:5, tooltip:", -- [1]
        "<160.11 20:15:50> [UPDATE_UI_WIDGET] widgetID:613, widgetType:0, widgetSetID:1, scriptedAnimationEffectID:0, modelSceneLayer:0, dynamicTooltip:, widgetScale:0, tooltipLoc:0, widgetTag:, widgetSizeSetting:0, text:Halion's corporeality: 50%, state:0, inAnimType:0, layoutDirection:0, hasTimer:false, outAnimType:0, orderIndex:273, tooltip:Halion's corporeality in this dimension", -- [2]
        "<160.11 20:15:50> [UPDATE_UI_WIDGET] widgetID:613, state:1", -- [3]
        "<175.01 20:16:05> [UPDATE_UI_WIDGET] widgetID:613, text:Halion's corporeality: 40%", -- [4]
        "<190.01 20:16:20> [UPDATE_UI_WIDGET] widgetID:613, text:Halion's corporeality: 30%", -- [5]
        "<205.03 20:16:35> [UPDATE_UI_WIDGET] widgetID:613, text:Halion's corporeality: 20%", -- [6]
        "<220.09 20:16:50> [UPDATE_UI_WIDGET] widgetID:613, text:Halion's corporeality: 10%", -- [7]
        "<235.09 20:17:05> [UPDATE_UI_WIDGET] widgetID:613, text:Halion's corporeality: 0%", -- [8]
        "<363.25 20:19:13> [UPDATE_UI_WIDGET] widgetID:613, state:0", -- [9]
        "<363.50 20:19:13> [UPDATE_UI_WIDGET] widgetID:4834, shownState:1", -- [10]
    },

RubyRetail.zip

MysticalOS commented 8 months ago

and Classic

    ["UPDATE_UI_WIDGET"] = {
        "<243.69 02:11:26> [UPDATE_UI_WIDGET] widgetID:3940, widgetType:0, widgetSetID:1, state:0, widgetTag:, orderIndex:272, dynamicTooltip:Halion's corporeality in this dimension, hasTimer:false, text:Halion's corporeality: 50%, textureKitID:0, tooltip:Halion's corporeality in this dimension", -- [1]
        "<243.69 02:11:26> [UPDATE_UI_WIDGET] widgetID:3940, state:1", -- [2]
        "<258.72 02:11:41> [UPDATE_UI_WIDGET] widgetID:3941, widgetType:0, widgetSetID:1, state:1, widgetTag:, orderIndex:273, dynamicTooltip:Halion's corporeality in this dimension, hasTimer:false, text:Halion's corporeality: 60%, textureKitID:0, tooltip:Halion's corporeality in this dimension", -- [3]
        "<273.70 02:11:56> [UPDATE_UI_WIDGET] widgetID:3941, text:Halion's corporeality: 50%", -- [4]
        "<288.71 02:12:11> [UPDATE_UI_WIDGET] widgetID:3941, text:Halion's corporeality: 60%", -- [5]
        "<303.71 02:12:26> [UPDATE_UI_WIDGET] widgetID:3941, text:Halion's corporeality: 70%", -- [6]
        "<318.71 02:12:41> [UPDATE_UI_WIDGET] widgetID:3941, text:Halion's corporeality: 80%", -- [7]
        "<323.29 02:12:46> [UPDATE_UI_WIDGET] widgetID:3941, state:0", -- [8]
        "<323.29 02:12:46> [UPDATE_UI_WIDGET] widgetID:3941, text:Halion's corporeality: 0%", -- [9]
    },

RubyClassic.zip

MysticalOS commented 8 months ago

Looks like you don't even need to use widgets, just spell ids, like 74826 through 74831


            "<235.09 20:17:05> [CLEU] SPELL_AURA_APPLIED#Creature-0-4210-724-19325-39863-000021E2E8#Halion#Creature-0-4210-724-19325-39863-000021E2E8#Halion#74836#Corporeality#BUFF#nil", -- [1177]
            "<235.09 20:17:05> [CLEU] SPELL_AURA_REMOVED#Creature-0-4210-724-19325-40142-000021E2E8#Halion#Creature-0-4210-724-19325-40142-000021E2E8#Halion#74830#Corporeality#BUFF#nil", -- [1178]
            "<235.10 20:17:05> [CLEU] SPELL_AURA_APPLIED#Creature-0-4210-724-19325-40142-000021E2E8#Halion#Creature-0-4210-724-19325-40142-000021E2E8#Halion#74831#Corporeality#BUFF#nil", -- [1179]```
Zidras commented 8 months ago

Looks like you don't even need to use widgets, just spell ids, like 74826 through 74831

          "<235.09 20:17:05> [CLEU] SPELL_AURA_APPLIED#Creature-0-4210-724-19325-39863-000021E2E8#Halion#Creature-0-4210-724-19325-39863-000021E2E8#Halion#74836#Corporeality#BUFF#nil", -- [1177]
          "<235.09 20:17:05> [CLEU] SPELL_AURA_REMOVED#Creature-0-4210-724-19325-40142-000021E2E8#Halion#Creature-0-4210-724-19325-40142-000021E2E8#Halion#74830#Corporeality#BUFF#nil", -- [1178]
          "<235.10 20:17:05> [CLEU] SPELL_AURA_APPLIED#Creature-0-4210-724-19325-40142-000021E2E8#Halion#Creature-0-4210-724-19325-40142-000021E2E8#Halion#74831#Corporeality#BUFF#nil", -- [1179]```

While that is true, it would require checking playerInTwilight, since you see both realms's CLEUs (so you will receive both the spellId for 40% and 60%)

"<175.01 20:16:05> [CLEU] SPELL_AURA_REMOVED#Creature-0-4210-724-19325-39863-000021E2E8#Halion#Creature-0-4210-724-19325-39863-000021E2E8#Halion#74826#Corporeality#BUFF#nil", -- [905]
"<175.01 20:16:05> [CLEU] SPELL_AURA_APPLIED#Creature-0-4210-724-19325-39863-000021E2E8#Halion#Creature-0-4210-724-19325-39863-000021E2E8#Halion#74832#Corporeality#BUFF#nil", -- [906]
"<175.01 20:16:05> [CLEU] SPELL_AURA_REMOVED#Creature-0-4210-724-19325-40142-000021E2E8#Halion#Creature-0-4210-724-19325-40142-000021E2E8#Halion#74826#Corporeality#BUFF#nil", -- [907]
"<175.01 20:16:05> [CLEU] SPELL_AURA_APPLIED#Creature-0-4210-724-19325-40142-000021E2E8#Halion#Creature-0-4210-724-19325-40142-000021E2E8#Halion#74827#Corporeality#BUFF#nil", -- [908]

Also, UPDATE_UI_WIDGET fires less and already does the work of not having to check all the different Ids. Lastly, there's the cpu overhead of CLEU. I will convert to widget api for now, but let me know if CLEU is something you prefer maintaining (vs widget)

MysticalOS commented 8 months ago

yeah widget is probably cleaner, but was just presenting two options. as for CLEU overhead, the fortunate thing here is DBM is already using CLEU and only generates args table on spellIds that are registered to boot, so it's not adding extra overhead really.

The irony here is that most users will load up a weak aura on top of DBM that actually does waste performance by adding yet another CLEU parsing source to tell them same thing DBM is. (for some reason classic players are now obsessed with having duplicate weak auras)

So do whatever is easiest.

Zidras commented 8 months ago

and Classic

  ["UPDATE_UI_WIDGET"] = {
      "<243.69 02:11:26> [UPDATE_UI_WIDGET] widgetID:3940, widgetType:0, widgetSetID:1, state:0, widgetTag:, orderIndex:272, dynamicTooltip:Halion's corporeality in this dimension, hasTimer:false, text:Halion's corporeality: 50%, textureKitID:0, tooltip:Halion's corporeality in this dimension", -- [1]
      "<243.69 02:11:26> [UPDATE_UI_WIDGET] widgetID:3940, state:1", -- [2]
      "<258.72 02:11:41> [UPDATE_UI_WIDGET] widgetID:3941, widgetType:0, widgetSetID:1, state:1, widgetTag:, orderIndex:273, dynamicTooltip:Halion's corporeality in this dimension, hasTimer:false, text:Halion's corporeality: 60%, textureKitID:0, tooltip:Halion's corporeality in this dimension", -- [3]
      "<273.70 02:11:56> [UPDATE_UI_WIDGET] widgetID:3941, text:Halion's corporeality: 50%", -- [4]
      "<288.71 02:12:11> [UPDATE_UI_WIDGET] widgetID:3941, text:Halion's corporeality: 60%", -- [5]
      "<303.71 02:12:26> [UPDATE_UI_WIDGET] widgetID:3941, text:Halion's corporeality: 70%", -- [6]
      "<318.71 02:12:41> [UPDATE_UI_WIDGET] widgetID:3941, text:Halion's corporeality: 80%", -- [7]
      "<323.29 02:12:46> [UPDATE_UI_WIDGET] widgetID:3941, state:0", -- [8]
      "<323.29 02:12:46> [UPDATE_UI_WIDGET] widgetID:3941, text:Halion's corporeality: 0%", -- [9]
  },

RubyClassic.zip

Although this I don't understand. it has 2 IDs? 3940 and 3941?

MysticalOS commented 8 months ago

that's classic for you. instead of using cleaner retail code they often changed to new IDs, multiple Ids, or just weird code.

reminds me of black temple all over again. they decided to nil out the stack arg (3)...then add a new stack arg at like 16 because reasons. the things they do boggle me sometimes.

Short answer, no idea why classic is using more than 1 ID, it just is :D

Zidras commented 8 months ago

hmm, I'll surrender to CLEU then. easier to debug with public combat logs if something changes in the future... I don't have enough data nor classic api knowledge to play the guessing game with Blizz

Zidras commented 8 months ago

dps-voices.zip

Zidras commented 8 months ago

PR ready for review. Couple of considerations for reviewer:

  1. Widget approach left commented out. Codewise, it would make more sense to go for this method, since widget text is a direct string match and, according to the provided transcriptor logs, the events are adequate and fire when expected. There is also a bonus of accounting for realm switching with no additional code, since blizz will fire the WIDGET update event. The only drawback I found is in classic, where the log showed two posssible Widget IDs, so there is something else at play here which may break in the future, or current implementation may not catch all possible cases.

  2. CLEU approach requires more code, since it needs a corporeality map, checking if player is in Twilight Realm and checking SAA source npcID since CLEU catches both events cross realm. For the moment, it DOES NOT account for player switching realms (which would probably require wrapping the entire check in a local function and fire it on updateBossDistance to invert corporeality and fire the proper SA+voice.

MysticalOS commented 8 months ago

Conflicts also need resolving basically missing rebase from my latest halion fixes

MysticalOS commented 8 months ago

I have my won idea for how to clean up the code for it all around to solve remaining issues and make it prettier, so gonna go ahead and merge it now and then implement my idea for you to review :D