本文整理汇总了C#中WowPacketParser.Misc.Packet.WriteGuid方法的典型用法代码示例。如果您正苦于以下问题:C# Packet.WriteGuid方法的具体用法?C# Packet.WriteGuid怎么用?C# Packet.WriteGuid使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类WowPacketParser.Misc.Packet
的用法示例。
在下文中一共展示了Packet.WriteGuid方法的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: HandleDestroyObject
public static void HandleDestroyObject(Packet packet)
{
if (packet.Direction == Direction.ServerToClient)
{
var guid = new byte[8];
guid[3] = packet.ReadBit();
guid[2] = packet.ReadBit();
guid[4] = packet.ReadBit();
guid[1] = packet.ReadBit();
packet.ReadBit("Despawn Animation");
guid[7] = packet.ReadBit();
guid[0] = packet.ReadBit();
guid[6] = packet.ReadBit();
guid[5] = packet.ReadBit();
packet.ParseBitStream(guid, 0, 4, 7, 2, 6, 3, 1, 5);
packet.WriteGuid("Object Guid", guid);
}
else
{
packet.WriteLine(" : CMSG_PVP_LOG_DATA");
}
}
示例2: HandleGuildAchievementData
public static void HandleGuildAchievementData(Packet packet)
{
var count = packet.ReadBits("Criteria count", 20);
var guid = new byte[count][];
for (var i = 0; i < count; ++i)
{
guid[i] = new byte[8];
packet.StartBitStream(guid[i], 3, 5, 4, 7, 2, 1, 0, 6);
}
for (var i = 0; i < count; ++i)
{
packet.ReadXORByte(guid[i], 2);
packet.ReadXORByte(guid[i], 7);
packet.ReadInt32("Unk 1", i);
packet.ReadXORByte(guid[i], 5);
packet.ReadXORByte(guid[i], 3);
packet.ReadXORByte(guid[i], 1);
packet.ReadInt32<AchievementId>("Achievement Id", i);
packet.ReadXORByte(guid[i], 6);
packet.ReadInt32("Unk 2", i);
packet.ReadXORByte(guid[i], 4);
packet.ReadXORByte(guid[i], 0);
packet.ReadPackedTime("Time", i);
packet.WriteGuid("Guid", guid[i], i);
}
}
示例3: HandleVoidItemSwapResponse
public static void HandleVoidItemSwapResponse(Packet packet)
{
packet.ReadBit("Has Src Item id (Inv)");
byte[] itemId2 = packet.StartBitStream(4, 1, 6, 0, 3, 7, 2, 5);
packet.ReadBit("Has Dest Item id (Inv)");
byte[] itemId1 = itemId1 = packet.StartBitStream(6, 0, 3, 2, 1, 5, 7, 4);
var usedSrcSlot = !packet.ReadBit("Used Src Slot (Inv)"); // always set?
var usedDestSlot = !packet.ReadBit("Used Dest Slot (Inv)");
packet.ParseBitStream(itemId1, 3, 7, 2, 5, 0, 1, 4, 6);
packet.WriteGuid("Dest Item Id", itemId1);
packet.ParseBitStream(itemId2, 0, 2, 7, 5, 6, 4, 3, 1);
packet.WriteGuid("Src Item Id", itemId2);
if (usedSrcSlot)
packet.ReadInt32("New Slot for Src Item");
if (usedDestSlot)
packet.ReadInt32("New Slot for Dest Item");
}
示例4: HandleItemEnchantTimeUpdate
public static void HandleItemEnchantTimeUpdate(Packet packet)
{
var itemGuid = new byte[8];
var playerGuid = new byte[8];
packet.StartBitStream(itemGuid, 2, 4);
playerGuid[4] = packet.ReadBit();
itemGuid[5] = packet.ReadBit();
packet.StartBitStream(playerGuid, 3, 5);
packet.StartBitStream(itemGuid, 7, 0, 6);
packet.StartBitStream(playerGuid, 6, 2, 0, 1);
itemGuid[1] = packet.ReadBit();
playerGuid[7] = packet.ReadBit();
itemGuid[3] = packet.ReadBit();
packet.ResetBitReader();
packet.ReadXORBytes(playerGuid, 1, 7);
packet.ReadXORBytes(itemGuid, 4, 7);
packet.ReadXORByte(playerGuid, 5);
packet.ReadXORBytes(itemGuid, 1, 2);
packet.ReadXORBytes(playerGuid, 4, 2, 0);
packet.ReadXORBytes(itemGuid, 0, 5);
packet.ReadUInt32("Duration");
packet.ReadUInt32("Slot");
packet.ReadXORByte(playerGuid, 3);
packet.ReadXORBytes(itemGuid, 3, 6);
packet.ReadXORByte(playerGuid, 6);
packet.WriteGuid("Player GUID", playerGuid);
packet.WriteGuid("Item GUID", itemGuid);
}
示例5: HandleLootList
public static void HandleLootList(Packet packet)
{
var guid48 = new byte[8];
guid48[5] = packet.ReadBit();
var unk24 = packet.ReadBit("unk24"); // 24
var guid16 = new byte[8];
if (unk24)
guid16 = packet.StartBitStream(4, 6, 0, 7, 5, 2, 3, 1);
guid48[1] = packet.ReadBit();
var unk40 = packet.ReadBit("unk40"); // 40
guid48[4] = packet.ReadBit();
guid48[3] = packet.ReadBit();
guid48[2] = packet.ReadBit();
var guid32 = new byte[8];
if (unk40)
guid32 = packet.StartBitStream(2, 3, 4, 5, 6, 0, 1, 7);
guid48[7] = packet.ReadBit();
guid48[0] = packet.ReadBit();
guid48[6] = packet.ReadBit();
if (unk40)
{
packet.ParseBitStream(guid32, 7, 1, 0, 6, 5, 3, 4, 2);
packet.WriteGuid("guid32", guid32);
}
if (unk24)
{
packet.ParseBitStream(guid16, 4, 5, 6, 3, 2, 7, 0, 1);
packet.WriteGuid("guid16", guid16);
}
packet.ParseBitStream(guid48, 5, 1, 6, 2, 3, 0, 7, 4);
packet.WriteGuid("guid48", guid48);
}
示例6: HandleEquipmentSetList
public static void HandleEquipmentSetList(Packet packet)
{
var count = packet.ReadBits(19);
var guid1 = new byte[count][][];
var guid2 = new byte[count][];
var bits0 = new uint[count];
var bits4 = new uint[count];
for (var i = 0; i < count; i++)
{
guid1[i] = new byte[NumSlots][];
guid2[i] = new byte[8];
guid2[i][7] = packet.ReadBit();
for (var j = 0; j < NumSlots; j++)
{
guid1[i][j] = new byte[8];
packet.StartBitStream(guid1[i][j], 6, 7, 5, 1, 0, 4, 2, 3);
}
guid2[i][3] = packet.ReadBit();
guid2[i][1] = packet.ReadBit();
guid2[i][5] = packet.ReadBit();
guid2[i][6] = packet.ReadBit();
bits0[i] = packet.ReadBits(8);
bits4[i] = packet.ReadBits(9);
guid2[i][0] = packet.ReadBit();
guid2[i][2] = packet.ReadBit();
guid2[i][4] = packet.ReadBit();
}
for (var i = 0; i < count; i++)
{
for (var j = 0; j < NumSlots; j++)
{
packet.ParseBitStream(guid1[i][j], 7, 4, 5, 3, 0, 6, 2, 1);
packet.WriteGuid("Item GUID", guid1[i][j], i, j);
}
packet.ReadXORByte(guid2[i], 7);
packet.ReadXORByte(guid2[i], 3);
packet.ReadXORByte(guid2[i], 0);
packet.ReadXORByte(guid2[i], 5);
packet.ReadWoWString("Set Name", bits0[i], i);
packet.ReadXORByte(guid2[i], 4);
packet.ReadXORByte(guid2[i], 6);
packet.ReadXORByte(guid2[i], 2);
packet.ReadXORByte(guid2[i], 1);
packet.ReadInt32("Index", i);
packet.ReadWoWString("Set Icon", bits4[i], i);
packet.WriteGuid("GUID", guid2[i], i);
}
}
示例7: HandleLfgJoinResult
public static void HandleLfgJoinResult(Packet packet)
{
var guid = new byte[8];
guid[7] = packet.ReadBit();
guid[6] = packet.ReadBit();
guid[3] = packet.ReadBit();
guid[0] = packet.ReadBit();
var count40 = packet.ReadBits("count40", 22);
var guids = new byte[count40][];
var unk52 = new uint[count40];
for (var i = 0; i < count40; i++)
{
guids[i] = new byte[8];
guids[i][3] = packet.ReadBit();
unk52[i] = packet.ReadBits("unk52", 20, i);
guids[i][6] = packet.ReadBit();
guids[i][1] = packet.ReadBit();
guids[i][4] = packet.ReadBit();
guids[i][7] = packet.ReadBit();
guids[i][2] = packet.ReadBit();
guids[i][0] = packet.ReadBit();
guids[i][5] = packet.ReadBit();
}
guid[5] = packet.ReadBit();
guid[1] = packet.ReadBit();
guid[4] = packet.ReadBit();
guid[2] = packet.ReadBit();
packet.ReadByte("unk56"); // 56
for (var i = 0; i < count40; i++)
{
packet.ParseBitStream(guids[i], 4);
for (var j = 0; j < unk52[i]; j++)
{
packet.ReadInt32("unk68", i); // 68
packet.ReadInt32("unk64", i); // 64
packet.ReadInt32("unk60", i); // 60
packet.ReadInt32("unk56", i); // 56
}
packet.ParseBitStream(guids[i], 1, 0, 5, 7, 3, 6, 2);
packet.WriteGuid("Guids", guids[i], i);
}
packet.ReadByte("unk57"); // 57
packet.ParseBitStream(guid, 2);
packet.ReadInt32("unk32"); // 32
packet.ReadInt32("unk24"); // 24
packet.ReadInt32("unk28"); // 28
packet.ParseBitStream(guid, 6, 4, 1, 0, 5, 7, 3);
packet.WriteGuid("Guid", guid);
}
示例8: HandlePetNameQuery
public static void HandlePetNameQuery(Packet packet)
{
var number = new byte[8];
var guid = new byte[8];
guid[6] = packet.ReadBit();
number[4] = packet.ReadBit();
number[6] = packet.ReadBit();
number[5] = packet.ReadBit();
guid[4] = packet.ReadBit();
number[7] = packet.ReadBit();
guid[5] = packet.ReadBit();
guid[3] = packet.ReadBit();
guid[2] = packet.ReadBit();
guid[7] = packet.ReadBit();
number[1] = packet.ReadBit();
number[0] = packet.ReadBit();
number[2] = packet.ReadBit();
number[3] = packet.ReadBit();
guid[1] = packet.ReadBit();
guid[0] = packet.ReadBit();
packet.ReadXORByte(guid, 7);
packet.ReadXORByte(number, 2);
packet.ReadXORByte(guid, 4);
packet.ReadXORByte(guid, 6);
packet.ReadXORByte(guid, 5);
packet.ReadXORByte(number, 5);
packet.ReadXORByte(guid, 3);
packet.ReadXORByte(number, 0);
packet.ReadXORByte(number, 6);
packet.ReadXORByte(guid, 1);
packet.ReadXORByte(number, 4);
packet.ReadXORByte(guid, 0);
packet.ReadXORByte(number, 7);
packet.ReadXORByte(number, 1);
packet.ReadXORByte(guid, 2);
packet.ReadXORByte(number, 3);
packet.WriteGuid("Guid2", number);
packet.WriteGuid("Guid3", guid);
var GUID = new WowGuid(BitConverter.ToUInt64(guid, 0));
var Number = BitConverter.ToUInt64(number, 0);
packet.WriteGuid("Guid", guid);
packet.AddValue("Pet Number", Number);
// Store temporary name (will be replaced in SMSG_PET_NAME_QUERY_RESPONSE)
StoreGetters.AddName(GUID, Number.ToString(CultureInfo.InvariantCulture));
}
示例9: HandlePetNameQuery
public static void HandlePetNameQuery(Packet packet)
{
var guid1 = new byte[8];
var guid2 = new byte[8];
guid2[1] = packet.ReadBit();
guid1[5] = packet.ReadBit();
guid2[3] = packet.ReadBit();
guid1[0] = packet.ReadBit();
guid1[3] = packet.ReadBit();
guid2[4] = packet.ReadBit();
guid1[1] = packet.ReadBit();
guid1[4] = packet.ReadBit();
guid2[0] = packet.ReadBit();
guid2[7] = packet.ReadBit();
guid1[6] = packet.ReadBit();
guid1[7] = packet.ReadBit();
guid1[2] = packet.ReadBit();
guid2[5] = packet.ReadBit();
guid2[2] = packet.ReadBit();
guid2[6] = packet.ReadBit();
packet.ReadXORByte(guid1, 1);
packet.ReadXORByte(guid2, 5);
packet.ReadXORByte(guid1, 5);
packet.ReadXORByte(guid1, 4);
packet.ReadXORByte(guid2, 1);
packet.ReadXORByte(guid2, 7);
packet.ReadXORByte(guid1, 7);
packet.ReadXORByte(guid2, 4);
packet.ReadXORByte(guid2, 2);
packet.ReadXORByte(guid2, 0);
packet.ReadXORByte(guid2, 6);
packet.ReadXORByte(guid1, 6);
packet.ReadXORByte(guid1, 0);
packet.ReadXORByte(guid1, 3);
packet.ReadXORByte(guid1, 2);
packet.ReadXORByte(guid2, 3);
packet.WriteGuid("Pet Guid", guid1);
packet.WriteGuid("Pet Number", guid2);
var PetGuid = new Guid(BitConverter.ToUInt64(guid1, 0));
var PetNumberGuid = new Guid(BitConverter.ToUInt64(guid2, 0));
var PetNumber = PetNumberGuid.GetEntry().ToString(CultureInfo.InvariantCulture); // Not sure about this.
// Store temporary name from Pet Number GUID (will be retrieved as uint64 in SMSG_PET_NAME_QUERY_RESPONSE)
StoreGetters.AddName(PetGuid, PetNumber);
}
示例10: HandleObjectUpdateFailed
public static void HandleObjectUpdateFailed(Packet packet)
{
var guid = packet.StartBitStream(3, 5, 6, 0, 1, 2, 7, 4);
packet.ParseBitStream(guid, 0, 6, 5, 7, 2, 1, 3, 4);
packet.WriteGuid("Guid", guid);
}
示例11: HandleBattlePetDeletePet
public static void HandleBattlePetDeletePet(Packet packet)
{
var guid = packet.StartBitStream(3, 5, 6, 2, 4, 0, 7, 1);
packet.ResetBitReader();
packet.ParseBitStream(guid, 4, 1, 5, 0, 7, 2, 3, 6);
packet.WriteGuid("Guid", guid);
}
示例12: HandleGroupInvite
public static void HandleGroupInvite(Packet packet)
{
var crossRealmGuid = new byte[8];
packet.ReadInt32("Int114");
packet.ReadByte("Byte118");
packet.ReadInt32("Int128");
crossRealmGuid[7] = packet.ReadBit();
var realmNameLen = packet.ReadBits(9);
crossRealmGuid[3] = packet.ReadBit();
var nameLen = packet.ReadBits(9);
crossRealmGuid[2] = packet.ReadBit();
crossRealmGuid[5] = packet.ReadBit();
crossRealmGuid[4] = packet.ReadBit();
crossRealmGuid[0] = packet.ReadBit();
crossRealmGuid[1] = packet.ReadBit();
crossRealmGuid[6] = packet.ReadBit();
packet.ReadXORByte(crossRealmGuid, 7);
packet.ReadXORByte(crossRealmGuid, 6);
packet.ReadXORByte(crossRealmGuid, 0);
packet.ReadXORByte(crossRealmGuid, 4);
packet.ReadWoWString("Name", nameLen);
packet.ReadXORByte(crossRealmGuid, 1);
packet.ReadXORByte(crossRealmGuid, 2);
packet.ReadXORByte(crossRealmGuid, 3);
packet.ReadWoWString("Realm Name", realmNameLen);
packet.ReadXORByte(crossRealmGuid, 5);
packet.WriteGuid("crossRealmGuid", crossRealmGuid);
}
示例13: HandleGOReportUse
public static void HandleGOReportUse(Packet packet)
{
var guid = packet.StartBitStream(7, 0, 3, 2, 1, 6, 5, 4);
packet.ParseBitStream(guid, 1, 3, 5, 4, 6, 7, 2, 0);
packet.WriteGuid("GameObject Guid", guid);
}
示例14: HandleGuildPlayerSetNote
public static void HandleGuildPlayerSetNote(Packet packet)
{
var playerGUID = new byte[8];
playerGUID[1] = packet.ReadBit();
var noteLength = packet.ReadBits("note length", 8);
playerGUID[4] = packet.ReadBit();
playerGUID[2] = packet.ReadBit();
var ispublic = packet.ReadBit("IsPublic");
playerGUID[3] = packet.ReadBit();
playerGUID[5] = packet.ReadBit();
playerGUID[0] = packet.ReadBit();
playerGUID[6] = packet.ReadBit();
playerGUID[7] = packet.ReadBit();
packet.ReadXORByte(playerGUID, 5);
packet.ReadXORByte(playerGUID, 1);
packet.ReadXORByte(playerGUID, 6);
packet.ReadWoWString("note", noteLength);
packet.ReadXORByte(playerGUID, 0);
packet.ReadXORByte(playerGUID, 7);
packet.ReadXORByte(playerGUID, 4);
packet.ReadXORByte(playerGUID, 3);
packet.ReadXORByte(playerGUID, 2);
packet.WriteGuid("Player GUID", playerGUID);
}
示例15: HandleQuestgiverStatusQuery
public static void HandleQuestgiverStatusQuery(Packet packet)
{
var guid = packet.StartBitStream(4, 3, 2, 1, 0, 5, 7, 6);
packet.ParseBitStream(guid, 5, 7, 4, 0, 2, 1, 6, 3);
packet.WriteGuid("NPC Guid", guid);
}