mirror of
https://github.com/Melledy/LunarCore.git
synced 2025-12-13 13:54:37 +01:00
anti-scam packet
This commit is contained in:
File diff suppressed because it is too large
Load Diff
@@ -7,6 +7,7 @@ import emu.lunarcore.server.packet.PacketHandler;
|
||||
import emu.lunarcore.server.packet.send.PacketDailyActiveInfoNotify;
|
||||
import emu.lunarcore.server.packet.send.PacketBattlePassInfoNotify;
|
||||
import emu.lunarcore.server.packet.send.PacketGetArchiveDataScRsp;
|
||||
import emu.lunarcore.server.packet.send.PacketServerAnnounceNotify;
|
||||
|
||||
@Opcodes(CmdId.PlayerLoginFinishCsReq)
|
||||
public class HandlerPlayerLoginFinishCsReq extends PacketHandler {
|
||||
@@ -15,7 +16,7 @@ public class HandlerPlayerLoginFinishCsReq extends PacketHandler {
|
||||
public void handle(GameSession session, byte[] data) throws Exception {
|
||||
session.send(CmdId.PlayerLoginFinishScRsp);
|
||||
session.send(new PacketBattlePassInfoNotify());
|
||||
// session.send(new PacketDailyActiveInfoNotify(session.getPlayer()));
|
||||
session.send(new PacketServerAnnounceNotify());
|
||||
session.send(new PacketGetArchiveDataScRsp());
|
||||
}
|
||||
|
||||
|
||||
@@ -0,0 +1,28 @@
|
||||
package emu.lunarcore.server.packet.send;
|
||||
|
||||
import emu.lunarcore.proto.ServerAnnounceNotifyOuterClass.ServerAnnounceNotify;
|
||||
import emu.lunarcore.proto.ServerAnnounceNotifyOuterClass.ServerAnnounceNotify.AnnounceData;
|
||||
import emu.lunarcore.server.packet.BasePacket;
|
||||
import emu.lunarcore.server.packet.CmdId;
|
||||
|
||||
public class PacketServerAnnounceNotify extends BasePacket {
|
||||
|
||||
public PacketServerAnnounceNotify() {
|
||||
super(CmdId.ServerAnnounceNotify);
|
||||
|
||||
AnnounceData announceData = AnnounceData.newInstance()
|
||||
.setBeginTime(0L)
|
||||
.setEndTime(9999999999999L)
|
||||
.setCountDownText("LUNARCORE IS A FREE SOFTWARE. IF YOU PAID FOR IT, YOU HAVE BEEN SCAMMED! lunarcore 是一款免费软件。如果你花钱买了它,那你就被骗了!")
|
||||
.setCenterSystemFrequency(100)
|
||||
.setCountDownFrequency(1)
|
||||
.setIsCenterSystemLast5EveryMinutes(true)
|
||||
.setConfigId(0);
|
||||
|
||||
var data = ServerAnnounceNotify.newInstance()
|
||||
.addAnnounceDataList(announceData);
|
||||
|
||||
this.setData(data);
|
||||
}
|
||||
|
||||
}
|
||||
Reference in New Issue
Block a user