Skip to content
Permalink
Browse files

action log win/loss/concede

  • Loading branch information...
Manuel-777 committed May 11, 2019
1 parent b552152 commit ae5af1648839fcc72e1caafda69ee813a1cd7a9e
Showing with 12 additions and 0 deletions.
  1. +12 −0 window_background/labels.js
@@ -8,6 +8,18 @@ function onLabelOutLogInfo(entry, json) {
currentMatch.opponent.cards = currentMatch.oppCardsUsed;

var payload = json.params.payloadObject;

let loserName = getNameBySeat(payload.winningTeamId == 1 ? 2 : 1);
if (payload.winningReason == "ResultReason_Concede") {
actionLog(-1, false, `${loserName} Conceded`);
}
if (payload.winningReason == "ResultReason_Timeout") {
actionLog(-1, false, `${loserName} Timed out`);
}

let playerName = getNameBySeat(payload.winningTeamId);
actionLog(-1, false, `${playerName} Wins!`);

var mid = payload.matchId + "-" + playerData.arenaId;
var time = payload.secondsCount;
if (mid == currentMatch.matchId) {

0 comments on commit ae5af16

Please sign in to comment.
You can’t perform that action at this time.