RunUO Community

This is a sample guest message. Register a free account today to become a member! Once signed in, you'll be able to participate on this site by adding your own topics and posts, as well as connect with other members through your own private inbox!

Support in core for user calls.

MarciXs

Sorceror
Support in core for user calls.

How about a delegate in core, to which you could tie your methods ?
Like
public delegate void CoreMethodHandler();

and then in the core add a
public static CoreMethodHandler UserMethods;

then add it just after the ScriptCompiler has done everything.
like, UserMethods();

I would appreciate it ... I mean, It would really allow to build few things, that aren't possible without this. Well, maybe they are, however. There are few issues. And the workaround is either to modify the core, which is not something I would want to do... or just look for workaround.
So yeah, the point of this?

In your scripts you could do something like Server.Core.UserMethods += new CoreMethodHandler(myMethod);

public static void myMethod()
{
// Do something you want to do..

}
You could get a chance to modify stuff or run within the core this way, well not exactly run. But modify variables that you normally couldn't...
Thanks.
 

MarciXs

Sorceror
Well, most of what I'm doing now is more or less core side. I used to modify core for my needs, now I just do scripts that do the same thing.
But anyways. I found the workaround I needed. Without what I asked for.
Oh and I spoke to Mark yesterday. And I found out that there is exact thing already that I asked for. A delegate, to which you can attach your methods...
So basically, everything I need is already there. So at the end of the day I've asked for something that is already there.

Sorry.
 
Top