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


C# StreamHandler.ReadGuid方法代码示例

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


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

示例1: Read

 public override void Read(StreamHandler reader)
 {
     Entity = reader.ReadGuid();
     Model = reader.ReadUInt32();
     Race = (Races)reader.ReadByte();
     Gender = (Genders)reader.ReadByte();
     Class = (Classes)reader.ReadByte();
     Skin = reader.ReadByte();
     Face = reader.ReadByte();
     Hair = reader.ReadByte();
     HairColor = reader.ReadByte();
     FaceFeatures = reader.ReadByte();
     Guild = reader.ReadGuid();
     Head = reader.ReadUInt32();
     Shoulders = reader.ReadUInt32();
     Body = reader.ReadUInt32();
     Chest = reader.ReadUInt32();
     Waist = reader.ReadUInt32();
     Legs = reader.ReadUInt32();
     Feet = reader.ReadUInt32();
     Wrists = reader.ReadUInt32();
     Hands = reader.ReadUInt32();
     Back = reader.ReadUInt32();
     Tabard = reader.ReadUInt32();
 }
开发者ID:CarlosX,项目名称:Kamilla.Wow,代码行数:25,代码来源:MirrorImageData.cs

示例2: Read

        public override void Read(StreamHandler reader)
        {
            ContainerSlot = (InventorySlot)reader.ReadByte();
            Slot = (InventorySlot)reader.ReadByte();
            CastId = reader.ReadByte();
            SpellId = reader.ReadUInt32();
            ItemGuid = reader.ReadGuid();
            GlyphSlot = reader.ReadUInt32();
            UnkFlags = reader.ReadByte();

            TargetData.Read(reader);
        }
开发者ID:CarlosX,项目名称:Kamilla.Wow,代码行数:12,代码来源:UseItem.cs

示例3: Read

        public override void Read(StreamHandler reader)
        {
            this.Guid = reader.ReadGuid();
            this.Type = (LootType)reader.ReadByte();
            this.Gold = new Money(reader.ReadUInt32());
            byte itemCount = reader.ReadByte();
            byte currencyCount = reader.ReadByte();

            for (int i = 0; i < itemCount; ++i)
            {
                Item item = reader.ReadStruct<Item>();
                Items.Add(item);
            }

            for (int i = 0; i < currencyCount; ++i)
            {
                Currency currency = reader.ReadStruct<Currency>();
                Currencies.Add(currency);
            }
        }
开发者ID:CarlosX,项目名称:Kamilla.Wow,代码行数:20,代码来源:Loot.cs

示例4: PackedRead

 protected sealed override void PackedRead(StreamHandler reader)
 {
     this.Guid = reader.ReadGuid();
 }
开发者ID:CarlosX,项目名称:Kamilla.Wow,代码行数:4,代码来源:PackedGuidPacket.cs

示例5: Read

        public override void Read(StreamHandler Reader)
        {
            Caster = Reader.ReadPackedGuid();
            CastInvoker = Reader.ReadPackedGuid();
            CastId = Reader.ReadByte();
            SpellId = Reader.ReadUInt32();
            Flags = (CastFlags)Reader.ReadUInt32();
            Unk43 = Reader.ReadUInt32();
            CastTime = Reader.ReadUInt32();

            byte hits = Reader.ReadByte();
            Hits.Capacity = hits;
            for (byte i = 0; i < hits; ++i)
                Hits.Add(Reader.ReadGuid());

            byte misses = Reader.ReadByte();
            Misses.Capacity = misses;
            for (byte i = 0; i < misses; ++i)
            {
                var miss = new MissData();
                miss.Read(Reader);
                Misses.Add(miss);
            }

            TargetData.Read(Reader);

            if ((Flags & CastFlags.PredictedPower) != 0)
                PredictedPower = Reader.ReadUInt32();

            if ((Flags & CastFlags.RuneStates) != 0)
            {
                RunesBefore = (RuneStates)Reader.ReadByte();
                RunesAfter = (RuneStates)Reader.ReadByte();
                for (int i = 0; i < RuneCooldowns.Length; ++i)
                    RuneCooldowns[i] = Reader.ReadByte();
            }

            if ((Flags & CastFlags.Unk0x00020000) != 0)
            {
                Unk0x20000_Float = Reader.ReadSingle();
                Unk0x20000_UInt32 = Reader.ReadUInt32();
            }

            if ((Flags & CastFlags.Ammo) != 0)
            {
                ProjectileDisplayId = Reader.ReadUInt32();
                ProjectileInventoryType = (InventorySlotType)Reader.ReadUInt32();
            }

            if ((Flags & CastFlags.Unk0x00080000) != 0)
            {
                Unk0x80000_UInt32_1 = Reader.ReadUInt32();
                Unk0x80000_UInt32_2 = Reader.ReadUInt32();
            }

            if ((TargetData.Flags & SpellCastTargetFlags.DestLocation) != 0)
                DestLocationCounter = Reader.ReadByte();

            if ((TargetData.Flags & SpellCastTargetFlags.Unk4) != 0)
            {
                uint count = Reader.ReadUInt32();
                Unk4_Count = count;
                Unk4_List.Capacity = (int)count;

                for (uint i = 0; i < count; ++i)
                {
                    Vector3 v3 = Reader.ReadVector3();
                    WowGuid guid = Reader.ReadGuid();
                    Unk4_List.Add(new KeyValuePair<WowGuid, Vector3>(guid, v3));
                    if (guid.IsEmpty)
                        break;
                }
            }
        }
