Jump to content

Testing Return Values of Anticipated Code


cgeorg13

Recommended Posts

Hello,

I've been looking into writing my own plugin and have found that it is extremely hard if I can't test some of the functions I'm wanting to use (such as, ObjectManager.GetUnitAttackPlayer()).

I've been looking into the development tool and saw the 'C# (ret value in wManager.DevelopmentTools.OutPutCSharp)' button but have no idea what that does or how to use it although I feel like this is what I'm looking for lol.

So, officially my question is, how can I test return values of functions I want to use?

Link to comment
Share on other sites

  • 1 month later...

Hello, you can test code return value in development tools like this:

        var o = wManager.Wow.ObjectManager.ObjectManager.GetUnitAttackPlayer();
        if (o.Count > 0)
        {
            wManager.DevelopmentTools.OutPutCSharp = o[0].Name + " Distance: " + o[0].GetDistance.ToString();
        }

 

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...