SpawnPackets??

02/19/2013 22:12 abdoumatrix#16
The Funny Thing that I'm still learning about C# and packets etc...

So I dont uderstand this codes yet :D
02/19/2013 22:33 Super Aids#17
Quote:
Originally Posted by teroareboss1 View Post
is easy to update in properties ... if you use your mind

Code:
public enum objpos : byte
    {
        Uint32_Mesh = 4,
        Uint32_UID = 8,
        Uint32_GuildId = 12,
        Uint32_GuildRank = 16,
        Uint16_unknown1 = 20,
        BitVector32 = 22,
        BitVector16 = 39,
        Uint32_Head = 44,
        Uint32_Garment = 48,
        Uint32_Armor = 52,
        Utin32_LeftWeapon = 56,
        Uint32_RightWeapon = 60,
        Uint32_LeftWeaponAccessory = 64,
        Uint32_RightWeaponAccessory = 68,
        Uint32_Steed = 72,

        Uint16_X = 94,
        Uint16_Y = 96,
        Byte_Fascing = 100,
        Byte_Action = 101,
        Byte_Reborn = 108,
        Byte_Level = 109,
        Byte_Nobility = 133,
        Str_Count = 234,
        Str_NameLenght = 235,
        Uint16_PLenght = 237

    }
Code:
        public CMD.ConquerAngle Facing { get { return (CMD.ConquerAngle)ReadByte((byte)objpos.Byte_Fascing); } set { WriteByte((byte)value, (byte)objpos.Byte_Fascing); } }
        public CMD.ConquerAction Action { get { return (CMD.ConquerAction)ReadByte((byte)objpos.Byte_Action); } set { WriteByte((byte)value, (byte)objpos.Byte_Action); } }


   public byte Level { get { return _lvl; } set { WriteByte(value, (byte)objpos.Byte_Level); _lvl = value; } }
and others
Totally defeats the purpose of having some structured and readable code + that will slow down your packet writing with all those type conversions.