diff --git a/GuildWarsInterface/Datastructures/Components/FriendList.cs b/GuildWarsInterface/Datastructures/Components/FriendList.cs index f7d1a05..6cf0568 100644 --- a/GuildWarsInterface/Datastructures/Components/FriendList.cs +++ b/GuildWarsInterface/Datastructures/Components/FriendList.cs @@ -38,7 +38,14 @@ public void Add(Type type, string baseCharacterName, string currentCharacterName { var newEntry = new Entry(type, baseCharacterName, currentCharacterName, playerStatus, map); - _entries.Add(newEntry.BaseCharacterName, newEntry); + if (!_entries.ContainsKey(newEntry.BaseCharacterName)) + { + _entries.Add(newEntry.BaseCharacterName, newEntry); + } + else + { + _entries[newEntry.BaseCharacterName] = newEntry; + } if (Game.State == GameState.Playing) { @@ -82,6 +89,7 @@ private static void UpdateEntry(Entry entry) { Network.AuthServer.Send(AuthServerMessage.UpdateFriendList, (uint) entry.PlayerStatus, entry.BaseCharacterName, entry.CurrentCharacterName); + //If a map was specified, show it next to name if (entry.Map != 0) { Network.AuthServer.Send(AuthServerMessage.FriendListLocationInfo, (uint) entry.Map, diff --git a/GuildWarsInterface/Networking/Network.cs b/GuildWarsInterface/Networking/Network.cs index 9d21936..5c3f3fb 100644 --- a/GuildWarsInterface/Networking/Network.cs +++ b/GuildWarsInterface/Networking/Network.cs @@ -32,4 +32,4 @@ public static void Initialize() GameServer.Start(); } } -} \ No newline at end of file +} diff --git a/GuildWarsInterface/Networking/Protocol/AuthServerMessage.cs b/GuildWarsInterface/Networking/Protocol/AuthServerMessage.cs index 3f2e3ac..0a5a003 100644 --- a/GuildWarsInterface/Networking/Protocol/AuthServerMessage.cs +++ b/GuildWarsInterface/Networking/Protocol/AuthServerMessage.cs @@ -14,4 +14,4 @@ internal enum AuthServerMessage FriendListLocationInfo = 32, Response53 = 38, } -} \ No newline at end of file +} diff --git a/GuildWarsInterface/Networking/Servers/FileServer.cs b/GuildWarsInterface/Networking/Servers/FileServer.cs index cfc8586..23e6589 100644 --- a/GuildWarsInterface/Networking/Servers/FileServer.cs +++ b/GuildWarsInterface/Networking/Servers/FileServer.cs @@ -20,9 +20,9 @@ protected override void Received(byte[] data) Send(new byte[] { 0xF1, 0x02, 0x20, 0x00, 0x6F, 0xC0, 0x05, 0x00, - 0x7E, 0xC9, 0x05, 0x00, 0x9C, 0x43, 0x05, 0x00, - 0x8C, 0xC9, 0x05, 0x00, 0x8D, 0xC9, 0x05, 0x00, - 0x8E, 0xC9, 0x05, 0x00, 0x8B, 0xC9, 0x05, 0x00 + 0xB3, 0xC9, 0x05, 0x00, 0x9C, 0x43, 0x05, 0x00, + 0xB5, 0xC9, 0x05, 0x00, 0xB6, 0xC9, 0x05, 0x00, + 0xB7, 0xC9, 0x05, 0x00, 0xB4, 0xC9, 0x05, 0x00 }); } }