المساعد الشخصي الرقمي

مشاهدة النسخة كاملة : مطلوب سيستم MsgFilter


ToRWadA
2019-07-23, 10:17 AM
انا عاوز نظام الMsgFilter لانو ناقص في سيرفري ومش عارف اسحبو من اي سورس

عفواً لايمكن عرض الروابط في الإرشيف

Tefa
2019-07-23, 09:43 PM
لو سورس مسج

ضيف ده في MsgAction
case Mode.AddPersonToBlackList:
{
var targetname = System.Text.UnicodeEncoding.UTF8.GetString(packet, 43, packet[42]).Replace("/0", "");
foreach (var person in Kernel.GamePool.Values)
{
if (person.Player.Name == targetname)
{
if (!client.Player.BlackList.Contains(targetname))
{
client.Player.BlackList.Add(targetname);
gData.UID = client.Player.UID;//8
gData.dwParam = 1;//12
gData.TimeStamp = Time32.Now;//20
gData.ID = Mode.AddPersonToBlackList;//24
gData.Unknown2 = 1;//41
gData.DailyQuestWordLenght = packet[42];//42
gData.DailyQuestWord = targetname;//43
gData.Send(client);

}
}
}
break;

}


و ده عشان تشيلك من بلاك ليست
case Mode.RemovePersonFromBlackList:
{
var targetname = System.Text.UnicodeEncoding.UTF8.GetString(packet, 43, packet[42]).Replace("/0", "");
if (client.Player.BlackList.Contains(targetname))
{
client.Player.BlackList.Remove(targetname);
gData.UID = client.Player.UID;//8
gData.dwParam = 1;//12
gData.TimeStamp = Time32.Now;//20
gData.ID = Mode.RemovePersonFromBlackList;//24
gData.Unknown2 = 1;//41
gData.DailyQuestWordLenght = packet[42];
gData.DailyQuestWord = targetname;//43
gData.Send(client);
}
break;
}

لو سورس عادي
سيرش علي private static void HandleData(

تحته ضيف
case 440:
{
var targetname = System.Text.UnicodeEncoding.UTF8.GetString(packet, 43, packet[42]).Replace("/0", "");
foreach (var person in Kernel.GamePool.Values)
{
if (person.Entity.Name == targetname)
{
if (!client.Entity.BlackList.Contains(targetname))
{
client.Entity.BlackList.Add(targetname);
gData.UID = client.Entity.UID;//8
gData.dwParam = 1;//12
gData.TimeStamp = Time32.Now;//20
gData.ID = 440;//24
gData.Unknown2 = 1;//41//43
gData.Send(client);

}
}
}
break;
}
و دي عشان تشيله من اللسته
case 441:
{
var targetname = System.Text.UnicodeEncoding.UTF8.GetString(packet, 43, packet[42]).Replace("/0", "");
if (client.Entity.BlackList.Contains(targetname))
{
client.Entity.BlackList.Remove(targetname);
gData.UID = client.Entity.UID;//8
gData.dwParam = 1;//12
gData.TimeStamp = Time32.Now;//20
gData.ID = 441;//24
gData.Unknown2 = 1;//41
gData.Send(client);
}
break;
}
لو جالك ايرور في player بدلها ل entity

karem1q
2023-10-11, 09:57 PM
لو سورس مسج

ضيف ده في msgaction
case mode.addpersontoblacklist:
{
var targetname = system.text.unicodeencoding.utf8.getstring(packet, 43, packet[42]).replace("/0", "");
foreach (var person in kernel.gamepool.values)
{
if (person.player.name == targetname)
{
if (!client.player.blacklist.contains(targetname))
{
client.player.blacklist.add(targetname);
gdata.uid = client.player.uid;//8
gdata.dwparam = 1;//12
gdata.timestamp = time32.now;//20
gdata.id = mode.addpersontoblacklist;//24
gdata.unknown2 = 1;//41
gdata.dailyquestwordlenght = packet[42];//42
gdata.dailyquestword = targetname;//43
gdata.send(client);

}
}
}
break;

}


و ده عشان تشيلك من بلاك ليست
case mode.removepersonfromblacklist:
{
var targetname = system.text.unicodeencoding.utf8.getstring(packet, 43, packet[42]).replace("/0", "");
if (client.player.blacklist.contains(targetname))
{
client.player.blacklist.remove(targetname);
gdata.uid = client.player.uid;//8
gdata.dwparam = 1;//12
gdata.timestamp = time32.now;//20
gdata.id = mode.removepersonfromblacklist;//24
gdata.unknown2 = 1;//41
gdata.dailyquestwordlenght = packet[42];
gdata.dailyquestword = targetname;//43
gdata.send(client);
}
break;
}

لو سورس عادي
سيرش علي private static void handledata(

تحته ضيف
case 440:
{
var targetname = system.text.unicodeencoding.utf8.getstring(packet, 43, packet[42]).replace("/0", "");
foreach (var person in kernel.gamepool.values)
{
if (person.entity.name == targetname)
{
if (!client.entity.blacklist.contains(targetname))
{
client.entity.blacklist.add(targetname);
gdata.uid = client.entity.uid;//8
gdata.dwparam = 1;//12
gdata.timestamp = time32.now;//20
gdata.id = 440;//24
gdata.unknown2 = 1;//41//43
gdata.send(client);

}
}
}
break;
}
و دي عشان تشيله من اللسته
case 441:
{
var targetname = system.text.unicodeencoding.utf8.getstring(packet, 43, packet[42]).replace("/0", "");
if (client.entity.blacklist.contains(targetname))
{
client.entity.blacklist.remove(targetname);
gdata.uid = client.entity.uid;//8
gdata.dwparam = 1;//12
gdata.timestamp = time32.now;//20
gdata.id = 441;//24
gdata.unknown2 = 1;//41
gdata.send(client);
}
break;
}
لو جالك ايرور في player بدلها ل entity
تسلم ايدك يا ريدر