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


C# Utils.WriteByte方法代码示例

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


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

示例1: serialize

 public static void serialize(Utils.Objects.Packet sender)
 {
     int wrapper1 = 0;
     Utils.BooleanByteWrapper.setFlag(ref wrapper1, 0, false); // cantBeAggressed
     Utils.BooleanByteWrapper.setFlag(ref wrapper1, 1, false); // cantBeChallenged
     Utils.BooleanByteWrapper.setFlag(ref wrapper1, 2, false); // cantTrade
     Utils.BooleanByteWrapper.setFlag(ref wrapper1, 3, false); // cantBeAttackedByMutant
     Utils.BooleanByteWrapper.setFlag(ref wrapper1, 4, false); // cantRun
     Utils.BooleanByteWrapper.setFlag(ref wrapper1, 5, false); // forceSlowWalk
     Utils.BooleanByteWrapper.setFlag(ref wrapper1, 6, false); // cantMinimize
     Utils.BooleanByteWrapper.setFlag(ref wrapper1, 7, false); // cantMove
     sender.WriteByte((byte)wrapper1);
     int wrapper2 = 0;
     Utils.BooleanByteWrapper.setFlag(ref wrapper2, 0, false); // cantAggress
     Utils.BooleanByteWrapper.setFlag(ref wrapper2, 1, false); // cantChallenge
     Utils.BooleanByteWrapper.setFlag(ref wrapper2, 2, false); // cantExchange
     Utils.BooleanByteWrapper.setFlag(ref wrapper2, 3, false); // cantAttack
     Utils.BooleanByteWrapper.setFlag(ref wrapper2, 4, false); // cantChat
     Utils.BooleanByteWrapper.setFlag(ref wrapper2, 5, false); // cantBeMerchant
     Utils.BooleanByteWrapper.setFlag(ref wrapper2, 6, false); // cantUseObject
     Utils.BooleanByteWrapper.setFlag(ref wrapper2, 7, false); // cantUseTaxCollector
     sender.WriteByte((byte)wrapper2);
     int wrapper3 = 0;
     Utils.BooleanByteWrapper.setFlag(ref wrapper3, 0, false); // cantUseInteractive
     Utils.BooleanByteWrapper.setFlag(ref wrapper3, 1, false); // cantSpeakToNPC
     Utils.BooleanByteWrapper.setFlag(ref wrapper3, 2, false); // cantChangeZone
     Utils.BooleanByteWrapper.setFlag(ref wrapper3, 3, false); // cantAttackMonster
     Utils.BooleanByteWrapper.setFlag(ref wrapper3, 4, false); // cantWalk8Directions
     sender.WriteByte((byte)wrapper3);
 }
开发者ID:Emudofus,项目名称:Aldos,代码行数:30,代码来源:SetCharacterRestrictionsMessage.cs

示例2: serialize

        public void serialize(Utils.Objects.Packet sender)
        {
            // MINIMAL INFO
            sender.WriteInt(Member.Guid);
            sender.WriteByte((byte)Member.Level);
            sender.WriteUTF(Member.Name);

            // LOOK
            sender.WriteShort(1); // bones ID

            sender.WriteShort(1); // nSkins
            sender.WriteShort((short)((int)Member.Classe * 10 + (int)Member.Sexe));

            sender.WriteShort((short)5);
            for (int i = 0; i < 5; ++i)
                sender.WriteInt(Member.Colors[i] | (i + 1) * 0x1000000);

            sender.WriteShort(1); // nScales
            sender.WriteShort((short)140);

            sender.WriteShort(0); // nSubEntities

            // PARTY
            sender.WriteInt(Member.Characteristics.lifePoints);
            sender.WriteInt(Member.Characteristics.maxLifePoints);
            sender.WriteShort((short)Member.Characteristics.prospecting.Total);
            sender.WriteByte(0); // regenRate
            sender.WriteShort((short)Member.Characteristics.initiative.Total);
            sender.WriteBool(false); // pvp enabled
            sender.WriteByte(0); // alignment side
        }
开发者ID:Emudofus,项目名称:Aldos,代码行数:31,代码来源:PartyMemberInformations.cs

