예제 #1
0
 public static KeyValuePair <string, object>[] GetAllPartyAttributes(PartyId partyId)
 {
     if (partyId == null)
     {
         return(new KeyValuePair <string, object> [0]);
     }
     string[] array;
     BattleNet.GetAllPartyAttributes(partyId.ToEntityId(), out array);
     KeyValuePair <string, object>[] array2 = new KeyValuePair <string, object> [array.Length];
     for (int i = 0; i < array2.Length; i++)
     {
         string text  = array[i];
         object value = null;
         long?  partyAttributeLong = BnetParty.GetPartyAttributeLong(partyId, text);
         if (partyAttributeLong != null)
         {
             value = partyAttributeLong;
         }
         string partyAttributeString = BnetParty.GetPartyAttributeString(partyId, text);
         if (partyAttributeString != null)
         {
             value = partyAttributeString;
         }
         byte[] partyAttributeBlob = BnetParty.GetPartyAttributeBlob(partyId, text);
         if (partyAttributeBlob != null)
         {
             value = partyAttributeBlob;
         }
         array2[i] = new KeyValuePair <string, object>(text, value);
     }
     return(array2);
 }