internal SteamPartyInvite(CMsgClientUDSInviteToGame msg) { result = msg; }
/// <summary> /// Handles a client message. This should not be called directly. /// </summary> /// <param name="packetMsg">The packet message that contains the data.</param> public override void HandleMsg(IPacketMsg packetMsg) { if (packetMsg.MsgType == EMsg.ClientFromGC) { var msg = new ClientMsgProtobuf<CMsgGCClient>(packetMsg); if (msg.Body.appid == (uint)GameID) { IPacketGCMsg gcmsg = GetPacketGCMsg(msg.Body.msgtype, msg.Body.payload); var messageMap = new Dictionary<uint, Action<IPacketGCMsg>> { {(uint) EGCBaseClientMsg.k_EMsgGCClientWelcome, HandleWelcome}, {(uint) EDOTAGCMsg.k_EMsgGCPracticeLobbyJoinResponse, HandlePracticeLobbyJoinResponse}, {(uint) EDOTAGCMsg.k_EMsgGCPracticeLobbyListResponse, HandlePracticeLobbyListResponse}, {(uint) ESOMsg.k_ESOMsg_CacheSubscribed, HandleCacheSubscribed}, {(uint) ESOMsg.k_ESOMsg_CacheUnsubscribed, HandleCacheUnsubscribed}, {(uint) ESOMsg.k_ESOMsg_Destroy, HandleCacheDestroy}, {(uint) EGCBaseClientMsg.k_EMsgGCPingRequest, HandlePingRequest}, {(uint) EDOTAGCMsg.k_EMsgGCJoinChatChannelResponse, HandleJoinChatChannelResponse}, {(uint) EDOTAGCMsg.k_EMsgGCChatMessage, HandleChatMessage}, {(uint) EDOTAGCMsg.k_EMsgGCOtherJoinedChannel, HandleOtherJoinedChannel}, {(uint) EDOTAGCMsg.k_EMsgGCOtherLeftChannel, HandleOtherLeftChannel}, {(uint) ESOMsg.k_ESOMsg_UpdateMultiple, HandleUpdateMultiple}, {(uint) EDOTAGCMsg.k_EMsgGCPopup, HandlePopup}, {(uint) EDOTAGCMsg.k_EMsgDOTALiveLeagueGameUpdate, HandleLiveLeageGameUpdate}, {(uint) EGCBaseMsg.k_EMsgGCInvitationCreated, HandleInvitationCreated}, {(uint) EDOTAGCMsg.k_EMsgGCMatchDetailsResponse, HandleMatchDetailsResponse}, {(uint) EGCBaseClientMsg.k_EMsgGCClientConnectionStatus, HandleConnectionStatus}, {(uint) EDOTAGCMsg.k_EMsgGCProTeamListResponse, HandleProTeamList}, {(uint) EDOTAGCMsg.k_EMsgGCFantasyLeagueInfo, HandleFantasyLeagueInfo}, {(uint) EDOTAGCMsg.k_EMsgGCPlayerInfo, HandlePlayerInfo}, {(uint) EDOTAGCMsg.k_EMsgGCProfileResponse, HandleProfileResponse }, {(uint) EDOTAGCMsg.k_EMsgGCGuildSetAccountRoleResponse , HandleGuildAccountRoleResponse }, {(uint) EDOTAGCMsg.k_EMsgGCGuildInviteAccountResponse, HandleGuildInviteAccountResponse }, {(uint) EDOTAGCMsg.k_EMsgGCGuildCancelInviteResponse, HandleGuildCancelInviteResponse }, {(uint) EDOTAGCMsg.k_EMsgGCGuildData, HandleGuildData }, }; Action<IPacketGCMsg> func; if (!messageMap.TryGetValue(gcmsg.MsgType, out func)) { Client.PostCallback(new UnhandledDotaGCCallback(gcmsg)); return; } func(gcmsg); } } else { if (packetMsg.IsProto && packetMsg.MsgType == EMsg.ClientUDSInviteToGame) { var msg = new ClientMsgProtobuf<CMsgClientUDSInviteToGame>(packetMsg); Invitation = msg.Body; Client.PostCallback(new SteamPartyInvite(Invitation)); } else switch (packetMsg.MsgType) { case EMsg.ClientAuthListAck: { var msg = new ClientMsgProtobuf<CMsgClientAuthListAck>(packetMsg); Client.PostCallback(new AuthListAck(msg.Body)); } break; case EMsg.ClientOGSBeginSessionResponse: { var msg = new ClientMsg<MsgClientOGSBeginSessionResponse>(packetMsg); Client.PostCallback(new BeginSessionResponse(msg.Body)); } break; } } }