示例3: serialize

        public void serialize(Utils.Objects.Packet sender)
        {
            // --------------- //
            // --- MINIMAL --- //
            // --------------- //

            sender.WriteInt(_character.Guid);
            sender.WriteByte( (byte)_character.Level );
            sender.WriteUTF(_character.Name);

            // ------------ //
            // --- LOOK --- //
            // ------------ //

            sender.WriteShort(1); // bones ID

            sender.WriteShort(1); // nSkins
            sender.WriteShort( (short)( (int)_character.Classe * 10 + (int)_character.Sexe) );

            sender.WriteShort((short)5);
            for (int i = 0; i < 5; ++i)
                sender.WriteInt(_character.Colors[i] | (i + 1) * 0x1000000);

            sender.WriteShort(1); // nScales
            sender.WriteShort( (short)140 );

            sender.WriteShort(0); // nSubEntities

            // ------------ //
            // --- BASE --- //
            // ------------ //

            sender.WriteByte( (byte)_character.Classe );
            sender.WriteByte( (byte)_character.Sexe );
        }
开发者ID:Emudofus,项目名称:Aldos,代码行数:35,代码来源:CharacterBaseInformations.cs

示例4: serialize

        public static void serialize(Utils.Objects.Packet packet, Global.Character character)
        {
            packet.WriteUTF(character.Name);
            packet.WriteByte((byte)character.Classe);
            packet.WriteByte((byte)character.Sexe);

            foreach (int color in character.Colors)
                packet.WriteInt(color);
        }
开发者ID:Emudofus,项目名称:Aldos,代码行数:9,代码来源:CharacterCreationRequestMessage.cs

示例5: serialize

 public static void serialize(Utils.Objects.Packet sender)
 {
     sender.WriteByte((byte)GlobalConfig.Version.Major);
     sender.WriteByte((byte)GlobalConfig.Version.Minor);
     sender.WriteByte((byte)GlobalConfig.Version.Release);
     sender.WriteUShort((ushort)GlobalConfig.Version.Revision);
     sender.WriteByte((byte)GlobalConfig.Version.BuildType);
     sender.WriteByte((byte)GlobalConfig.Version.Patch);
 }
开发者ID:Emudofus,项目名称:Aldos,代码行数:9,代码来源:Version.cs

示例6: serialize

        public static void serialize(Utils.Objects.Packet sender, List<Channel> enabled, List<Channel> disabled)
        {
            sender.WriteShort( (short)enabled.Count );
            foreach (Channel chan in enabled)
                sender.WriteByte( (byte)chan );

            sender.WriteShort( (short)disabled.Count );
            foreach (Channel chan in disabled)
                sender.WriteByte( (byte)chan );
        }
开发者ID:Emudofus,项目名称:Aldos,代码行数:10,代码来源:EnabledChannelsMessage.cs

示例7: serialize

        public static void serialize(Utils.Objects.Packet sender, Global.Account acc)
        {
            sender.WriteShort(1); // nGameServers

            sender.WriteUShort((ushort)GlobalConfig.Network.Game.Guid);
            sender.WriteByte((byte)ServerState.ONLINE);
            sender.WriteByte(0); // completion
            sender.WriteBool(true); // selectable
            sender.WriteByte( (byte)acc.Characters.Count );
        }
开发者ID:Emudofus,项目名称:Aldos,代码行数:10,代码来源:ServersListMessage.cs

示例8: serialize

        public void serialize(Utils.Objects.Packet sender)
        {
            sender.WriteInt( (int)Character.Id );
            sender.WriteByte( (byte)Character.Level );
            sender.WriteUTF(Character.Name);

            Character.Look.serialize(sender);

            sender.WriteByte( (byte)Character.Breed );
            sender.WriteByte( (byte)Character.Gender );
        }
开发者ID:Emudofus,项目名称:Aldos,代码行数:11,代码来源:CharacterBaseInformations.cs

示例9: serialize

 public static void serialize(Utils.Objects.Packet sender, Global.Account acc)
 {
     int wrapper = 0;
     Utils.BooleanByteWrapper.setFlag(ref wrapper, 0, (int)acc.GmLvl > 0);
     Utils.BooleanByteWrapper.setFlag(ref wrapper, 1, acc.Connected);
     sender.WriteByte( (byte)wrapper );
     sender.WriteUTF("[" + acc.GmLvl + "] " + acc.Nickname);
     sender.WriteInt((int)acc.Id);
     sender.WriteByte(0); // communityID
     sender.WriteUTF(""); // question
     sender.WriteDouble(31536000000); // aboTime (un an en millisecondes)
 }
开发者ID:Emudofus,项目名称:Aldos,代码行数:12,代码来源:IdentificationSuccessMessage.cs

