Core/Realmlist: Fixes getting disconnected when trying to switch realms.
This commit is contained in:
@@ -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;
|
||||||
|
|||||||
Reference in New Issue
Block a user