Core/Realmlist: Fixes getting disconnected when trying to switch realms.

This commit is contained in:
Hondacrx
2025-08-28 22:39:22 -04:00
parent 431faefbcb
commit 27c5c5647e
+2 -2
View File
@@ -24,7 +24,7 @@ namespace Game
Dictionary<string, Bgs.Protocol.Variant> Params = new(); Dictionary<string, Bgs.Protocol.Variant> Params = new();
string removeSuffix(string str) string removeSuffix(string str)
{ {
var pos = str.IndexOf('_'); var pos = str.LastIndexOf('_');
if (pos != -1) if (pos != -1)
return str.Substring(0, pos); return str.Substring(0, pos);
@@ -60,7 +60,7 @@ namespace Game
[Service(OriginalHash.GameUtilitiesService, 10)] [Service(OriginalHash.GameUtilitiesService, 10)]
BattlenetRpcErrorCode HandleGetAllValuesForAttribute(GetAllValuesForAttributeRequest request, GetAllValuesForAttributeResponse response) BattlenetRpcErrorCode HandleGetAllValuesForAttribute(GetAllValuesForAttributeRequest request, GetAllValuesForAttributeResponse response)
{ {
if (!request.AttributeKey.Contains("Command_RealmListRequest_v1")) if (request.AttributeKey.Contains("Command_RealmListRequest_v1"))
{ {
Global.RealmMgr.WriteSubRegions(response); Global.RealmMgr.WriteSubRegions(response);
return BattlenetRpcErrorCode.Ok; return BattlenetRpcErrorCode.Ok;