|
المشاركات 1,993 |
+التقييم 1.00 |
تاريخ التسجيل Jun 2019 |
الاقامة |
نظام التشغيل |
رقم العضوية 279 |
public unsafe class MsgRank
using System;
using System.Linq;
using System.Text;
using System.Collections.Generic;
using MoElSaher.Client;
namespace MoElSaher.Network.GamePackets
{
public unsafe class MsgRank : Writer, Interfaces.IPacket
{
public void AppendP(uint rank, uint amount, uint uid, string name, uint lvl, uint clas, uint pho)
{
int offset = current * 80 + 24;
if (offset + 72 <= Buffer.Length)
{
current++;
Count = (uint)current;
WriteUInt32(rank, offset, Buffer); offset += 8;
WriteUInt32(amount, offset, Buffer); offset += 8;
WriteUInt32(uid, offset, Buffer); offset += 4;
WriteUInt32(uid, offset, Buffer); offset += 4;
WriteString(name, offset, Buffer); offset += 16;
WriteString(name, offset, Buffer); offset += 16;
WriteUInt32(lvl, offset, Buffer); offset += 4;
WriteUInt32(clas, offset, Buffer); offset += 4;
WriteUInt32(pho, offset, Buffer);
}
}
public const uint
Ranking = 1,
QueryCount = 2,
InformationRequest = 5,
TotemRank = 6;
public const uint
RoseFairy = 30000002,
LilyFairy = 30000102,
OrchidFairy = 30000202,
TulipFairy = 30000302,
Kiss = 30000402,
Love = 30000502,
Tins = 30000602,
Jade = 30000702,
PrestigeHighWall = 312500,
Chi = 60000000,
DragonChi = 60000001,
PhoenixChi = 60000002,
TigerChi = 60000003,
TurtleChi = 60000004,
InnerPower = 70000000,
Prestige = 80000000,
PrestigeTrojan = 80000001,
PrestigeWarrior = 80000002,
PrestigeArcher = 80000003,
PrestigeNinja = 80000004,
PrestigeMonk = 80000005,
PrestigePirate = 80000006,
PrestigeDWarrior = 80000007,
PrestigeWater = 80000008,
PrestigeFir1e = 80000009,
Prestigewing = 80000010;
byte[] Buffer;
int current;
public MsgRank(bool Create, uint entries = 1)
{
if (Create)
{
Buffer = new byte[744 + 16];
Writer.Write(Buffer.Length - 8, 0, Buffer);
Writer.Write(1151, 2, Buffer);
}
}
public uint Mode
{
get { return BitConverter.ToUInt32(Buffer, 4); }
set { WriteUInt32(value, 4, Buffer); }
}
public uint RankingType
{
get { return BitConverter.ToUInt32(Buffer, 8); }
set { WriteUInt32(value, 8, Buffer); }
}
public ushort RegisteredCount
{
get { return BitConverter.ToUInt16(Buffer, 12); }
set { WriteUInt16(value, 12, Buffer); }
}
public ushort Page
{
get { return BitConverter.ToUInt16(Buffer, 14); }
set { WriteUInt16(value, 14, Buffer); }
}
public uint Count
{
get { return BitConverter.ToUInt32(Buffer, 16); }
set { WriteUInt32(value, 16, Buffer); }
}
public void Append(uint rank, uint amount, uint uid, string name, byte level = 0, byte Class = 0, uint mesh = 0, bool toper = false)
{
if (!toper)
{
int offset = current * 80 + 24;
if (offset + 72 <= Buffer.Length)
{
current++;
Count = (uint)current;
WriteUInt32(rank, offset, Buffer); offset += 8;
WriteUInt32(amount, offset, Buffer); offset += 8;
WriteUInt32(uid, offset, Buffer); offset += 4;
WriteUInt32(uid, offset, Buffer); offset += 4;
WriteString(name, offset, Buffer); offset += 16;
WriteString(name, offset, Buffer); offset += 16;
WriteUInt32(level, offset, Buffer); offset += 4;
WriteUInt32(Class, offset, Buffer); offset += 4;
WriteUInt64(mesh, offset, Buffer); offset += 8;
}
}
else
{
int offset = 24;
WriteUInt32(1, offset, Buffer); offset += 8;
WriteUInt32(amount, offset, Buffer); offset += 8;
WriteUInt32(80000000, offset, Buffer); offset += 4;
WriteUInt32(uid, offset, Buffer); offset += 4;
WriteString(name, offset, Buffer); offset += 16;
WriteString(name, offset, Buffer); offset += 16;
WriteUInt32(level, offset, Buffer); offset += 4;
WriteUInt32(Class, offset, Buffer); offset += 4;
WriteUInt64(mesh, offset, Buffer); offset += 8;
}
}
public void Appendd(uint rank, uint amount, uint uid, string name, uint Type = 0, uint level = 0, uint Class = 0, uint face = 0)
{
int offset = current * 80 + 24;
if (offset + 72 <= Buffer.Length)
{
current++;
Count = (uint)current;
Writer.WriteUInt32(rank, offset, Buffer);
offset += 8;
Writer.WriteUInt32(amount, offset, Buffer);
offset += 8;
Writer.WriteUInt32(Type, offset, Buffer);
offset += 4;
Writer.WriteUInt32(uid, offset, Buffer);
offset += 4;
Writer.WriteString(name, offset, Buffer);
offset += 0x10;
Writer.WriteString(name, offset, Buffer);
offset += 0x10;
Writer.WriteUInt32(level, offset, Buffer);
offset += 4;
Writer.WriteUInt32(Class, offset, Buffer);
offset += 4;
Writer.WriteUInt32(face, offset, Buffer);
offset += 8;
}
}
public void Append(uint amount, uint uid, string name, byte level = 0, byte Class = 0, uint mesh = 0)
{
int offset = current * 80 + 24;
if (offset + 72 <= Buffer.Length)
{
current++;
WriteUInt64(1, offset, Buffer); offset += 8;
WriteUInt64(amount, offset, Buffer); offset += 8;
WriteUInt32(80000000 + (uint)(current - 1), offset, Buffer); offset += 4;
WriteUInt32(uid, offset, Buffer); offset += 4;
WriteString(name, offset, Buffer); offset += 16;
WriteString(name, offset, Buffer); offset += 16;
WriteUInt32(level, offset, Buffer); offset += 4;
WriteUInt32(Class, offset, Buffer); offset += 4;
WriteUInt64(mesh, offset, Buffer); offset += 8;
}
}
public void Append(uint rank, uint amount, uint uid, string name)
{
int offset = current * 80 + 24;
if (offset + 72 <= Buffer.Length)
{
current++;
Count = (uint)current;
Write(rank, offset, Buffer);
offset += 8;
Write(amount, offset, Buffer);
offset += 8;
Write(uid, offset, Buffer);
offset += 4;
Write(uid, offset, Buffer);
offset += 4;
Writer.Write(name, offset, Buffer);
offset += 16;
Writer.Write(name, offset, Buffer);
offset += 32;
}
}
public void Append(uint rank, uint amount, uint uid, string name, byte level = 0, byte Class = 0, uint mesh = 0)
{
int offset = current * 80 + 24;
if (offset + 72 <= Buffer.Length)
{
current++;
Count = (uint)current;
WriteUInt32(rank, offset, Buffer); offset += 8;
WriteUInt32(amount, offset, Buffer); offset += 8;
WriteUInt32(uid, offset, Buffer); offset += 4;
WriteUInt32(uid, offset, Buffer); offset += 4;
Write(name, offset, Buffer); offset += 16;
Write(name, offset, Buffer); offset += 16;
WriteUInt32(level, offset, Buffer); offset += 4;
WriteUInt32(Class, offset, Buffer); offset += 4;
WriteUlong(mesh, offset, Buffer); offset += 4;
}
}
public void Append(uint rank, uint amount, uint uid, string name, byte level, byte Class, uint mesh, uint RankID)
{
int offset = current * 80 + 24;
if (offset + 72 <= Buffer.Length)
{
current++;
Count = (uint)current;
WriteUInt32(rank, offset, Buffer); offset += 8;
WriteUInt32(amount, offset, Buffer); offset += 8;
WriteUInt32(RankID, offset, Buffer); offset += 4;
WriteUInt32(uid, offset, Buffer); offset += 4;
WriteString(name, offset, Buffer); offset += 16;
WriteString(name, offset, Buffer); offset += 16;
WriteUInt32(level, offset, Buffer); offset += 4;
WriteUInt32(Class, offset, Buffer); offset += 4;
WriteUlong(mesh, offset, Buffer); offset += 8;
}
}
public void Reset()
{
current = 0;
}
public void Send(Client.GameState client)
{
client.Send(Buffer);
}
public byte[] ToArray()
{
return Buffer;
}
public void Deserialize(byte[] _buffer)
{
Buffer = _buffer;
if (Count == 0)
{
byte[] buffer = new byte[112];
Buffer.CopyTo(buffer, 0);
WriteUInt16(104, 0, buffer);
Buffer = buffer;
}
}
public void Append2(uint rank, uint amount, uint uid, string name, byte level, ushort Class, uint mesh, bool Main = false)
{
int offset = current * 80 + 24;
if (offset + 72 <= Buffer.Length)
{
current++;
Count = (uint)current;
Write(rank, offset, Buffer);
offset += 8;
Write(amount, offset, Buffer);
offset += 8;
if (Main)
Write((80000000 + rank) - 1, offset, Buffer);
else
Write(uid, offset, Buffer);
offset += 4;
Write(uid, offset, Buffer);
offset += 4;
Writer.Write(name, offset, Buffer);
offset += 16;
Writer.Write(name, offset, Buffer);
offset += 16;
Writer.Write(level, offset, Buffer);
offset += 4;
Writer.Write(Class, offset, Buffer);
offset += 4;
Writer.Write(mesh, offset, Buffer);
offset += 8;
}
}
}
}
الذين يشاهدون محتوى الموضوع الآن : 1 ( الأعضاء 0 والزوار 1) | |
أدوات الموضوع | |
|
الموضوع | كاتب الموضوع | المنتدى | مشاركات | آخر مشاركة |
حل مشكلة ايرور البرفكشن الي بييجي اول ما تفتح سورس Rayzo2 | Tefa | تطوير سيرفرات كونكر | 13 | 2022-01-06 11:02 PM |
البرفكشن | Tyranny-Team's | مشكلات السيرفيرات كونكر الشخصيه | 3 | 2021-08-11 03:51 AM |
بخصوص البرفكشن | salahsayed | مشكلات السيرفيرات كونكر الشخصيه | 8 | 2019-11-04 08:58 AM |
مشكلة في البرفكشن | manshestar | مشكلات السيرفيرات كونكر الشخصيه | 5 | 2019-07-31 08:08 AM |
التعديل على البرفكشن | Users | تطوير سيرفرات كونكر | 4 | 2019-07-14 01:04 PM |