本文整理汇总了C#中Zepheus.FiestaLib.Networking.Packet.WriteHexAsBytes方法的典型用法代码示例。如果您正苦于以下问题:C# Packet.WriteHexAsBytes方法的具体用法?C# Packet.WriteHexAsBytes怎么用?C# Packet.WriteHexAsBytes使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Zepheus.FiestaLib.Networking.Packet
的用法示例。
在下文中一共展示了Packet.WriteHexAsBytes方法的7个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: GetAcademyGoldRewardList
public static void GetAcademyGoldRewardList(WorldClient client, Packet packet)
{
using (var pack = new Packet(SH38Type.SendAcademyGoldRewardList))
{
pack.WriteHexAsBytes("80 18");//responsecode
pack.WriteByte(1);//stat count
pack.WriteHexAsBytes("0A 0A CA 9A 3B 00 00 00 00");//unk
pack.WriteByte(10);//levelbreich
pack.WriteLong(1000);
pack.WriteByte(15);//level bereich
pack.WriteLong(1000);
pack.WriteByte(26);//level bereich
pack.WriteLong(1000);
pack.WriteByte(31);//level bereich
pack.WriteLong(1000);
pack.WriteByte(36);//levelbereich
pack.WriteLong(1000);
pack.WriteByte(41);//level bereich
pack.WriteLong(9000);
pack.WriteByte(46);//level bereich
pack.WriteLong(1000);
pack.WriteByte(51);//level bereich
pack.WriteLong(1000);
pack.WriteByte(56);//level bereich
pack.WriteLong(1000);
client.SendPacket(pack);
}
}
示例2: sendUnk14
public static void sendUnk14(WorldClient client)
{
using (var packet = new Packet(SH2Type.Unk14))
{
packet.WriteHexAsBytes("07 2C 2A");
client.SendPacket(packet);
}
}
示例3: MasterList
public static void MasterList(WorldClient client, Packet packet)
{
Dictionary<string, string> list = new Dictionary<string, string>
{
{"Char1", "hier ist Char1"},
{"Char2", "hier ist Char2"}
};
using (var ppacket = new Packet(SH14Type.GroupList))
{
ppacket.WriteHexAsBytes("00 00 14 01 01 00 01 00 00 00");
ppacket.WriteInt(list.Count);
foreach (KeyValuePair<string, string> stat in list)
{
// Note - teh fuck?
ppacket.WriteHexAsBytes("");
ppacket.WriteString("haha", 16);
ppacket.WriteString("1234567890123456789012345678901234567890123456", 46);
ppacket.WriteHexAsBytes("00 00 00 00 44 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 8C 8E CD 00 88 49 DF 4E B3 08 4C 00 78 26 43 00 01 00 00 00 5A 68 42 00 18 FE 64 02 40 55 DF 4E 08 27 4D 00 94 FF 64 02 24 00 00 00 BD 68 42 00 87 BE");
}
list.Clear();
client.SendPacket(ppacket);
}
}
示例4: WritePacket
public void WritePacket(Packet pPacket)
{
pPacket.WriteUShort(ItemID);
if (this.Type != HouseType.Resting)
{
pPacket.Fill(10, 0xFF); // Unknown
pPacket.WriteString(this.Name, 30);
}
else
{
pPacket.WriteHexAsBytes("BE 02 FA 01 F8 01");
pPacket.Fill(34, 0xFF); // No idea!?
}
pPacket.WriteByte(0xFF);
}
示例5: WritePacket
private void WritePacket(ZoneCharacter character, params string[] param)
{
if (param.Length >= 3)
{
byte header = byte.Parse(param[1]);
byte type = byte.Parse(param[2]);
using (var packet = new Packet(header, type))
{
if (param.Length > 3)
{
packet.WriteHexAsBytes(string.Join("", param, 3, param.Length - 3));
}
character.Client.SendPacket(packet);
}
}
}
示例6: SendNewGroupMasterPacket
private void SendNewGroupMasterPacket(WorldClient pMaster, string pMemberName)
{
using (var packet = new Packet(SH14Type.InviteDeclined))
{
packet.WriteString(pMemberName, 16);
packet.WriteHexAsBytes("C1 04");
pMaster.SendPacket(packet);
}
}
示例7: On_GameClient_UpdateGuildMessage
public static void On_GameClient_UpdateGuildMessage(WorldClient Client, Packet Packet)
{
ushort length;
string message;
if (Client.Character.Guild == null
|| !Packet.TryReadUShort(out length)
|| !Packet.TryReadString(out message, length))
{
return;
}
//response packets
using (var packet = new Packet(SH29Type.UnkMessageChange))
{
packet.WriteHexAsBytes("68 1B 00 92 AD F8 4F 2E 00 00 00 2B 00 00 00 17 00 00 00 07 00 00 00 06 00 00 00 70 00 00 00 06 00 00 00 BC 00 00 00 01 00 00 00 00 00");
Client.SendPacket(packet);
}
using (var packet = new Packet(SH29Type.ClearGuildDetailsMessage))
{
packet.WriteUShort(3137);
packet.WriteLong(0);
Client.SendPacket(packet);
}
using (var packet = new Packet(SH29Type.UpdateGuildMessageResponse))
{
packet.WriteUShort(3137);
Client.SendPacket(packet);
}
//update guild
lock (Client.Character.Guild.ThreadLocker)
{
Client.Character.Guild.Message = message;
Client.Character.Guild.MessageCreater = Client.Character;
Client.Character.Guild.MessageCreateTime = Program.CurrentTime;
Client.Character.Guild.Save();
//broadcast packet to all guild members
using (var packet = new Packet(SH29Type.SendUpdateGuildDetails))
{
packet.Fill(4, 0x00);
packet.WriteInt(Client.Character.Guild.MessageCreateTime.Second);
packet.WriteInt(Client.Character.Guild.MessageCreateTime.Minute);
packet.WriteInt(Client.Character.Guild.MessageCreateTime.Hour);
packet.WriteInt(Client.Character.Guild.MessageCreateTime.Day);
packet.WriteInt(Client.Character.Guild.MessageCreateTime.Month - 1);
packet.WriteInt(Client.Character.Guild.MessageCreateTime.Year - 1900);
packet.WriteInt(0);
packet.WriteLong(0);
packet.WriteString(Client.Character.Character.Name, 16);
packet.WriteUShort(length);
packet.WriteString(message, length);
Client.Character.Guild.Broadcast(packet);
}
//send packet to zone that guild message changed
using (var packet = new InterPacket(InterHeader.ZONE_GuildMessageUpdate))
{
packet.WriteInt(Client.Character.Guild.ID);
packet.WriteInt(Client.Character.ID);
packet.WriteDateTime(Client.Character.Guild.MessageCreateTime);
packet.WriteUShort(length);
packet.WriteString(message, length);
ZoneManager.Instance.Broadcast(packet);
}
}
}