Exemplo n.º 1
0
        public WorldManager(NetHandler netHandler)
        {
            netHandler.AddPacketHandler(PacketType.LOGIN, this.Handle_PlayerLogin);
            netHandler.AddPacketHandler(PacketType.REGISTER, this.Handle_PlayerRegister);
            netHandler.AddPacketHandler(PacketType.PLAYER_MSG, this.Handle_PlayerMessage);
            netHandler.AddPacketHandler(PacketType.QUIT_GAME, this.Handle_QuitGame);
            netHandler.ConnectionLost += Player_Connection_Lost;

            _maps = new WorldDictionary <string, Map>();
        }
        public CommandHandler(NetHandler netHandler)
        {
            netHandler.AddPacketHandler(PacketType.CLIENT_COMMAND, this.Handle_ClientCommand);

            _scriptedCommandHandlers = new Dictionary <string, List <ScriptAction> >();
        }