本文整理匯總了C#中Uber.Messages.ServerPacket.Init方法的典型用法代碼示例。如果您正苦於以下問題:C# ServerPacket.Init方法的具體用法?C# ServerPacket.Init怎麽用?C# ServerPacket.Init使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在類Uber.Messages.ServerPacket
的用法示例。
在下文中一共展示了ServerPacket.Init方法的3個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的C#代碼示例。
示例1: WelcomeMesage
public void WelcomeMesage(string Message)
{
ServerPacket Welcome = new ServerPacket();
Welcome.Init(810);
Welcome.AppendUInt(1);
Welcome.AppendStringWithBreak(Message);
GetConnection().SendPacket(Welcome);
}
示例2: UpdateState
public void UpdateState(bool inDb, bool inRoom)
{
if (inDb)
{
using (DatabaseClient dbClient = UberEnvironment.GetDatabase().GetClient())
{
dbClient.AddParamWithValue("extra_data", this.ExtraData);
dbClient.ExecuteQuery("UPDATE room_items SET extra_data = @extra_data WHERE id = '" + Id + "' LIMIT 1");
}
}
if (inRoom)
{
ServerPacket Message = new ServerPacket();
if (IsFloorItem)
{
Message.Init(88);
Message.AppendStringWithBreak(Id.ToString());
Message.AppendStringWithBreak(ExtraData);
}
else
{
Message.Init(85);
Serialize(Message);
}
GetRoom().SendMessage(Message);
}
}
示例3: SendNotif
public void SendNotif(string Message, Boolean FromHotelManager)
{
ServerPacket nMessage = new ServerPacket();
if (FromHotelManager)
{
nMessage.Init(139);
}
else
{
nMessage.Init(161);
}
nMessage.AppendStringWithBreak(Message);
GetConnection().SendPacket(nMessage);
}