diff --git a/core/achievement.js b/core/achievement.js index 68dc482f..20e32603 100644 --- a/core/achievement.js +++ b/core/achievement.js @@ -211,9 +211,12 @@ class Achievements { StatLog.incrementUserStat(info.client.user, UserProps.AchievementTotalCount, 1); StatLog.incrementUserStat(info.client.user, UserProps.AchievementTotalPoints, info.details.points); + const cleanTitle = stripMciColorCodes(localInterruptItem.title); + const cleanText = stripMciColorCodes(localInterruptItem.achievText); + const recordData = [ info.client.user.userId, info.achievementTag, getISOTimestampString(info.timestamp), info.matchField, - stripMciColorCodes(localInterruptItem.title), stripMciColorCodes(localInterruptItem.achievText), info.details.points, + cleanTitle, cleanText, info.details.points, ]; UserDb.run( @@ -231,6 +234,8 @@ class Achievements { user : info.client.user, achievementTag : info.achievementTag, points : info.details.points, + title : cleanTitle, + text : cleanText, } ); diff --git a/core/system_events.js b/core/system_events.js index 173f753b..129dacfd 100644 --- a/core/system_events.js +++ b/core/system_events.js @@ -23,5 +23,5 @@ module.exports = { UserSendNodeMsg : 'codes.l33t.enigma.system.user_send_node_msg', // { ..., global } UserStatSet : 'codes.l33t.enigma.system.user_stat_set', // { ..., statName, statValue } UserStatIncrement : 'codes.l33t.enigma.system.user_stat_increment', // { ..., statName, statIncrementBy, statValue } - UserAchievementEarned : 'codes.l33t.enigma.system.user_achievement_earned', // { ..., achievementTag, points } + UserAchievementEarned : 'codes.l33t.enigma.system.user_achievement_earned', // { ..., achievementTag, points, title, text } };