Пример #1
0
        /// <summary>
        /// Handles inviting all players already in a game
        /// </summary>
        /// <param name="packet">The packet.</param>
        private void OnPlayerInGame(GameServerPacket packet)
        {
            PlayerInGameIn fromServer = new PlayerInGameIn(packet);

            if (fromServer.IsPlayerInParty)
            {
                return;
            }

            if (String.Compare(characterName, fromServer.PlayerName, System.StringComparison.OrdinalIgnoreCase) != 0)
            {
                // invite player...
                Log(string.Format("Inviting player: {0}", fromServer.PlayerName));
                SendPacket(new PartyRequestOut(PartyRequestOut.RequestType.Invite, fromServer.PlayerID));
            }
        }
        /// <summary>
        /// Handles inviting all players already in a game
        /// </summary>
        /// <param name="packet">The packet.</param>
        private void OnPlayerInGame(GameServerPacket packet)
        {
            PlayerInGameIn fromServer = new PlayerInGameIn(packet);

            if (fromServer.IsPlayerInParty)
            {
                return;
            }

            if (String.Compare(characterName, fromServer.PlayerName, System.StringComparison.OrdinalIgnoreCase) != 0)
            {
                // invite player...
                Log(string.Format("Inviting player: {0}", fromServer.PlayerName));
                SendPacket(new PartyRequestOut(PartyRequestOut.RequestType.Invite, fromServer.PlayerID));
            }
        }