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


C# Packet.WriteBool方法代码示例

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


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

示例1: SendGuildCreateResponse

        private static void SendGuildCreateResponse(WorldClient Client, string Name, string Password, bool AllowGuildWar, GuildCreateResponse Response)
        {
            using (var packet = new Packet(SH29Type.CreateGuildResponse))
            {

                packet.WriteUShort((ushort)Response);
                packet.WriteInt((Response == GuildCreateResponse.Success ? 32 : 0));

                packet.WriteString(Name, 16);
                packet.WriteString(Password, 8);
                packet.WriteBool(AllowGuildWar);
                Client.SendPacket(packet);
            }
        }
开发者ID:,项目名称:,代码行数:14,代码来源:

示例2: AllowFiles

 private static void AllowFiles(LoginClient pClient, bool pIsOk)
 {
     using (Packet pack = new Packet(SH3Type.FilecheckAllow)) {
     pack.WriteBool(pIsOk);
     pClient.SendPacket(pack);
     }
 }
开发者ID:,项目名称:,代码行数:7,代码来源:

示例3: WriteCharacterDisplay

        public void WriteCharacterDisplay(Packet packet)
        {
            packet.WriteUShort(MapObjectID);
            packet.WriteString(Name, 16);
            packet.WriteInt(Position.X);
            packet.WriteInt(Position.Y);
            packet.WriteByte(Rotation);                // Rotation
            packet.WriteByte((byte)State);          // Player State (1,2 - Player, 3 - Dead, 4 - Resting, 5 - Vendor, 6 - On Mount)
            packet.WriteByte((byte)Job);
            if (State != PlayerState.Resting && State != PlayerState.Vendor && this.House == null)
            {
                WriteLook(packet);
                WriteEquipment(packet);
            }
            else
            {
                this.House.WritePacket(packet);
            }
            WriteRefinement(packet);
            //(IsMale ? 1 : 0)
            int mount = (this.Mount != null) ? (int) this.Mount.Handle : (int)0xffff;
            packet.WriteUShort((ushort)mount);  // Mount Handle
            packet.WriteUShort(0xffff);
            packet.WriteByte(0xff);          // Emote (0xff = nothing)
            packet.WriteUShort(0xffff);
            packet.WriteShort(0);
            packet.WriteUShort(0);             // Mob ID (title = 10)

            packet.Fill(55, 0);                // Buff Bits? Something like that
            if (this.Character.GuildID > 1)
            {
                packet.WriteInt(this.Guild.ID);
            }
            else if (this.Character.AcademyID > 0)
            {
                packet.WriteInt(this.Character.AcademyID);
            }
            else
            {
                packet.WriteInt(0);
            }
            packet.WriteByte(0x02);            // UNK (0x02)

            packet.WriteBool(this.IsInaAcademy);            // In Guild Academy (0 - No, 1 - Yes)
            packet.WriteBool(true);            // Pet AutoPickup   (0 - Off, 1 - On)
            packet.WriteByte(this.Level);
        }
开发者ID:,项目名称:,代码行数:47,代码来源:

示例4: SendAttackDamage

        public static void SendAttackDamage(MapObject from, ushort objectID, ushort damage, bool crit, uint hpleft, ushort counter)
        {
            using (var packet = new Packet(SH9Type.AttackDamage))
            {
                packet.WriteUShort(from.MapObjectID);
                packet.WriteUShort(objectID);
                packet.WriteBool(crit);
                packet.WriteUShort(damage);
                packet.WriteUInt(hpleft);
                packet.WriteUShort(counter);
                packet.WriteByte(4);
                packet.WriteByte(100);

                from.MapSector.Broadcast(packet);
            }
        }
开发者ID:,项目名称:,代码行数:16,代码来源:

示例5: WriteInfo

 public void WriteInfo(Packet packet)
 {
     packet.WriteString(Character.Character.Name, 16);
     packet.Fill(65, 0x00);//unk
     packet.WriteBool(Character.IsIngame);
     packet.Fill(3, 0x00);//unk
     packet.WriteByte(Character.Character.Job);//job
     packet.WriteByte(Character.Character.CharLevel);//level
     packet.WriteByte(0);// unk
     packet.WriteString(DataProvider.GetMapname(Character.Character.PositionInfo.Map), 12);//mapName
     packet.WriteByte((byte)RegisterDate.Month);//month
     packet.WriteByte(184);//year fortmat unkown
     packet.WriteByte((byte)RegisterDate.Day);//day
     packet.WriteByte(0);//unk
     packet.WriteByte(0);  //unk
 }
开发者ID:,项目名称:,代码行数:16,代码来源:

