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


C# PacketWriter.Bool方法代码示例

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


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

示例1: CloseNPC

 public static byte[] CloseNPC()
 {
     PacketWriter Writer = new PacketWriter();
     Writer.Create(Systems.SERVER_CLOSE_NPC);
     Writer.Bool(true);
     return Writer.GetBytes();
 }
开发者ID:CarlosX,项目名称:DarkEmu,代码行数:7,代码来源:NpcPackets.cs

示例2: AlchemyResponse

        public static byte[] AlchemyResponse(bool isSuccess, Global.slotItem sItem, byte type, byte totalblue)
        {
            PacketWriter Writer = new PacketWriter();
            Writer.Create(Systems.SERVER_ALCHEMY);
            Writer.Byte(1);
            Writer.Byte(2);
            Writer.Bool(isSuccess);
            Writer.Byte(sItem.Slot);
            if (!isSuccess) { Writer.Byte(0); }
            Writer.DWord(0);
            Writer.DWord(sItem.ID);
            Writer.Byte(sItem.PlusValue);
            Writer.LWord(0);
            Writer.DWord(sItem.Durability);
            Writer.Byte(Data.ItemBlue[sItem.dbID].totalblue);
            for (int i = 0; i <= Data.ItemBlue[sItem.dbID].totalblue - 1; i++)
            {
                Writer.DWord(Data.MagicOptions.Find(mg => (mg.Name == Convert.ToString(Data.ItemBlue[sItem.dbID].blue[i]))).ID);
                Writer.DWord(Data.ItemBlue[sItem.dbID].blueamount[i]);
            }
            Writer.Word(1);
            Writer.Word(2);
            Writer.Word(3);

            return Writer.GetBytes();
        }
开发者ID:CarlosX,项目名称:DarkEmu,代码行数:26,代码来源:AlchemyPackets.cs

示例3: CloseExhangeWindow

 public static byte[] CloseExhangeWindow()
 {
     PacketWriter Writer = new PacketWriter();
     Writer.Create(Systems.SERVER_EXCHANGE_CLOSE);
     Writer.Bool(true);
     return Writer.GetBytes();
 }
开发者ID:CarlosX,项目名称:DarkEmu,代码行数:7,代码来源:ExchangePackets.cs

示例4: ConnectSuccess

 ////////////////////////////////////////////////////////////////////////////////////////////////////////////
 // Connection success
 ////////////////////////////////////////////////////////////////////////////////////////////////////////////
 public static byte[] ConnectSuccess()
 {
     PacketWriter Writer = new PacketWriter();
     Writer.Create(Systems.SERVER_CONNECTION);   // Select opcode
     Writer.Bool(true);                          // Writer bool = 1 True
     return Writer.GetBytes();
 }
开发者ID:CarlosX,项目名称:DarkEmu,代码行数:10,代码来源:LoginPackets.cs

示例5: CancelLeaveGame

 public static byte[] CancelLeaveGame()
 {
     PacketWriter Writer = new PacketWriter();
     Writer.Create(Systems.SERVER_LEAVE_CALCEL);
     Writer.Bool(true);
     return Writer.GetBytes();
 }
开发者ID:CarlosX,项目名称:DarkEmu,代码行数:7,代码来源:LeaveGamePackets.cs

示例6: AgentServer

 public static byte[] AgentServer()
 {
     PacketWriter Writer = new PacketWriter();
     Writer.Create(Systems.SERVER_AGENTSERVER);
     Writer.Text("AgentServer");
     Writer.Bool(true);
     return Writer.GetBytes();
 }
开发者ID:CarlosX,项目名称:DarkEmu,代码行数:8,代码来源:LoginPackets.cs

示例7: ChatIndexPacket

 public static byte[] ChatIndexPacket(byte type, byte index)
 {
     PacketWriter Writer = new PacketWriter();
     Writer.Create(Systems.SERVER_CHAT_INDEX);
     Writer.Bool(true);
     Writer.Byte(type);
     Writer.Byte(index);
     return Writer.GetBytes();
 }
