File tree Expand file tree Collapse file tree 1 file changed +7
-0
lines changed Expand file tree Collapse file tree 1 file changed +7
-0
lines changed Original file line number Diff line number Diff line change @@ -104,6 +104,9 @@ static Character *get_avatar_or_follower( const character_id &id )
104
104
return nullptr ;
105
105
}
106
106
107
+ // Legacy value, maintained until kill_xp rework/removal from dependent in-repo mods
108
+ static constexpr int npc_kill_xp = 10 ;
109
+
107
110
void kill_tracker::notify ( const cata::event &e )
108
111
{
109
112
switch ( e.type () ) {
@@ -112,6 +115,8 @@ void kill_tracker::notify( const cata::event &e )
112
115
if ( Character *killer = get_avatar_or_follower ( killer_id ) ) {
113
116
const mtype_id victim_type = e.get <mtype_id>( " victim_type" );
114
117
kills[victim_type]++;
118
+ // Legacy value update, maintained until kill_xp rework/removal from dependent in-repo mods
119
+ killer->kill_xp += e.get <int >( " exp" );
115
120
victim_type.obj ().families .practice_kill ( *killer );
116
121
}
117
122
break ;
@@ -122,6 +127,8 @@ void kill_tracker::notify( const cata::event &e )
122
127
if ( get_avatar_or_follower ( killer_id ) ) {
123
128
const std::string victim_name = e.get <cata_variant_type::string>( " victim_name" );
124
129
npc_kills.push_back ( victim_name );
130
+ // Legacy value update, maintained until kill_xp rework/removal from dependent in-repo mods
131
+ killer->kill_xp += npc_kill_xp;
125
132
}
126
133
break ;
127
134
}
You can’t perform that action at this time.
0 commit comments