From 35569af2e8d754ae2c501f9c61e4ff90b3ef3e3f Mon Sep 17 00:00:00 2001 From: hondacrx Date: Thu, 9 Jun 2022 18:03:00 -0400 Subject: [PATCH] Script/Commands: .character changeaccount now disconnects player before transferring Port From (https://github.com/TrinityCore/TrinityCore/commit/503ac5556d3b5e52340bee9d27811645ebf96c7a) --- Source/Game/Chat/Commands/CharacterCommands.cs | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/Source/Game/Chat/Commands/CharacterCommands.cs b/Source/Game/Chat/Commands/CharacterCommands.cs index 3e76d7369..ba983885f 100644 --- a/Source/Game/Chat/Commands/CharacterCommands.cs +++ b/Source/Game/Chat/Commands/CharacterCommands.cs @@ -295,6 +295,10 @@ namespace Game.Chat } } + Player onlinePlayer = playerIdentifier.GetConnectedPlayer(); + if (onlinePlayer != null) + onlinePlayer.GetSession().KickPlayer("HandleCharacterChangeAccountCommand GM Command transferring character to another account"); + PreparedStatement stmt = DB.Characters.GetPreparedStatement(CharStatements.UPD_ACCOUNT_BY_GUID); stmt.AddValue(0, newAccount.GetID()); stmt.AddValue(1, playerIdentifier.GetGUID().GetCounter());