public override void Process(Level level) { var player = ResourcesManager.GetPlayer(ReportedPlayerID, false); ++player.GetPlayerAvatar().ReportedTimes; if (player.GetPlayerAvatar().ReportedTimes < 3) { return; } AvatarChatBanMessage c = new AvatarChatBanMessage(Client); int code = 1800; c.SetBanPeriod(code); c.Send(); }
internal override async void Process() { try { Level ReportedPlayer = await ResourcesManager.GetPlayer(ReportedPlayerID); ReportedPlayer.Avatar.ReportedTimes++; if (ReportedPlayer.Avatar.ReportedTimes >= 3) { AvatarChatBanMessage _AvatarChatBanMessage = new AvatarChatBanMessage(ReportedPlayer.Client); //_AvatarChatBanMessage.SetBanPeriod(86400); // A Day _AvatarChatBanMessage.SetBanPeriod(1800); // 30 Minutes _AvatarChatBanMessage.Send(); } } catch (Exception) { } }
public override async void Process(Level level) { try { Level ReportedPlayer = await ResourcesManager.GetPlayer(ReportedPlayerID); ReportedPlayer.GetPlayerAvatar().ReportedTimes++; if (ReportedPlayer.GetPlayerAvatar().ReportedTimes >= 3) { AvatarChatBanMessage _AvatarChatBanMessage = new AvatarChatBanMessage(ReportedPlayer.GetClient()); //_AvatarChatBanMessage.SetBanPeriod(86400); // A Day _AvatarChatBanMessage.SetBanPeriod(1800); // 30 Minutes PacketProcessor.Send(_AvatarChatBanMessage); } } catch (Exception) { } }