Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- بدل دول بلي عندك
- public static unsafe void Interaction(this ServerSockets.Packet stream, InteractQuery* pQuery, bool AutoAttack)
- {
- stream.ReadUnsafe(pQuery, sizeof(InteractQuery));
- if (pQuery->AtkType == AttackID.Magic && AutoAttack == false)
- {
- DecodeMagicAttack(pQuery);
- }
- }
- public static unsafe ServerSockets.Packet InteractionCreate(this ServerSockets.Packet stream, InteractQuery* pQuery)
- {
- stream.InitWriter();
- stream.WriteUnsafe(pQuery, sizeof(InteractQuery));
- stream.Finalize(GamePackets.Attack);
- return stream;
- }
- private static unsafe void DecodeMagicAttack(InteractQuery* pQuery)
- {
- int magicType, magicLevel;
- BitUnfold32(pQuery->Damage, out magicType, out magicLevel);
- magicType = (ushort)(ExchangeShortBits(((ushort)magicType ^ (uint)pQuery->UID ^ 0x915d), 16 - 3) + 0x14be);
- magicLevel = (ushort)(((byte)magicLevel) ^ 0x21);
- pQuery->Damage = BitFold32(magicType, magicLevel);
- pQuery->OpponentUID = (uint)((ExchangeLongBits((uint)pQuery->OpponentUID, 13) ^ (uint)pQuery->UID ^ 0x5f2d2463) + 0x8b90b51a);
- pQuery->X = (ushort)(ExchangeShortBits(((ushort)pQuery->X ^ (uint)pQuery->UID ^ 0x2ed6), 16 - 1) + 0xdd12);
- pQuery->Y = (ushort)(ExchangeShortBits(((ushort)pQuery->Y ^ (uint)pQuery->UID ^ 0xb99b), 16 - 5) + 0x76de);
- }
- ولول جالك ايرور ف كود شبه ده
- خليه كده
- stream.Interaction(&Attack, user.OnAutoAttack);
Advertisement
Add Comment
Please, Sign In to add comment