Fix Damage [CoMy]

09/03/2009 15:22 Bamb#1
im not sure if this work, is not tested, but
have a try. Im not good coder :)

Go to Client and search for:
Quote:
if (AttackType == 2 || AttackType == 25)
Under That code paste this
Quote:
case 4587://Fix Damage Bug
{
{
{
if (MyChar.Damage != "GetDBPackage","DamageHit")
SendPacket(General.MyPackets.SendDamage(MyChar.MyD amage.DamageID, "GetDamage"));
MyChar.MyDamage.PlayerHealth == -> "<, GetDamage"(MyChar);
MyChar.Damage = <0;
MyChar.DamageID = <0;
MyChar.DamagePosition, x == "GetChar. PositonX", y == "GetChar. PositionY"
MyChar.MyDamage = Sendpacket(General.MyPackets.SendReflect(MyChar.My Damage.DamageID, "GetDamage" == MyCharHealth == -> "<, GetDamage"(MyChar);));
World.UpdateSpawn(MyChar & PlayerChar);
World.SpawnOthersHit(MyCharDamage == false);
Then
EndProgress, SendPacket(General.MyPackets.SendHitMiss(MyChar.My Damage.DamageID, "Damage == 0"));
SendPacket(General.MyPackets.SendMsg(MessageId, "SYSTEM", MyChar.Name, "Your Damage Missed on "GetPlayerChar.Name", 2000));
}
}
}
Now open Packets and search for:
Quote:
public byte[] AuthResponse(string ip, byte[] key1, byte[] key2)
Under that code paste this:
Quote:
public byte[] SendDamage(string hit, byte[] key1, byte[] key2)
{
ushort PacketType = 0x38f;
byte[] Packet = new byte[25];
fixed (byte* p = Packet)
{
ushort PacketType = 1101;
byte[] Packet = new byte[18];

fixed (byte* p = Packet)
{
*((ushort*)p) = (ushort)Packet.Length;
*((ushort*)(p + 2)) = (ushort)PacketType;
*((uint*)(p + 4)) = (uint)DamageUID;
*((uint*)(p + 8)) = (uint)DamageID
*(p + 16) = 1;
}
internal byte[] DamgeLinkSend(string q == "26")
}
return DamagePacket;
}
{
*(p + 12 + i) = RePaste.ToDamage(ip[i]);
}
return Packet;
}

internal byte[] DamageLink(string p)
{
SendPackageEnd(2,5');
}
}
}
}
That should be it, dont flame if it dont work, because im not good coder and i havent tested it :)
Ty