feat: Moves network related events to UOContent using code generation (#1945)
### Summary - Moves `CharacterCreated` event to UOContent using code generated event _CharacterCreatedEvent_. - Moves `TargetByResourceMacro` event to UOContent using code generated event _TargetByResourceMacro_. - Moves `GameLogin` event to UOContent using code generated event _GameLoginEvent_. - Moves `ServerList` event to UOContent using code generated event _ServerListEvent_. - Streamlines ProfessionInfo > [!IMPORTANT] > **Developer Note** > Custom scripts that use any of these event sinks will need to be updated to use the new code generated events.
This commit is contained in:
parent
4110556e89
commit
47e16a03fe
14 changed files with 207 additions and 309 deletions
29
Projects/UOContent/Network/GameServer.cs
Normal file
29
Projects/UOContent/Network/GameServer.cs
Normal file
|
|
@ -0,0 +1,29 @@
|
|||
using ModernUO.CodeGeneratedEvents;
|
||||
|
||||
namespace Server.Network;
|
||||
|
||||
public static partial class GameServer
|
||||
{
|
||||
public class GameLoginEventArgs
|
||||
{
|
||||
public GameLoginEventArgs(NetState state, string un, string pw)
|
||||
{
|
||||
State = state;
|
||||
Username = un;
|
||||
Password = pw;
|
||||
}
|
||||
|
||||
public NetState State { get; }
|
||||
|
||||
public string Username { get; }
|
||||
|
||||
public string Password { get; }
|
||||
|
||||
public bool Accepted { get; set; }
|
||||
|
||||
public CityInfo[] CityInfo { get; set; }
|
||||
}
|
||||
|
||||
[GeneratedEvent(nameof(GameServerLoginEvent))]
|
||||
public static partial void GameServerLoginEvent(GameLoginEventArgs e);
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue