초기커밋
This commit is contained in:
34
GameServer/Contents/State/PacketHandler/StateNotifyHelper.cs
Normal file
34
GameServer/Contents/State/PacketHandler/StateNotifyHelper.cs
Normal file
@@ -0,0 +1,34 @@
|
||||
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;
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user