Jump to content

CHAT_MSG_SYSTEM


Weer36

Recommended Posts

using robotManager.Helpful;
using System;
using System.Collections.Generic;
using wManager.Plugin;
using wManager.Wow.Helpers;

public class Main : IPlugin
{
   
    public void Initialize()
    {
        EventsLuaWithArgs.OnEventsLuaStringWithArgs += ChatEvent;
    }

    public void Dispose()
    {
        EventsLuaWithArgs.OnEventsLuaStringWithArgs -= ChatEvent;
    }

    public void Settings()
    {
        throw new NotImplementedException();
    }

    private static void ChatEvent(String EventName, List<String> Args)
    {
        if(EventName.ToString() == "CHAT_MSG_SYSTEM")
        {
            for (int i = 0; i < Args.Count -1; i++)
            {
                Logging.WriteDebug($"Args{i} = {Args[i].ToString()}");
            }
        }
    }
}

try this.

Main.cs

Link to comment
Share on other sites

tyvm!

btw,

EventsLuaWithArgs.OnEventsLuaStringWithArgs += ChatEvent;

can't work, but EventsLuaWithArgs.OnEventsLuaStringWithArgs += (e, a) => {}; with same procedure code works fine. I'm confuzed )

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...