Example #1
0
 internal void Unload()
 {
     if (_integrationManager != null && Utils.IsClient())
     {
         _integrationManager.Close();
     }
     Instance            = null;
     _integrationManager = null;
     ActionManager       = null;
 }
Example #2
0
        internal void Load()
        {
            _logger.Info($"Loading mod on: {(Utils.IsClient() ? "Client": "Server")}");
            ActionManager = new ActionManager();

            _packetHandler = new PacketHandler();
            _packetHandler.RegisterPacket(0, typeof(IntegrationPacket));
            _packetHandler.RegisterPacket(1, typeof(ManaHealPacket));
            _packetHandler.RegisterPacket(2, typeof(DropItemPacket));
            _packetHandler.RegisterPacket(3, typeof(SoundPacket));
            _packetHandler.RegisterPacket(4, typeof(BuffPacket));

            if (Utils.IsClient())
            {
                _integrationManager = new IntegrationManager();
                _integrationManager.Start();
            }
        }