当前位置: 首页>>代码示例>>C#>>正文


C# Packet.ReadWoWString方法代码示例

本文整理汇总了C#中WowPacketParser.Misc.Packet.ReadWoWString方法的典型用法代码示例。如果您正苦于以下问题:C# Packet.ReadWoWString方法的具体用法?C# Packet.ReadWoWString怎么用?C# Packet.ReadWoWString使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在WowPacketParser.Misc.Packet的用法示例。


在下文中一共展示了Packet.ReadWoWString方法的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。

示例1: HandleChatAddonMessageParty

 public static void HandleChatAddonMessageParty(Packet packet)
 {
     var len33 = packet.ReadBits(8);
     var len16 = packet.ReadBits(5);
     packet.ReadWoWString("Message", len33);
     packet.ReadWoWString("Prefix", len16);
 }
开发者ID:ChipLeo,项目名称:WowPacketParser,代码行数:7,代码来源:AddonHandler.cs

示例2: HandleBattlePetModifyName

        public static void HandleBattlePetModifyName(Packet packet)
        {
            var guid = new byte[8];
            guid[5] = packet.ReadBit(); // 93
            guid[7] = packet.ReadBit(); // 95
            guid[3] = packet.ReadBit(); // 91
            guid[0] = packet.ReadBit(); // 88
            guid[6] = packet.ReadBit(); // 94
            var len = packet.ReadBits("Len", 7);
            guid[2] = packet.ReadBit(); // 90
            guid[1] = packet.ReadBit(); // 89
            var hasDeclinedNames = packet.ReadBit("hasDeclNames"); // 421
            guid[4] = packet.ReadBit(); // 92

            var declinedNamesLen = new uint[5];

            if (hasDeclinedNames)
                for ( var i = 5; i > 0; i--)
                    declinedNamesLen[i-1] = packet.ReadBits(7);

            packet.ResetBitReader();

            packet.ParseBitStream(guid, 3, 0, 6, 1, 5, 2, 4, 7);
            packet.WriteGuid("Guid", guid);

            packet.ReadWoWString("Nick", len);

            if (hasDeclinedNames)
                for (var i = 5; i > 0; i--)
                    packet.ReadWoWString("declNames", declinedNamesLen[i - 1], i);
        }
开发者ID:nelegalno,项目名称:WowPacketParser,代码行数:31,代码来源:BattlePetHandlers.cs

示例3: HandleChatAddonMessageInstanceChat

 public static void HandleChatAddonMessageInstanceChat(Packet packet)
 {
     var len272 = packet.ReadBits(5);
     var len16 = packet.ReadBits(8);
     packet.ReadWoWString("Message", len16);
     packet.ReadWoWString("Prefix", len272);
 }
开发者ID:ChipLeo,项目名称:WowPacketParser,代码行数:7,代码来源:AddonHandler.cs

示例4: HandleChannelBan

 public static void HandleChannelBan(Packet packet)
 {
     var channelLength = packet.ReadBits(8);
     var nameLength = packet.ReadBits(7);
     packet.ReadWoWString("Channel", channelLength);
     packet.ReadWoWString("Player to ban", nameLength);
 }
开发者ID:Nihilianth,项目名称:WowPacketParser,代码行数:7,代码来源:ChannelHandler.cs

示例5: HandleEquipmentSetList

        public static void HandleEquipmentSetList(Packet packet)
        {
            var count = packet.ReadInt32("Count");

            for (var i = 0; i < count; i++)
            {
                packet.ReadInt32("Type", i);
                packet.ReadUInt64("Guid", i);
                packet.ReadUInt32("SetID", i);
                uint ignoreMask = packet.ReadUInt32("IgnoreMask");

                for (var j = 0; j < NumSlots; j++)
                {
                    bool ignore = (ignoreMask & (1 << j)) != 0;
                    packet.ReadPackedGuid128("Pieces" + (ignore ? " (Ignored)" : ""), i, j);
                    packet.ReadInt32("Appearances", i);
                }

                for (var j = 0; j < 2; j++)
                    packet.ReadInt32("Enchants", i);

                packet.ResetBitReader();
                var setNameLen = packet.ReadBits(8);
                var setIconLen = packet.ReadBits(9);

                packet.ReadWoWString("SetName", setNameLen, i);
                packet.ReadWoWString("SetIcon", setIconLen, i);
            }
        }