示例6: SendSkillNoVictim

 public static void SendSkillNoVictim(MapObject user, ushort animid)
 {
     // 9 82 | [75 70] [32 29] [00]
     using (var packet = new Packet(SH9Type.SkillAnimationTarget))
     {
         packet.WriteUShort(animid);
         packet.WriteUShort(user.MapObjectID);
         packet.WriteBool(false);
         user.MapSector.Broadcast(packet);
     }
 }
开发者ID:,项目名称:,代码行数:11,代码来源:

示例7: SendStatsUpdate

 public static void SendStatsUpdate(MapObject pObject, ZoneClient to, bool selectedby)
 {
     using (var packet = new Packet(SH9Type.StatUpdate))
     {
         packet.WriteBool(selectedby);
         packet.WriteUShort(pObject.MapObjectID);
         if (pObject is ZoneCharacter)
         {
             ((ZoneCharacter)pObject).WriteUpdateStats(packet);
         }
         else
         {
             ((Mob)pObject).WriteUpdateStats(packet);
         }
         to.SendPacket(packet);
     }
 }
开发者ID:,项目名称:,代码行数:17,代码来源:

示例8: SendSkill

 public static void SendSkill(MapObject user, ushort animid, ushort victimid, uint damage, uint newhp, ushort counter, byte special1 = (byte) 0x10, byte special2 = (byte) 0x00)
 {
     // 9 82 | [E5 3F] [8A 27] [01] [8A 27] [10 00] [09 00 00 00] [5E 00 00 00] [A7 4C]
     // 9 82 | [9A 35] [8A 27] [01] [C2 05] [10 00] [0A 00 00 00] [1D 01 00 00] [73 37]
     // 9 82 | [43 3C] [42 15] [01] [AC 4C] [01 01] [7A 02 00 00] [00 00 00 00] [35 09]
     // 9 82 | [0E 39] [42 15] [01] [00 4A] [21 01] [1C 03 00 00] [00 00 00 00] [8C 0E]
     using (var packet = new Packet(SH9Type.SkillAnimationTarget))
     {
         packet.WriteUShort(animid);
         packet.WriteUShort(user.MapObjectID);
         packet.WriteBool(true);
         packet.WriteUShort(victimid);
         packet.WriteByte(special1);
         packet.WriteByte(special2);
         packet.WriteUInt(damage);
         packet.WriteUInt(newhp);
         packet.WriteUShort(counter);
         user.MapSector.Broadcast(packet);
     }
 }
开发者ID:,项目名称:,代码行数:20,代码来源:

示例9: WritePacket

 public void WritePacket(Packet pPacket)
 {
     pPacket.WriteBool(IsOnline);	// Logged In
     pPacket.WriteByte(this.Month);	// Last connect Month << 4 (TODO)
     pPacket.WriteByte(this.Day);	// Last connect Day (TODO)
     pPacket.WriteByte(0);	// Unknown (TODO)
     pPacket.WriteString(this.Name, 16);
     pPacket.WriteByte(this.Job);
     pPacket.WriteByte(this.Level);
     pPacket.WriteByte(0);	// In Party (TODO)
     pPacket.WriteByte(0);	// Unkown (TODO)
     pPacket.WriteString(this.Map, 12);
     pPacket.Fill(32, 0);
 }
开发者ID:,项目名称:,代码行数:14,代码来源:

示例10: SendShortcuts

 public static void SendShortcuts(WorldClient client)
 {
     using (var packet = new Packet(SH28Type.LoadShortCuts))
     {
         byte[] data = client.Character.Character.Shortcuts;
         bool hasData = data != null;
         packet.WriteBool(hasData);
         packet.WriteBytes(hasData ? data : new byte[] { 0 });
         client.SendPacket(packet);
     }
 }
开发者ID:,项目名称:,代码行数:11,代码来源:

示例11: SendQuickbarState

 public static void SendQuickbarState(WorldClient client)
 {
     using (var packet = new Packet(SH28Type.LoadQuickBarState))
     {
         byte[] data = client.Character.Character.QuickBarState;
         bool hasData = data != null;
         packet.WriteBool(hasData);
         packet.WriteBytes(hasData ? data : new byte[] { 0 });
         client.SendPacket(packet);
     }
 }
开发者ID:,项目名称:,代码行数:11,代码来源:

示例12: AnnouncePartyList

        public void AnnouncePartyList()
        {
            using (var packet = new Packet(SH14Type.PartyList))
            {
                packet.WriteByte((byte)Members.Count);
                foreach (var groupMember in Members)
                {
                    packet.WriteString(groupMember.Name, 16);
                    packet.WriteBool(groupMember.IsOnline);
                }

                AnnouncePacket(packet);
            }
        }
开发者ID:,项目名称:,代码行数:14,代码来源:


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