예제 #1
0
        public void BuildPreMail(PacketOut Out, Character_mail Mail)
        {
            if (Mail == null)
                return;

            Out.WriteUInt32(0);
            Out.WriteUInt32((UInt32)Mail.Guid);
            Out.WriteUInt16((UInt16)(Mail.Opened ? 1 : 0));
            Out.WriteByte(0x64); // Icon ID

            Out.WriteUInt32(0xFFE4D486); // Time
            Out.WriteUInt32(0xFFE4D486); // Sent time

            Out.WriteUInt32((UInt32)Mail.CharacterIdSender); // Sender ID
            Out.WriteByte(0); // 1 = localized name

            Out.WriteByte(0);
            Out.WriteStringToZero(Mail.SenderName);

            Out.WriteByte(0);
            Out.WriteStringToZero(Mail.ReceiverName);

            Out.WriteByte(0);
            Out.WriteStringToZero(Mail.Title);

            Out.WriteUInt32(0);

            Out.WriteUInt32(Mail.Money);
            Out.WriteUInt16((ushort)Mail.ItemsReqInfo.Count);
            if(Mail.ItemsReqInfo.Count > 0)
                Out.WriteByte(0);
            if(Mail.ItemsReqInfo.Count > 8)
                Out.WriteByte(0);

            foreach(Character_items item in Mail.ItemsReqInfo)
            {
                Out.WriteUInt32(item.ModelId);
            }
        }
예제 #2
0
 public void SendCurrentStage(Player Plr)
 {
     PacketOut Out = new PacketOut((byte)Opcodes.F_OBJECTIVE_INFO);
     Out.WriteUInt32(Info.Entry);
     Out.WriteByte(0); // Type
     Out.WriteByte(Info.Type);
     Out.WriteByte(Info.Type); // Forteresse, rien du tout ,etc
     Out.WriteUInt16(0);
     Out.WritePascalString(Info.Name);
     Out.WriteByte(1);
     Out.WriteUInt16(0); // Time in second
     Out.WriteUInt32(0x034B0201);
     Out.WriteByte(1);
     Out.WriteByte(0);
     Out.WriteByte(1);
     Out.WriteUInt16(0);
     Out.WriteByte(0);
     Out.WritePascalString("Un Nom");
     Out.WriteByte(0);
     Out.WriteByte(0);
     Out.WriteStringToZero("Stage III");
     Out.WritePascalString("Test d'un message quelque soit");
     Out.WriteUInt16(0);
     Out.WriteUInt16(0x012C);
     Out.WriteUInt32(0x9E);
     Out.WriteUInt32(0);
     Out.WriteByte(0x48);
     Out.WriteUInt32(0);
     //Out.WriteHexStringBytes(Str.Replace(" ", string.Empty));
     Plr.SendPacket(Out);
 }
예제 #3
0
파일: Player.cs 프로젝트: dzikun/WarEmu
 public void SendObjectiveText(string Text)
 {
     PacketOut Out = new PacketOut((byte)Opcodes.F_OBJECTIVE_INFO);
     Out.WriteUInt32(0); // Entry
     Out.WriteByte(0); // 1
     Out.WriteByte(1); // 2
     Out.WriteByte(0); // 1
     Out.WriteUInt16(0);
     Out.WriteStringToZero(Text);
     Out.WriteUInt16(0);
     Out.WriteUInt16(0); // Time
     Out.WriteUInt16(0);
     Out.WriteByte(0);
     SendPacket(Out);
 }
예제 #4
0
        public void BuildPreMail(PacketOut Out, Character_mail Mail)
        {
            if (Mail == null)
                return;

            Out.WriteUInt32(0);
            Out.WriteUInt32((UInt32)Mail.Guid);
            Out.WriteUInt16((UInt16)(Mail.Opened ? 1 : 0));
            Out.WriteByte((byte)(Mail.AuctionType == 0 ? 100 : 0)); // Icon ID

            Out.WriteUInt32(Mail.SendDate); // Time
            Out.WriteUInt32(Mail.SendDate); // Sent time

            Out.WriteUInt32((UInt32)Mail.CharacterIdSender); // Sender ID

            Out.WriteByte(0); // 1 = localized name

            Out.WriteByte(0);
            Out.WriteStringToZero(Mail.SenderName);

            Out.WriteByte(0);
            Out.WriteStringToZero(Mail.ReceiverName);

            Out.WriteByte(0);
            Out.WriteStringToZero(Mail.Title);
            Out.WriteUInt32(0);

            Out.WriteUInt32(Mail.Money);
            Out.WriteUInt16((ushort)Mail.Items.Count);
            if (Mail.Items.Count > 0)
                Out.WriteByte(0);
            if (Mail.Items.Count > 8)
                Out.WriteByte(0);

            foreach (KeyValuePair<uint, ushort> item in Mail.Items)
            {
                Out.WriteUInt32(WorldMgr.GetItem_Info(item.Key).ModelId);
            }
        }
예제 #5
0
파일: Player.cs 프로젝트: dzikun/WarEmu
        public void SendHelpMessage(Player Plr, string Text)
        {
            /*|00 3D 06 00 00 23 00 00 00 00 0D 57 68 69 69 74 |.=...#.....Whiit|
|65 63 68 65 72 72 79 00 00 25 4C 46 20 74 61 6E |echerry..%LF tan|
|6B 20 61 6E 64 20 68 65 61 6C 65 72 20 66 6F 72 |k and healer for|
|20 73 63 2F 6F 72 76 72 20 67 72 6F 75 70 00 00 | sc/orvr group..|      */

            PacketOut Out = new PacketOut((byte)Opcodes.F_CHAT);
            Out.WriteUInt16(Plr.Oid);
            Out.WriteByte(0x23);
            Out.WriteUInt32(0);
            Out.WriteStringToZero(Plr.Name);
            Out.WriteUInt16((ushort)(Text.Length + 1));
            Out.WriteStringBytes(Text);
            Out.WriteByte(0);
            Out.WriteByte(0);
            SendPacket(Out);
        }