开发者ID:TrinityCore,项目名称:WowPacketParser,代码行数:29,代码来源:EquipmentSetHandler.cs

示例6: HandleClientChatMessageAddon434

 public static void HandleClientChatMessageAddon434(Packet packet)
 {
     var length1 = (int)packet.ReadBits(9);
     var length2 = (int)packet.ReadBits(5);
     packet.ReadWoWString("Message", length1);
     packet.ReadWoWString("Prefix", length2);
 }
开发者ID:Kinzcool,项目名称:WowPacketParser,代码行数:7,代码来源:ChatHandler.cs

示例7: HandleSetTimeZoneInformation

 public static void HandleSetTimeZoneInformation(Packet packet)
 {
     var len1 = packet.ReadBits(7);
     var len2 = packet.ReadBits(7);
     packet.ReadWoWString("Server Location", len2);
     packet.ReadWoWString("Server Location", len1);
 }
开发者ID:horn,项目名称:WowPacketParser,代码行数:7,代码来源:MiscellaneousHandler.cs

示例8: HandleGuildQueryResponse

        public static void HandleGuildQueryResponse(Packet packet)
        {
            packet.ReadPackedGuid128("Guild Guid");

            var hasData = packet.ReadBit();
            if (hasData)
            {
                packet.ReadPackedGuid128("GuildGUID");
                packet.ReadInt32("VirtualRealmAddress");
                var rankCount = packet.ReadInt32("RankCount");
                packet.ReadInt32("EmblemColor");
                packet.ReadInt32("EmblemStyle");
                packet.ReadInt32("BorderColor");
                packet.ReadInt32("BorderStyle");
                packet.ReadInt32("BackgroundColor");

                packet.ResetBitReader();
                var nameLen = packet.ReadBits(7);

                for (var i = 0; i < rankCount; i++)
                {
                    packet.ReadInt32("RankID", i);
                    packet.ReadInt32("RankOrder", i);

                    packet.ResetBitReader();
                    var rankNameLen = packet.ReadBits(7);
                    packet.ReadWoWString("Rank Name", rankNameLen, i);
                }

                packet.ReadWoWString("Guild Name", nameLen);
            }
        }
开发者ID:TrinityCore,项目名称:WowPacketParser,代码行数:32,代码来源:GuildHandler.cs

示例9: HandlePetNameQueryResponse

        public static void HandlePetNameQueryResponse(Packet packet)
        {
            var number = packet.ReadUInt64("Pet number");
            var hasData = packet.ReadBit();
            if (!hasData)
                return;

            const int maxDeclinedNameCases = 5;
            var declinedNameLen = new int[maxDeclinedNameCases];
            for (var i = 0; i < maxDeclinedNameCases; ++i)
                declinedNameLen[i] = (int)packet.ReadBits(7);

            packet.ReadBit("Declined");
            var len = packet.ReadBits(8);

            for (var i = 0; i < maxDeclinedNameCases; ++i)
                if (declinedNameLen[i] != 0)
                    packet.ReadWoWString("Declined name", declinedNameLen[i], i);

            packet.ReadTime("Time");
            var petName = packet.ReadWoWString("Pet name", len);

            var guidArray = (from pair in StoreGetters.NameDict where Equals(pair.Value, number) select pair.Key).ToList();
            foreach (var guid in guidArray)
                StoreGetters.NameDict[guid] = petName;
        }
开发者ID:Oboltys,项目名称:WowPacketParser,代码行数:26,代码来源:PetHandler.cs

