private static void CSConfig() { _Parent0x1A = OutgoingPacketOverrides.GetHandler(0x1A); _Parent0xF3 = OutgoingPacketOverrides.GetHandler(0xF3); OutgoingPacketOverrides.Register(0x1A, true, HandleWorldItem); OutgoingPacketOverrides.Register(0xF3, true, HandleWorldItemSAHS); }
public static void Configure() { EventSink.Logout += OnLogoutImpl; EventSink.Disconnected += OnDisconnectedImpl; EventSink.Speech += OnSpeechImpl; EventSink.Movement += OnMovementImpl; NetState.GumpCap = 1024; VitaNexCore.OnConfigured += () => { OutgoingPacketOverrides.Register(0xB0, true, OnEncode0xB0_0xDD); OutgoingPacketOverrides.Register(0xDD, true, OnEncode0xB0_0xDD); }; }
private static void CMConfig() { EquipItemRequestParent = PacketHandlers.GetHandler(0x13); DropItemRequestParent = PacketHandlers.GetHandler(0x08); DropItemRequestParent6017 = PacketHandlers.Get6017Handler(0x08); EquipItemParent = OutgoingPacketOverrides.GetHandler(0x2E); PacketHandlers.Register(0x13, 10, true, EquipItemRequest); //PacketHandlers.Register6017(0x13, 10, true, EquipItemRequest6017); PacketHandlers.Register(0x08, 14, true, DropItemRequest); PacketHandlers.Register6017(0x08, 15, true, DropItemRequest6017); OutgoingPacketOverrides.Register(0x2E, true, EquipItem); }
public static void Configure() { if (Configured) { return; } DisplayRetroBoot(); CommandUtility.Register("VNC", AccessLevel.Administrator, OnCoreCommand); OutgoingPacketOverrides.Init(); ExtendedOPL.Init(); DateTime now = DateTime.UtcNow; ToConsole(String.Empty); ToConsole("Compile action started..."); TryCatch(CompileServices, ToConsole); TryCatch(CompileModules, ToConsole); Compiled = true; if (OnCompiled != null) { TryCatch(OnCompiled, ToConsole); } double time = (DateTime.UtcNow - now).TotalSeconds; ToConsole("Compile action completed in {0:F2} second{1}", time, (time != 1) ? "s" : String.Empty); now = DateTime.UtcNow; ToConsole(String.Empty); ToConsole("Configure action started..."); TryCatch(ConfigureServices, ToConsole); TryCatch(ConfigureModules, ToConsole); Configured = true; if (OnConfigured != null) { TryCatch(OnConfigured, ToConsole); } time = (DateTime.UtcNow - now).TotalSeconds; ToConsole("Configure action completed in {0:F2} second{1}", time, (time != 1) ? "s" : String.Empty); ProcessINIT(); EventSink.ServerStarted += () => { EventSink.WorldSave += e => { TryCatch(Backup, ToConsole); TryCatch(Save, ToConsole); }; EventSink.Shutdown += e => TryCatch(Dispose, ToConsole); EventSink.Crashed += e => TryCatch(Dispose, ToConsole); }; }
public static void Configure() { if (Configured) { return; } DisplayRetroBoot(); CommandUtility.Register("VNC", AccessLevel.Administrator, OnCoreCommand); OutgoingPacketOverrides.Init(); ExtendedOPL.Init(); var now = DateTime.UtcNow; ToConsole(String.Empty); ToConsole("Compile action started..."); TryCatch(CompileServices, ToConsole); TryCatch(CompileModules, ToConsole); Compiled = true; InvokeByPriority(OnCompiled); var time = (DateTime.UtcNow - now).TotalSeconds; ToConsole("Compile action completed in {0:F2} second{1}", time, (time != 1) ? "s" : String.Empty); now = DateTime.UtcNow; ToConsole(String.Empty); ToConsole("Configure action started..."); TryCatch(ConfigureServices, ToConsole); TryCatch(ConfigureModules, ToConsole); Configured = true; InvokeByPriority(OnConfigured); time = (DateTime.UtcNow - now).TotalSeconds; ToConsole("Configure action completed in {0:F2} second{1}", time, (time != 1) ? "s" : String.Empty); ProcessINIT(); EventSink.ServerStarted += () => { EventSink.WorldSave += e => { TryCatch(Backup, ToConsole); TryCatch(Save, ToConsole); }; EventSink.Shutdown += e => TryCatch(Dispose, ToConsole); EventSink.Crashed += e => TryCatch(Dispose, ToConsole); }; try { var crashed = typeof(EventSink).GetEventDelegates("Crashed"); foreach (var m in crashed.OfType <CrashedEventHandler>()) { EventSink.Crashed -= m; } EventSink.Crashed += e => Crashed = true; foreach (var m in crashed.OfType <CrashedEventHandler>()) { EventSink.Crashed += m; } } catch (Exception x) { ToConsole(x); EventSink.Crashed += e => Crashed = true; } }