示例10: serialize

        public void serialize(Utils.Objects.Packet sender)
        {
            sender.WriteByte((byte)alignmentSide);
            sender.WriteByte((byte)alignmentValue);
            sender.WriteByte((byte)alignmentGrade);
            sender.WriteShort((short)dishonor);
            sender.WriteInt(characterPower);

            sender.WriteShort((short)honor);
            sender.WriteShort((short)honorGradeFloor);
            sender.WriteShort((short)honorNextGradeFloor);
            sender.WriteBool(pvpEnabled);
        }
开发者ID:Emudofus,项目名称:Aldos,代码行数:13,代码来源:ActorExtendedAlignmentInformations.cs

示例11: serialize

        public void serialize(Utils.Objects.Packet sender)
        {
            sender.WriteInt(_target.Guid);

            ////// ENTITY LOOK //////

            sender.WriteShort(1); // bones ID

            sender.WriteShort(1); // nSkins
            sender.WriteShort( (short)( (int)_target.Classe * 10 + (int)_target.Sexe) );

            sender.WriteShort((short)5);
            for (int i = 0; i < 5; ++i)
                sender.WriteInt(_target.Colors[i] | (i + 1) * 0x1000000);

            sender.WriteShort(1); // nScales
            sender.WriteShort( (short)140 );

            sender.WriteShort(0); // nSubEntities

            ////// ENTITY DISPOSITION

            sender.WriteShort(60); // EntityDisposition id

            sender.WriteShort(_target.CurCell);
            sender.WriteByte( (byte)_target.Direction );
        }
开发者ID:Emudofus,项目名称:Aldos,代码行数:27,代码来源:GameRolePlayActorInformations+(Antoine-PC's+conflicted+copy+2011-02-12).cs

示例12: serialize

 public static void serialize(Utils.Objects.Packet sender, Channel chan, string message, Global.Character target)
 {
     sender.WriteByte((byte)chan);
     sender.WriteUTF(message);
     sender.WriteInt(Global.Environnement.getInstance().Timestamp);
     sender.WriteUTF("abcdef"); // fingerprint ???
     sender.WriteInt(target.Guid);
     sender.WriteUTF(target.Name);
 }
开发者ID:Emudofus,项目名称:Aldos,代码行数:9,代码来源:ChatServerCopyMessage.cs

示例13: serialize

        public void serialize(Utils.Objects.Packet sender)
        {
            // MINIMAL INFO
            sender.WriteInt((int)Member.Id);
            sender.WriteByte((byte)Member.Level);
            sender.WriteUTF(Member.Name);

            Member.Look.serialize(sender);

            // PARTY
            sender.WriteInt(Member.Characteristics.lifePoints);
            sender.WriteInt(Member.Characteristics.maxLifePoints);
            sender.WriteShort((short)Member.Characteristics.prospecting.Total);
            sender.WriteByte(0); // regenRate
            sender.WriteShort((short)Member.Characteristics.initiative.Total);
            sender.WriteBool(false); // pvp enabled
            sender.WriteByte(0); // alignment side
        }
开发者ID:Emudofus,项目名称:Aldos,代码行数:18,代码来源:PartyMemberInformations.cs

示例14: serialize

 public static void serialize(Utils.Objects.Packet sender, Channel chan, string message, Global.Character target)
 {
     sender.WriteByte((byte)chan);
     sender.WriteUTF(message);
     sender.WriteInt( (int)(DateTime.Now - new DateTime(1970, 1, 1)).TotalSeconds );
     sender.WriteUTF("abcdef"); // fingerprint ???
     sender.WriteInt((int)target.Id);
     sender.WriteUTF(target.Name);
 }
开发者ID:Emudofus,项目名称:Aldos,代码行数:9,代码来源:ChatServerCopyMessage.cs

示例15: serialize

 public static void serialize(Utils.Objects.Packet sender, Channel chan, string message, Global.Character actor)
 {
     sender.WriteByte((byte)chan);
     sender.WriteUTF(message);
     sender.WriteInt( (int)(DateTime.Now - new DateTime(1970, 1, 1)).TotalSeconds );
     sender.WriteUTF(string.Empty);
     sender.WriteInt((int)actor.Id);
     sender.WriteUTF(actor.Name);
     sender.WriteInt((int)actor.Owner.Id);
 }
开发者ID:Emudofus,项目名称:Aldos,代码行数:10,代码来源:ChatServerMessage.cs


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