开发者ID:SkyFire,项目名称:Kamilla.Wow,代码行数:74,代码来源:SpellCasting.cs

示例6: ReadFromStreamHandler

        private void ReadFromStreamHandler(StreamHandler Reader, WowOpcodes opcode)
        {
            GameMasterMessage = (opcode == WowOpcodes.SMSG_GM_MESSAGECHAT);

            m_type = (ChatMessageType)Reader.ReadByte();
            if (m_type == ChatMessageType.Addon2)
                m_type = ChatMessageType.Addon;

            m_language = (Language)Reader.ReadUInt32();
            m_senderGUID = Reader.ReadGuid();
            m_unknownUInt32 = Reader.ReadUInt32();

            switch (m_type)
            {
                case ChatMessageType.MonsterSay:
                case ChatMessageType.MonsterParty:
                case ChatMessageType.MonsterYell:
                case ChatMessageType.MonsterWhisper:
                case ChatMessageType.MonsterEmote:
                case ChatMessageType.BattleNet:
                case ChatMessageType.RaidBossEmote:
                case ChatMessageType.RaidBossWhisper:
                    Reader.Skip(4);
                    m_senderName = Reader.ReadCString();
                    m_targetGUID = Reader.ReadGuid();
                    if (!m_targetGUID.IsEmpty
                        && !m_targetGUID.IsPlayer
                        && !m_targetGUID.IsPet)
                    {
                        Reader.Skip(4);
                        m_targetName = Reader.ReadCString();
                    }
                    if (m_language == Language.Addon)
                        m_addonPrefix = Reader.ReadCString();
                    Reader.Skip(4);
                    m_text = Reader.ReadCString();
                    m_flags = (ChatMessageFlags)Reader.ReadByte();
                    if (m_type == ChatMessageType.RaidBossEmote || m_type == ChatMessageType.RaidBossWhisper)
                    {
                        m_displayTime = Reader.ReadSingle();
                        m_suspendEvent = Reader.ReadBoolean();
                    }
                    break;
                case ChatMessageType.BGSystemNeutral:
                case ChatMessageType.BGSystemAlliance:
                case ChatMessageType.BGSystemHorde:
                    m_targetGUID = Reader.ReadGuid();
                    if (!m_targetGUID.IsEmpty
                        && !m_targetGUID.IsPlayer)
                    {
                        Reader.Skip(4);
                        m_targetName = Reader.ReadCString();
                    }
                    if (m_language == Language.Addon)
                        m_addonPrefix = Reader.ReadCString();
                    Reader.Skip(4);
                    m_text = Reader.ReadCString();
                    m_flags = (ChatMessageFlags)Reader.ReadByte();
                    break;
                case ChatMessageType.Achievement:
                case ChatMessageType.GuildAchievement:
                    m_targetGUID = Reader.ReadGuid();
                    if (m_language == Language.Addon)
                        m_addonPrefix = Reader.ReadCString();
                    Reader.Skip(4);
                    m_text = Reader.ReadCString();
                    m_flags = (ChatMessageFlags)Reader.ReadByte();
                    m_achievementId = Reader.ReadUInt32();
                    break;
                case ChatMessageType.WhisperForeign:
                    Reader.Skip(4);
                    m_senderName = Reader.ReadCString();
                    m_targetGUID = Reader.ReadGuid();
                    if (m_language == Language.Addon)
                        m_addonPrefix = Reader.ReadCString();
                    Reader.Skip(4);
                    m_text = Reader.ReadCString();
                    m_flags = (ChatMessageFlags)Reader.ReadByte();
                    break;
                default:
                    if (GameMasterMessage)
                    {
                        Reader.Skip(4);
                        m_senderName = Reader.ReadCString();
                    }
                    if (m_type == ChatMessageType.Channel)
                        m_channel = Reader.ReadCString();
                    m_targetGUID = Reader.ReadGuid();
                    if (m_language == Language.Addon)
                        m_addonPrefix = Reader.ReadCString();
                    Reader.Skip(4);
                    m_text = Reader.ReadCString();
                    m_flags = (ChatMessageFlags)Reader.ReadByte();
                    break;
            }
        }
开发者ID:CarlosX,项目名称:Kamilla.Wow,代码行数:96,代码来源:ServerChatMessage.cs

示例7: PackedRead

 protected override void PackedRead(StreamHandler reader)
 {
     this.Player = reader.ReadGuid();
 }
开发者ID:SkyFire,项目名称:Kamilla.Wow,代码行数:4,代码来源:ForcePacket.cs

示例8: PackedRead

 protected override void PackedRead(StreamHandler reader)
 {
     PlayerGuid = reader.ReadGuid();
     GuildGuid = reader.ReadGuid();
 }
开发者ID:CarlosX,项目名称:Kamilla.Wow,代码行数:5,代码来源:GuildRosterRequest.cs


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