حل مشكلة الدم في سورس ايجي قهر
علشان يبقي السورس كامل باذن الله
صورة متحركة للتاكيد
علشان يبقي السورس كامل باذن الله
صورة متحركة للتاكيد
و يبقي كده الحمد لله مافيش اي مشاكل و السورس تمام
هيبقي كل اللي ينقصنا بس اضفات
اللي عايز يضيف يضيف و اللي مش عايز برحتوا
هنروح علي
Network\GamePackets\Update.cs
هنشلها كلها
و نحط
كود PHP:
namespace Conquer_Online_Server.Network.GamePackets{
using Conquer_Online_Server;
using Conquer_Online_Server.Client;
using Conquer_Online_Server.Game;
using Conquer_Online_Server.Interfaces;
using Conquer_Online_Server.Network;
using Conquer_Online_Server.ServerBase;
using System;
using System.Collections.Generic;
using System.Runtime.InteropServices;
public class Update : Writer, IPacket
{
public const byte Agility = 0x10;
public const byte Atributes = 10;
public const byte BoundConquerPoints = 0x2d;
private byte[] Buffer;
public const byte Class = 7;
public const byte ConquerPoints = 0x1d;
public const byte CursedTimer = 20;
public const byte DoubleExpTimer = 0x12;
public const byte EnlightPoints = 0x29;
public const byte Experience = 5;
public const byte ExtraBattlePower = 0x24;
public const byte HairStyle = 26;
public const byte HeavensBlessing = 0x11;
public const byte Hitpoints = 0;
public const byte HonorPoints = 0x2a;
public const byte Level = 12;
public const byte LuckyTimeTimer = 0x1c;
public const byte Mana = 2;
public const byte MaxHitpoints = 1;
public const byte MaxMana = 3;
public const byte Merchant = 0x26;
public const byte Mesh = 11;
private const byte minBufferSize = 0x20;
public const byte Money = 4;
public const byte OnlineTraining = 0x1f;
public const byte PKPoints = 6;
public const byte QuizPoints = 40;
public const byte HellPoints = 49;
public const byte Reborn = 0x16;
public const byte Spirit = 13;
public const byte Stamina = 8;
public const byte StatusFlag = 0x19;
public const byte Strength = 15;
public const byte VIPLevel = 0x27;
public const byte Vitality = 14;
public const byte WHMoney = 9;
public const byte XPCircle = 0x1b;
public Update(bool Create)
{
if (Create)
{
this.Buffer = new byte[40];
Writer.WriteUInt16(0x20, 0, this.Buffer);
Writer.WriteUInt16(0x2721, 2, this.Buffer);
}
}
public void Add2(uint type, uint value, uint value1, uint value2 = 0)
{
ushort offset = 12;
Writer.WriteUInt32(type, offset, this.Buffer);
Writer.WriteUInt32(value, offset + 4, this.Buffer);
Writer.WriteUInt32(value1, offset + 20, this.Buffer);
Writer.WriteUInt32(value2, offset + 0x18, this.Buffer);
}
public void Append(byte type, byte value)
{
this.UpdateCount++;
ushort offset = (ushort)(12 + ((this.UpdateCount - 1) * 20));
Writer.WriteUInt32(type, offset, this.Buffer);
Writer.WriteUInt64((ulong)value, offset + 4, this.Buffer);
// Writer.WriteUInt64(value, offset + 8, Buffer);
}
public void Append5(byte type, ushort value)
{
this.UpdateCount++;
ushort offset = (ushort)(12 + ((this.UpdateCount - 1) * 20));
Writer.WriteUInt32(type, offset, this.Buffer);
Writer.WriteUInt64((ulong)value, offset + 4, this.Buffer);
Writer.WriteUInt64((ulong)value, offset + 8, this.Buffer);
}
/// <summary>
/// //////////////////
//////////////////////
public void Append(byte type, ushort value)
{
this.UpdateCount++;
ushort offset = (ushort)(12 + ((this.UpdateCount - 1) * 20));
Writer.WriteUInt32(type, offset, this.Buffer);
Writer.WriteUInt64((ulong)value, offset + 4, this.Buffer);
// Writer.WriteUInt64(value, offset + 8, Buffer);
}
public void Append(byte type, uint value)
{
this.UpdateCount++;
ushort offset = (ushort)(12 + ((this.UpdateCount - 1) * 20));
Writer.WriteUInt32(type, offset, this.Buffer);
Writer.WriteUInt64((ulong)value, offset + 4, this.Buffer);
}
public void Append(byte type, ulong value)
{
this.UpdateCount++;
ushort offset = (ushort)(12 + ((this.UpdateCount - 1) * 20));
Writer.WriteUInt32(type, offset, this.Buffer);
Writer.WriteUInt64(value, offset + 4, this.Buffer);
}
public void Append(byte type, byte value, byte second, byte second2, byte second3, byte second4, byte second5, byte second6, byte second7)
{
this.UpdateCount++;
ushort offset = (ushort)(this.UpdateCount * 12);
Writer.WriteUInt32(type, offset, this.Buffer);
Writer.WriteUInt64((ulong)value, offset + 4, this.Buffer);
Writer.WriteByte(second, offset + 12, this.Buffer);
Writer.WriteByte(second2, offset + 13, this.Buffer);
Writer.WriteByte(second3, offset + 14, this.Buffer);
Writer.WriteByte(second4, offset + 15, this.Buffer);
Writer.WriteByte(second5, offset + 0x10, this.Buffer);
Writer.WriteByte(second6, offset + 0x11, this.Buffer);
Writer.WriteByte(second7, offset + 0x12, this.Buffer);
}
public void Append2(byte type, byte value)
{
this.UpdateCount++;
ushort offset = (ushort)(12 + ((this.UpdateCount - 1) * 20));
Writer.WriteUInt32(type, offset, this.Buffer);
Writer.WriteUInt64((ulong)value, offset + 12, this.Buffer);
}
public void Append2(byte type, ushort value)
{
this.UpdateCount++;
ushort offset = (ushort)(12 + ((this.UpdateCount - 1) * 20));
Writer.WriteUInt32(type, offset, this.Buffer);
Writer.WriteUInt64((ulong)value, offset + 12, this.Buffer);
}
public void Append2(byte type, uint value)
{
this.UpdateCount++;
ushort offset = (ushort)(12 + ((this.UpdateCount - 1) * 20));
Writer.WriteUInt32(type, offset, this.Buffer);
Writer.WriteUInt64((ulong)value, offset + 12, this.Buffer);
}
public void Append2(byte type, ulong value)
{
this.UpdateCount++;
ushort offset = (ushort)(12 + ((this.UpdateCount - 1) * 20));
Writer.WriteUInt32(type, offset, this.Buffer);
Writer.WriteUInt64(value, offset + 12, this.Buffer);
}
public void AppendFull(byte type, ulong val1, ulong val2)
{
this.UpdateCount++;
ushort offset = (ushort)(12 + ((this.UpdateCount - 1) * 20));
Writer.WriteUInt32(type, offset, this.Buffer);
Writer.WriteUInt64(val1, offset + 4, this.Buffer);
Writer.WriteUInt64(val2, offset + 12, this.Buffer);
}
public void AzureShield(Entity Entity, int Dmg, byte SpellLevel, byte Time_)
{
byte[] buffer = new byte[60];
Writer.WriteUInt16(0x34, 0, buffer);
Writer.WriteUInt16(0x2721, 2, buffer);
Writer.WriteUInt32(Entity.UID, 4, buffer);
Writer.WriteUInt32(2, 8, buffer);
Writer.WriteUInt32(0x19, 12, buffer);
Writer.WriteUInt64(Entity.StatusFlag2, 0x18, buffer);
Writer.WriteUInt32(0x31, 0x20, buffer);
Writer.WriteUInt32(0x5d, 0x24, buffer);
Writer.WriteUInt32(Time_, 40, buffer);
Writer.WriteUInt32((uint)Dmg, 0x2c, buffer);
Writer.WriteUInt32(SpellLevel, 0x30, buffer);
if (Kernel.GamePool.ContainsKey(Entity.UID))
{
Kernel.GamePool[Entity.UID].Send(buffer);
}
}
public void Clear()
{
byte[] buffer = new byte[40];
Writer.WriteUInt16(0x20, 0, this.Buffer);
Writer.WriteUInt16(0x2721, 2, this.Buffer);
Writer.WriteUInt32(this.UID, 4, buffer);
this.Buffer = buffer;
}
public void Deserialize(byte[] buffer)
{
this.Buffer = buffer;
}
public void Send(GameState client)
{
client.Send(this.Buffer);
}
public void SoulShackle(Entity Entity, int Dmg, byte SpellLevel, byte Time_)
{
byte[] buffer = new byte[60];
Writer.WriteUInt16(0x34, 0, buffer);
Writer.WriteUInt16(0x2721, 2, buffer);
Writer.WriteUInt32(Entity.UID, 4, buffer);
Writer.WriteUInt32(2, 8, buffer);
Writer.WriteUInt32(0x19, 12, buffer);
Writer.WriteUInt64(Entity.StatusFlag2, 0x18, buffer);
Writer.WriteUInt32(0x36, 0x20, buffer);
Writer.WriteUInt32(0x71, 0x24, buffer);
Writer.WriteUInt32(Time_, 40, buffer);
Writer.WriteUInt32((uint)Dmg, 0x2c, buffer);
Writer.WriteUInt32(SpellLevel, 0x30, buffer);
if (Kernel.GamePool.ContainsKey(Entity.UID))
{
Kernel.GamePool[Entity.UID].Send(buffer);
}
}
public void Blackspot(Entity Entity, bool activate)
{
byte[] buffer = new byte[12 + 8];
Writer.WriteUInt16(12, 0, buffer);
Writer.WriteUInt16(2081, 2, buffer);
Writer.WriteInt32(activate == true ? 0 : 1, 4, buffer);
Writer.WriteUInt32(Entity.UID, 8, buffer);
if (Entity.EntityFlag == EntityFlag.Monster)
{
Entity.MonsterInfo.SendScreen(buffer);
}
else
{
Entity.Owner.SendScreen(buffer, true);
Entity.Owner.Send(buffer);
}
}
public byte[] ToArray()
{
return this.Buffer;
}
public uint self
{
get
{
return Conquer_Online_Server.BitConverter.ToUInt32(this.Buffer, 8);
}
set
{
Writer.WriteUInt32(value, 8, this.Buffer);
}
}
public uint UID
{
get
{
return Conquer_Online_Server.BitConverter.ToUInt32(this.Buffer, 4);
}
set
{
Writer.WriteUInt32(value, 4, this.Buffer);
}
}
public uint UpdateCount
{
get
{
return Conquer_Online_Server.BitConverter.ToUInt32(this.Buffer, 8);
}
set
{
byte[] array = new byte[40 + (20 * value)];
this.Buffer.CopyTo(array, 0);
Writer.WriteUInt16((ushort)(0x20 + (20 * value)), 0, array);
this.Buffer = array;
Writer.WriteUInt32(value, 8, this.Buffer);
}
}
public List<UpdateStruct> Updates
{
get
{
List<UpdateStruct> list = new List<UpdateStruct>();
ushort offset = 12;
if (this.UpdateCount > 0)
{
for (int i = 0; i < this.UpdateCount; i++)
{
UpdateStruct item = new UpdateStruct
{
Type = Conquer_Online_Server.BitConverter.ToUInt32(this.Buffer, offset)
};
offset = (ushort)(offset + 4);
item.Value1 = Conquer_Online_Server.BitConverter.ToUInt64(this.Buffer, offset);
offset = (ushort)(offset + 8);
item.Value2 = Conquer_Online_Server.BitConverter.ToUInt64(this.Buffer, offset);
offset = (ushort)(offset + 8);
list.Add(item);
}
}
return list;
}
}
public class Effects
{
public const ulong BlackBeard = 13L;
public const ulong BombUsage = 0x3dL;
public const ulong EagleEye = 0x18L;
public const ulong GunReloading = 0x79L;
public const ulong KrackenRevenge = 0x1dL;
}
public class Flags
{
public const ulong Ball = 0x80000L;
public const ulong Ball2 = 0x100000L;
public const ulong BlackName = 0x8000L;
public const ulong CastPray = 0x40000000L;
public const ulong ChaosCycle = 0x1000000000000000L;
public const ulong Cyclone = 0x800000L;
public const ulong Dazed = 0x40000000000000L;
public const ulong Dead = 0x20L;
public const ulong Dodge = 0x4000000L;
public const ulong FadeAway = 0x800L;
public const ulong FatalStrike = 0x800000000000L;
public const ulong FlashingName = 1L;
public const ulong Flashy = 0x1000000000000L;
public const ulong Fly = 0x8000000L;
public const ulong Freeze = 0x800000000000000L;
public const ulong Ghost = 0x400L;
public const ulong GodlyShield = 0x200000000000000L;
public const ulong HeavenBlessing = 0x200000000L;
public const ulong Intensify = 0x10000000L;
public const ulong Invisibility = 0x400000L;
public const ulong Invisible = 4L;
public const ulong MagicShield = 0x100L;
public const ulong MonthlyPKChampion = 0x1000000000L;
public const ulong MoveSpeedRecovered = 0x100000000000000L;
public const ulong Normal = 0L;
public const ulong OrangeSparkles = 0x10000000000000L;
public const ulong Poisoned = 2L;
public const ulong Praying = 0x80000000L;
public const ulong PurpleSparkles = 0x20000000000000L;
public const ulong RedName = 0x4000L;
public const ulong ReflectMelee = 0x20000L;
public const ulong RestoreAura = 0x80000000000000L;
public const ulong Ride = 0x4000000000000L;
public const ulong ShockDaze = 0x400000000000000L;
public const ulong ShurikenVortex = 0x400000000000L;
public const ulong StarOfAccuracy = 0x80L;
public const ulong Stigma = 0x200L;
public const ulong Superman = 0x40000L;
public const ulong TeamLeader = 0x40L;
public const ulong TopArcher = 0x10000000000L;
public const ulong TopDeputyLeader = 0x800000000L;
public const ulong TopFireTaoist = 0x40000000000L;
public const ulong TopGuildLeader = 0x400000000L;
public const ulong TopNinja = 0x80000000000L;
public const ulong TopSpouse = 0x8000000000000L;
public const ulong TopTrojan = 0x8000000000L;
public const ulong TopWarrior = 0x4000000000L;
public const ulong TopWaterTaoist = 0x20000000000L;
public const ulong WeeklyPKChampion = 0x2000000000L;
public const ulong XPList = 0x10L;
public const ulong TopPirate = 44;
public const ulong TopMonk = 1125899906842624;
}
public class Flags2
{
// public const ulong CannonBarrage = 0x50000000000000L;
public const ulong AzureShield = 0x20000000L;
public const ulong AzureShieldFade = 0x40000000L;
public const ulong BlueRestoreAura = 0x80000000000000L;
public const ulong CaryingFlag = 0x80000000L;
public const ulong ChainBoltActive = 0x10000000L;
public const ulong Confused = 0x1000000000000000L;
public const ulong Contestant = 0x8000000L;
public const ulong Dazed = 0x40000000000000L;
public const ulong EarthAura = 0x400000000000L;
public const ulong FendAura = 0x1000000000L;
public const ulong FireAura = 0x100000000000L;
public const ulong HUGEDazed = 0x400000000000000L;
public const ulong IceBlock = 0x800000000000000L;
public const ulong LionShield = 0x200000000000000L;
public const ulong LowVigorUnableToJump = 0x4000000000000L;
public const ulong MetalAura = 0x4000000000L;
public const ulong MonthlyTop8Pk = 8L;
public const ulong MontlyTop2Pk = 0x10L;
public const ulong MontlyTop3Pk = 0x20L;
public const ulong MoveSpeedRecovered = 0x100000000000000L;
public const ulong Oblivion = 0x1000000000000L;
public const ulong OrangeHaloGlow = 0x1000000000000L;
public const ulong PurpleSparkle = 0x20000000000000L;
public const ulong SoulShackle = 0x800000000000L;
public const ulong SparkleHalo = 0x10000000000000L;
public const ulong SuperShieldHalo = 0x200000000000000L;
public const ulong Top2Archer = 0x400000L;
public const ulong Top2Fire = 0x80L;
public const ulong Top2Monk = 0x10000000000000L;
public const ulong Top2Ninja = 0x2000L;
public const ulong Top2SpouseBlue = 0x2000000L;
public const ulong Top2Trojan = 0x80000L;
public const ulong Top2Warrior = 0x10000L;
public const ulong Top2Water = 0x400L;
public const ulong Top3Archer = 0x800000L;
public const ulong Top3Fire = 0x100L;
public const ulong Top3Monk = 0x20000000000000L;
public const ulong Top3Ninja = 0x4000L;
public const ulong Top3SpouseBlue = 0x1000000L;
public const ulong Top3SpouseYellow = 0x4000000L;
public const ulong Top3Trojan = 0x100000L;
public const ulong Top3Warrior = 0x20000L;
public const ulong Top3Water = 0x800L;
public const ulong Top8Archer = 0x200000L;
public const ulong Top8Fire = 0x40L;
public const ulong Top8Monk = 0x8000000000000L;
public const ulong Top8Ninja = 0x1000L;
public const ulong Top8Trojan = 0x40000L;
public const ulong Top8Warrior = 0x8000L;
public const ulong Top8Water = 0x200L;
public const ulong TopPirate = 0x400000000000000;
public const ulong Top8Pirate = 0x800000000000000;
public const ulong Top2Pirate = 0x1000000000000000;
public const ulong Top3Pirate = 0x2000000000000000;
public const ulong TopMonk = 0x4000000000000L;
public const ulong TopSpouse = 0x8000000000000L;
public const ulong TyrantAura = 0x400000000L;
public const ulong WaterAura = 0x40000000000L;
public const ulong WeeklyTop2PkBlue = 4L;
public const ulong WeeklyTop2PkGold = 2L;
public const ulong WeeklyTop8Pk = 1L;
public const ulong LikeFatalStrike = 1UL << (ushort)120; //PirateXP
public const ulong LikeFatalStrike2 = 1UL << (ushort)121; //PirateXP
public const ulong WoodAura = 0x10000000000L;
}
[StructLayout(LayoutKind.Sequential)]
public struct UpdateStruct
{
public uint Type;
public ulong Value1;
public ulong Value2;
}
public static byte boundCPS { get; set; }
}
}
صورة متحركة للتاكيد
0 التعليقات:
إرسال تعليق