Added reporting of kills
This commit is contained in:
parent
e5c033c9ed
commit
6741d38923
1 changed files with 8 additions and 0 deletions
|
|
@ -73,6 +73,8 @@ namespace MosswartMassacre
|
|||
{
|
||||
try
|
||||
{
|
||||
WriteToChat($"[Debug] Chat Color: {e.Color}, Message: {e.Text}");
|
||||
|
||||
if (IsKilledByMeMessage(e.Text))
|
||||
{
|
||||
totalKills++;
|
||||
|
|
@ -86,6 +88,12 @@ namespace MosswartMassacre
|
|||
rareCount++;
|
||||
MainView.UpdateRareCount(rareCount);
|
||||
}
|
||||
if (e.Color == 18 && e.Text.EndsWith("!report\""))
|
||||
{
|
||||
string reportMessage = $"Total Kills: {totalKills}, Kills per Hour: {killsPerHour:F2}";
|
||||
WriteToChat($"[Mosswart Massacre] Reporting to allegiance: {reportMessage}");
|
||||
MyHost.Actions.InvokeChatParser($"/a {reportMessage}");
|
||||
}
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue