public void OnLeaveGame(AgentGameProto.LeaveGameRequest request, long clientId) { if (_clientRoleDict.TryGetValue(clientId, out var roleId)) { Items.Remove(roleId); _clientRoleDict.Remove(clientId); } }
public void OnLeaveGame(AgentGameProto.LeaveGameRequest request, long clientId) { RemoveItem(request.UserId); var timeoutLinker = _userTimeoutLinker.GetValueOrDefault(clientId); if (timeoutLinker != null) { timeoutLinker.Valid = false; _userTimeoutLinker.Remove(clientId); } _userTick.Remove(clientId); }