[Request]AttackType's!

11/25/2008 21:17 YukiXian#1
Someone got a list with all the AttackType's? Cuz I can't figure out what number is what type,,,
11/25/2008 21:25 Ultimatum#2
Melee = 2,
Magic = 21,
Archer = 25

Them?
11/25/2008 21:33 © Haydz#3
You forgot the marriage ones..

Melee = 2
MarriageRequest = 8
MarriageAccept = 9
Magic = 21
Archer = 25
11/25/2008 21:35 YukiXian#4
Thanks, and what are 3 and 4?
11/25/2008 21:56 InfamousNoone#5
Code:
using System;
using System.Collections;
using System.Runtime.InteropServices;
using System.Text;
using System.Native;

namespace Conquer.Packets
{
    public enum AttackTypes : uint
    {
        None = 0x00,
        Physical = 0x02,
        Magic = 0x15,
        Archer = 0x19,
        RequestMarriage = 0x08,
        AcceptMarriage = 0x09,
        Death = 0x0E
    }

    public unsafe struct RequestAttackPacket
    {
        public ushort Size;
        public ushort Type;
        public TIME TimeStamp;
        public uint UID;
        public uint OpponentUID;
        public ushort X;
        public ushort Y;
        public AttackTypes AtkType;
        // C++
        // union DWORD
        // {
        // 	WORD SpellID;
        //	WORD SpellLevel;
        //	DWORD Damage;
        // }
        public ushort SpellID;
        public ushort SpellLevel;
        public fixed sbyte TQServer[8];
        // Extra Informaiton used in re-casting (autoattack)
        public ushort Attacker_X;
        public ushort Attacker_Y;
        public bool Aggressive;
        public bool Decrypted;

        public void Decrypt(uint Seed)
        {
            ushort wSeed = (ushort)Seed;
            OpponentUID = (uint)Assembler.RollRight(OpponentUID, 13, 32);
            OpponentUID = (OpponentUID ^ 0x5F2D2463 ^ Seed) - 0x746F4AE6;
            SpellID = (ushort)(SpellID ^ (wSeed ^ 0x915D));
            SpellID = (ushort)(Assembler.RollLeft(SpellID, 3, 16) - 0xEB42);
            X = (ushort)(X ^ (wSeed ^ 0x2ED6));
            X = (ushort)(Assembler.RollLeft(X, 1, 16) - 0x22ee);
            Y = (ushort)(Y ^ (wSeed ^ 0xB99B));
            Y = (ushort)(Assembler.RollLeft(Y, 5, 16) - 0x8922);
        }
        public static void MoveData(void* New, void* Old)
        {
            Native.memcpy(New, Old, *((ushort*)Old) + 8);
        }
        public static RequestAttackPacket Create()
        {
            RequestAttackPacket retn = new RequestAttackPacket();
            retn.Size = 0x1C;
            retn.Type = 0x3FE;
            retn.TimeStamp = Native.timeGetTime();
            PacketBuilder.AppendTQServer((byte*)retn.TQServer, 8);
            return retn;
        }
    }
}
11/25/2008 22:38 EvilSammi#6
Thanks Inf , your the best.

EvilSammi