示例10: HandleGroupInvite

        public static void HandleGroupInvite(Packet packet)
        {
            var guid = new byte[8];

            packet.ReadInt32("Unk Int32"); // Non-zero in cross realm parties (1383)
            packet.ReadInt32("Unk Int32"); // Always 0
            packet.ReadByte("unk");

            guid[2] = packet.ReadBit();
            var strLen = packet.ReadBits(9);
            guid[0] = packet.ReadBit();

            guid[3] = packet.ReadBit();
            guid[4] = packet.ReadBit();
            guid[6] = packet.ReadBit();
            guid[7] = packet.ReadBit();
            guid[5] = packet.ReadBit();
            guid[1] = packet.ReadBit();

            var nameLen = packet.ReadBits(9);

            packet.ResetBitReader();

            packet.ReadXORByte(guid, 5);
            packet.ReadWoWString("Realm Name", strLen); // Non-empty in cross realm parties
            packet.ReadWoWString("Name", nameLen);
            packet.ReadXORByte(guid, 4);
            packet.ReadXORByte(guid, 0);
            packet.ReadXORByte(guid, 3);
            packet.ReadXORByte(guid, 6);
            packet.ReadXORByte(guid, 1);
            packet.ReadXORByte(guid, 2);
            packet.ReadXORByte(guid, 7);
            packet.WriteGuid("Guid", guid); // Non-zero in cross realm parties
        }
开发者ID:Oboltys,项目名称:WowPacketParser,代码行数:35,代码来源:GroupHandler.cs

示例11: 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);
        }
开发者ID:ChipLeo,项目名称:WowPacketParser,代码行数:31,代码来源:GroupHandler.cs

示例12: HandleCalendarSendEvent

        public static void HandleCalendarSendEvent(Packet packet)
        {
            packet.ReadByte("EventType");
            packet.ReadPackedGuid128("OwnerGUID");
            packet.ReadInt64("EventID");
            packet.ReadByte("GetEventType");
            packet.ReadInt32("TextureID");
            packet.ReadUInt32("Flags");
            packet.ReadUInt32("Date");
            packet.ReadUInt32("LockDate");
            packet.ReadPackedGuid128("EventGuildID");

            var inviteCount = packet.ReadInt32("InviteCount");

            packet.ResetBitReader();

            var lenEventName = packet.ReadBits(8);
            var lenDescription = packet.ReadBits(11);

            packet.ResetBitReader();

            for (int i = 0; i < inviteCount; i++)
                V6_0_2_19033.Parsers.CalendarHandler.ReadCalendarEventInviteInfo(packet, "Invites", i);

            packet.ReadWoWString("EventName", lenEventName);
            packet.ReadWoWString("Description", lenDescription);
        }
开发者ID:TrinityCore,项目名称:WowPacketParser,代码行数:27,代码来源:CalendarHandler.cs

示例13: HandleClientChatMessageWhisper

 public static void HandleClientChatMessageWhisper(Packet packet)
 {
     packet.ReadEnum<Language>("Language", TypeCode.Int32);
     var msgLen = packet.ReadBits(8);
     var recvName = packet.ReadBits(9);
     packet.ReadWoWString("Message", msgLen);
     packet.ReadWoWString("Receivers Name", recvName);
 }
开发者ID:DDuarte,项目名称:WowPacketParser,代码行数:8,代码来源:ChatHandler.cs

示例14: HandleServerTimezone

        public static void HandleServerTimezone(Packet packet)
        {
            var Location2Lenght = packet.ReadBits(7);
            var Location1Lenght = packet.ReadBits(7);

            packet.ReadWoWString("Timezone Location1", Location1Lenght);
            packet.ReadWoWString("Timezone Location2", Location2Lenght);
        }
开发者ID:Nihilianth,项目名称:WowPacketParser,代码行数:8,代码来源:MiscellaneousHandler.cs

示例15: HandleChannelMisc1

        public static void HandleChannelMisc1(Packet packet)
        {
            var lenChannelName = packet.ReadBits(7);
            var lenName = packet.ReadBits(9);

            packet.ReadWoWString("ChannelName", lenChannelName);
            packet.ReadWoWString("Name", lenName);
        }
开发者ID:Oboltys,项目名称:WowPacketParser,代码行数:8,代码来源:ChannelHandler.cs


注:本文中的WowPacketParser.Misc.Packet.ReadWoWString方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。