private void Handle_FriendStatus(WoWReader wr) { FriendsListItem friendStatus = new FriendsListItem(); friendStatus.guid = new WoWGuid(wr.ReadUInt64()); friendStatus.online = wr.ReadBoolean(); BoogieCore.Player.friendStatusUpdate(friendStatus); }
// Update status of a Friend on our Friends List public void friendStatusUpdate(FriendsListItem f) { // Find friend in friends list, and update online status. for (int i = 0; i < friendsList.Length; i++) { if (friendsList[i].guid.GetOldGuid() == f.guid.GetOldGuid()) { friendsList[i].online = f.online; return; } } }
private void Handle_FriendsList(WoWReader wr) { byte count = wr.ReadByte(); FriendsListItem[] friendsList = new FriendsListItem[count]; for (int i = 0; i < count; i++) { friendsList[i] = new FriendsListItem(); friendsList[i].guid = new WoWGuid(wr.ReadUInt64()); friendsList[i].online = wr.ReadBoolean(); QueryName(friendsList[i].guid); } BoogieCore.Player.setFriendList(friendsList); }
// Initialize Friends List, from the list recieved from the WorldServer public void setFriendList(FriendsListItem[] fl) { friendsList = fl; }