GetBytes() public méthode

public GetBytes ( ) : byte[]
Résultat byte[]
 public static byte[] DisbandGuildMsgEnd()
 {
     PacketWriter Writer = new PacketWriter();
     Writer.Create(Systems.SERVER_GUILD_DISBAND_MSG);
     Writer.Byte(1);
     return Writer.GetBytes();
 }
 public static byte[] LeaveStall()
 {
     PacketWriter Writer = new PacketWriter();
     Writer.Create(Systems.SERVER_STALL_OTHER_CLOSE);
     Writer.Byte(1);
     return Writer.GetBytes();
 }
Exemple #3
0
 ////////////////////////////////////////////////////////////////////////////////////////////////////////////
 // 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();
 }
Exemple #4
0
 //Packet for response of message sending
 public static byte[] PrivateMessageRespond(byte type)
 {
     //Create new packet writer
     PacketWriter Writer = new PacketWriter();
     //Add the opcode to the packet
     Writer.Create(Systems.SERVER_PM_SEND);
     //Switch on type sended by our function
     switch (type)
     {
         case 1:
             //Failed
             Writer.Byte(0x02);
             Writer.Byte(0x0D);
             Writer.Byte(0x64);
             break;
         case 2:
             //Success
             Writer.Byte(0x01);
             break;
         case 3:
             //Inbox full
             Writer.Byte(2);
             Writer.Word(0x6414);
             break;
     }
     //Return all bytes to the void
     return Writer.GetBytes();
 }
 public static byte[] GuildLeave()
 {
     PacketWriter Writer = new PacketWriter();
     Writer.Create(Systems.SERVER_GUILD_LEAVE);
     Writer.Byte(1);
     return Writer.GetBytes();
 }
 public static byte[] GuildKick(int memberid)
 {
     PacketWriter Writer = new PacketWriter();
     Writer.Create(Systems.SERVER_GUILD_DISBAND);
     Writer.DWord(memberid);
     return Writer.GetBytes();
 }
Exemple #7
0
 public static byte[] LeaveJob()
 {
     PacketWriter Writer = new PacketWriter();
     Writer.Create(Systems.SERVER_LEAVE_JOB);
     Writer.Byte(1);
     return Writer.GetBytes();
 }
Exemple #8
0
 public static byte[] CloseNPC()
 {
     PacketWriter Writer = new PacketWriter();
     Writer.Create(Systems.SERVER_CLOSE_NPC);
     Writer.Bool(true);
     return Writer.GetBytes();
 }
Exemple #9
0
 public static byte[] CancelLeaveGame()
 {
     PacketWriter Writer = new PacketWriter();
     Writer.Create(Systems.SERVER_LEAVE_CALCEL);
     Writer.Bool(true);
     return Writer.GetBytes();
 }
Exemple #10
0
 public static byte[] GuildKickMsg()
 {
     PacketWriter Writer = new PacketWriter();
     Writer.Create(Systems.SERVER_GUILD_KICK);
     Writer.Byte(1);
     return Writer.GetBytes();
 }
Exemple #11
0
 public static byte[] Exchange_Accept()
 {
     PacketWriter Writer = new PacketWriter();
     Writer.Create(Systems.SERVER_EXCHANGE_ACCEPT);
     Writer.Byte(1);
     return Writer.GetBytes();
 }
Exemple #12
0
 public static byte[] UpdatePlace()
 {
     PacketWriter Writer = new PacketWriter();
     Writer.Create(Systems.SERVER_SAVE_PLACE);
     Writer.Byte(1);
     return Writer.GetBytes();
 }
Exemple #13
0
 public static byte[] CloseExhangeWindow()
 {
     PacketWriter Writer = new PacketWriter();
     Writer.Create(Systems.SERVER_EXCHANGE_CLOSE);
     Writer.Bool(true);
     return Writer.GetBytes();
 }
Exemple #14
0
 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();
 }
Exemple #15
0
 ///////////////////////////////////////////////////////////////////////////
 // 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();
 }
Exemple #16
0
 public static byte[] TeleportStart2()
 {
     PacketWriter Writer = new PacketWriter();
     Writer.Create(Systems.SERVER_TELEPORTSTART);
     Writer.Byte(1);
     return Writer.GetBytes();
 }
