示例#1
0
        public async Task RemoveFromParty(string partyName, string playerData)
        {
            await Groups.RemoveFromGroupAsync(Context.ConnectionId, partyName);

            if (!await _partyHandler.RemoveFromPartyAsync(partyName.Split(':')[1], playerData))
            {
                throw new HubException("Failed To Remove Member From Group");
            }
            ;

            await Clients.OthersInGroup(partyName).SendAsync("RemovePlayerFromParty", playerData);
        }