using ServerCommon; using ServerCore; using ServerBase; using System; using System.Collections.Generic; using System.Linq; using System.Text; using System.Threading.Tasks; namespace GameServer { public static class GameOptionNotifyHelper { public static bool send_S2C_NTF_GAME_OPTION(this Player player) { var game_option_attribute = player.getEntityAttribute(); ArgumentNullReferenceCheckHelper.throwIfNull(game_option_attribute, () => "game_option_attribute is null !!!"); var noti_packet = new ClientToGame(); noti_packet.Message = new(); noti_packet.Message.GameOptionNoti = new(); byte[] byteOptions = Convert.FromBase64String(game_option_attribute.options); noti_packet.Message.GameOptionNoti.ValuesList.AddRange(Array.ConvertAll(byteOptions, Convert.ToInt32).ToList()); if (false == GameServerApp.getServerLogic().onSendPacket(player, noti_packet)) { return false; } return true; } } }