35 lines
1.0 KiB
C#
35 lines
1.0 KiB
C#
using System;
|
|
using System.Collections.Generic;
|
|
using System.Linq;
|
|
using System.Text;
|
|
using System.Threading.Tasks;
|
|
|
|
|
|
using ServerCore; using ServerBase;
|
|
|
|
|
|
namespace GameServer
|
|
{
|
|
public class StateNotifyHelper
|
|
{
|
|
public static bool send_S2C_NTF_CHANGE_STATE(Player player, PlayerStateType playerStateType)
|
|
{
|
|
ArgumentNullReferenceCheckHelper.throwIfNull(player, () => $"player is null !!!");
|
|
|
|
var noti_packet = new ClientToGame();
|
|
noti_packet.Message = new();
|
|
noti_packet.Message.ChangeStateNoti = new();
|
|
|
|
noti_packet.Message.ChangeStateNoti.ActorGuid = player.getUserGuid();
|
|
noti_packet.Message.ChangeStateNoti.State = (int)playerStateType;
|
|
|
|
var game_zone_action = player.getEntityAction<GameZoneAction>();
|
|
NullReferenceCheckHelper.throwIfNull(game_zone_action, () => $"game_zone_action is null !!! - {player.toBasicString()}");
|
|
|
|
game_zone_action.broadcast(player, noti_packet);
|
|
|
|
return true;
|
|
}
|
|
}
|
|
}
|