/* * Set Selected Friend that we want outgoing messages to whisper to * @param Username Friend Name * @param UniqueID Friends Network ID */ void SetWhisperFriend(const FText Username, TSharedPtr<const FUniqueNetId> UniqueID) { TSharedPtr<FSelectedFriend> NewFriend = FindFriend(UniqueID); if (!NewFriend.IsValid()) { NewFriend = MakeShareable(new FSelectedFriend()); NewFriend->DisplayName = Username; NewFriend->UserID = UniqueID; SetWhisperFriend(NewFriend); } }
TSharedRef<FSelectedFriend> GetRecentFriend(const FText Username, TSharedPtr<FUniqueNetId> UniqueID) { TSharedPtr<FSelectedFriend> NewFriend = FindFriend(UniqueID); if (!NewFriend.IsValid()) { NewFriend = MakeShareable(new FSelectedFriend()); NewFriend->FriendName = Username; NewFriend->UserID = UniqueID; RecentPlayerList.AddUnique(NewFriend); } return NewFriend.ToSharedRef(); }
bool CFriendList::IsAlreadyFriend( uint32 dwLastUsedIP, uint32 nLastUsedPort ) { return (FindFriend( CMD4Hash(), dwLastUsedIP, nLastUsedPort ) != NULL); }