Blaze.Server.PlayerJoinCompletedNotification.Notify C# (CSharp) Метод

Notify() публичный статический Метод

public static Notify ( Client client, ulong gameID, ulong personaID ) : void
client Client
gameID ulong
personaID ulong
Результат void
        public static void Notify(Client client, ulong gameID, ulong personaID)
        {
            //var game = GameManager.Games[client.GameID];
            //var gameClient = BlazeServer.Clients[game.ClientID];

            var data = new List<Tdf>
            {
                //new TdfInteger("GID", client.GameID),
                //new TdfInteger("PID", (client.Type == ClientType.GameplayUser) ? gameClient.User.ID : client.User.ID)
                new TdfInteger("GID", gameID),
                new TdfInteger("PID", personaID)
            };

            client.Notify(Component.GameManager, 0x1E, 0, data);
        }
    }

Usage Example

        public static void HandleRequest(Request request)
        {
            Log.Info(string.Format("Client {0} updating mesh connection", request.Client.ID));

            var gameID = (TdfInteger)request.Data["GID"];

            var targ     = (TdfList)request.Data["TARG"];
            var targData = (List <Tdf>)targ.List[0];
            var playerID = (TdfInteger)targData[1];
            var stat     = (TdfInteger)targData[2];

            request.Reply();

            if (stat.Value == 2)
            {
                if (request.Client.Type == ClientType.GameplayUser)
                {
                    GamePlayerStateChangeNotification.Notify(request.Client, gameID.Value, request.Client.User.ID);
                    PlayerJoinCompletedNotification.Notify(request.Client, gameID.Value, request.Client.User.ID);
                }
                else if (request.Client.Type == ClientType.DedicatedServer)
                {
                    GamePlayerStateChangeNotification.Notify(request.Client, gameID.Value, playerID.Value);
                    PlayerJoinCompletedNotification.Notify(request.Client, gameID.Value, playerID.Value);
                }
            }
            else if (stat.Value == 0)
            {
                if (request.Client.Type == ClientType.GameplayUser)
                {
                    var game = GameManager.Games[gameID.Value];
                    game.Slots.Remove(playerID.Value);

                    PlayerRemovedNotification.Notify(request.Client, playerID.Value);
                }
                else if (request.Client.Type == ClientType.DedicatedServer)
                {
                    var game = GameManager.Games[gameID.Value];
                    game.Slots.Remove(playerID.Value);

                    PlayerRemovedNotification.Notify(request.Client, playerID.Value);
                }
            }
        }
PlayerJoinCompletedNotification