You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
36 lines
923 B
36 lines
923 B
using System;
|
|
using System.Collections.Generic;
|
|
using System.Linq;
|
|
using System.Threading.Tasks;
|
|
|
|
using Sog;
|
|
|
|
using ProtoCSStruct;
|
|
|
|
namespace Game
|
|
{
|
|
public static class PlayerNotifyClientExtension
|
|
{
|
|
public static void SendToClient<T>(this PlayerOnGame player, int iMsgID, ref T structMessage)
|
|
where T : struct, IStructMessage<T>
|
|
{
|
|
if (player == null)
|
|
{
|
|
return;
|
|
}
|
|
|
|
GameServerUtils.GetSysHandler().SendToPlayer<T>(player, iMsgID, ref structMessage);
|
|
}
|
|
|
|
public static void SendToClient<T>(this PlayerOnGame player, StructPacket packet)
|
|
where T : struct, IStructMessage<T>
|
|
{
|
|
if (player == null)
|
|
{
|
|
return;
|
|
}
|
|
|
|
GameServerUtils.GetSysHandler().SendToPlayer<T>(player, packet);
|
|
}
|
|
}
|
|
}
|
|
|