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


C# Utils.WriteUTF方法代码示例

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


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

示例1: serialize

 public static void serialize(Utils.Objects.Packet sender, string login, string hashedPasswd, bool autoConnect)
 {
     Version.serialize(sender);
     sender.WriteUTF(login);
     sender.WriteUTF(hashedPasswd);
     sender.WriteBool(autoConnect);
 }
开发者ID:Emudofus,项目名称:Aldos,代码行数:7,代码来源:IdentificationMessage.cs

示例2: serialize

 public static void serialize(Utils.Objects.Packet sender, string ticket, string senderIp)
 {
     sender.WriteShort( (short)GlobalConfig.Network.Game.Guid );
     sender.WriteUTF(senderIp == "127.0.0.1" ? "127.0.0.1" : GlobalConfig.Network.IP);
     sender.WriteUShort( (ushort)GlobalConfig.Network.Game.Port );
     sender.WriteBool(true); // can create characters
     sender.WriteUTF(ticket);
 }
开发者ID:Emudofus,项目名称:Aldos,代码行数:8,代码来源:SelectedServerDataMessage.cs

示例3: serialize

        public static void serialize(Utils.Objects.Packet sender, Global.Character senderChar, Global.Character targetChar)
        {
            sender.WriteInt(senderChar.Guid);
            sender.WriteUTF(senderChar.Name);

            sender.WriteInt(targetChar.Guid);
            sender.WriteUTF(targetChar.Name);
        }
开发者ID:Emudofus,项目名称:Aldos,代码行数:8,代码来源:PartyInvitationMessage.cs

示例4: 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

示例5: 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

示例6: 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(Global.Environnement.getInstance().Timestamp);
     sender.WriteUTF("abcdef");
     sender.WriteInt(actor.Guid);
     sender.WriteUTF(actor.Name);
     sender.WriteInt(actor.AccountID);
 }
开发者ID:Emudofus,项目名称:Aldos,代码行数:10,代码来源:ChatServerMessage.cs

示例7: 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

示例8: 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

示例9: 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

示例10: 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

示例11: 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

示例12: 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

示例13: serialize

        public void serialize(Utils.Objects.Packet sender)
        {
            sender.WriteUTF(Friend.Nickname);
            sender.WriteByte(Friend.CurrentCharacter != null ? (byte)Friend.CurrentCharacter.State : (byte)Enums.PlayerStateEnum.NOT_CONNECTED);
            sender.WriteInt(0);

            if (Friend.CurrentCharacter != null && Friend.CurrentCharacter.IsConnected)
            {
                sender.WriteUTF(Friend.CurrentCharacter.Name);
                sender.WriteShort((short)Friend.CurrentCharacter.Level);
                sender.WriteByte(0); // alignmentSide
                sender.WriteByte((byte)Friend.CurrentCharacter.Classe);
                sender.WriteByte((byte)Friend.CurrentCharacter.Sexe);

                sender.WriteInt(0); // guild guid
                sender.WriteUTF(""); // guild name

                sender.WriteByte(0xff); // mood smiley id
            }
        }
开发者ID:Emudofus,项目名称:Aldos,代码行数:20,代码来源:FriendInformations.cs

示例14: serialize

        public static void serialize(Utils.Objects.Packet sender, Enums.TextInformationType type, int msgId, string message)
        {
            sender.WriteByte((byte)type);
            sender.WriteShort((byte)msgId);

            if (message != string.Empty)
            {
                sender.WriteShort(1); // nMessages
                sender.WriteUTF(message);
            }
            else
                sender.WriteShort(0); // nMessages
        }
开发者ID:Emudofus,项目名称:Aldos,代码行数:13,代码来源:TextInformationMessage.cs

示例15: 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


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