Block Asia join EU Party

05/26/2018 00:31 sonzenbi#1
I want the characters in the two races can not join party
I guess that is 0x7060 opcodes .
anyone have some suggestions ?
Thannks:handsdown:
05/26/2018 16:40 sarkoplata#2
as far as I remember party invite packets (not party matching) work with UniqueID, so you'll have to store every uniqueID in the server to some big hashtable, and check the race

the party matching packets probably have some kind of race/refobjid data, so should be easy. When someone tries to join your party through party matching, player won't be able to accept if incoming player is not from the same race. (a little lame)

better solution would be to keep all parties in an hashtable as well and block the request from the beginning.
05/26/2018 22:59 sonzenbi#3
I succeeded in blocking at packet 0x7060 and 0x7062
Quote:
#region 0x7060_PARTY_ADD_MEMBER
else if (opcode == 0x7060)
{
#region ASI JOIN PT EU
if (FilterMain.ASI_JOIN_GRPARTY)
{
uint Target = _pck.ReadUInt32();
int race = Task.Run(async () => await sqlCon.prod_int($"EXEC [{FilterMain.sql_db}].[dbo].[_FindRaceByUniqueID] '{Target}'")).Result;
if (this.Chinese)
{
if (race == 0)
{
this.SendNotice("CHINA_PARTY_EU");
continue;
}
}
else
{
if (race == 1)
{
this.SendNotice("CHINA_PARTY_EU");
continue;
}
}
}
But i'm having trouble at 0x706D
Quote:
else if (opcode == 0x706D)
{
#region ASI JOIN PT EU 2
if (FilterMain.ASI_JOIN_GRPARTY)
{
string Target = _pck.ReadAscii(); // Charname
int race = Task.Run(async () => await sqlCon.prod_int($"EXEC [{FilterMain.sql_db}].[dbo].[_FindRaceByCharname] '{Target}'")).Result;
if (this.Chinese)
...
Did I miss something?

PVP is charname
Code:
[S -> C][706D]
13 00 00 00                                       ................
03 00 00 00                                       ................
1F 00 00 00                                       ................
00 00 00 00                                       ................
00 00 00 00                                       ................
04                                                ................
FF                                                ................
03 00 00 00                                       ................
03 00                                             ................
50 56 50                                          PVP.............
73 07 00 00                                       s...............
6E                                                n...............
AA                                                ................
99 66                                             .f..............
71 03                                             q...............
96 FF                                             ................
49 05                                             I...............
01 00 01 00                                       ................
00 00                                             ................
04                                                ................
00 00 00 00                                       ................
00 00 00 00
05/27/2018 00:49 sarkoplata#4
there are lots of bytes before charname, you must read them first?
btw i think that first DWORD is ModelID, make your checks with that, don't waste performance with an unnecessary sql query...
05/27/2018 02:30 B1Q#5
i recently parsed 706D for my ecsro server
the structure looks identical

Code:
                uint requesterID = pck.ReadUInt();
                uint requestModel = pck.ReadUInt();
                uint partyNumber = pck.ReadUInt();
                uint randomNumber = pck.ReadUInt();
                pck.ReadUInt(); // random #2
                byte flag = pck.ReadByte();
                uint uniqueID = pck.ReadUInt();
                string charname = pck.ReadAscii();
                uint model = pck.ReadUInt();
                byte requesterLevel = pck.ReadByte();
                byte random3 = pck.ReadByte();
                ushort requesterRegion = pck.ReadUShort();
                ushort posX = pck.ReadUShort();
                ushort posY = pck.ReadUShort();
                ushort posZ = pck.ReadUShort();
                string guildName = pck.ReadAscii();
to accept / deny

Code:
                Packet accept = new Packet(0x306E);
                accept.WriteUInt(requesterID);
                accept.WriteUInt(requestModel);
                accept.WriteByte(1); // 1 for accept 0 for decline
                client.Send(accept, Direction.Server);