本文整理汇总了C#中FrameWork.PacketOut.WriteStringToZero方法的典型用法代码示例。如果您正苦于以下问题:C# PacketOut.WriteStringToZero方法的具体用法?C# PacketOut.WriteStringToZero怎么用?C# PacketOut.WriteStringToZero使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类FrameWork.PacketOut
的用法示例。
在下文中一共展示了PacketOut.WriteStringToZero方法的5个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: BuildPreMail
public void BuildPreMail(PacketOut Out, Character_mail Mail)
{
if (Mail == null)
return;
Out.WriteUInt32(0);
Out.WriteUInt32((UInt32)Mail.Guid);
Out.WriteUInt16((UInt16)(Mail.Opened ? 1 : 0));
Out.WriteByte(0x64); // Icon ID
Out.WriteUInt32(0xFFE4D486); // Time
Out.WriteUInt32(0xFFE4D486); // Sent time
Out.WriteUInt32((UInt32)Mail.CharacterIdSender); // Sender ID
Out.WriteByte(0); // 1 = localized name
Out.WriteByte(0);
Out.WriteStringToZero(Mail.SenderName);
Out.WriteByte(0);
Out.WriteStringToZero(Mail.ReceiverName);
Out.WriteByte(0);
Out.WriteStringToZero(Mail.Title);
Out.WriteUInt32(0);
Out.WriteUInt32(Mail.Money);
Out.WriteUInt16((ushort)Mail.ItemsReqInfo.Count);
if(Mail.ItemsReqInfo.Count > 0)
Out.WriteByte(0);
if(Mail.ItemsReqInfo.Count > 8)
Out.WriteByte(0);
foreach(Character_items item in Mail.ItemsReqInfo)
{
Out.WriteUInt32(item.ModelId);
}
}
示例2: SendCurrentStage
public void SendCurrentStage(Player Plr)
{
PacketOut Out = new PacketOut((byte)Opcodes.F_OBJECTIVE_INFO);
Out.WriteUInt32(Info.Entry);
Out.WriteByte(0); // Type
Out.WriteByte(Info.Type);
Out.WriteByte(Info.Type); // Forteresse, rien du tout ,etc
Out.WriteUInt16(0);
Out.WritePascalString(Info.Name);
Out.WriteByte(1);
Out.WriteUInt16(0); // Time in second
Out.WriteUInt32(0x034B0201);
Out.WriteByte(1);
Out.WriteByte(0);
Out.WriteByte(1);
Out.WriteUInt16(0);
Out.WriteByte(0);
Out.WritePascalString("Un Nom");
Out.WriteByte(0);
Out.WriteByte(0);
Out.WriteStringToZero("Stage III");
Out.WritePascalString("Test d'un message quelque soit");
Out.WriteUInt16(0);
Out.WriteUInt16(0x012C);
Out.WriteUInt32(0x9E);
Out.WriteUInt32(0);
Out.WriteByte(0x48);
Out.WriteUInt32(0);
//Out.WriteHexStringBytes(Str.Replace(" ", string.Empty));
Plr.SendPacket(Out);
}
示例3: SendObjectiveText
public void SendObjectiveText(string Text)
{
PacketOut Out = new PacketOut((byte)Opcodes.F_OBJECTIVE_INFO);
Out.WriteUInt32(0); // Entry
Out.WriteByte(0); // 1
Out.WriteByte(1); // 2
Out.WriteByte(0); // 1
Out.WriteUInt16(0);
Out.WriteStringToZero(Text);
Out.WriteUInt16(0);
Out.WriteUInt16(0); // Time
Out.WriteUInt16(0);
Out.WriteByte(0);
SendPacket(Out);
}
示例4: BuildPreMail
public void BuildPreMail(PacketOut Out, Character_mail Mail)
{
if (Mail == null)
return;
Out.WriteUInt32(0);
Out.WriteUInt32((UInt32)Mail.Guid);
Out.WriteUInt16((UInt16)(Mail.Opened ? 1 : 0));
Out.WriteByte((byte)(Mail.AuctionType == 0 ? 100 : 0)); // Icon ID
Out.WriteUInt32(Mail.SendDate); // Time
Out.WriteUInt32(Mail.SendDate); // Sent time
Out.WriteUInt32((UInt32)Mail.CharacterIdSender); // Sender ID
Out.WriteByte(0); // 1 = localized name
Out.WriteByte(0);
Out.WriteStringToZero(Mail.SenderName);
Out.WriteByte(0);
Out.WriteStringToZero(Mail.ReceiverName);
Out.WriteByte(0);
Out.WriteStringToZero(Mail.Title);
Out.WriteUInt32(0);
Out.WriteUInt32(Mail.Money);
Out.WriteUInt16((ushort)Mail.Items.Count);
if (Mail.Items.Count > 0)
Out.WriteByte(0);
if (Mail.Items.Count > 8)
Out.WriteByte(0);
foreach (KeyValuePair<uint, ushort> item in Mail.Items)
{
Out.WriteUInt32(WorldMgr.GetItem_Info(item.Key).ModelId);
}
}
示例5: SendHelpMessage
public void SendHelpMessage(Player Plr, string Text)
{
/*|00 3D 06 00 00 23 00 00 00 00 0D 57 68 69 69 74 |.=...#.....Whiit|
|65 63 68 65 72 72 79 00 00 25 4C 46 20 74 61 6E |echerry..%LF tan|
|6B 20 61 6E 64 20 68 65 61 6C 65 72 20 66 6F 72 |k and healer for|
|20 73 63 2F 6F 72 76 72 20 67 72 6F 75 70 00 00 | sc/orvr group..| */
PacketOut Out = new PacketOut((byte)Opcodes.F_CHAT);
Out.WriteUInt16(Plr.Oid);
Out.WriteByte(0x23);
Out.WriteUInt32(0);
Out.WriteStringToZero(Plr.Name);
Out.WriteUInt16((ushort)(Text.Length + 1));
Out.WriteStringBytes(Text);
Out.WriteByte(0);
Out.WriteByte(0);
SendPacket(Out);
}