本文整理匯總了C#中Server.Network.Packet.SetStatic方法的典型用法代碼示例。如果您正苦於以下問題:C# Packet.SetStatic方法的具體用法?C# Packet.SetStatic怎麽用?C# Packet.SetStatic使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在類Server.Network.Packet
的用法示例。
在下文中一共展示了Packet.SetStatic方法的5個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的C#代碼示例。
示例1: Initialize
public static void Initialize()
{
m_OldEFHandler = PacketHandlers.GetHandler(0xEF);
PacketHandlers.Register(0xEF, 21, false, new Server.Network.OnPacketReceive(LoginServerSeed));
PacketHandlers.Register(Config.EncapsulationHeader, 0, false, new Server.Network.OnPacketReceive(UOExtPacket));
uint ip = (uint)(BitConverter.ToInt32(IPAddress.Parse(Config.IP).GetAddressBytes(), 0));
m_UOExtSupport = new UOExtSupport();
m_UOExtSupport.SetStatic();
m_handler = UOExt.PacketHandler.Instatinate();
Console.WriteLine("UOExt: Adapter started.");
}
示例2: SetStatic
public static Packet SetStatic( Packet p )
{
p.SetStatic();
return p;
}
示例3: SendSingleClickTo
public override void SendSingleClickTo( Mobile from )
{
if ( !IsMagic || !( m_Identified.Contains( from ) || from.AccessLevel > AccessLevel.Counselor ) )
{
base.SendSingleClickTo( from );
}
else
{
if ( m_MagicSingleClick == null )
{
m_MagicSingleClick = new AsciiMessage( Serial, ItemID, MessageType.Label, 0x3B2, 3, "", BuildMagicSingleClick() );
m_MagicSingleClick.SetStatic();
}
from.NetState.Send( m_MagicSingleClick );
}
}
示例4: SendSingleClickTo
public virtual void SendSingleClickTo( Mobile from )
{
if ( m_SingleClick == null )
{
m_SingleClick = new AsciiMessage( Serial, ItemID, MessageType.Label, 0x3B2, 3, "", BuildSingleClick() );
m_SingleClick.SetStatic();
}
from.NetState.Send( m_SingleClick );
}
示例5: SendUpdateMsg
private static void SendUpdateMsg( PlayerMobile m )
{
if ( !File.Exists( "update.txt" ) )
return;
DateTime time = File.GetLastWriteTimeUtc( "update.txt" );
int ticks = (int)time.Ticks;
if ( m.LastUpdate == ticks )
return;
if ( time != m_FileTime || m_Packet == null )
{
m_FileTime = time;
Packet.Release( ref m_Packet );
m_Packet = new ScrollMessage( 0x02, ticks, ReadFile( "update.txt" ) );
m_Packet.SetStatic();
}
m.Send( m_Packet );
m.LastUpdate = ticks;
}