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


C# PacketWriter.String方法代码示例

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


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

示例1: GuildSetTitle2

 public static byte[] GuildSetTitle2(int guildid, int charid, string title)
 {
     PacketWriter Writer = new PacketWriter();
     Writer.Create(OperationCode.SERVER_GUILD_SET_TITLE2);
     Writer.Byte(1);
     Writer.DWord(guildid);
     Writer.DWord(charid);
     Writer.Word(title.Length);
     Writer.String(title);
     return Writer.GetBytes();
 }
开发者ID:ManhHaHY,项目名称:ClowenEmulationOpenSourceProject,代码行数:11,代码来源:Packets.cs

示例2: StallBuyItem2

        public static byte[] StallBuyItem2(string charname, byte stallslot, List<WorldMgr.stall.stallItem> ItemList)
        {
            PacketWriter Writer = new PacketWriter();
            Writer.Create(OperationCode.SERVER_STALL_PLAYERUPDATE);
            Writer.Byte(3);
            Writer.Byte(stallslot);
            Writer.Word(charname.Length);
            Writer.String(charname);
            StallItemPacket(ItemList, Writer);

            return Writer.GetBytes();
        }
开发者ID:ManhHaHY,项目名称:ClowenEmulationOpenSourceProject,代码行数:12,代码来源:StallSystemPackets.cs

示例3: PartyRequest

        public static byte[] PartyRequest(byte Type, int id, byte type)
        {
            //Create new packet writer
            PacketWriter Writer = new PacketWriter();
            //Add opcode
            Writer.Create(OperationCode.SERVER_PARTY_REQUEST);
            //Write type byte
            Writer.Byte(Type);
            //Create switch on type
            switch (Type)
            {
                case 6:
                    //Union invite
                    Writer.DWord(id);
                    break;
                case 5:
                    //Guild invitation
                    Writer.DWord(id);
                    PlayerMgr InvitedPlayer = Helpers.GetInformation.GetPlayer(id);
                    Writer.Word(InvitedPlayer.Character.Information.Name.Length);
                    Writer.String(InvitedPlayer.Character.Information.Name);
                    Writer.Word(InvitedPlayer.Character.Network.Guild.Name.Length);
                    Writer.String(InvitedPlayer.Character.Network.Guild.Name);
                    break;
                case 2:
                    //Party invite
                    Writer.DWord(id);
                    Writer.Byte(type);
                    break;
                case 1:
                    //Exchange invite
                    Writer.DWord(id);
                    break;
            }

            return Writer.GetBytes();
        }
开发者ID:ManhHaHY,项目名称:ClowenEmulationOpenSourceProject,代码行数:37,代码来源:JoinFormedRequests.cs

示例4: SendGuildInfo

 public static byte[] SendGuildInfo(WorldMgr.guild guildGlobal)
 {
     PacketWriter Writer = new PacketWriter();
     /////////////////////////////////////////////////////////////////////////
     //Opcode information
     /////////////////////////////////////////////////////////////////////////
     Writer.Create(OperationCode.SERVER_GUILD_INFO_LOAD);
     /////////////////////////////////////////////////////////////////////////
     //Packet Structure
     /////////////////////////////////////////////////////////////////////////
     //Writer.Byte(1); // Guild update
     Writer.DWord(guildGlobal.Guildid);              // Unique Guild ID
     Writer.Text(guildGlobal.Name);                  // Guild Name
     Writer.Byte(guildGlobal.Level);                 // Guild level
     Writer.DWord(guildGlobal.PointsTotal);          // Guild GP
     Writer.Word(guildGlobal.NewsTitle.Length);      // Guild Message Title Lenght
     Writer.String(guildGlobal.NewsTitle);           // Guild Message Title
     Writer.Word(guildGlobal.NewsMessage.Length);    // Guild Message Lenght
     Writer.String(guildGlobal.NewsMessage);         // Guild Message
     Writer.DWord(0);                                // War on guild id
     Writer.Byte(0);                                 // War status?
     /////////////////////////////////////////////////////////////////////////
     // Write Guild Member information for each excisting member.
     /////////////////////////////////////////////////////////////////////////
     Guild_ListPlayersInfo(guildGlobal.MembersInfo, Writer);
     Writer.Byte(0);
     return Writer.GetBytes();
 }
开发者ID:ManhHaHY,项目名称:ClowenEmulationOpenSourceProject,代码行数:28,代码来源:Packets.cs


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