Exemple #17
0
 public static byte[] FriendData(int target, byte type, string name, character c, bool state)
 {
     PacketWriter Writer = new PacketWriter();
     Writer.Create(Systems.SERVER_FRIEND_DATA);
     switch (type)
     {
         case 2:
             //Friend invite accepted
             Writer.Byte(2);
             Writer.DWord(target); //Id
             Writer.Text(c.Information.Name);  //Name
             Writer.DWord(c.Information.Model); //Model
             break;
         case 3:
             //Remove friend from own list
             Writer.Byte(3);
             Writer.DWord(target);
             break;
         case 4:
             //Fried online / offline update
             Writer.Byte(4);
             Writer.DWord(target);
             Writer.Byte(state);
             break;
         case 5:
             //Send private message..
             Writer.Byte(8);
             Writer.Text(name);
             Writer.DWord(0);
             Writer.DWord(0);//time info
             break;
     }
     return Writer.GetBytes();
 }
Exemple #18
0
 public static byte[] TeleportOtherStart()
 {
     PacketWriter Writer = new PacketWriter();
     Writer.Create(Systems.SERVER_TELEPORTOTHERSTART);
     Writer.DWord(0);
     return Writer.GetBytes();
 }
Exemple #19
0
 ////////////////////////////////////////////////////////////////////////////////////////////////////////////
 // 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();
 }
Exemple #20
0
        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();
        }
Exemple #21
0
 public static byte[] OpenWarehouse(long t)
 {
     PacketWriter Writer = new PacketWriter();
     Writer.Create(Systems.SERVER_OPEN_WAREHOUSE);
     Writer.LWord(t);
     return Writer.GetBytes();
 }
Exemple #22
0
 ////////////////////////////////////////////////////////////////////////////////////////////////////////////
 // Update arrow amount
 ////////////////////////////////////////////////////////////////////////////////////////////////////////////
 public static byte[] Arrow(short amount)
 {
     PacketWriter Writer = new PacketWriter();
     Writer.Create(Systems.SERVER_ARROW_UPDATE);
     Writer.Word(amount);
     return Writer.GetBytes();
 }
Exemple #23
0
 public static byte[] Exchange_Approve()
 {
     PacketWriter Writer = new PacketWriter();
     Writer.Create(Systems.SERVER_EXCHANGE_APPROVE);
     Writer.Byte(1);
     return Writer.GetBytes();
 }
 public static byte[] ActionState(byte b1, byte b2)
 {
     PacketWriter Writer = new PacketWriter();
     Writer.Create(Systems.SERVER_ACTIONSTATE);
     Writer.Byte(b1);
     Writer.Byte(b2);
     return Writer.GetBytes();
 }
Exemple #25
0
 public static byte[] TeleportImage(byte xsec, byte ysec)
 {
     PacketWriter Writer = new PacketWriter();
     Writer.Create(Systems.SERVER_TELEPORTIMAGE);
     Writer.Byte(xsec);
     Writer.Byte(ysec);
     return Writer.GetBytes();
 }
Exemple #26
0
 public static byte[] IngameMessages(ushort opcode,ushort id)
 {
     PacketWriter Writer = new PacketWriter();
     Writer.Create(opcode);
     Writer.Byte(2);
     Writer.Word(id);
     return Writer.GetBytes();
 }
Exemple #27
0
 public static byte[] AlchemyCancel()
 {
     PacketWriter Writer = new PacketWriter();
     Writer.Create(Systems.SERVER_ALCHEMY);
     Writer.Byte(1);
     Writer.Byte(1);
     return Writer.GetBytes();
 }
Exemple #28
0
 public static byte[] Exchange_Gold(long gold)
 {
     PacketWriter Writer = new PacketWriter();
     Writer.Create(Systems.SERVER_EXCHANGE_GOLD);
     Writer.Byte(2);
     Writer.LWord(gold);
     return Writer.GetBytes();
 }
Exemple #29
0
 public static byte[] Exchange_Cancel()
 {
     PacketWriter Writer = new PacketWriter();
     Writer.Create(Systems.SERVER_EXCHANGE_CANCEL);
     Writer.Byte(0x2C);
     Writer.Byte(0x18);
     return Writer.GetBytes();
 }
Exemple #30
0
        public static byte[] StallClose()
        {
            PacketWriter Writer = new PacketWriter();
            Writer.Create(Systems.SERVER_STALL_CLOSED);
            Writer.Byte(1);

            return Writer.GetBytes();
        }