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


C# PacketWriter.LWord方法代码示例

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


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

示例1: InfoUpdate

        public static byte[] InfoUpdate(byte type, int obje, byte bT)
        {
            PacketWriter Writer = new PacketWriter();
            Writer.Create(OperationCode.SERVER_INFO_UPDATE);
            Writer.Byte(type);
            switch (type)
            {
                case 1:
                    Writer.LWord(obje);
                    Writer.Byte(0);
                    break;
                case 2:
                    Writer.DWord(obje);
                    Writer.Byte(0);
                    break;
                case 4:
                    Writer.Byte(bT);
                    Writer.DWord(obje);
                    break;
                default:
                    break;
            }

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

示例2: OpenWarehouse

 public static byte[] OpenWarehouse(long t)
 {
     PacketWriter Writer = new PacketWriter();
     Writer.Create(OperationCode.SERVER_OPEN_WAREHOUSE);
     Writer.LWord(t);
     return Writer.GetBytes();
 }
开发者ID:ManhHaHY,项目名称:ClowenEmulationOpenSourceProject,代码行数:7,代码来源:StoragePackets.cs

示例3: AlchemyResponse

        public static byte[] AlchemyResponse(bool isSuccess, ObjData.slotItem sItem, byte type, byte totalblue)
        {
            PacketWriter Writer = new PacketWriter();
            Writer.Create(OperationCode.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(ObjData.Manager.ItemBlue[sItem.dbID].totalblue);
            for (int i = 0; i <= ObjData.Manager.ItemBlue[sItem.dbID].totalblue - 1; i++)
            {
                Writer.DWord(ObjData.Manager.MagicOptions.Find(mg => (mg.Name == Convert.ToString(ObjData.Manager.ItemBlue[sItem.dbID].blue[i]))).ID);
                Writer.DWord(ObjData.Manager.ItemBlue[sItem.dbID].blueamount[i]);
            }
            Writer.Word(1);
            Writer.Word(2);
            Writer.Word(3);

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

示例4: PetSpawn

 ///////////////////////////////////////////////////////////////////////////
 // Despawn Pet
 ///////////////////////////////////////////////////////////////////////////
 public static byte[] PetSpawn(int petid, byte type, CLGameServer.WorldMgr.pet_obj o)
 {
     PacketWriter Writer = new PacketWriter();
     Writer.Create(OperationCode.SERVER_PLAYER_SPAWN_PET);   //Select Opcode
     Writer.DWord(petid);                              //Pet ID
     switch (type)
     {
         case 1:
             //Despawn pet
             Writer.Byte(1);
             break;
         case 2:
             //Rename pet respawn
             Writer.Byte(5);
             Writer.Text(o.Petname);
             break;
         case 3:
             //Attack pet respawn for exp info
             Writer.Byte(3);//Static
             Writer.LWord(o.exp);//New exp
             Writer.DWord(o.OwnerID);//Owner id
             break;
     }
     return Writer.GetBytes();
 }
开发者ID:ManhHaHY,项目名称:ClowenEmulationOpenSourceProject,代码行数:28,代码来源:GrabpetPackets.cs

示例5: Exchange_Gold

 public static byte[] Exchange_Gold(long gold)
 {
     PacketWriter Writer = new PacketWriter();
     Writer.Create(OperationCode.SERVER_EXCHANGE_GOLD);
     Writer.Byte(2);
     Writer.LWord(gold);
     return Writer.GetBytes();
 }
开发者ID:ManhHaHY,项目名称:ClowenEmulationOpenSourceProject,代码行数:8,代码来源:ExchangePackets.cs

示例6: Exchange_ItemPacket

        public static byte[] Exchange_ItemPacket(int id, List<ObjData.slotItem> Exhange, bool mine)
        {
            PacketWriter Writer = new PacketWriter();
            Writer.Create(OperationCode.SERVER_EXCHANGE_ITEM);
            Writer.DWord(id);
            Writer.Byte(Exhange.Count);

            for (byte i = 0; i < Exhange.Count; i++)
            {
                PlayerMgr.LoadBluesid(Exhange[i].dbID);
                if (mine) Writer.Byte(Exhange[i].Slot);

                Writer.Byte(i);
                Writer.DWord(0);
                Writer.DWord(Exhange[i].ID);

                if (ObjData.Manager.ItemBase[Exhange[i].ID].Type == ObjData.item_database.ArmorType.ARMOR ||
                    ObjData.Manager.ItemBase[Exhange[i].ID].Type == ObjData.item_database.ArmorType.GARMENT ||
                    ObjData.Manager.ItemBase[Exhange[i].ID].Type == ObjData.item_database.ArmorType.GM ||
                    ObjData.Manager.ItemBase[Exhange[i].ID].Type == ObjData.item_database.ArmorType.HEAVY ||
                    ObjData.Manager.ItemBase[Exhange[i].ID].Type == ObjData.item_database.ArmorType.LIGHT ||
                    ObjData.Manager.ItemBase[Exhange[i].ID].Type == ObjData.item_database.ArmorType.PROTECTOR ||
                    ObjData.Manager.ItemBase[Exhange[i].ID].Type == ObjData.item_database.ArmorType.ROBE ||
                    ObjData.Manager.ItemBase[Exhange[i].ID].Itemtype == ObjData.item_database.ItemType.EARRING ||
                    ObjData.Manager.ItemBase[Exhange[i].ID].Itemtype == ObjData.item_database.ItemType.RING ||
                    ObjData.Manager.ItemBase[Exhange[i].ID].Itemtype == ObjData.item_database.ItemType.NECKLACE ||
                    ObjData.Manager.ItemBase[Exhange[i].ID].Itemtype == ObjData.item_database.ItemType.BLADE ||
                    ObjData.Manager.ItemBase[Exhange[i].ID].Itemtype == ObjData.item_database.ItemType.BOW ||
                    ObjData.Manager.ItemBase[Exhange[i].ID].Itemtype == ObjData.item_database.ItemType.EU_AXE ||
                    ObjData.Manager.ItemBase[Exhange[i].ID].Itemtype == ObjData.item_database.ItemType.EU_CROSSBOW ||
                    ObjData.Manager.ItemBase[Exhange[i].ID].Itemtype == ObjData.item_database.ItemType.EU_DAGGER ||
                    ObjData.Manager.ItemBase[Exhange[i].ID].Itemtype == ObjData.item_database.ItemType.EU_DARKSTAFF ||
                    ObjData.Manager.ItemBase[Exhange[i].ID].Itemtype == ObjData.item_database.ItemType.EU_HARP ||
                    ObjData.Manager.ItemBase[Exhange[i].ID].Itemtype == ObjData.item_database.ItemType.EU_STAFF ||
                    ObjData.Manager.ItemBase[Exhange[i].ID].Itemtype == ObjData.item_database.ItemType.EU_SWORD ||
                    ObjData.Manager.ItemBase[Exhange[i].ID].Itemtype == ObjData.item_database.ItemType.EU_TSTAFF ||
                    ObjData.Manager.ItemBase[Exhange[i].ID].Itemtype == ObjData.item_database.ItemType.EU_TSWORD ||
                    ObjData.Manager.ItemBase[Exhange[i].ID].Itemtype == ObjData.item_database.ItemType.GLAVIE ||
                    ObjData.Manager.ItemBase[Exhange[i].ID].Itemtype == ObjData.item_database.ItemType.SPEAR ||
                    ObjData.Manager.ItemBase[Exhange[i].ID].Itemtype == ObjData.item_database.ItemType.SWORD ||
                    ObjData.Manager.ItemBase[Exhange[i].ID].Itemtype == ObjData.item_database.ItemType.CH_SHIELD ||
                    ObjData.Manager.ItemBase[Exhange[i].ID].Itemtype == ObjData.item_database.ItemType.EU_SHIELD)
                {
                    Writer.Byte(Exhange[i].PlusValue);
                        Writer.LWord(0);
                        Writer.DWord(ObjData.Manager.ItemBase[Exhange[i].ID].Defans.Durability);
                        if (ObjData.Manager.ItemBlue[Exhange[i].dbID].totalblue != 0)
                        {
                            Writer.Byte(Convert.ToByte(ObjData.Manager.ItemBlue[Exhange[i].dbID].totalblue));
                            for (int a = 1; a <= ObjData.Manager.ItemBlue[Exhange[i].dbID].totalblue; a++)
                            {
                                Writer.DWord(ObjData.Manager.MagicOptions.Find(mg => (mg.Name == Convert.ToString(ObjData.Manager.ItemBlue[Exhange[i].dbID].blue[i]))).ID);
                                Writer.DWord(ObjData.Manager.ItemBlue[Exhange[i].dbID].blueamount[i]);
                            }
                        }

                        else
                        {
                            Writer.Byte(0);
                        }
                        Writer.Word(1);
                        Writer.Word(2);
                        Writer.Word(3);
                }
                else if (ObjData.Manager.ItemBase[Exhange[i].ID].Etctype == ObjData.item_database.EtcType.STONES)
                {
                    Writer.Word(Exhange[i].Amount);
                    Writer.Byte(0);
                }
                else if (ObjData.Manager.ItemBase[Exhange[i].ID].Etctype == ObjData.item_database.EtcType.MONSTERMASK)
                {
                    Writer.DWord(0);
                }
                else if (ObjData.Manager.ItemBase[Exhange[i].ID].Etctype == ObjData.item_database.EtcType.ELIXIR)
                {
                    Writer.Word(1);
                }
                    else if (ObjData.Manager.ItemBase[Exhange[i].ID].Itemtype == ObjData.item_database.ItemType.ARROW ||
                    ObjData.Manager.ItemBase[Exhange[i].ID].Itemtype == ObjData.item_database.ItemType.BOLT ||
                    ObjData.Manager.ItemBase[Exhange[i].ID].Etctype == ObjData.item_database.EtcType.HP_POTION ||
                    ObjData.Manager.ItemBase[Exhange[i].ID].Etctype == ObjData.item_database.EtcType.MP_POTION ||
                    ObjData.Manager.ItemBase[Exhange[i].ID].Etctype == ObjData.item_database.EtcType.VIGOR_POTION ||
                    ObjData.Manager.ItemBase[Exhange[i].ID].Etctype == ObjData.item_database.EtcType.SPEED_POTION ||
                    ObjData.Manager.ItemBase[Exhange[i].ID].Ticket == ObjData.item_database.Tickets.BEGINNER_HELPERS ||
                    ObjData.Manager.ItemBase[Exhange[i].ID].Etctype == ObjData.item_database.EtcType.ELIXIR ||
                    ObjData.Manager.ItemBase[Exhange[i].ID].Etctype == ObjData.item_database.EtcType.ALCHEMY_MATERIAL ||
                    ObjData.Manager.ItemBase[Exhange[i].ID].TypeID2 == 3)
                {
                    Writer.Word(Exhange[i].Amount);
                }
            }
            return Writer.GetBytes();
        }
开发者ID:ManhHaHY,项目名称:ClowenEmulationOpenSourceProject,代码行数:93,代码来源:ExchangePackets.cs

示例7: ItemExchange_Gold

 public static byte[] ItemExchange_Gold(long gold)
 {
     PacketWriter Writer = new PacketWriter();
     Writer.Create(OperationCode.SERVER_ITEM_MOVE);
     Writer.Byte(1);
     Writer.Byte(13);
     Writer.LWord(gold);
     return Writer.GetBytes();
 }
开发者ID:ManhHaHY,项目名称:ClowenEmulationOpenSourceProject,代码行数:9,代码来源:ExchangePackets.cs

示例8: GuildGoldUpdate

 public static byte[] GuildGoldUpdate(long info, byte type)
 {
     PacketWriter Writer = new PacketWriter();
     Writer.Create(OperationCode.SERVER_ITEM_MOVE);
     Writer.Byte(1);
     Writer.Byte(type);
     Writer.LWord(info);
     return Writer.GetBytes();
 }
开发者ID:ManhHaHY,项目名称:ClowenEmulationOpenSourceProject,代码行数:9,代码来源:ExchangePackets.cs

示例9: Player_getExp

 public static byte[] Player_getExp(int id, long exp, long sp, short level)
 {
     PacketWriter Writer = new PacketWriter();
     Writer.Create(OperationCode.SERVER_PLAYER_GET_EXP);
     Writer.DWord(id);
     Writer.LWord(exp);
     Writer.LWord(sp);
     Writer.Byte(0);
     if (level != 0) Writer.Word(level);
     return Writer.GetBytes();
 }
开发者ID:ManhHaHY,项目名称:ClowenEmulationOpenSourceProject,代码行数:11,代码来源:PlayerActionPackets.cs

示例10: CharacterDataLoad

        public static byte[] CharacterDataLoad(WorldMgr.character c)
        {
            PacketWriter Writer = new PacketWriter();
            Writer.Create(OperationCode.SERVER_PLAYERDATA);
            /////////////////////////////////////////////////////// Character basic info
            #region Basic info
            Writer.DWord(c.Ids.GetLoginID);
            Writer.DWord(c.Information.Model);
            Writer.Byte(c.Information.Volume);
            Writer.Byte(c.Information.Level);
            Writer.Byte(c.Information.Level);
            Writer.LWord(c.Information.XP);
            Writer.DWord(c.Information.SpBar);
            Writer.LWord(c.Information.Gold);
            Writer.DWord(c.Information.SkillPoint);
            Writer.Word(c.Information.Attributes);
            Writer.Byte(c.Information.BerserkBar);
            Writer.DWord(988);
            Writer.DWord(c.Stat.SecondHp);
            Writer.DWord(c.Stat.SecondMP);
            Writer.Bool(c.Information.Level < 20 ? true : false);
            #endregion
            /////////////////////////////////////////////////////// Character Player Kill Info
            #region Pk information
            //DB perfection reading with multiple data adapters... while this one is open i can still read anything else from the database
            //With no speed reduction...
            DB checkpk = new DB("SELECT * FROM character WHERE name ='" + c.Information.Name + "'");
            using (System.Data.SqlClient.SqlDataReader getinfo = checkpk.Read())
            {
                while (getinfo.Read())
                {
                    byte dailypk = getinfo.GetByte(48);
                    byte pklevel = getinfo.GetByte(49);
                    byte murderlevel = getinfo.GetByte(50);

                    Writer.Byte(dailypk);
                    Writer.Word(pklevel);
                    Writer.DWord(murderlevel);
                    if (murderlevel != 0) c.Information.Murderer = true;
                }
            }
            #endregion
            /////////////////////////////////////////////////////// Character Title
            #region Title
            Writer.Byte(c.Information.Title);
            #endregion
            /////////////////////////////////////////////////////// Character Pvpstate
            #region Pvp
            Writer.Byte(c.Information.Pvpstate);
            if (c.Information.Pvpstate > 0)
                c.Information.PvP = true;
            #endregion
            /////////////////////////////////////////////////////// Character Items
            #region Item

            Writer.Byte(c.Information.Slots);

            DB ms = new DB("SELECT * FROM char_items WHERE owner='" + c.Information.CharacterID + "' AND slot >= '0' AND slot <= '" + c.Information.Slots + "' AND inavatar='0' AND storagetype='0'");
            Writer.Byte(ms.Count());
            using (System.Data.SqlClient.SqlDataReader msreader = ms.Read())
            {

                while (msreader.Read())
                {

                    short amount = msreader.GetInt16(6);

                    if (amount < 1) amount = 1;
                    DB.query("UPDATE char_items SET quantity='" + amount + "' WHERE owner='" + c.Information.CharacterID + "' AND itemid='" + msreader.GetInt32(2) + "' AND id='" + msreader.GetInt32(0) + "' AND storagetype='0'");

                    if (msreader.GetByte(5) == 6)
                        c.Information.Item.wID = Convert.ToInt32(msreader.GetInt32(2));
                    if (msreader.GetByte(5) == 7)
                    {
                        c.Information.Item.sID = msreader.GetInt32(2);
                        c.Information.Item.sAmount = msreader.GetInt16(6);
                    }

                    Item.AddItemPacket(Writer, msreader.GetByte(5), msreader.GetInt32(2), msreader.GetByte(4), amount, msreader.GetInt32(7),msreader.GetInt32(0), msreader.GetInt32(9), msreader.GetInt32(30));
                }
            }
            ms.Close();

            //Avatar
            Writer.Byte(5);

            ms = new DB("SELECT * FROM char_items WHERE owner='" + c.Information.CharacterID + "' AND slot >= '0' AND slot <= '" + c.Information.Slots + "' AND inavatar='1' AND storagetype='0'");

            Writer.Byte(ms.Count());
            using (System.Data.SqlClient.SqlDataReader msreader = ms.Read())
            {
                while (msreader.Read())
                {
                    Item.AddItemPacket(Writer, msreader.GetByte(5), msreader.GetInt32(2), msreader.GetByte(4), msreader.GetInt16(6), msreader.GetInt32(7), msreader.GetInt32(0), msreader.GetInt32(9),msreader.GetInt32(30));
                }
            }
            ms.Close();

            Writer.Byte(0);

//.........这里部分代码省略.........
开发者ID:ManhHaHY,项目名称:ClowenEmulationOpenSourceProject,代码行数:101,代码来源:CharacterPackets.cs

示例11: CharacterListing

        ////////////////////////////////////////////////////////////////////////////////////////////////////////////
        // Character listening packet
        ////////////////////////////////////////////////////////////////////////////////////////////////////////////
        public static byte[] CharacterListing(string name)
        {
            DB ms    = new DB("SELECT TOP 4 * FROM character WHERE account='" + name + "'");
            PacketWriter Writer = new PacketWriter();

            Writer.Create(OperationCode.SERVER_CHARACTERSCREEN);      // Select opcode
            Writer.Byte(2);                                     // Static byte 2
            Writer.Byte(1);                                     // Static byte 1
            Writer.Byte(ms.Count());                            // Byte WorldMgr.character count

            using (System.Data.SqlClient.SqlDataReader reader = ms.Read())
            {
                while (reader.Read())
                {
                    Writer.DWord(reader.GetInt32(3));           // DWord Skin Model
                    Writer.Text(reader.GetString(2));           // String Name

                    Writer.Byte(reader.GetByte(4));             // Byte Skin Volume
                    Writer.Byte(reader.GetByte(5));             // Byte Level

                    Writer.LWord(reader.GetInt64(12));          // Long Experience

                    Writer.Word(reader.GetInt16(6));            // Word STR
                    Writer.Word(reader.GetInt16(7));            // Word INT
                    Writer.Word(reader.GetInt16(8));            // Attribute points

                    Writer.DWord(reader.GetInt32(9));           // HP
                    Writer.DWord(reader.GetInt32(10));          // MP

                    TimeSpan ts = Convert.ToDateTime(reader.GetDateTime(43)) - DateTime.Now;
                    double time = ts.TotalMinutes;

                    if (Math.Round(time) > 0)
                    {
                        Writer.Byte(1);
                        Writer.DWord(Math.Round(time));
                    }
                    else
                    {
                        Writer.Byte(0);
                    }

                    if (Math.Round(time) < 0 && DateTime.Now != reader.GetDateTime(43))
                    {
                        DB.query("UPDATE character SET deleted='1' Where id='" + reader.GetInt32(0) + "'");
                    }

                    Writer.Word(0);
                    Writer.Byte(0);

                    Function.Items.PrivateItemPacket(Writer, reader.GetInt32(0), 8, 0,false);
                    Function.Items.PrivateItemPacket(Writer, reader.GetInt32(0), 5, 1,false);
                }
                //Jobtype information
                byte jobinfo = Convert.ToByte(DB.GetData("SELECT * FROM users WHERE id='"+ name +"'", "jobtype"));
                Writer.Byte(jobinfo);
            }
            ms.Close();

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

示例12: GuildStorageGold

 public static byte[] GuildStorageGold(WorldMgr.character c)
 {
     PacketWriter Writer = new PacketWriter();
     Writer.Create(OperationCode.SERVER_GUILD_STORAGE_GOLD);
     Writer.LWord(c.Network.Guild.StorageGold);
     return Writer.GetBytes();
 }
开发者ID:ManhHaHY,项目名称:ClowenEmulationOpenSourceProject,代码行数:7,代码来源:Packets.cs

示例13: StallItemPacket

        public static void StallItemPacket(List<WorldMgr.stall.stallItem> ItemList, PacketWriter Writer)
        {
            for (byte i = 0; i < ItemList.Count; i++)
            {
                //Define item id
                int itemid = ItemList[i].Item.ID;
                //Temp disable mall type, todo : Enable PRE-Mall to sell in stalls.
                if (ObjData.Manager.ItemBase[itemid].Name.Contains("MALL")) return;

                PlayerMgr.LoadBluesid(ItemList[i].Item.dbID);

                Writer.Byte(ItemList[i].stallSlot);
                Writer.DWord(0);
                Writer.DWord(itemid);

                //Define what types of item we are adding to the stall
                if (ObjData.Manager.ItemBase[itemid].Type == ObjData.item_database.ArmorType.ARMOR ||
                    ObjData.Manager.ItemBase[itemid].Type == ObjData.item_database.ArmorType.GARMENT ||
                    ObjData.Manager.ItemBase[itemid].Type == ObjData.item_database.ArmorType.GM ||
                    ObjData.Manager.ItemBase[itemid].Type == ObjData.item_database.ArmorType.HEAVY ||
                    ObjData.Manager.ItemBase[itemid].Type == ObjData.item_database.ArmorType.LIGHT ||
                    ObjData.Manager.ItemBase[itemid].Type == ObjData.item_database.ArmorType.PROTECTOR ||
                    ObjData.Manager.ItemBase[itemid].Type == ObjData.item_database.ArmorType.ROBE ||
                    ObjData.Manager.ItemBase[itemid].Itemtype == ObjData.item_database.ItemType.EARRING ||
                    ObjData.Manager.ItemBase[itemid].Itemtype == ObjData.item_database.ItemType.RING ||
                    ObjData.Manager.ItemBase[itemid].Itemtype == ObjData.item_database.ItemType.NECKLACE ||
                    ObjData.Manager.ItemBase[itemid].Itemtype == ObjData.item_database.ItemType.BLADE ||
                    ObjData.Manager.ItemBase[itemid].Itemtype == ObjData.item_database.ItemType.BOW ||
                    ObjData.Manager.ItemBase[itemid].Itemtype == ObjData.item_database.ItemType.EU_AXE ||
                    ObjData.Manager.ItemBase[itemid].Itemtype == ObjData.item_database.ItemType.EU_CROSSBOW ||
                    ObjData.Manager.ItemBase[itemid].Itemtype == ObjData.item_database.ItemType.EU_DAGGER ||
                    ObjData.Manager.ItemBase[itemid].Itemtype == ObjData.item_database.ItemType.EU_DARKSTAFF ||
                    ObjData.Manager.ItemBase[itemid].Itemtype == ObjData.item_database.ItemType.EU_HARP ||
                    ObjData.Manager.ItemBase[itemid].Itemtype == ObjData.item_database.ItemType.EU_STAFF ||
                    ObjData.Manager.ItemBase[itemid].Itemtype == ObjData.item_database.ItemType.EU_SWORD ||
                    ObjData.Manager.ItemBase[itemid].Itemtype == ObjData.item_database.ItemType.EU_TSTAFF ||
                    ObjData.Manager.ItemBase[itemid].Itemtype == ObjData.item_database.ItemType.EU_TSWORD ||
                    ObjData.Manager.ItemBase[itemid].Itemtype == ObjData.item_database.ItemType.GLAVIE ||
                    ObjData.Manager.ItemBase[itemid].Itemtype == ObjData.item_database.ItemType.SPEAR ||
                    ObjData.Manager.ItemBase[itemid].Itemtype == ObjData.item_database.ItemType.SWORD ||
                    ObjData.Manager.ItemBase[itemid].Itemtype == ObjData.item_database.ItemType.CH_SHIELD ||
                    ObjData.Manager.ItemBase[itemid].Itemtype == ObjData.item_database.ItemType.EU_SHIELD)
                {
                    Writer.Byte(ItemList[i].Item.PlusValue);
                        Writer.LWord(0);
                        Writer.DWord(ObjData.Manager.ItemBase[ItemList[i].Item.ID].Defans.Durability);
                        if (ObjData.Manager.ItemBlue[ItemList[i].Item.dbID].totalblue != 0)
                        {
                            Writer.Byte(Convert.ToByte(ObjData.Manager.ItemBlue[ItemList[i].Item.dbID].totalblue));
                            for (int a = 1; a <= ObjData.Manager.ItemBlue[ItemList[i].Item.dbID].totalblue; a++)
                            {
                                Writer.DWord(ObjData.Manager.MagicOptions.Find(mg => (mg.Name == Convert.ToString(ObjData.Manager.ItemBlue[ItemList[i].Item.dbID].blue[i]))).ID);
                                Writer.DWord(ObjData.Manager.ItemBlue[ItemList[i].Item.dbID].blueamount[i]);
                            }
                        }

                        else
                        {
                            Writer.Byte(0);
                        }
                        Writer.Word(1);
                        Writer.Word(2);
                        Writer.Word(3);
                }
                else if (ObjData.Manager.ItemBase[itemid].Etctype == ObjData.item_database.EtcType.STONES)
                {
                    Writer.Word(ItemList[i].Item.Amount);
                    Writer.Byte(0);
                }
                else if (ObjData.Manager.ItemBase[itemid].Etctype == ObjData.item_database.EtcType.MONSTERMASK)
                {
                    Writer.DWord(0);//Todo : Load monster mask monster model id here
                    return;
                }
                else if (ObjData.Manager.ItemBase[itemid].Etctype == ObjData.item_database.EtcType.ELIXIR)
                {
                    Writer.Word(1);
                }
                    else if (ObjData.Manager.ItemBase[itemid].Itemtype == ObjData.item_database.ItemType.ARROW ||
                    ObjData.Manager.ItemBase[itemid].Itemtype == ObjData.item_database.ItemType.BOLT ||
                    ObjData.Manager.ItemBase[itemid].Etctype == ObjData.item_database.EtcType.HP_POTION ||
                    ObjData.Manager.ItemBase[itemid].Etctype == ObjData.item_database.EtcType.MP_POTION ||
                    ObjData.Manager.ItemBase[itemid].Etctype == ObjData.item_database.EtcType.VIGOR_POTION ||
                    ObjData.Manager.ItemBase[itemid].Etctype == ObjData.item_database.EtcType.SPEED_POTION ||
                    ObjData.Manager.ItemBase[itemid].Ticket == ObjData.item_database.Tickets.BEGINNER_HELPERS ||
                    ObjData.Manager.ItemBase[itemid].Etctype == ObjData.item_database.EtcType.ELIXIR ||
                    ObjData.Manager.ItemBase[itemid].Etctype == ObjData.item_database.EtcType.ALCHEMY_MATERIAL ||
                    ObjData.Manager.ItemBase[itemid].TypeID2 == 3)
                {
                    Writer.Word(ItemList[i].Item.Amount);
                }
                Writer.Byte(ItemList[i].Item.Slot);
                Writer.Word(ItemList[i].Item.Amount);
                Writer.LWord(ItemList[i].price);
            }
            Writer.Byte(0xFF);
        }
开发者ID:ManhHaHY,项目名称:ClowenEmulationOpenSourceProject,代码行数:97,代码来源:StallSystemPackets.cs

示例14: StallModifyItem

 public static byte[] StallModifyItem(byte stallSlot, ulong price)
 {
     PacketWriter Writer = new PacketWriter();
     Writer.Create(OperationCode.SERVER_STALL_ACTION);
     Writer.Byte(1);
     Writer.Byte(1);
     Writer.Byte(stallSlot);
     Writer.Word(1);
     Writer.LWord(price);
     Writer.Word(0);
     return Writer.GetBytes();
 }
开发者ID:ManhHaHY,项目名称:ClowenEmulationOpenSourceProject,代码行数:12,代码来源:StallSystemPackets.cs

示例15: UpdateGold

 ////////////////////////////////////////////////////////////////////////////////////////////////////////////
 // Update gold
 ////////////////////////////////////////////////////////////////////////////////////////////////////////////
 public static byte[] UpdateGold(long gold)
 {
     PacketWriter Writer = new PacketWriter();
     Writer.Create(OperationCode.SERVER_UPDATEGOLD);
     Writer.Byte(1);
     Writer.LWord(gold);
     Writer.Byte(0);
     return Writer.GetBytes();
 }
开发者ID:ManhHaHY,项目名称:ClowenEmulationOpenSourceProject,代码行数:12,代码来源:ItemActionPackets.cs


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