[Development] CPX 3G

09/04/2010 22:22 ImmuneOne#1
I know, I know. My last project didn't go too well because it was really rubbish, I guess me and Nullable both agree on that. So yeah, I decided to take this project into development again for those who actually followed the development of the previous project.

I'm writing a new source this time, using different methods and actually have gained more information about certain things. Some examples;

Mapping system:
Code:
private Dictionary<uint, IMap> mapCollection;

[B]IMap interface:[/B]
    public interface IMap
    {
        DMap DMap { get; set; }
        ushort pHandle { get; set; }
        ushort pMesh { get; set; }
        bool TryGetValue(uint ID, out IScreenObject obj);

        void Attach(IScreenObject obj);
        void Detach(IScreenObject obj);
        bool Contains(IScreenObject obj);
        void CallObjects(IScreenObject callingObj);
    }
------------------------------------------------------------------------
Usage:
IMap Map = null;
if (Kernel.MapTable.TryGetValue(client.Hero.MapID, out Map))
{
    //You can call objects by doing Map.CallObjects(client.Hero);
    //Or use the DMap Map.DMap.Valid(<X>, <Y>);
}
--------------------------------------------------------------------------
Packet serialize/deserialize method:
Code:
       [StructLayout(LayoutKind.Sequential, CharSet=CharSet.Ansi)]
        struct MessagePacket
        {
            public PacketHeader Header;//0
            public UInt32 Msg_Color;//4
            public UInt32 Msg_Type;//8
            public UInt32 Msg_ID;//12
            public Byte String_Count;//16
            public Byte String_From_Length;//17
            [MarshalAs(UnmanagedType.ByValTStr, SizeConst = 16)]
            public String String_From;//18
            public Byte String_To_Length;//19 + pos
            [MarshalAs(UnmanagedType.ByValTStr, SizeConst = 16)]
            public String String_To;//20 + pos
            public Byte Blank;//21 + pos
            public Byte String_Message_Length;//22 + pos
            [MarshalAs(UnmanagedType.ByValTStr, SizeConst = 16)]
            public String String_Message;//23 + pos
        }
--------------------------------------------------------------------------
Usage of the packetfiller:
Filler.FillPacket<MessagePacket>(Packet); - Filler.FillPacket<MessagePacket>(Packet, <OFFSET>);
Or;
Filler.FillPacket<UInt32>(<VALUE>); or Filler.FillPacket<UInt32>(<VALUE>, <OFFSET>);
I will be using a custom winsock wrapper for the sockets. If you have not heard about the previous project, the project will be running on patch 4267.
09/05/2010 00:04 _DreadNought_#2
Great to see you working on this!
09/05/2010 00:17 Kiyono#3
Let's see if this project lasts till the end =X
09/05/2010 01:34 Basser#4
Very interesting stuff.
Hopefully this source will actually use the features of the .NET framework, as a change.

@Ali, good luck! :)

Will this be public?
Can we participate in the development?
09/05/2010 02:12 Nullable#5
Code:
[StructLayout(LayoutKind.Sequential, CharSet=CharSet.Ansi, Pack=1)]
[Only registered and activated users can see links. Click Here To Register...]
09/05/2010 08:32 -Fáng-#6
I have a 420* *something client if you want to code for that instead =o
09/05/2010 11:39 ImmuneOne#7
Quote:
Originally Posted by Basser View Post
Very interesting stuff.
Hopefully this source will actually use the features of the .NET framework, as a change.

@Ali, good luck! :)

Will this be public?
Can we participate in the development?
The source will not be public. However, you can participate in the development by helping with npcs, those will be written in a certain scripting language which can be a custom one or a publicly released one like LUA.