• Visit Rebornbuddy
  • How to get if a mob is cursed by Necro curse skills?

    Discussion in 'Community Developer Forum' started by apollogg, Aug 24, 2017.

    1. apollogg

      apollogg Member

      Joined:
      Apr 12, 2015
      Messages:
      101
      Likes Received:
      2
      Trophy Points:
      18
      Trinity use spell history function to see if a mob is targeted by Necro curse skills,
      But the curse can expire OR the curse skills can curse a large mount of mobs in one cast.
      So I use _debuffSlots.Any(attr => monster.CommonData.GetAttribute<bool>(attr, (int)debuffSNO)) to scan the debuffslots.
      But the functions returns false even monster is obviously cursed.

      Can devs address this bug?
       
    2. Tempest

      Tempest Active Member

      Joined:
      Nov 10, 2015
      Messages:
      181
      Likes Received:
      41
      Trophy Points:
      28
      I have bothered Nesox with the same questions about a week ago. Now I can save some of his time. You are probably using wrong SNOs. Necro debuffs use different SNOs than active spells' SNOs that are used to cast them. Debuffs SNOs are:
      SNOPower.P6_Necro_PassiveManager_Decrepify
      SNOPower.P6_Necro_PassiveManager_Frailty
      ...

      Moreover, some of the curses support is already created in NecromancerBase.cs, around lines 633 and below:

      protected bool UnitHasAnyCurse(TrinityActor actor) => NecromancerCurses.Any(actor.HasDebuff);
      protected bool UnitHasDecrepify(TrinityActor actor) => actor.HasDebuff(SNOPower.P6_Necro_PassiveManager_Decrepify);
      protected bool UnitHasFrailty(TrinityActor actor) => actor.HasDebuff(SNOPower.P6_Necro_PassiveManager_Frailty);
      protected bool UnitHasLeech(TrinityActor actor) => actor.HasDebuff(SNOPower.X1_DemonHunter_Passive_Leech);

      I am using Decrepify and Frailty and I can confirm those work fine. As for Leech, it uses weirdly named SNO (maybe Blizz just recycled something from the DH), and you will have to test it by yourself. It would be cool if you let us know your result here.
       
    3. apollogg

      apollogg Member

      Joined:
      Apr 12, 2015
      Messages:
      101
      Likes Received:
      2
      Trophy Points:
      18
      @Tempest
      You are the champion (elites)!
      I have tested what you advised.
      SNOPower.P6_Necro_PassiveManager_Decrepify
      SNOPower.P6_Necro_PassiveManager_Frailty
      is totally right.
      But SNOPower.X1_DemonHunter_Passive_Leech is not right. I simipy change it to SNOPower.P6_Necro_PassiveManager_Leech, the function returns right value, so I think Leech curse should be SNOPower.P6_Necro_PassiveManager_Leech.

      Thanks again.
       

    Share This Page