开发者ID:CarlosX,项目名称:DarkEmu,代码行数:9,代码来源:MessagePackets.cs

示例8: EffectUpdate

 public static byte[] EffectUpdate(int objectid, Effect.EffectNumbers effectid, bool start)
 {
     PacketWriter Writer = new PacketWriter();
     Writer.Create(Systems.SERVER_SKILL_EFFECTS);
     Writer.DWord(objectid);
     Writer.Byte(1);
     Writer.Bool(start);
     Writer.Byte(4); // effect change
     Writer.DWord(effectid);
     return Writer.GetBytes();
 }
开发者ID:CarlosX,项目名称:DarkEmu,代码行数:11,代码来源:SkillSystemPackets.cs

示例9: Movement

        ////////////////////////////////////////////////////////////////////////////////////////////////////////////
        // Movement Packet
        ////////////////////////////////////////////////////////////////////////////////////////////////////////////
        public static byte[] Movement(DarkEmu_GameServer.Global.vektor p)
        {
            PacketWriter Writer = new PacketWriter();
                Writer.Create(Systems.SERVER_MOVEMENT);     //Select opcode
                Writer.DWord(p.ID);                         //Player ID
                Writer.Bool(true);                          //Bool 1
                Writer.Byte(p.xSec);                        //Player X Sector
                Writer.Byte(p.ySec);                        //Player Y Sector
                if (!File.FileLoad.CheckCave(p.xSec, p.ySec))
                {
                Writer.Word(p.x);                    //Player X Location
                Writer.Word(p.z);                    //Player Z Location
                Writer.Word(p.y);                    //Player Y Location
                }
                else
                {
                    if (p.x < 0)
                    {
                        Writer.Word(p.x);
                        Writer.Word(0xFFFF);
                    }
                    else
                    {
                        Writer.DWord(p.x);
                    }
                    Writer.DWord(p.z);

                    if (p.y < 0)
                    {
                        Writer.Word(p.y);
                        Writer.Word(0xFFFF);
                    }
                    else
                    {
                        Writer.DWord(p.y);
                    }
                }
                Writer.Bool(false);
                return Writer.GetBytes();
        }
开发者ID:CarlosX,项目名称:DarkEmu,代码行数:43,代码来源:MovementPackets.cs

