//public IEnumerable<PartyMember> GetPartyMembers() //{ // IEnumerable<PartyMember> enumerable; // try // { // XDRPCStructArgumentInfo<XPARTY_USER_LIST> partyUserList = this.GetPartyUserList(); // List<PartyMember> list = new List<PartyMember>(); // for (int i = 0; i < partyUserList.Value.dwUserCount; i++) // { // byte[] destinationArray = new byte[120]; // Array.Copy(partyUserList.Value.Users, i * 120, destinationArray, 0, destinationArray.Length); // XPARTY_USER_INFO xparty_user_info = new XPARTY_USER_INFO(); // XDRPCStructArgumentInfo<XPARTY_USER_INFO> info2 = new XDRPCStructArgumentInfo<XPARTY_USER_INFO>(xparty_user_info, ArgumentType.Out); // info2.UnpackBufferData(destinationArray); // bool isLocal = (info2.Value.dwFlags & 1) > 0; // PartyMember item = new PartyMember(info2.Value.GamerTag, info2.Value.Xuid, isLocal, (UserIndex)info2.Value.dwUserIndex); // list.Add(item); // } // enumerable = list; // } // catch (XDRPCException exception) // { // throw new ProfilesException(exception); // } // return enumerable; //} static public void GetPartyMembers(XDevkit.IXboxConsole xbc) { //XPARTY_USER_LIST partyUserList = GetPartyUserList(xbc); XDRPCStructArgumentInfo <XPARTY_USER_LIST> partyUserList = GetPartyUserList(xbc); int Count = partyUserList.Value.dwUserCount; //pUtil.Bitswap32(partyUserList.Value.dwUserCount); if (Count > 8) { return; } PartyUsersCount = Count; for (int i = 0; i < Count; i++) { byte[] destinationArray = new byte[120]; Array.Copy(partyUserList.Value.Users, i * 120, destinationArray, 0, destinationArray.Length); XPARTY_USER_INFO xparty_user_info = new XPARTY_USER_INFO(); XDRPCStructArgumentInfo <XPARTY_USER_INFO> info2 = new XDRPCStructArgumentInfo <XPARTY_USER_INFO>(xparty_user_info, ArgumentType.Out); info2.UnpackBufferData(destinationArray); ListGamerTags[i] = info2.Value.GamerTag; ListSXuid[i] = info2.Value.Xuid.ToString("X16"); ListLXuid[i] = info2.Value.Xuid; } }
public static void GetPartyMembers(XDevkit.IXboxConsole xbc) { XPARTY_USER_LIST partyUserList = GetPartyUserList(xbc); int Count = pUtil.Bitswap32(partyUserList.dwUserCount); if (Count > 8) return; PartyUsersCount = Count; for (int i = 0; i < Count; i++) { byte[] destinationArray = new byte[120]; Array.Copy(partyUserList.Users, i * 120, destinationArray, 0, destinationArray.Length); XPARTY_USER_INFO xparty_user_info = new XPARTY_USER_INFO(); XDRPCStructArgumentInfo<XPARTY_USER_INFO> info2 = new XDRPCStructArgumentInfo<XPARTY_USER_INFO>(xparty_user_info, ArgumentType.Out); info2.UnpackBufferData(destinationArray); ListGamerTags[i] = info2.Value.GamerTag; ListSXuid[i] = info2.Value.Xuid.ToString("X16"); ListLXuid[i] = info2.Value.Xuid; } }