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


C# BigEndianWriter.WriteShort方法代码示例

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


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

示例1: Serialize

 public override void Serialize(BigEndianWriter writer)
 {
     writer.WriteUShort((ushort) SpellsId.Length);
     foreach (var entry in SpellsId)
     {
         writer.WriteShort(entry);
     }
     writer.WriteShort(BoostPoint);
 }
开发者ID:Riul,项目名称:emulator,代码行数:9,代码来源:SpellForgottenMessage.cs

示例2: Serialize

 public override void Serialize(BigEndianWriter writer)
 {
     base.Serialize(writer);
     writer.WriteShort(Days);
     writer.WriteShort(Hours);
     writer.WriteShort(Minutes);
 }
开发者ID:Riul,项目名称:emulator,代码行数:7,代码来源:ObjectEffectDuration.cs

示例3: Serialize

 public override void Serialize(BigEndianWriter writer)
 {
     base.Serialize(writer);
     writer.WriteShort(HumanoidInfo.TypeId);
     HumanoidInfo.Serialize(writer);
     writer.WriteInt(AccountId);
 }
开发者ID:Riul,项目名称:emulator,代码行数:7,代码来源:GameRolePlayHumanoidInformations.cs

示例4: Serialize

 public virtual void Serialize(BigEndianWriter writer)
 {
     writer.WriteShort(ActionId);
     writer.WriteInt(SourceId);
     writer.WriteShort(Effect.TypeId);
     Effect.Serialize(writer);
 }
开发者ID:Riul,项目名称:emulator,代码行数:7,代码来源:FightDispellableEffectExtendedInformations.cs

示例5: BuildPacket

        private void BuildPacket(BigEndianWriter writer)
        {
            byte[] data = writer.Data;

            writer.Clear();

            int messageLenghtType = ComputeTypeLen(data.Length);
            short header = ComputeStaticHeader((int) MessageId, messageLenghtType);

            writer.WriteShort(header);

            switch (messageLenghtType)
            {
                case 1:
                    writer.WriteByte((byte) data.Length);
                    break;
                case 2:
                    writer.WriteShort((short) data.Length);
                    break;
                case 3:
                    writer.WriteByte((byte) (data.Length >> 16 & 255));
                    writer.WriteShort((short) (data.Length & 65535));
                    break;
            }

            writer.WriteBytes(data);
        }
开发者ID:Riul,项目名称:emulator,代码行数:27,代码来源:NetworkMessage.cs

示例6: Serialize

 public override void Serialize(BigEndianWriter writer)
 {
     base.Serialize(writer);
     writer.WriteShort(MarkId);
     writer.WriteInt(TriggeringCharacterId);
     writer.WriteShort(TriggeredSpellId);
 }
开发者ID:Riul,项目名称:emulator,代码行数:7,代码来源:GameActionFightTriggerGlyphTrapMessage.cs

示例7: Serialize

 public override void Serialize(BigEndianWriter writer)
 {
     base.Serialize(writer);
     writer.WriteShort(DiceNum);
     writer.WriteShort(DiceSide);
     writer.WriteShort(DiceConst);
 }
开发者ID:Riul,项目名称:emulator,代码行数:7,代码来源:ObjectEffectDice.cs

示例8: Serialize

 public override void Serialize(BigEndianWriter writer)
 {
     writer.WriteUShort((ushort) Cells.Length);
     foreach (var entry in Cells)
     {
         writer.WriteShort(entry);
     }
 }
开发者ID:Riul,项目名称:emulator,代码行数:8,代码来源:ObjectGroundRemovedMultipleMessage.cs

示例9: Serialize

 public override void Serialize(BigEndianWriter writer)
 {
     writer.WriteUShort((ushort) InteractiveElements.Length);
     foreach (var entry in InteractiveElements)
     {
         writer.WriteShort(entry.TypeId);
         entry.Serialize(writer);
     }
 }
开发者ID:Riul,项目名称:emulator,代码行数:9,代码来源:InteractiveMapUpdateMessage.cs

示例10: Serialize

 public virtual void Serialize(BigEndianWriter writer)
 {
     writer.WriteUShort((ushort) Objects.Length);
     foreach (var entry in Objects)
     {
         writer.WriteShort(entry);
     }
     writer.WriteInt(Kamas);
 }
开发者ID:Riul,项目名称:emulator,代码行数:9,代码来源:FightLoot.cs

示例11: Serialize

 public override void Serialize(BigEndianWriter writer)
 {
     writer.WriteShort(DungeonId);
     writer.WriteUShort((ushort) Players.Length);
     foreach (var entry in Players)
     {
         entry.Serialize(writer);
     }
 }
开发者ID:Riul,项目名称:emulator,代码行数:9,代码来源:DungeonPartyFinderRoomContentMessage.cs

示例12: Serialize

 public override void Serialize(BigEndianWriter writer)
 {
     writer.WriteUShort((ushort) Fighters.Length);
     foreach (var entry in Fighters)
     {
         writer.WriteShort(entry.TypeId);
         entry.Serialize(writer);
     }
 }
开发者ID:Riul,项目名称:emulator,代码行数:9,代码来源:GameFightSynchronizeMessage.cs

示例13: Serialize

 public override void Serialize(BigEndianWriter writer)
 {
     writer.WriteUShort((ushort) IgnoredList.Length);
     foreach (var entry in IgnoredList)
     {
         writer.WriteShort(entry.TypeId);
         entry.Serialize(writer);
     }
 }
开发者ID:Riul,项目名称:emulator,代码行数:9,代码来源:IgnoredListMessage.cs

示例14: Serialize

 public override void Serialize(BigEndianWriter writer)
 {
     writer.WriteUShort((ushort) KeyMovements.Length);
     foreach (var entry in KeyMovements)
     {
         writer.WriteShort(entry);
     }
     writer.WriteInt(ActorId);
 }
开发者ID:Riul,项目名称:emulator,代码行数:9,代码来源:GameMapMovementMessage.cs

示例15: Serialize

 public override void Serialize(BigEndianWriter writer)
 {
     base.Serialize(writer);
     writer.WriteShort(DungeonId);
     writer.WriteUShort((ushort) PlayersDungeonReady.Length);
     foreach (var entry in PlayersDungeonReady)
     {
         writer.WriteBoolean(entry);
     }
 }
开发者ID:Riul,项目名称:emulator,代码行数:10,代码来源:PartyInvitationDungeonDetailsMessage.cs


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