示例10: EnterStall

        public static byte[] EnterStall(int CharacterID, stall stall)
        {
            PacketWriter Writer = new PacketWriter();
            Writer.Create(Systems.SERVER_STALL_OTHER_OPEN);
            Writer.Byte(1);
            Writer.DWord(stall.ownerID);
            Writer.Text3(stall.WelcomeMsg);
            Writer.Bool(stall.isOpened);
            Writer.Byte(0);
            StallItemPacket(stall.ItemList, Writer);
            Writer.Byte(stall.Members.Count - 2);
            for (byte i = 0; i < stall.Members.Count; i++)
            {
                if (stall.Members[i] != stall.ownerID && stall.Members[i] != CharacterID)
                    Writer.DWord(stall.Members[i]);
            }

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

示例11: OpenNPC

 public static byte[] OpenNPC(byte type)
 {
     PacketWriter Writer = new PacketWriter();
     Writer.Create(Systems.SERVER_OPEN_NPC);
     Writer.Bool(true);
     switch (type)
     {
         case 1:
             //Purchase items
             Writer.Byte(type);
             break;
         case 2:
             Writer.Byte(2);
             break;
         case 12:
             Writer.Byte(0x01);
             Writer.Byte(0x01);
             break;
         default:
             Writer.Byte(type);
             break;
     }
     return Writer.GetBytes();
 }
开发者ID:CarlosX,项目名称:DarkEmu,代码行数:24,代码来源:NpcPackets.cs

示例12: MoveItemBuy

 ////////////////////////////////////////////////////////////////////////////////////////////////////////////
 // Move Item From Buying To Inventory
 ////////////////////////////////////////////////////////////////////////////////////////////////////////////
 public static byte[] MoveItemBuy(byte type, byte shopLine, byte itemLine, byte max, byte slot, short amount)
 {
     PacketWriter Writer = new PacketWriter();
     Writer.Create(Systems.SERVER_ITEM_MOVE);
     Writer.Bool(true);
     Writer.Byte(type);
     Writer.Byte(shopLine);
     Writer.Byte(itemLine);
     Writer.Byte(1);
     Writer.Byte(slot);
     Writer.Word(amount);
     Writer.DWord(0);
     return Writer.GetBytes();
 }
开发者ID:CarlosX,项目名称:DarkEmu,代码行数:17,代码来源:ItemActionPackets.cs

示例13: MoveItem

 ////////////////////////////////////////////////////////////////////////////////////////////////////////////
 // Inventory item movement
 ////////////////////////////////////////////////////////////////////////////////////////////////////////////
 public static byte[] MoveItem(byte type, byte fromSlot, byte toSlot, short quantity, long gold, string action)
 {
     PacketWriter Writer = new PacketWriter();
     Writer.Create(Systems.SERVER_ITEM_MOVE);
     switch (action)
     {
         case "MOVE_INSIDE_INVENTORY":
                 Writer.Byte(1);
                 Writer.Byte(type);
                 Writer.Byte(fromSlot);
                 Writer.Byte(toSlot);
                 Writer.Word(quantity);
                 Writer.Byte(0);
             break;
         case "MOVE_INSIDE_STORAGE":
                 Writer.Bool(true);
                 Writer.Byte(1);
                 Writer.Byte(fromSlot);
                 Writer.Byte(toSlot);
                 Writer.Word(quantity);
             break;
         case "MOVE_INSIDE_GUILD_STORAGE":
                 Writer.Byte(1);
                 Writer.Byte(0x1D);//Type
                 Writer.Byte(fromSlot);
                 Writer.Byte(toSlot);
                 Writer.Word(quantity);
             break;
         case "MOVE_TO_STORAGE":
                 Writer.Byte(1);
                 Writer.Byte(2);
                 Writer.Byte(fromSlot);
                 Writer.Byte(toSlot);
             break;
         case "MOVE_TO_GUILD_STORAGE":
                 Writer.Byte(1);
                 Writer.Byte(0x1E);
                 Writer.Byte(fromSlot);
                 Writer.Byte(toSlot);
             break;
         case "MOVE_FROM_STORAGE":
                 Writer.Byte(1);
                 Writer.Byte(3);
                 Writer.Byte(fromSlot);
                 Writer.Byte(toSlot);
                 break;
         case "MOVE_FROM_GUILD_STORAGE":
                 Writer.Byte(1);
                 Writer.Byte(0x1F);
                 Writer.Byte(fromSlot);
                 Writer.Byte(toSlot);
                 break;
         case "MOVE_WAREHOUSE_GOLD":
                 Writer.Bool(true);
                 Writer.Byte(type);
                 Writer.LWord(gold);
                 break;
         case "MOVE_GENDER_CHANGE":
                 Writer.Byte(1);
                 Writer.Byte(fromSlot);
                 Writer.Byte(0x13);
                 Writer.Byte(2);
                 break;
         case "DELETE_ITEM":
                 Writer.Byte(1);
                 Writer.Byte(type);
                 Writer.Byte(fromSlot);
                 if (type == 0x0F) Writer.Byte(4);
             break;
         case "DELETE_GOLD":
                 Writer.Byte(1);
                 Writer.Byte(type);
                 Writer.LWord(gold);
                 break;
     }
     return Writer.GetBytes();
 }
开发者ID:CarlosX,项目名称:DarkEmu,代码行数:80,代码来源:ItemActionPackets.cs

示例14: GM_MAKEITEM

        ////////////////////////////////////////////////////////////////////////////////////////////////////////////
        // Create Item From Gm console
        ////////////////////////////////////////////////////////////////////////////////////////////////////////////
        public static byte[] GM_MAKEITEM(byte type, byte Slot, int id, short plus, int durability, int itemid, int bluecount)
        {
            int msid = Systems.MsSQL.GetDataInt("SELECT id FROM char_items WHERE owner='" + id + "' AND slot = '" + Slot + "'", "id");
            Systems.LoadBluesid(msid);

            PacketWriter Writer = new PacketWriter();
            Writer.Create(Systems.SERVER_ITEM_MOVE);
            Writer.Bool(true);
            Writer.Byte(6);
            Item.AddItemPacket(Writer, Slot, id, (byte)plus, plus, durability, itemid, msid, 0);
            return Writer.GetBytes();
        }
开发者ID:CarlosX,项目名称:DarkEmu,代码行数:15,代码来源:ItemActionPackets.cs

示例15: ActionAttack


//.........这里部分代码省略.........
                                AttackID = 9606; // Harp base
                                break;
                            case 15:
                                AttackAmount = 1;
                                AttackID = 9970; // Light staff cleric
                                break;
                            case 16:
                                AttackAmount = 1;
                                AttackID = Data.SkillBase[Character.Action.UsingSkillID].ID;
                                break;
                            default:
                                Console.WriteLine("Action attack case: {0} , SkillID = {1}" + Data.ItemBase[Character.Information.Item.wID].Class_C, Data.SkillBase[Character.Action.UsingSkillID].ID);
                                break;
                        }
                    }
                    else
                    {
                        //Punch attack
                        AttackAmount = 1;
                        AttackID = 1;
                    }
                    //Get casting id
                    Character.Action.AttackingID = Character.Ids.GetCastingID();
                    //Create new packet writer
                    PacketWriter Writer = new PacketWriter();
                    Writer.Create(Systems.SERVER_ACTION_DATA);
                    Writer.Byte(1);
                    Writer.Byte(2);
                    Writer.Byte(0x30);
                    Writer.DWord(AttackID);
                    Writer.DWord(Character.Information.UniqueID);
                    Writer.DWord(Character.Action.AttackingID);
                    Writer.DWord(Character.Action.Target);
                    Writer.Bool(true);
                    Writer.Byte(AttackAmount);
                    Writer.Byte(numbert);

                    for (byte t = 1; t <= numbert; t++)
                    {
                        Writer.DWord(found[t]);

                        for (byte n = 1; n <= AttackAmount; n++)
                        {
                            PhysicalDamage = 0;
                            status = 0;
                            crit = 1;

                            if (t == 2) //for light skill
                            {
                                TargetObject = new targetObject(GetObjects(found[t]), this);
                                if (Character.Action.ImbueID != 0)
                                {
                                    PhysicalDamage = (int)Formule.gamedamage((Data.SkillBase[Character.Action.ImbueID].tmpProp), MasteryGetPower(Character.Action.ImbueID), 0, 0, Character.Information.Mag_Balance, Character.Stat.UpdatededMagAttack);

                                    PhysicalDamage += rnd.Next(0, PhysicalDamage.ToString().Length);
                                }
                                else PhysicalDamage = 1;

                                if (status != 128)
                                    status = TargetObject.HP((int)PhysicalDamage);
                                else TargetObject.GetDead();
                            }
                            else if (t == 1)
                            {
                                PhysicalDamage = (int)Formule.gamedamage(Character.Stat.MaxPhyAttack, Character.Stat.AttackPower + MasteryGetPower(AttackID), 0, (double)TargetObject.PhyDef, Character.Information.Phy_Balance, Character.Stat.UpdatededPhyAttack);
                                if (Character.Action.ImbueID != 0) PhysicalDamage += (int)Formule.gamedamage((Character.Stat.MinMagAttack + Data.SkillBase[Character.Action.ImbueID].tmpProp), MasteryGetPower(Character.Action.ImbueID), 0, TargetObject.MagDef, Character.Information.Mag_Balance, Character.Stat.UpdatededMagAttack);
开发者ID:CarlosX,项目名称:DarkEmu,代码行数:67,代码来源:Skills.cs


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