• 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:
      7
      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:
      5,229
      Likes Received:
      364
      Trophy Points:
      83
      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.
       
    3. bobbarker69

      bobbarker69 New Member

      Joined:
      Jul 14, 2018
      Messages:
      7
      Likes Received:
      0
      Trophy Points:
      1
      This is for a combat routine I'm working on. Can you provide an example of how I should go about using GamelogManager.MessageReceived ? Everything I've worked with so far with the API has been classes and methods, never any Event stuff yet.
       
    4. mastahg

      mastahg Administrator Staff Member

      Joined:
      Feb 27, 2011
      Messages:
      5,229
      Likes Received:
      364
      Trophy Points:
      83

    Share This Page