Files
caliverse_server/GameServer/Contents/CustomDefinedUi/Helper/CustomDefinedUiNotifyHelper.cs
2025-05-01 07:20:41 +09:00

36 lines
1.1 KiB
C#

using ServerCommon;
using ServerCore; using ServerBase;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using static ClientToGameMessage.Types;
namespace GameServer
{
public static class CustomDefinedUiNotifyHelper
{
public static bool send_GS2C_NTF_CUSTOM_DEFINED_UI_ALL(this Player player)
{
var custom_defined_ui_ation = player.getEntityAction<CustomDefinedUiAction>();
NullReferenceCheckHelper.throwIfNull(custom_defined_ui_ation, () => $"custom_defined_ui_ation is null !!! - {player.toBasicString()}");
var ntf_packet = new ClientToGame();
ntf_packet.Message = new ClientToGameMessage();
ntf_packet.Message.NtfCustomDefinedUIAll = new GS2C_NTF_CUSTOM_DEFINED_UI_ALL();
ntf_packet.Message.NtfCustomDefinedUIAll.UiDatas.Add(custom_defined_ui_ation.toCustomDefinedUiAll());
if (false == GameServerApp.getServerLogic().onSendPacket(player, ntf_packet))
{
return false;
}
return true;
}
}
}