private long DispatchActorId(Session session, ushort opcode)
        {
            AppType appType = MessageHelper.Get(opcode);
            long    actorId = 0L;
            var     sessionPlayerComponent = session.GetComponent <SessionPlayerComponent>();

            if (sessionPlayerComponent == null)
            {
                Log.Warning($"OuterMessageDispatcher.DispatchActorId actorId is zero. appType: {appType}, opcode: {opcode}");
                return(actorId);
            }

            Player player = sessionPlayerComponent.Player;

            switch (appType)
            {
            case AppType.Lobby:
                actorId = player.uid;
                break;

            case AppType.Map:
                actorId = player.mapUnitId;
                break;

            default:
                actorId = 0L;
                break;
            }

            if (actorId == 0L)
            {
                Log.Warning($"OuterMessageDispatcher.DispatchActorId actorId is zero. appType: {appType}, opcode: {opcode}");
            }
            return(actorId);
        }