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


C# Utils.WriteShort方法代码示例

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


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

示例1: serialize

 public void serialize(Utils.Objects.Packet sender)
 {
     sender.WriteShort((short)Base);
     sender.WriteShort((short)ObjectsAndMountBonus);
     sender.WriteShort((short)AlignGiftBonus);
     sender.WriteShort((short)ContextModif);
 }
开发者ID:Emudofus,项目名称:Aldos,代码行数:7,代码来源:CharacterBaseCharacteristic.cs

示例2: serialize

 public static void serialize(Utils.Objects.Packet sender, int accountId)
 {
     sender.WriteInt(accountId);
     sender.WriteBool(false); // tutorial available
     sender.WriteShort(8191); // breeds visible
     sender.WriteShort(2047); // breeds available
 }
开发者ID:Emudofus,项目名称:Aldos,代码行数:7,代码来源:AccountCapabilitiesMessage.cs

示例3: serialize

 public static void serialize(Utils.Objects.Packet sender, List<int> path, Global.Character actor)
 {
     sender.WriteShort( (short)path.Count );
     foreach (int cell in path)
         sender.WriteShort((short)cell);
     sender.WriteInt(actor.Guid);
 }
开发者ID:Emudofus,项目名称:Aldos,代码行数:7,代码来源:GameMapMovementMessage.cs

示例4: serialize

 public static void serialize(Utils.Objects.Packet sender, Global.FriendList friends)
 {
     sender.WriteShort((short)friends.Count);
     foreach (Types.context.FriendInformations friend in friends.ToList())
     {
             sender.WriteShort((short)friend.ProtocolID);
             friend.serialize(sender);
     }
 }
开发者ID:Emudofus,项目名称:Aldos,代码行数:9,代码来源:FriendsListMessage.cs

示例5: serialize

 public static void serialize(Utils.Objects.Packet sender, List<Types.game.friend.FriendInformations> friends)
 {
     sender.WriteShort((short)friends.Count);
     foreach (Types.game.friend.FriendInformations friend in friends)
     {
         sender.WriteShort((short)friend.ProtocolID);
         friend.serialize(sender);
     }
 }
开发者ID:Emudofus,项目名称:Aldos,代码行数:9,代码来源:FriendsListMessage.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 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

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

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

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

示例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((short)Types.game.context.EntityDispositionInformations.ProtocolID);
            _target.Disposition.serialize(sender);
        }
开发者ID:Emudofus,项目名称:Aldos,代码行数:25,代码来源:GameRolePlayActorInformations.cs

示例12: serialize

        public static void serialize(Utils.Objects.Packet sender, List<Global.Character> characters)
        {
            // On classe la liste dans l'ordre décroissant de la dernière utilisation
            characters = characters.OrderByDescending(x => x.LastUse).ToList();

            sender.WriteBool(false); // hasStartupActions
            sender.WriteShort( (short)characters.Count );

            foreach (Global.Character each in characters)
            {
                sender.WriteShort((short)Types.game.character.CharacterBaseInformations.ProtocolID);
                new Types.game.character.CharacterBaseInformations(each).serialize(sender);
            }
        }
开发者ID:Emudofus,项目名称:Aldos,代码行数:14,代码来源:CharactersListMessage.cs

示例13: serialize

 public static void serialize(Utils.Objects.Packet sender)
 {
     int nFlags = 0;
     sender.WriteShort((short)nFlags);
     for (int i = 0; i < nFlags; ++i)
         sender.WriteInt(0);
 }
开发者ID:Emudofus,项目名称:Aldos,代码行数:7,代码来源:NotificationListMessage.cs

示例14: serialize

 public static void serialize(Utils.Objects.Packet sender, List<int> path, int targetMap)
 {
     sender.WriteShort( (short)path.Count );
     foreach (int cell in path)
         sender.WriteCell(cell);
     sender.WriteInt(targetMap);
 }
开发者ID:Emudofus,项目名称:Aldos,代码行数:7,代码来源:GameMapMovementRequestMessage.cs

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


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