• Visit Rebornbuddy
  • Enemy ability usage detection

    Discussion in 'Community Developer Forum' started by bobbarker69, Oct 9, 2019.

    1. bobbarker69

      bobbarker69 New Member

      Joined:
      Jul 14, 2018
      Messages:
      2
      Likes Received:
      0
      Trophy Points:
      1
      I know how to check for spells that are being casted via target.IsCasting and target.SpellCastInfo etc. How do I detect an instant casted ability though that had no cast bar?

      Edit: Plan B could be to read the battle chat log for "Enemy uses Ability Name". Is this possible?
       
      Last edited: Oct 10, 2019
    2. mastahg

      mastahg Administrator Staff Member

      Joined:
      Feb 27, 2011
      Messages:
      4,175
      Likes Received:
      207
      Trophy Points:
      63
      The only way would be to look at the game log.

      To find the messages while developing you can use.
      Code:
      
      ClearLog();
      foreach(var item in GamelogManager.CurrentBuffer)
      {
      Log(item.FullLine);
      }
      
      
      But after that I would use the

      Code:
      GamelogManager.MessageRecevied
      
      event handler so to process the messages.

      The MessageType enum might be missing the id you need but you can just use the ushort value.
       

    Share This Page