초기커밋
This commit is contained in:
@@ -0,0 +1,33 @@
|
||||
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<GameOptionAttribute>();
|
||||
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<byte, int>(byteOptions, Convert.ToInt32).ToList());
|
||||
|
||||
if (false == GameServerApp.getServerLogic().onSendPacket(player, noti_packet))
|
||||
{
|
||||
return false;
|
||||
}
|
||||
|
||||
return true;
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user