From 9ea2973aa27677cfbba8bfed07fd455fe7d3eb88 Mon Sep 17 00:00:00 2001 From: Crowns3bc <44653214+Crowns3bc@users.noreply.github.com> Date: Fri, 9 Jan 2026 01:54:26 -0700 Subject: [PATCH] new kill credit emit added a new socket emit "kill_credit" to be able to better log kills you actually get credit for --- node/server.js | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/node/server.js b/node/server.js index 1119147..1653e37 100644 --- a/node/server.js +++ b/node/server.js @@ -2392,6 +2392,9 @@ function issue_monster_awards(monster) { var current = players[name_to_id[name]]; var share = max(0, monster.points[name]) / total; if (current && share > 0.0025) { + current.socket.emit("kill_credit", { + mtype: monster.type, + }); // && current.map==monster.map if (monster.rbuff && G.conditions[monster.rbuff]) { current.s[monster.rbuff] = { ms: G.conditions[monster.rbuff].duration }; @@ -2438,6 +2441,10 @@ function issue_monster_award(monster) { stats.kills[monster.type]++; drop_something(player, monster); if (!player.party) { + player.socket.emit("kill_credit", { + mtype: monster.type, + }); + if (monster.rbuff && G.conditions[monster.rbuff]) { player.s[monster.rbuff] = { ms: G.conditions[monster.rbuff].duration }; } @@ -2470,6 +2477,10 @@ function issue_monster_award(monster) { // xp=round(xp); parties[player.party].forEach(function (name) { var current = players[name_to_id[name]]; + if (!current) return; + current.socket.emit("kill_credit", { + mtype: monster.type, + }); var cxp = round(xp * current.xpm * current.share); if (monster.rbuff && G.conditions[monster.rbuff]) { current.s[monster.rbuff] = { ms: G.conditions[monster.rbuff].duration };