From 27c5c5647ea9d9d138f44cc763db0165396d913f Mon Sep 17 00:00:00 2001 From: Hondacrx Date: Thu, 28 Aug 2025 22:39:22 -0400 Subject: [PATCH] Core/Realmlist: Fixes getting disconnected when trying to switch realms. --- Source/Game/Services/GameUtilitiesService.cs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Source/Game/Services/GameUtilitiesService.cs b/Source/Game/Services/GameUtilitiesService.cs index 9dc0b63da..452f70fc4 100644 --- a/Source/Game/Services/GameUtilitiesService.cs +++ b/Source/Game/Services/GameUtilitiesService.cs @@ -24,7 +24,7 @@ namespace Game Dictionary Params = new(); string removeSuffix(string str) { - var pos = str.IndexOf('_'); + var pos = str.LastIndexOf('_'); if (pos != -1) return str.Substring(0, pos); @@ -60,7 +60,7 @@ namespace Game [Service(OriginalHash.GameUtilitiesService, 10)] BattlenetRpcErrorCode HandleGetAllValuesForAttribute(GetAllValuesForAttributeRequest request, GetAllValuesForAttributeResponse response) { - if (!request.AttributeKey.Contains("Command_RealmListRequest_v1")) + if (request.AttributeKey.Contains("Command_RealmListRequest_v1")) { Global.RealmMgr.WriteSubRegions(response); return BattlenetRpcErrorCode.Ok;