Register for your free account! | Forgot your password?

Go Back   elitepvpers > MMORPGs > Conquer Online 2 > CO2 Private Server
You last visited: Today at 02:53

  • Please register to post and access all features, it's quick, easy and FREE!

Advertisement



Packet 1033 (Date/Time).

Discussion on Packet 1033 (Date/Time). within the CO2 Private Server forum part of the Conquer Online 2 category.

Reply
 
Old   #1
 
- RuShi -'s Avatar
 
elite*gold: 0
Join Date: Jan 2020
Posts: 10
Received Thanks: 2
Exclamation Packet 1033 (Date/Time).

How can I show the current time of the host and I know it's Packet 1033.
Code:
MSG_DATE_TIME = 1033
Now, I cannot handle this complicated calculation or at least force it to read the real date and time of the host.

Here's the code:
Code:
public unsafe struct ServerTimePacket
    {
        public DateTime Time;

        public static ServerTimePacket Create()
        {
            var packet = new ServerTimePacket
            {
                Time = DateTime.UtcNow
                    .AddHours(Constants.TIME_ADJUST_HOUR)
                    .AddMinutes(Constants.TIME_ADJUST_MIN)
                    .AddSeconds(Constants.TIME_ADJUST_SEC)
            };
            return packet;
        }

        public static implicit operator byte[](ServerTimePacket packet)
        {
            var buffer = new byte[36 + 8];
            fixed (byte* ptr = buffer)
            {
                PacketBuilder.AppendHeader(ptr, buffer.Length, Constants.MSG_DATE_TIME);
                *((int*)(ptr + 8)) = packet.Time.Year - 1900;
                *((int*)(ptr + 12)) = packet.Time.Month - 1;
                *((int*)(ptr + 16)) = packet.Time.DayOfYear;
                *((int*)(ptr + 20)) = packet.Time.Day;
                *((int*)(ptr + 24)) = packet.Time.Hour;
                *((int*)(ptr + 28)) = packet.Time.Minute;
                *((int*)(ptr + 32)) = packet.Time.Second;
            }
            return buffer;
        }
    }
Please, I cannot open discussions about the author or anything related to the base.
Note, I have someone who are coding for me but he is busy at the moment so I decided to get a free help if there is anyone who can.
- RuShi - is offline  
Old 01/31/2020, 09:03   #2
 
~Crystaline's Avatar
 
elite*gold: 0
Join Date: Jun 2012
Posts: 179
Received Thanks: 55
Code:
public static ServerTimePacket Create()
        {
            var packet = new ServerTimePacket
            {
                Time = DateTime.Now
            };
            return packet;
        }
I'm not sure if it works, but at least give it a try.
~Crystaline is offline  
Old 01/31/2020, 11:24   #3
 
Spirited's Avatar
 
elite*gold: 12
Join Date: Jul 2011
Posts: 8,283
Received Thanks: 4,192
You can replace the UtcNow call with just Now. That should use your local time by default. Guide on DateTime, just fyi:
Spirited is offline  
Reply


Similar Threads Similar Threads
[Selling] 26 level | Bronze 1033 SR | Fake name
01/15/2018 - Overwatch Trading - 0 Replies
level: 26 1033 current, 1033 highest Free name change: available Unopened loot boxes: 25 https://imgur.com/a/6UNQl I have all the details of the account as I am the original owner of it. You will get full info (login and password from account + original email + secret answer) Fake name (no id chargebacks)
[B] 1033 EliteGold [S] PayPal
07/07/2015 - elite*gold Trading - 7 Replies
^Topic Macht mir Angebote :)
Cant create character in game: Error 1030,1033,1027(for euro)
07/22/2014 - SRO Private Server - 0 Replies
When i try to create character i get errors, everything is shown on the screen: http://www32.speedyshare.com/7Wv9k/download/silkr oaderrors.jpg or link here: silkroaderrors.jpg - Speedy Share - upload your files here I have my regions enabled in refregionsallocserver table ( i read it somewhere to check that). Please help me :)



All times are GMT +1. The time now is 02:54.


Powered by vBulletin®
Copyright ©2000 - 2026, Jelsoft Enterprises Ltd.
SEO by vBSEO ©2011, Crawlability, Inc.
This site is protected by reCAPTCHA and the Google Privacy Policy and Terms of Service apply.

Support | Contact Us | FAQ | Advertising | Privacy Policy | Terms of Service | Abuse
Copyright ©2026 elitepvpers All Rights Reserved.