using System; using System.Collections.Generic; using System.Linq; using System.Runtime.CompilerServices; using System.Text; using System.Threading.Tasks; using ServerCore; using ServerBase; using ServerCommon; using static ClientToGameRes.Types; namespace GameServer { public static class UserNotifyHelper { public static void send_S2C_ACK_SELECTED_CHARACTER_INFO(this Player player) { var server_logic = GameServerApp.getServerLogic(); var player_action = player.getEntityAction(); NullReferenceCheckHelper.throwIfNull(player_action, () => $"player_action is null !!! - {player.toBasicString()}"); ClientToGame clientToGame = new ClientToGame(); clientToGame.Response = new ClientToGameRes(); clientToGame.Response.ErrorCode = ServerErrorCode.Success; clientToGame.Response.SelectCharRes = new SelectCharRes(); clientToGame.Response.SelectCharRes.Id = 1; clientToGame.Response.SelectCharRes.CharData = player_action.toSelectedPlayerInfo(); var WORLD_META_ID = server_logic.getServerType().toServerType() == ServerType.Channel ? (int)server_logic.getWorldId() : 0; clientToGame.Response.SelectCharRes.WorldId = WORLD_META_ID; player.sendPacket(clientToGame); } } }