|
المشاركات 1,940 |
+التقييم 0.96 |
تاريخ التسجيل Apr 2019 |
الاقامة Egypt |
نظام التشغيل windows 7 |
رقم العضوية 1 |
Network
GamePackets
GameUpdates
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
namespace LordsRoad.Network.GamePackets
{
public class GameUpdates : Writer, Interfaces.IPacket
{
private byte[] Buffer;
public const byte
Header = 0,
Body = 1,
Footer = 2;
public GameUpdates(byte _Type, string _String)
{
this.Buffer = new byte[29 + _String.Length];
WriteUInt16((ushort)(Buffer.Length - Cool, 0, Buffer);
WriteUInt16(2032, 2, Buffer);
WriteUInt32((uint)Time32.timeGetTime().GetHashCode(), 4, Buffer);
Buffer[15] = 112;
Buffer[16] = 1;
Type = _Type;
_string = _String;
}
public byte Type
{
get { return Buffer[14]; }
set { Buffer[14] = value; }
}
public string _string
{
get { return System.BitConverter.ToString(Buffer, 18, Buffer[17]); }
set { WriteStringWithLength(value, 17, Buffer); }
}
public void Send(Client.GameClient client)
{
client.Send(Buffer);
}
public void Deserialize(byte[] buffer)
{
this.Buffer = buffer;
}
public byte[] ToArray()
{
return Buffer;
}
}
}
PacketHandler.cs
static void AppendConnect(Connect appendConnect, Client.GameClient client)
private static void HeaderUpdates(string update, GameClient client)
{
client.Send(new GameUpdates(GameUpdates.Header, update));
}
private static void BodyUpdates(string update, GameClient client)
{
client.Send(new GameUpdates(GameUpdates.Body, update));
}
private static void FooterUpdates(string update, GameClient client)
{
client.Send(new GameUpdates(GameUpdates.Footer, update));
}
System
GameUpdetess
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
namespace TroZenA.Database
{
internal class GameUpdetess
{
public static string Header = "";
public static string Body1 = "";
public static string Body2 = "";
public static string Body3 = "";
public static string Body4 = "";
public static string Body5 = "";
public static string Body6 = "";
public static string Date = "";
public static void LoadRates()
{
MySqlReader reader = new MySqlReader(new MySqlCommand(MySqlCommandType.SELECT).Select("gameupdates"));
if (reader.Read())
{
Header = reader.ReadString("Header");
Body1 = reader.ReadString("Body1");
Body2 = reader.ReadString("Body2");
Body3 = reader.ReadString("Body3");
Body4 = reader.ReadString("Body4");
Body5 = reader.ReadString("Body5");
Body6 = reader.ReadString("Body6");
// Body6 = reader.ReadString("Date");
}
Console.WriteLine("System GameUpdates Loaded.");
}
}
}
Writer
public class Writer
{
public static void WriteStringWithLength(string arg, int offset, byte[] buffer)
{
if (buffer == null)
return;
if (offset > buffer.Length - 1)
return;
int till = buffer.Length - offset;
till = Math.Min(arg.Length, till);
buffer[offset] = (byte)arg.Length;
offset++;
byte[] argEncoded = Program.Encoding.GetBytes(arg);
Array.Copy(argEncoded, 0, buffer, offset, till);
}
PacketHandler.cs
client.UnionExploits = client.UnionExploits;
client.LoadItemStats();
#region Game Updates
{
HeaderUpdates("Welcome All in Server" + DateTime.Now.ToString(), client);
BodyUpdates("The Server Has Hard Drops 200 Cps Randomn ", client);
BodyUpdates("All New Characters And System Is Here ! Smile", client);
BodyUpdates("Guild War Start Eevry Friday At [20:00] End Every At [24:00]", client);
BodyUpdates("Any One Need Any Help", client);
FooterUpdates("Enjoy With Us in Server! Smile", client);
}
#endregion
#region Game Updates
{
HeaderUpdates("Welcome All in Server" + DateTime.Now.ToString(), client);
BodyUpdates("The Server Has Hard Drops 200 Cps Randomn ", client);
BodyUpdates("All New Characters And System Is Here ! Smile", client);
BodyUpdates("Guild War Start Eevry Friday At [20:00] End Every At [24:00]", client);
BodyUpdates("Any One Need Any Help", client);
FooterUpdates("Enjoy With Us in Server! Smile", client);
}
#endregion
الذين يشاهدون محتوى الموضوع الآن : 1 ( الأعضاء 0 والزوار 1) | |
|
الموضوع | كاتب الموضوع | المنتدى | مشاركات | آخر مشاركة |
WarDrobe System | محمد ياسر | تطوير سيرفرات كونكر | 15 | 2024-10-06 11:14 PM |
system language | محمد ياسر | تطوير سيرفرات كونكر | 3 | 2019-06-25 05:43 PM |
System Lottery Done 100% | Mero | تطوير سيرفرات كونكر | 11 | 2019-05-19 04:02 PM |
% System Auction 100 | محمد ياسر | تطوير سيرفرات كونكر | 0 | 2019-04-23 03:40 PM |