npsharp/src/libnpsharp/RPC/Messages/RPCMessage.cs

16 lines
435 B
C#
Raw Normal View History

2014-05-07 15:39:49 +00:00
using System.Linq;
namespace NPSharp.RPC.Messages
2014-05-07 15:39:49 +00:00
{
public abstract class RPCMessage
2014-05-07 15:39:49 +00:00
{
internal const uint Signature = 0xDEADC0DE; // I wonder if aiw3 changed this since kernal noted it in his source code.
public uint GetTypeId()
{
var packet = (PacketAttribute) GetType().GetCustomAttributes(typeof (PacketAttribute), false).Single();
return packet.Type;
}
}
}