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


C# PacketWriter.DWord方法代码示例

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


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

示例1: PetSpawn

 ///////////////////////////////////////////////////////////////////////////
 // Despawn Pet
 ///////////////////////////////////////////////////////////////////////////
 public static byte[] PetSpawn(int petid, byte type, pet_obj o)
 {
     PacketWriter Writer = new PacketWriter();
     Writer.Create(Systems.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:CarlosX,项目名称:DarkEmu,代码行数:28,代码来源:GrabpetPackets.cs

示例2: CreateFormedParty

 public static byte[] CreateFormedParty(party pt)
 {
     //Create new packet writer
     PacketWriter Writer = new PacketWriter();
     //Add opcode to packet
     Writer.Create(Systems.SERVER_FORMED_PARTY_CREATED);
     //Static byte
     Writer.Byte(1);
     //Party id
     Writer.DWord(pt.ptid);
     //0 Dword value
     Writer.DWord(0);
     //Party type
     Writer.Byte(pt.Type);
     //Party purpose
     Writer.Byte(pt.ptpurpose);
     //Party min level required
     Writer.Byte(pt.minlevel);
     //Party max level allowed
     Writer.Byte(pt.maxlevel);
     //Party name
     Writer.Text3(pt.partyname);
     //Return all bytes to send
     return Writer.GetBytes();
 }
开发者ID:CarlosX,项目名称:DarkEmu,代码行数:25,代码来源:JoinPackets.cs

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

示例4: Effects2Dmg

 public static byte[] Effects2Dmg(int id, int dmg)
 {
     PacketWriter Writer = new PacketWriter();
     Writer.Create(Systems.SERVER_EFFECT_DAMAGE);
     Writer.DWord(id);
     Writer.DWord(dmg);
     return Writer.GetBytes();
 }
开发者ID:CarlosX,项目名称:DarkEmu,代码行数:8,代码来源:SkillSystemPackets.cs

示例5: BalloonTicket

 public static byte[] BalloonTicket(int charid, int info)
 {
     PacketWriter Writer = new PacketWriter();
     Writer.Create(Systems.SERVER_TICKET);
     Writer.Byte(0);
     Writer.DWord(charid);
     Writer.DWord(info);
     return Writer.GetBytes();
 }
开发者ID:CarlosX,项目名称:DarkEmu,代码行数:9,代码来源:CharacterLoad.cs

示例6: Player_UpToHorse

 ////////////////////////////////////////////////////////////////////////////////////////////////////////////
 // Player move up to horse
 ////////////////////////////////////////////////////////////////////////////////////////////////////////////
 public static byte[] Player_UpToHorse(int ownerID, bool type, int petID)
 {
     PacketWriter Writer = new PacketWriter();
     Writer.Create(Systems.SERVER_PLAYER_UPTOHORSE); //Select opcode
     Writer.Byte(1);                                 //Static byte
     Writer.DWord(ownerID);                          //Horse Owner ID
     Writer.Byte(type);                              //Horse Type
     Writer.DWord(petID);                            //Horse ID
     return Writer.GetBytes();
 }
开发者ID:CarlosX,项目名称:DarkEmu,代码行数:13,代码来源:TransportPackets.cs

示例7: ChangePetSettings

 ///////////////////////////////////////////////////////////////////////////
 // Grab pet settings
 ///////////////////////////////////////////////////////////////////////////
 public static byte[] ChangePetSettings(byte option, int petid, byte type, int settings)
 {
     PacketWriter Writer = new PacketWriter();
     Writer.Create(Systems.SERVER_GPET_SETTINGS);
     Writer.Byte(option);
     Writer.DWord(petid);
     Writer.Byte(type);
     Writer.DWord(settings);
     return Writer.GetBytes();
 }
开发者ID:CarlosX,项目名称:DarkEmu,代码行数:13,代码来源:GrabpetPackets.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: GuildSetTitle2

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

示例10: Pet_Information

 ////////////////////////////////////////////////////////////////////////////////////////////////////////////
 // Horse Stats
 ////////////////////////////////////////////////////////////////////////////////////////////////////////////
 public static byte[] Pet_Information(int id, int model, int hp, int charid, pet_obj o)
 {
     PacketWriter Writer = new PacketWriter();
     Writer.Create(Systems.SERVER_PET_INFORMATION);  //Select opcode
     Writer.DWord(id);                               //Horse ID
     Writer.DWord(model);                            //Horse Model
     Writer.DWord(hp);                               //Horse HP
     Writer.DWord(hp);                               //Horse SEC HP
     Writer.Byte(0);                                 //Static byte ?
     return Writer.GetBytes();
 }
开发者ID:CarlosX,项目名称:DarkEmu,代码行数:14,代码来源:TransportPackets.cs

示例11: RenameParty

 void RenameParty()
 {
     try
     {
         //Create new packet reader
         PacketReader reader = new PacketReader(PacketInformation.buffer);
         //First integer is party id
         int partyid = reader.Int32();
         //Second integer is not needed
         int NotNeeded = reader.Int32();
         //Byte party type
         byte ptype = reader.Byte();
         //Byte party purpose
         byte purpose = reader.Byte();
         //Byte minimum level
         byte minlevel = reader.Byte();
         //Byte max level to enter party
         byte maxlevel = reader.Byte();
         //Party name lenght
         short namel = reader.Int16();
         //Party name each character is a word value using text3
         string pname = reader.Text3();
         //Create new packet writer
         PacketWriter Writer = new PacketWriter();
         //Add opcode to server packet
         Writer.Create(Systems.SERVER_PARTY_CHANGENAME);
         //Write static byte 1
         Writer.Byte(1);
         //Write party id
         Writer.DWord(partyid);
         //Write dword 0
         Writer.DWord(0);
         //Write party type
         Writer.Byte(ptype);
         //Write party purpose
         Writer.Byte(purpose);
         //Write party minimum level
         Writer.Byte(minlevel);
         //Write party max level
         Writer.Byte(maxlevel);
         //Write party name
         Writer.Text3(pname);
         //Send bytes to client
         client.Send(Writer.GetBytes());
     }
     //If a error happens
     catch (Exception ex)
     {
         //Write the exception to the log
         Systems.Debugger.Write(ex);
     }
 }
开发者ID:CarlosX,项目名称:DarkEmu,代码行数:52,代码来源:Renaming.cs

示例12: GuildSetOnline

 public static byte[] GuildSetOnline(guild c, int memberid)
 {
     PacketWriter Writer = new PacketWriter();
     Writer.Create(Systems.SERVER_GUILD_ONLINE);
     Writer.DWord(memberid);
     Writer.DWord(c.Guildid);
     Writer.Text(c.Name);
     Writer.Word(0);
     Writer.DWord(0);
     Writer.DWord(0);
     Writer.DWord(0);
     Writer.Byte(0);
     Writer.Byte(1);
     return Writer.GetBytes();
 }
开发者ID:CarlosX,项目名称:DarkEmu,代码行数:15,代码来源:GuildSystemPackets.cs

示例13: GuildKick

 public static byte[] GuildKick(int memberid)
 {
     PacketWriter Writer = new PacketWriter();
     Writer.Create(Systems.SERVER_GUILD_DISBAND);
     Writer.DWord(memberid);
     return Writer.GetBytes();
 }
开发者ID:CarlosX,项目名称:DarkEmu,代码行数:7,代码来源:GuildSystemPackets.cs

示例14: DespawnFromInventory

 ////////////////////////////////////////////////////////////////////////////////////////////////////////////
 // Delete Item from inventory visual
 ////////////////////////////////////////////////////////////////////////////////////////////////////////////
 public static byte[] DespawnFromInventory(int id)
 {
     PacketWriter Writer = new PacketWriter();
     Writer.Create(Systems.SERVER_ITEM_DELETE);
     Writer.DWord(id);
     return Writer.GetBytes();
 }
开发者ID:CarlosX,项目名称:DarkEmu,代码行数:10,代码来源:ItemActionPackets.cs

示例15: TeleportOtherStart

 public static byte[] TeleportOtherStart()
 {
     PacketWriter Writer = new PacketWriter();
     Writer.Create(Systems.SERVER_TELEPORTOTHERSTART);
     Writer.DWord(0);
     return Writer.GetBytes();
 }
开发者ID:CarlosX,项目名称:DarkEmu,代码行数:7,代码来源:TeleportPackets.cs


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