Script/Commands: .character changeaccount now disconnects player before transferring

Port From (https://github.com/TrinityCore/TrinityCore/commit/503ac5556d3b5e52340bee9d27811645ebf96c7a)
This commit is contained in:
hondacrx
2022-06-09 18:03:00 -04:00
parent 651cdf59c1
commit 35569af2e8
@@ -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());