public static void GetPartyAttributeString(bgs.types.EntityId partyId, string attributeKey, out string value) { BattleNet.s_impl.GetPartyAttributeString(partyId, attributeKey, out value); }
public static void ClearPartyAttribute(bgs.types.EntityId partyId, string attributeKey) { BattleNet.s_impl.ClearPartyAttribute(partyId, attributeKey); }
public static void SetPartyAttributeBlob(bgs.types.EntityId partyId, string attributeKey, [In] byte[] value) { BattleNet.s_impl.SetPartyAttributeBlob(partyId, attributeKey, value); }
public static void RequestPartyInvite(bgs.types.EntityId partyId, bgs.types.EntityId whomToAskForApproval, bgs.types.EntityId whomToInvite, string szPartyType) { BattleNet.s_impl.RequestPartyInvite(partyId, whomToAskForApproval, whomToInvite, szPartyType); }
public static void KickPartyMember(bgs.types.EntityId partyId, bgs.types.EntityId memberId) { BattleNet.s_impl.KickPartyMember(partyId, memberId); }
public static void SetPartyPrivacy(bgs.types.EntityId partyId, int privacyLevel) { BattleNet.s_impl.SetPartyPrivacy(partyId, privacyLevel); }
public static void SendPartyInvite(bgs.types.EntityId partyId, bgs.types.EntityId inviteeId, bool isReservation) { BattleNet.s_impl.SendPartyInvite(partyId, inviteeId, isReservation); }
private void RequestPresenceFieldsCallback(bgs.types.EntityId entityId, RPCContext context) { if (base.CheckRPCCallback("RequestPresenceFieldsCallback", context)) { foreach (Field fieldList in QueryResponse.ParseFrom(context.Payload).FieldList) { this.m_presenceCache.SetCache(entityId, fieldList.Key, fieldList.Value); PresenceUpdate boolValue = new PresenceUpdate() { entityId = entityId, programId = fieldList.Key.Program, groupId = fieldList.Key.Group, fieldId = fieldList.Key.Field, index = fieldList.Key.Index, boolVal = false, intVal = (long)0, stringVal = string.Empty, valCleared = false, blobVal = new byte[0] }; if (fieldList.Value.HasBoolValue) { boolValue.boolVal = fieldList.Value.BoolValue; } else if (fieldList.Value.HasIntValue) { boolValue.intVal = fieldList.Value.IntValue; } else if (!fieldList.Value.HasFloatValue) { if (fieldList.Value.HasStringValue) { boolValue.stringVal = fieldList.Value.StringValue; } else if (fieldList.Value.HasBlobValue) { boolValue.blobVal = fieldList.Value.BlobValue; } else if (fieldList.Value.HasMessageValue) { if (fieldList.Key.Field != 8) { boolValue.blobVal = fieldList.Value.MessageValue; } else { this.FetchRichPresenceResource(fieldList.Value); this.HandleRichPresenceUpdate(boolValue, fieldList.Key); } } else if (fieldList.Value.HasFourccValue) { boolValue.stringVal = (new BnetProgramId(fieldList.Value.FourccValue)).ToString(); } else if (!fieldList.Value.HasUintValue) { if (!fieldList.Value.HasEntityidValue) { boolValue.valCleared = true; } else { boolValue.entityIdVal.hi = fieldList.Value.EntityidValue.High; boolValue.entityIdVal.lo = fieldList.Value.EntityidValue.Low; } } } this.m_presenceUpdates.Add(boolValue); } } }
private bool SubstituteVariables(out string substitutedString, string originalStr, bgs.types.EntityId entityId, int recurseDepth) { int num; ulong num1; bool flag; string str; substitutedString = originalStr; int num2 = 0; Label1: while (num2 < substitutedString.Length) { num2 = substitutedString.IndexOf("$0x", num2); if (num2 != -1) { int length = num2 + "$0x".Length; int num3 = this.LastIndexOfOccurenceFromIndex(substitutedString, PresenceAPI.hexChars, length); int num4 = num3 + 1 - length; num = num3 + 1 - num2; string str1 = substitutedString.Substring(length, num4); num1 = (ulong)0; try { num1 = Convert.ToUInt64(str1, 16); goto Label0; } catch (Exception exception) { base.ApiLog.LogWarning("Failed to convert {0} to ulong when substiting rich presence variables", new object[] { str1 }); flag = false; } return(flag); } else { break; } } return(true); Label0: if (!this.ResolveRichPresenceStrings(out str, entityId, num1, recurseDepth)) { base.ApiLog.LogWarning("Failed resolve rich presence string for \"{0}\" when substiting variables in \"{1}\"", new object[] { num1, originalStr }); return(false); } string str2 = substitutedString.Substring(num2, num); substitutedString = substitutedString.Replace(str2, str); goto Label1; }
public void CopyFrom(bgs.types.EntityId id) { this.m_hi = id.hi; this.m_lo = id.lo; }
public void HandlePresenceUpdates(ChannelState channelState, ChannelAPI.ChannelReferenceObject channelRef) { bgs.types.EntityId high = new bgs.types.EntityId(); high.hi = channelRef.m_channelData.m_channelId.High; high.lo = channelRef.m_channelData.m_channelId.Low; FieldKey fieldKey = new FieldKey(); fieldKey.SetProgram(BnetProgramId.BNET.GetValue()); fieldKey.SetGroup(1); fieldKey.SetField(3); FieldKey fieldKey1 = fieldKey; List <PresenceUpdate> presenceUpdates = new List <PresenceUpdate>(); foreach (FieldOperation fieldOperationList in channelState.FieldOperationList) { if (fieldOperationList.Operation != FieldOperation.Types.OperationType.CLEAR) { this.m_presenceCache.SetCache(high, fieldOperationList.Field.Key, fieldOperationList.Field.Value); } else { this.m_presenceCache.SetCache(high, fieldOperationList.Field.Key, null); } PresenceUpdate boolValue = new PresenceUpdate() { entityId = high, programId = fieldOperationList.Field.Key.Program, groupId = fieldOperationList.Field.Key.Group, fieldId = fieldOperationList.Field.Key.Field, index = fieldOperationList.Field.Key.Index, boolVal = false, intVal = (long)0, stringVal = string.Empty, valCleared = false, blobVal = new byte[0] }; if (fieldOperationList.Operation == FieldOperation.Types.OperationType.CLEAR) { boolValue.valCleared = true; bool program = fieldKey1.Program == fieldOperationList.Field.Key.Program; bool group = fieldKey1.Group == fieldOperationList.Field.Key.Group; bool field = fieldKey1.Field == fieldOperationList.Field.Key.Field; if (program && group && field) { BnetEntityId bnetEntityId = BnetEntityId.CreateFromEntityId(boolValue.entityId); this.m_battleNet.Friends.RemoveFriendsActiveGameAccount(bnetEntityId, fieldOperationList.Field.Key.Index); } } else if (fieldOperationList.Field.Value.HasBoolValue) { boolValue.boolVal = fieldOperationList.Field.Value.BoolValue; } else if (fieldOperationList.Field.Value.HasIntValue) { boolValue.intVal = fieldOperationList.Field.Value.IntValue; } else if (fieldOperationList.Field.Value.HasStringValue) { boolValue.stringVal = fieldOperationList.Field.Value.StringValue; } else if (fieldOperationList.Field.Value.HasFourccValue) { boolValue.stringVal = (new BnetProgramId(fieldOperationList.Field.Value.FourccValue)).ToString(); } else if (fieldOperationList.Field.Value.HasEntityidValue) { boolValue.entityIdVal.hi = fieldOperationList.Field.Value.EntityidValue.High; boolValue.entityIdVal.lo = fieldOperationList.Field.Value.EntityidValue.Low; bool flag = fieldKey1.Program == fieldOperationList.Field.Key.Program; bool group1 = fieldKey1.Group == fieldOperationList.Field.Key.Group; bool field1 = fieldKey1.Field == fieldOperationList.Field.Key.Field; if (flag && group1 && field1) { BnetEntityId bnetEntityId1 = BnetEntityId.CreateFromEntityId(boolValue.entityId); this.m_battleNet.Friends.AddFriendsActiveGameAccount(bnetEntityId1, fieldOperationList.Field.Value.EntityidValue, fieldOperationList.Field.Key.Index); } } else if (fieldOperationList.Field.Value.HasBlobValue) { boolValue.blobVal = fieldOperationList.Field.Value.BlobValue; } else if (!fieldOperationList.Field.Value.HasMessageValue) { continue; } else if (fieldOperationList.Field.Key.Field != 8) { continue; } else { this.FetchRichPresenceResource(fieldOperationList.Field.Value); this.HandleRichPresenceUpdate(boolValue, fieldOperationList.Field.Key); continue; } presenceUpdates.Add(boolValue); } presenceUpdates.Reverse(); this.m_presenceUpdates.AddRange(presenceUpdates); }
public static void GetPartySentInvites(bgs.types.EntityId partyId, out PartyInvite[] invites) { BattleNet.s_impl.GetPartySentInvites(partyId, out invites); }
public static void GetPartyMembers(bgs.types.EntityId partyId, out bgs.types.PartyMember[] members) { BattleNet.s_impl.GetPartyMembers(partyId, out members); }
public static void GetPartyInviteRequests(bgs.types.EntityId partyId, out InviteRequest[] requests) { BattleNet.s_impl.GetPartyInviteRequests(partyId, out requests); }
public static void LeaveParty(bgs.types.EntityId partyId) { BattleNet.s_impl.LeaveParty(partyId); }
public static void RequestPresenceFields(bool isGameAccountEntityId, [In] bgs.types.EntityId entityId, [In] PresenceFieldKey[] fieldList) { BattleNet.s_impl.RequestPresenceFields(isGameAccountEntityId, entityId, fieldList); }
public static void DissolveParty(bgs.types.EntityId partyId) { BattleNet.s_impl.DissolveParty(partyId); }
public static void SendFriendlyChallengeInvite(ref bgs.types.EntityId gameAccount, int scenarioId) { BattleNet.s_impl.SendFriendlyChallengeInvite(ref gameAccount, scenarioId); }
public static void AssignPartyRole(bgs.types.EntityId partyId, bgs.types.EntityId memberId, uint roleId) { BattleNet.s_impl.AssignPartyRole(partyId, memberId, roleId); }
public static void SetPartyDeck(ref bgs.types.EntityId partyId, long deckID) { BattleNet.s_impl.SetMyFriendlyChallengeDeck(ref partyId, deckID); }
public static void RevokePartyInvite(bgs.types.EntityId partyId, ulong invitationId) { BattleNet.s_impl.RevokePartyInvite(partyId, invitationId); }
public static void DeclineFriendlyChallenge(ref bgs.types.EntityId partyId) { BattleNet.s_impl.DeclineFriendlyChallenge(ref partyId); }
public static void IgnoreInviteRequest(bgs.types.EntityId partyId, bgs.types.EntityId requestedTargetId) { BattleNet.s_impl.IgnoreInviteRequest(partyId, requestedTargetId); }
public static void AcceptFriendlyChallenge(ref bgs.types.EntityId partyId) { BattleNet.s_impl.AcceptFriendlyChallenge(ref partyId); }
public static void SendPartyChatMessage(bgs.types.EntityId partyId, string message) { BattleNet.s_impl.SendPartyChatMessage(partyId, message); }
public static void RescindFriendlyChallenge(ref bgs.types.EntityId partyId) { BattleNet.s_impl.RescindFriendlyChallenge(ref partyId); }
public static void SetPartyAttributeString(bgs.types.EntityId partyId, string attributeKey, [In] string value) { BattleNet.s_impl.SetPartyAttributeString(partyId, attributeKey, value); }
public static void JoinParty(bgs.types.EntityId partyId, string partyType) { BattleNet.s_impl.JoinParty(partyId, partyType); }
public static int GetPartyPrivacy(bgs.types.EntityId partyId) { return(BattleNet.s_impl.GetPartyPrivacy(partyId)); }
public static bool GetPartyAttributeLong(bgs.types.EntityId partyId, string attributeKey, out long value) { return(BattleNet.s_impl.GetPartyAttributeLong(partyId, attributeKey, out value)); }